Completed
Push — 4.0 ( ed2d0a...2bab8b )
by Marco
15:57
created
src/Request/Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
     private static function getParameters() {
48 48
 
49
-        switch( $_SERVER['REQUEST_METHOD'] ) {
49
+        switch ($_SERVER['REQUEST_METHOD']) {
50 50
 
51 51
             case 'POST':
52 52
 
Please login to merge, or discard this patch.
src/Response/Content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function set($content) {
42 42
 
43
-        if ( !is_scalar($content) ) {
43
+        if (!is_scalar($content)) {
44 44
 
45 45
             throw new Exception("Invalid HTTP content");
46 46
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function type($type = null) {
56 56
 
57
-        if ( is_null($type) ) {
57
+        if (is_null($type)) {
58 58
 
59 59
             return $this->type;
60 60
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function charset($charset = null) {
70 70
 
71
-        if ( is_null($charset) ) {
71
+        if (is_null($charset)) {
72 72
 
73 73
             return $this->charset;
74 74
 
Please login to merge, or discard this patch.
src/Response/Status.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
     public function set($code) {
87 87
 
88
-        if ( !array_key_exists($code, $this->http_status_codes) ) {
88
+        if (!array_key_exists($code, $this->http_status_codes)) {
89 89
 
90 90
             throw new Exception("Invalid HTTP Status Code");
91 91
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 
98 98
     }
99 99
 
100
-    public function description($code=null) {
100
+    public function description($code = null) {
101 101
 
102
-        if ( is_null($code) || !array_key_exists($code, $this->http_status_codes) ) {
102
+        if (is_null($code) || !array_key_exists($code, $this->http_status_codes)) {
103 103
 
104 104
             $message = $this->http_status_codes[$this->status_code];
105 105
 
Please login to merge, or discard this patch.
src/Router/Collector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         
94 94
         foreach ($this->table as $regex => $value) {
95 95
             
96
-            if (preg_match("/" . $regex . "/", $path, $matches)) {
96
+            if (preg_match("/".$regex."/", $path, $matches)) {
97 97
                 
98 98
                 array_shift($matches);
99 99
                 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 
124 124
                 $count++;
125 125
                 
126
-                if (preg_match("/" . $param_regex . "/", $paramValue)) {
126
+                if (preg_match("/".$param_regex."/", $paramValue)) {
127 127
                     
128 128
                     $request->post()->set($parameter, $paramValue);
129 129
                     
Please login to merge, or discard this patch.
src/Router/RoutingTable.php 2 patches
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,9 +101,8 @@  discard block
 block discarded – undo
101 101
                 
102 102
                 $key = $key[0];
103 103
                 
104
-                $required = isset($decoded['required'])?
105
-                    filter_var($decoded['required'], FILTER_VALIDATE_BOOLEAN) :
106
-                    false;
104
+                $required = isset($decoded['required']) ?
105
+                    filter_var($decoded['required'], FILTER_VALIDATE_BOOLEAN) : false;
107 106
                     
108 107
                 if (!empty($value)) {
109 108
                     $value['query'][$key] = $decoded[$key];
@@ -112,7 +111,7 @@  discard block
 block discarded – undo
112 111
                 $this->readpath( 
113 112
                     $folders,
114 113
                     $value,
115
-                    $regex.'('.$decoded[$key].'\/)'. (($required)?'{1}':'?')
114
+                    $regex.'('.$decoded[$key].'\/)'.(($required) ? '{1}' : '?')
116 115
                 );
117 116
                 
118 117
             } else {
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,8 +46,9 @@  discard block
 block discarded – undo
46 46
             "query"      => array()
47 47
         );
48 48
         
49
-        if (count($folders) > 1 && empty($folders[0]))
50
-            array_shift($folders);
49
+        if (count($folders) > 1 && empty($folders[0])) {
50
+                    array_shift($folders);
51
+        }
51 52
         
52 53
         if (count($folders) == 1 && empty($folders[0])) {
53 54
             $this->def_route = $value;
@@ -67,7 +68,9 @@  discard block
 block discarded – undo
67 68
         
68 69
         $regex = $this->readpath($folders);
69 70
         
70
-        if (isset($this->routes[$regex])) unset($this->routes[$regex]);
71
+        if (isset($this->routes[$regex])) {
72
+            unset($this->routes[$regex]);
73
+        }
71 74
         
72 75
     }
73 76
     
Please login to merge, or discard this patch.