Initial strict type fixes

This commit is contained in:
Dennis Eichhorn 2017-01-25 17:38:23 +01:00
parent 6a5e5d5143
commit d9749dd3bf
6 changed files with 11 additions and 11 deletions

View File

@ -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');

View File

@ -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 = '';

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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)) {