Browse Source

remove unused things

gjerokrsteski 11 years ago
parent
commit
4c67f021cd

+ 3 - 3
php-pimf/pimf-framework/.travis.yml

@@ -1,10 +1,10 @@
 language: php
 language: php
 
 
 php:
 php:
-  - 5.3
-  - 5.4
-  - 5.5
   - 5.6
   - 5.6
+  - 5.5
+  - 5.4
+  - 5.3
 
 
 before_script:
 before_script:
   - phpenv rehash
   - phpenv rehash

+ 5 - 3
php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php

@@ -64,8 +64,8 @@ class File extends Storage
    */
    */
   public function put($key, $value, $minutes)
   public function put($key, $value, $minutes)
   {
   {
-    if ($minutes <= 0) {
-      return;
+    if ((int)$minutes <= 0) {
+      return null;
     }
     }
 
 
     $value = $this->expiration($minutes) . serialize($value);
     $value = $this->expiration($minutes) . serialize($value);
@@ -91,7 +91,7 @@ class File extends Storage
    *
    *
    * @param string $key
    * @param string $key
    *
    *
-   * @return bool|void
+   * @return bool
    */
    */
   public function forget($key)
   public function forget($key)
   {
   {
@@ -103,5 +103,7 @@ class File extends Storage
 
 
       return true;
       return true;
     }
     }
+
+    return false;
   }
   }
 }
 }

+ 1 - 1
php-pimf/pimf-framework/core/Pimf/Param.php

@@ -37,7 +37,7 @@ class Param
 
 
   /**
   /**
    * @param string $index
    * @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!
    * @param bool   $filtered If you trust foreign input introduced to your PHP code - set to FALSE!
    *
    *
    * @return string
    * @return string

+ 4 - 7
php-pimf/pimf-framework/core/Pimf/View.php

@@ -125,11 +125,10 @@ class View implements Renderable
   }
   }
 
 
   /**
   /**
-   * Is utilized for reading data from inaccessible properties.
-   *
    * @param string $name
    * @param string $name
    *
    *
-   * @return mixed|null
+   * @return mixed
+   * @throws \OutOfBoundsException If undefined property at the template.
    */
    */
   public function __get($name)
   public function __get($name)
   {
   {
@@ -138,11 +137,9 @@ class View implements Renderable
     }
     }
 
 
     $trace = debug_backtrace();
     $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;
   }
   }
 
 
   /**
   /**