File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -173,8 +173,7 @@ public function filter(array $jobs, $time = null)
173173 protected function process ($ expr , $ time )
174174 {
175175 $ expr = $ this ->normalizeExpr ($ expr );
176- $ expr = \str_ireplace (\array_keys (static ::$ literals ), \array_values (static ::$ literals ), $ expr );
177- $ expr = \explode (' ' , $ expr );
176+ $ expr = \preg_split ('~\s+~ ' , $ expr ); # 14
178177
179178 if (\count ($ expr ) < 5 || \count ($ expr ) > 6 ) {
180179 throw new \UnexpectedValueException (
@@ -203,10 +202,16 @@ protected function normalizeTime($time)
203202
204203 protected function normalizeExpr ($ expr )
205204 {
205+ $ expr = \trim ($ expr );
206+
206207 if (isset (static ::$ expressions [$ expr ])) {
207- $ expr = static ::$ expressions [$ expr ];
208+ return static ::$ expressions [$ expr ];
208209 }
209210
210- return $ expr ;
211+ return \str_ireplace (
212+ \array_keys (static ::$ literals ),
213+ \array_values (static ::$ literals ),
214+ $ expr
215+ );
211216 }
212217}
You can’t perform that action at this time.
0 commit comments