mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Initial strict type fixes
This commit is contained in:
parent
6a5e5d5143
commit
d9749dd3bf
|
|
@ -70,12 +70,12 @@ class Auth
|
|||
/**
|
||||
* Authenticates user.
|
||||
*
|
||||
* @return bool
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function authenticate() : bool
|
||||
public function authenticate()
|
||||
{
|
||||
$uid = $this->session->get('UID');
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ class Grammar extends GrammarAbstract
|
|||
|
||||
return $this->valueQuotes . $value . $this->valueQuotes;
|
||||
} elseif (is_int($value)) {
|
||||
return $value;
|
||||
return (string) $value;
|
||||
} elseif (is_array($value)) {
|
||||
$values = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class HttpSession implements SessionInterface
|
|||
session_id($sid);
|
||||
}
|
||||
|
||||
session_set_cookie_params($liftetime, '/', null, false, true);
|
||||
session_set_cookie_params($liftetime, '/', '', false, true);
|
||||
session_start();
|
||||
$this->sessionData = $_SESSION;
|
||||
$_SESSION = null;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class File extends FileAbstract implements FileInterface
|
|||
|| (!$exists && ($mode & ContentPutMode::CREATE) === ContentPutMode::CREATE)
|
||||
) {
|
||||
if (!Directory::exists(dirname($path))) {
|
||||
Directory::create(dirname($path), '0644', true);
|
||||
Directory::create(dirname($path), 0644, true);
|
||||
}
|
||||
|
||||
$stream = fopen('data://temp,' . $content, 'r');
|
||||
|
|
@ -276,7 +276,7 @@ class File extends FileAbstract implements FileInterface
|
|||
|
||||
if ($overwrite || !self::exists($to)) {
|
||||
if (!Directory::exists(dirname($to))) {
|
||||
Directory::create(dirname($to), '0644', true);
|
||||
Directory::create(dirname($to), 0644, true);
|
||||
}
|
||||
|
||||
return ftp_rename($con, $from, $to);
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create(string $path, string $permission = '0644', bool $recursive = false) : bool
|
||||
public static function create(string $path, int $permission = 0644, bool $recursive = false) : bool
|
||||
{
|
||||
if (!file_exists($path)) {
|
||||
mkdir($path, $permission, $recursive);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class File extends FileAbstract implements FileInterface
|
|||
|| (!$exists && ($mode & ContentPutMode::CREATE) === ContentPutMode::CREATE)
|
||||
) {
|
||||
if (!Directory::exists(dirname($path))) {
|
||||
Directory::create(dirname($path), '0644', true);
|
||||
Directory::create(dirname($path), 0644, true);
|
||||
}
|
||||
|
||||
file_put_contents($path, $content);
|
||||
|
|
@ -259,7 +259,7 @@ class File extends FileAbstract implements FileInterface
|
|||
|
||||
if ($overwrite || !file_exists($to)) {
|
||||
if (!Directory::exists(dirname($to))) {
|
||||
Directory::create(dirname($to), '0644', true);
|
||||
Directory::create(dirname($to), 0644, true);
|
||||
}
|
||||
|
||||
copy($from, $to);
|
||||
|
|
@ -281,7 +281,7 @@ class File extends FileAbstract implements FileInterface
|
|||
|
||||
if ($overwrite || !file_exists($to)) {
|
||||
if (!Directory::exists(dirname($to))) {
|
||||
Directory::create(dirname($to), '0644', true);
|
||||
Directory::create(dirname($to), 0644, true);
|
||||
}
|
||||
|
||||
rename($from, $to);
|
||||
|
|
@ -347,7 +347,7 @@ class File extends FileAbstract implements FileInterface
|
|||
{
|
||||
if (!file_exists($path)) {
|
||||
if (!Directory::exists(dirname($path))) {
|
||||
Directory::create(dirname($path), '0644', true);
|
||||
Directory::create(dirname($path), 0644, true);
|
||||
}
|
||||
|
||||
if(!is_writable($path)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user