From bfd53ecc095a5afd5e391896b2d5e7cec6472972 Mon Sep 17 00:00:00 2001 From: "CORP\\phedor" Date: Tue, 13 Feb 2018 12:15:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=82=D0=B8=D0=BF=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Database/Manager.php | 2 +- src/Tools/SQLStatementExtractor.php | 2 +- src/Validator/Rule/IsFile.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Database/Manager.php b/src/Database/Manager.php index b3a77e2..036710c 100644 --- a/src/Database/Manager.php +++ b/src/Database/Manager.php @@ -122,7 +122,7 @@ class Database_Manager if (isset($data['references'])) { $references = " REFERENCES ".$data['references']; } - if (isset($data["not_null"])&&$data["not_null"]) + if (isset($data["not_null"]) && $data["not_null"]) $constraint .=" NOT NULL"; $type = $data['type']; if (!$pg) { diff --git a/src/Tools/SQLStatementExtractor.php b/src/Tools/SQLStatementExtractor.php index 551ee85..180d779 100644 --- a/src/Tools/SQLStatementExtractor.php +++ b/src/Tools/SQLStatementExtractor.php @@ -121,7 +121,7 @@ class Tools_SQLStatementExtractor { * @param string $string The string to check in (haystack). * @return boolean True if $string ends with $check, or they are equal, or $check is empty. */ - protected static function endsWith($check, $string) { + protected static function endsWith(/*.string.*/$check, $string) { if ($check === "" || $check === $string) { return true; } else { diff --git a/src/Validator/Rule/IsFile.php b/src/Validator/Rule/IsFile.php index 64d5f97..b724754 100644 --- a/src/Validator/Rule/IsFile.php +++ b/src/Validator/Rule/IsFile.php @@ -38,7 +38,7 @@ class Validator_Rule_IsFile extends Validator_Rule_Abstract return false; } - if ($tmp['size'] > $this->maxsize*1024) { + if (((int)$tmp['size']) > $this->maxsize*1024) { $this->setErrorMsg('Неверный размер файла'); return false; }