diff --git a/php-pimf/pimf-framework/.travis.yml b/php-pimf/pimf-framework/.travis.yml index 66f242c1fa3..22082ecd60b 100644 --- a/php-pimf/pimf-framework/.travis.yml +++ b/php-pimf/pimf-framework/.travis.yml @@ -1,10 +1,10 @@ language: php php: - - 5.3 - - 5.4 - - 5.5 - 5.6 + - 5.5 + - 5.4 + - 5.3 before_script: - phpenv rehash diff --git a/php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php b/php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php index a734d5dd343..a0d1de99d6c 100644 --- a/php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php +++ b/php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php @@ -64,8 +64,8 @@ protected function retrieve($key) */ public function put($key, $value, $minutes) { - if ($minutes <= 0) { - return; + if ((int)$minutes <= 0) { + return null; } $value = $this->expiration($minutes) . serialize($value); @@ -91,7 +91,7 @@ public function forever($key, $value) * * @param string $key * - * @return bool|void + * @return bool */ public function forget($key) { @@ -103,5 +103,7 @@ public function forget($key) return true; } + + return false; } } diff --git a/php-pimf/pimf-framework/core/Pimf/Param.php b/php-pimf/pimf-framework/core/Pimf/Param.php index 77fe5e3643e..02b71201b51 100644 --- a/php-pimf/pimf-framework/core/Pimf/Param.php +++ b/php-pimf/pimf-framework/core/Pimf/Param.php @@ -37,7 +37,7 @@ public function getAll() /** * @param string $index - * @param null $defaultValue + * @param mixed $defaultValue * @param bool $filtered If you trust foreign input introduced to your PHP code - set to FALSE! * * @return string diff --git a/php-pimf/pimf-framework/core/Pimf/View.php b/php-pimf/pimf-framework/core/Pimf/View.php index 8b4fe06d9c8..c24a5766b3d 100644 --- a/php-pimf/pimf-framework/core/Pimf/View.php +++ b/php-pimf/pimf-framework/core/Pimf/View.php @@ -125,11 +125,10 @@ public function pump(array $model) } /** - * Is utilized for reading data from inaccessible properties. - * * @param string $name * - * @return mixed|null + * @return mixed + * @throws \OutOfBoundsException If undefined property at the template. */ public function __get($name) { @@ -138,11 +137,9 @@ public function __get($name) } $trace = debug_backtrace(); - trigger_error( - 'undefined property "' . $name . '" at file ' . $trace[0]['file'] . ' line ' . $trace[0]['line'], E_USER_WARNING + throw new \OutOfBoundsException( + 'undefined property "' . $name . '" at file ' . $trace[0]['file'] . ' line ' . $trace[0]['line'] ); - - return null; } /**