Passed
Push — master ( 6cad0a...13c68b )
by Nícollas
09:55
created
src/Helpers/Functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $params = (array) func_get_arg(1);
35 35
 
36
-        if(!$router = $this->get($routerName)) {
36
+        if (!$router = $this->get($routerName)) {
37 37
             return null;
38 38
         }
39 39
 
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
 
42 42
         preg_match_all("/{\w+\??}/", $originalRoute, $matches);
43 43
   
44
-        if(empty($matches[0])) {
44
+        if (empty($matches[0])) {
45 45
             return $originalRoute;
46 46
         }
47 47
 
48
-        if(count($matches[0]) != count($params)) {
48
+        if (count($matches[0]) != count($params)) {
49 49
             return null;
50 50
         }
51 51
 
52
-        foreach($matches[0] as $index => $match) {
52
+        foreach ($matches[0] as $index => $match) {
53 53
             $paramForReplace = isset($params[$index]) ? $params[$index] : 'undefined';
54 54
 
55 55
             $originalRoute = str_replace($match, $paramForReplace, $originalRoute);
Please login to merge, or discard this patch.