@@ -33,7 +33,7 @@ |
||
33 | 33 | $current = XmlUtil::CreateChild($xmlDoc, "root"); |
34 | 34 | } |
35 | 35 | |
36 | - foreach ((array) $this->collection as $object) { |
|
36 | + foreach ((array)$this->collection as $object) { |
|
37 | 37 | if ($object instanceof ResponseBag) { |
38 | 38 | $object->process($current); |
39 | 39 | } else { |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | |
22 | 22 | protected $_defaultMethods = [ |
23 | 23 | // Service |
24 | - [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}/{secondid}.{output}', "handler" => 'service'], |
|
25 | - [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}.{output}', "handler" => 'service'], |
|
26 | - [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}/{action}.{output}', "handler" => 'service'], |
|
27 | - [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}.{output}', "handler" => 'service'], |
|
28 | - [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}.{output}', "handler" => 'service'], |
|
29 | - [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}.{output}', "handler" => 'service'] |
|
24 | + ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}/{secondid}.{output}', "handler" => 'service'], |
|
25 | + ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}.{output}', "handler" => 'service'], |
|
26 | + ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}/{action}.{output}', "handler" => 'service'], |
|
27 | + ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}.{output}', "handler" => 'service'], |
|
28 | + ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}.{output}', "handler" => 'service'], |
|
29 | + ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}.{output}', "handler" => 'service'] |
|
30 | 30 | ]; |
31 | 31 | protected $_moduleAlias = []; |
32 | 32 | protected $_defaultVersion = '1.0'; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $_REQUEST[$key] = $_GET[$key] = $vars[$key]; |
133 | 133 | } |
134 | 134 | |
135 | - return [ $vars['module'], $vars['output']]; |
|
135 | + return [$vars['module'], $vars['output']]; |
|
136 | 136 | |
137 | 137 | default: |
138 | 138 | throw new \Exception('Unknown'); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * you can request only: |
175 | 175 | * http://somehost/module/somealias |
176 | 176 | */ |
177 | - foreach ((array) $moduleAlias as $alias => $module) { |
|
177 | + foreach ((array)$moduleAlias as $alias => $module) { |
|
178 | 178 | $route->addModuleAlias($alias, $module); |
179 | 179 | } |
180 | 180 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | && file_exists($_SERVER['SCRIPT_FILENAME']) |
213 | 213 | && basename($_SERVER['SCRIPT_FILENAME']) !== "route.php" |
214 | 214 | && basename($_SERVER['SCRIPT_FILENAME']) !== $routeIndex |
215 | - ) { |
|
215 | + ) { |
|
216 | 216 | $file = $_SERVER['SCRIPT_FILENAME']; |
217 | 217 | if (strpos($file, '.php') !== false) { |
218 | 218 | require_once($file); |
@@ -109,8 +109,8 @@ |
||
109 | 109 | $array = XmlUtil::xml2Array($dom); |
110 | 110 | |
111 | 111 | $return = ""; |
112 | - foreach ((array) $array as $line) { |
|
113 | - foreach ((array) $line as $field) { |
|
112 | + foreach ((array)$array as $line) { |
|
113 | + foreach ((array)$line as $field) { |
|
114 | 114 | $return .= "\"" . str_replace('"', '\\"', (is_array($field) ? json_encode($field) : $field)) . "\";"; |
115 | 115 | } |
116 | 116 | $return .= "\n"; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | return $this->returnFrames; |
35 | 35 | } |
36 | 36 | |
37 | - $this->returnFrames = (bool) $returnFrames; |
|
37 | + $this->returnFrames = (bool)$returnFrames; |
|
38 | 38 | return $this; |
39 | 39 | } |
40 | 40 |
@@ -101,7 +101,7 @@ |
||
101 | 101 | $this->responseDebug = new ResponseBag(); |
102 | 102 | $this->response->add($this->responseDebug); |
103 | 103 | } |
104 | - $this->responseDebug->add(['debug' => [ $key => $string]]); |
|
104 | + $this->responseDebug->add(['debug' => [$key => $string]]); |
|
105 | 105 | ErrorHandler::getInstance()->addExtraInfo($key, serialize($string)); |
106 | 106 | } |
107 | 107 |