Skip to content

Commit 4c67f02

Browse files
committed
remove unused things
1 parent 1b14979 commit 4c67f02

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
language: php
22

33
php:
4-
- 5.3
5-
- 5.4
6-
- 5.5
74
- 5.6
5+
- 5.5
6+
- 5.4
7+
- 5.3
88

99
before_script:
1010
- phpenv rehash

php-pimf/pimf-framework/core/Pimf/Cache/Storages/File.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ protected function retrieve($key)
6464
*/
6565
public function put($key, $value, $minutes)
6666
{
67-
if ($minutes <= 0) {
68-
return;
67+
if ((int)$minutes <= 0) {
68+
return null;
6969
}
7070

7171
$value = $this->expiration($minutes) . serialize($value);
@@ -91,7 +91,7 @@ public function forever($key, $value)
9191
*
9292
* @param string $key
9393
*
94-
* @return bool|void
94+
* @return bool
9595
*/
9696
public function forget($key)
9797
{
@@ -103,5 +103,7 @@ public function forget($key)
103103

104104
return true;
105105
}
106+
107+
return false;
106108
}
107109
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function getAll()
3737

3838
/**
3939
* @param string $index
40-
* @param null $defaultValue
40+
* @param mixed $defaultValue
4141
* @param bool $filtered If you trust foreign input introduced to your PHP code - set to FALSE!
4242
*
4343
* @return string

php-pimf/pimf-framework/core/Pimf/View.php

+4-7
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,10 @@ public function pump(array $model)
125125
}
126126

127127
/**
128-
* Is utilized for reading data from inaccessible properties.
129-
*
130128
* @param string $name
131129
*
132-
* @return mixed|null
130+
* @return mixed
131+
* @throws \OutOfBoundsException If undefined property at the template.
133132
*/
134133
public function __get($name)
135134
{
@@ -138,11 +137,9 @@ public function __get($name)
138137
}
139138

140139
$trace = debug_backtrace();
141-
trigger_error(
142-
'undefined property "' . $name . '" at file ' . $trace[0]['file'] . ' line ' . $trace[0]['line'], E_USER_WARNING
140+
throw new \OutOfBoundsException(
141+
'undefined property "' . $name . '" at file ' . $trace[0]['file'] . ' line ' . $trace[0]['line']
143142
);
144-
145-
return null;
146143
}
147144

148145
/**

0 commit comments

Comments
 (0)