Completed
Push — master ( 809108...984872 )
by Marco
05:49
created
src/Comodojo/Dispatcher/Response/Preprocessor/Status205.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         $cleanup = ['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'];
32 32
 
33
-        foreach ($cleanup as $header) {
33
+        foreach ( $cleanup as $header ) {
34 34
             $this->response->getHeaders()->delete($header);
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Preprocessor/Status405.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         // An Allow Header should be provided from DispatcherException
34 34
         $allow = $this->response->getHeaders()->get('Allow');
35 35
 
36
-        if (is_null($allow)) throw new Exception("Missing Allow header");
36
+        if ( is_null($allow) ) throw new Exception("Missing Allow header");
37 37
 
38 38
         parent::consolidate();
39 39
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Headers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function send($replace = false) {
32 32
 
33
-        foreach ($this->headers as $header => $value) {
33
+        foreach ( $this->headers as $header => $value ) {
34 34
 
35 35
             header($header.": ".$value, $replace);
36 36
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Service/AbstractService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     use ResponseTrait;
49 49
     use ExtraTrait;
50 50
 
51
-    protected static $supported_methods = ['GET','PUT','POST','DELETE','OPTIONS','HEAD','TRACE','CONNECT','PURGE'];
51
+    protected static $supported_methods = ['GET', 'PUT', 'POST', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE', 'CONNECT', 'PURGE'];
52 52
 
53 53
     public function __construct(
54 54
         Configuration $configuration,
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Cache/ServerCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         $cache_object = $this->getCache()->setNamespace(self::$cache_namespace)->get($name);
49 49
 
50
-        if (is_null($cache_object)) return false;
50
+        if ( is_null($cache_object) ) return false;
51 51
 
52 52
         $response->import($cache_object);
53 53
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Request/File.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         $file = $this->getTemporaryName();
89 89
 
90
-        if (file_exists($file)) {
90
+        if ( file_exists($file) ) {
91 91
             return file_get_contents($file);
92 92
         }
93 93
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function load($slugOrControl) {
99 99
 
100
-        if (isset($_FILES) && isset($_FILES[$slugOrControl])) {
100
+        if ( isset($_FILES) && isset($_FILES[$slugOrControl]) ) {
101 101
 
102 102
             $this->loadFromUploadedFile($slugOrControl);
103 103
 
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
 
112 112
     public function save($path, $as_slug = false) {
113 113
 
114
-        if (!empty($path) && file_exists($path)) {
114
+        if ( !empty($path) && file_exists($path) ) {
115 115
 
116 116
             $local_name = "$path/".($as_slug ? $this->getSlug() : $this->getFileName());
117 117
 
118
-            if (file_exists($local_name)) {
118
+            if ( file_exists($local_name) ) {
119 119
 
120 120
                 $files = glob("$local_name*");
121 121
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
             }
127 127
 
128
-            if (move_uploaded_file($this->getTemporaryName(), $local_name)) {
128
+            if ( move_uploaded_file($this->getTemporaryName(), $local_name) ) {
129 129
 
130 130
                 // return file_exists($local_name);
131 131
                 return true;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $files = array();
169 169
 
170
-        foreach ($_FILES as $idx => $data) {
170
+        foreach ( $_FILES as $idx => $data ) {
171 171
 
172 172
             $files[] = new File($idx, $repository);
173 173
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Request/Files.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function __construct() {
30 30
 
31
-        foreach ($_FILES as $idx => $data) {
31
+        foreach ( $_FILES as $idx => $data ) {
32 32
 
33 33
             $this->files[] = new File($idx);
34 34
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/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/Comodojo/Dispatcher/Request/Headers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
      */
42 42
     private static function getHeaders() {
43 43
 
44
-        if (function_exists('getallheaders')) return getallheaders();
44
+        if ( function_exists('getallheaders') ) return getallheaders();
45 45
 
46 46
         $headers = array();
47 47
 
48
-        foreach ($_SERVER as $name => $value) {
48
+        foreach ( $_SERVER as $name => $value ) {
49 49
 
50
-            if (substr($name, 0, 5) == 'HTTP_') {
50
+            if ( substr($name, 0, 5) == 'HTTP_' ) {
51 51
 
52 52
                 $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
53 53
 
Please login to merge, or discard this patch.