Skip to content

Commit

Permalink
remove unused things
Browse files Browse the repository at this point in the history
  • Loading branch information
gjerokrsteski committed Mar 19, 2014
1 parent 1b14979 commit 4c67f02
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions php-pimf/pimf-framework/.travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -91,7 +91,7 @@ public function forever($key, $value)
*
* @param string $key
*
* @return bool|void
* @return bool
*/
public function forget($key)
{
Expand All @@ -103,5 +103,7 @@ public function forget($key)

return true;
}

return false;
}
}
2 changes: 1 addition & 1 deletion php-pimf/pimf-framework/core/Pimf/Param.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions php-pimf/pimf-framework/core/Pimf/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit 4c67f02

Please sign in to comment.