@@ -136,7 +136,7 @@ |
||
136 | 136 | * @param \Exception $e |
137 | 137 | * @param Request $request |
138 | 138 | * |
139 | - * @return int logRef |
|
139 | + * @return string logRef |
|
140 | 140 | */ |
141 | 141 | private function log(\Exception $e, Request $request) |
142 | 142 | { |
@@ -126,7 +126,7 @@ |
||
126 | 126 | private function codeError(\Exception $e) |
127 | 127 | { |
128 | 128 | $code = $e->getCode(); |
129 | - $message = $code . ' ' . (new Code)->statusText[$code]; |
|
129 | + $message = $code . ' ' . (new Code)->statusText[$code]; |
|
130 | 130 | $body = ['message' => $message]; |
131 | 131 | |
132 | 132 | return [$code, $body]; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Package package. |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Package package. |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Transfer; |
8 | 8 | |
9 | 9 | use BEAR\Resource\Code; |
@@ -95,7 +95,7 @@ |
||
95 | 95 | if (!class_exists($class)) { |
96 | 96 | $class = 'BEAR\Package\Context\\' . ucwords($context) . 'Module'; |
97 | 97 | } |
98 | - if (! is_a($class, AbstractModule::class, true)) { |
|
98 | + if (!is_a($class, AbstractModule::class, true)) { |
|
99 | 99 | throw new InvalidContextException($class); |
100 | 100 | } |
101 | 101 | /* @var $module AbstractModule */ |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Resource package |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Resource package |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Representation; |
8 | 8 | |
9 | 9 | use BEAR\Resource\AbstractUri; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $method = 'on' . ucfirst($ro->uri->method); |
52 | 52 | $hasMethod = method_exists($ro, $method); |
53 | - if (! $hasMethod) { |
|
53 | + if (!$hasMethod) { |
|
54 | 54 | $ro->view = ''; // OPTIONS request no view |
55 | 55 | |
56 | 56 | return ''; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * @param \BEAR\Resource\ResourceObject $ro |
70 | 70 | */ |
71 | - private function valuateElements(ResourceObject &$ro) |
|
71 | + private function valuateElements(ResourceObject & $ro) |
|
72 | 72 | { |
73 | 73 | foreach ($ro->body as $key => &$element) { |
74 | 74 | if ($element instanceof RequestInterface) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | private function getHalLink(array $body, array $links, Hal $hal) |
148 | 148 | { |
149 | 149 | foreach ($links as $link) { |
150 | - if (! $link instanceof Link) { |
|
150 | + if (!$link instanceof Link) { |
|
151 | 151 | continue; |
152 | 152 | } |
153 | 153 | $uri = uri_template($link->href, $body); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | // look for override in post data |
88 | 88 | if (isset($post['_method'])) { |
89 | - $method = strtolower($post['_method']); |
|
89 | + $method = strtolower($post['_method']); |
|
90 | 90 | unset($post['_method']); |
91 | 91 | |
92 | 92 | return $method; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | private function phpInput(array $server) |
129 | 129 | { |
130 | 130 | $contentType = $this->getContentType($server); |
131 | - if (! $contentType) { |
|
131 | + if (!$contentType) { |
|
132 | 132 | return []; |
133 | 133 | } |
134 | 134 | $isFormUrlEncoded = strpos($contentType, self::FORM_URL_ENCODE) !== false; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | $isApplicationJson = strpos($contentType, self::APPLICATION_JSON) !== false; |
141 | 141 | if ($isApplicationJson) { |
142 | - $content = json_decode(file_get_contents($this->stdIn), true); |
|
142 | + $content = json_decode(file_get_contents($this->stdIn), true); |
|
143 | 143 | |
144 | 144 | return $content; |
145 | 145 | } |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Sunday package |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Sunday package |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Router; |
8 | 8 | |
9 | 9 | use BEAR\Sunday\Annotation\DefaultSchemeHost; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Sunday package |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Sunday package |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Router; |
8 | 8 | |
9 | 9 | use BEAR\Sunday\Annotation\DefaultSchemeHost; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Package package. |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Package package. |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Transfer; |
8 | 8 | |
9 | 9 | use BEAR\Resource\Code; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $ob .= "{$label}: {$value}" . PHP_EOL; |
28 | 28 | } |
29 | 29 | // empty line |
30 | - $ob .= PHP_EOL; |
|
30 | + $ob .= PHP_EOL; |
|
31 | 31 | |
32 | 32 | // body |
33 | 33 | $ob .= $body; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Package package. |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Package package. |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Transfer; |
8 | 8 | |
9 | 9 | use BEAR\Resource\Code; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Package package. |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Package package. |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Transfer; |
8 | 8 | |
9 | 9 | use BEAR\Resource\Code; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the BEAR.Package package. |
|
4 | - * |
|
5 | - * @license http://opensource.org/licenses/MIT MIT |
|
6 | - */ |
|
3 | + * This file is part of the BEAR.Package package. |
|
4 | + * |
|
5 | + * @license http://opensource.org/licenses/MIT MIT |
|
6 | + */ |
|
7 | 7 | namespace BEAR\Package\Provide\Transfer; |
8 | 8 | |
9 | 9 | use BEAR\Resource\Code; |