@@ -30,7 +30,7 @@ |
||
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 |
@@ -33,7 +33,7 @@ |
||
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 |
@@ -30,7 +30,7 @@ |
||
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 |
@@ -48,7 +48,7 @@ |
||
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, |
@@ -47,7 +47,7 @@ |
||
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 |
@@ -87,7 +87,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -28,7 +28,7 @@ |
||
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 |
@@ -46,7 +46,7 @@ |
||
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 |
@@ -41,13 +41,13 @@ |
||
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 |