OSDN Git Service

Group `isset` calls
authorJefersson Nathan <admin@phpse.net>
Fri, 1 Apr 2016 11:20:45 +0000 (08:20 -0300)
committerJefersson Nathan <admin@phpse.net>
Thu, 21 Apr 2016 11:20:45 +0000 (08:20 -0300)
src/Route.php

index 6db8029..e95de46 100755 (executable)
@@ -75,7 +75,7 @@ class Route
     {
         $this->url     = $resource;
         $this->config  = $config;
-        $this->methods = isset($config['methods']) ? (array) $config['methods'] : [];
+        $this->methods = isset($config['methods']) ? (array) $config['methods'] : array();
         $this->target  = isset($config['target']) ? $config['target'] : null;
         $this->name    = isset($config['name']) ? $config['name'] : null;
     }
@@ -140,7 +140,7 @@ class Route
 
     private function substituteFilter($matches)
     {
-        if (isset($matches[1]) && isset($this->filters[$matches[1]])) {
+        if (isset($matches[1]$this->filters[$matches[1]])) {
             return $this->filters[$matches[1]];
         }