File tree 4 files changed +13
-14
lines changed
4 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
1
language : php
2
2
3
3
php :
4
- - 5.3
5
- - 5.4
6
- - 5.5
7
4
- 5.6
5
+ - 5.5
6
+ - 5.4
7
+ - 5.3
8
8
9
9
before_script :
10
10
- phpenv rehash
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ protected function retrieve($key)
64
64
*/
65
65
public function put ($ key , $ value , $ minutes )
66
66
{
67
- if ($ minutes <= 0 ) {
68
- return ;
67
+ if (( int ) $ minutes <= 0 ) {
68
+ return null ;
69
69
}
70
70
71
71
$ value = $ this ->expiration ($ minutes ) . serialize ($ value );
@@ -91,7 +91,7 @@ public function forever($key, $value)
91
91
*
92
92
* @param string $key
93
93
*
94
- * @return bool|void
94
+ * @return bool
95
95
*/
96
96
public function forget ($ key )
97
97
{
@@ -103,5 +103,7 @@ public function forget($key)
103
103
104
104
return true ;
105
105
}
106
+
107
+ return false ;
106
108
}
107
109
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function getAll()
37
37
38
38
/**
39
39
* @param string $index
40
- * @param null $defaultValue
40
+ * @param mixed $defaultValue
41
41
* @param bool $filtered If you trust foreign input introduced to your PHP code - set to FALSE!
42
42
*
43
43
* @return string
Original file line number Diff line number Diff line change @@ -125,11 +125,10 @@ public function pump(array $model)
125
125
}
126
126
127
127
/**
128
- * Is utilized for reading data from inaccessible properties.
129
- *
130
128
* @param string $name
131
129
*
132
- * @return mixed|null
130
+ * @return mixed
131
+ * @throws \OutOfBoundsException If undefined property at the template.
133
132
*/
134
133
public function __get ($ name )
135
134
{
@@ -138,11 +137,9 @@ public function __get($name)
138
137
}
139
138
140
139
$ 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 ' ]
143
142
);
144
-
145
- return null ;
146
143
}
147
144
148
145
/**
You can’t perform that action at this time.
0 commit comments