Completed
Push — master ( ba4a87...be3f36 )
by Sinnarasa
02:49
created
src/Routing/Route.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function setDetail($detail)
129 129
     {
130
-        $this->detail = array_merge($detail,$this->detail);
130
+        $this->detail = array_merge($detail, $this->detail);
131 131
     }
132 132
 
133 133
     /**
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
     /**
174 174
      * @return array
175 175
      */
176
-    public function getData(){
177
-        return (isset($this->getDetail()['data']) && is_array($this->getDetail()['data']))?$this->getDetail()['data']:[];
176
+    public function getData() {
177
+        return (isset($this->getDetail()['data']) && is_array($this->getDetail()['data'])) ? $this->getDetail()['data'] : [];
178 178
     }
179 179
 
180 180
     /**
Please login to merge, or discard this patch.
Braces   +18 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,10 +52,18 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function set($args = [])
54 54
     {
55
-        if (isset($args['name'])) $this->name = $args['name'];
56
-        if (isset($args['callback'])) $this->callback = $args['callback'];
57
-        if (isset($args['target'])) $this->target = $args['target'];
58
-        if (isset($args['detail'])) $this->detail = $args['detail'];
55
+        if (isset($args['name'])) {
56
+            $this->name = $args['name'];
57
+        }
58
+        if (isset($args['callback'])) {
59
+            $this->callback = $args['callback'];
60
+        }
61
+        if (isset($args['target'])) {
62
+            $this->target = $args['target'];
63
+        }
64
+        if (isset($args['detail'])) {
65
+            $this->detail = $args['detail'];
66
+        }
59 67
     }
60 68
 
61 69
     /**
@@ -145,8 +153,9 @@  discard block
 block discarded – undo
145 153
      */
146 154
     public function getTarget($key = null)
147 155
     {
148
-        if (!is_null($key))
149
-            return isset($this->target[$key]) ? $this->target[$key] : '';
156
+        if (!is_null($key)) {
157
+                    return isset($this->target[$key]) ? $this->target[$key] : '';
158
+        }
150 159
         return empty($this->target) ? '' : $this->target;
151 160
     }
152 161
 
@@ -165,8 +174,9 @@  discard block
 block discarded – undo
165 174
      */
166 175
     public function hasTarget($key = null)
167 176
     {
168
-        if (!is_null($key))
169
-            return isset($this->target[$key]) ? true : false;
177
+        if (!is_null($key)) {
178
+                    return isset($this->target[$key]) ? true : false;
179
+        }
170 180
         return empty($this->target) ? false : true;
171 181
     }
172 182
 
Please login to merge, or discard this patch.