@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param Iterable $options |
36 | 36 | * @return AdapterInterface |
37 | 37 | */ |
38 | - public function setOptions(?Iterable $config=null): AdapterInterface |
|
38 | + public function setOptions(? Iterable $config = null) : AdapterInterface |
|
39 | 39 | { |
40 | 40 | parent::setOptions($config); |
41 | 41 | if ($config === null) { |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @param Iterable $options |
31 | 31 | * @return void |
32 | 32 | */ |
33 | - public function __construct(?Iterable $config=null); |
|
33 | + public function __construct(? Iterable $config = null); |
|
34 | 34 | |
35 | 35 | |
36 | 36 | /** |
@@ -61,5 +61,5 @@ discard block |
||
61 | 61 | * @param Iterable $options |
62 | 62 | * @return AdapterInterface |
63 | 63 | */ |
64 | - public function setOptions(?Iterable $config=null): AdapterInterface; |
|
64 | + public function setOptions(? Iterable $config = null) : AdapterInterface; |
|
65 | 65 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @param Iterable $options |
44 | 44 | * @return AdapterInterface |
45 | 45 | */ |
46 | - public function setOptions(?Iterable $config=null) |
|
46 | + public function setOptions(? Iterable $config = null) |
|
47 | 47 | { |
48 | 48 | parent::setOptions($options); |
49 | 49 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | parent::init(); |
40 | 40 | $this->setExceptionHandler(); |
41 | 41 | |
42 | - $this->logger->info('processing incoming http ['. $_SERVER['REQUEST_METHOD'].'] request to ['.$_SERVER['REQUEST_URI'].']', [ |
|
42 | + $this->logger->info('processing incoming http ['.$_SERVER['REQUEST_METHOD'].'] request to ['.$_SERVER['REQUEST_URI'].']', [ |
|
43 | 43 | 'category' => get_class($this), |
44 | 44 | ]); |
45 | 45 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | protected function setExceptionHandler(): Http |
127 | 127 | { |
128 | - set_exception_handler(function ($e) { |
|
128 | + set_exception_handler(function($e) { |
|
129 | 129 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
130 | 130 | 'category' => get_class($this), |
131 | 131 | 'exception' => $e |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | protected function setExceptionHandler(): Cli |
117 | 117 | { |
118 | - set_exception_handler(function ($e) { |
|
118 | + set_exception_handler(function($e) { |
|
119 | 119 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
120 | 120 | 'category' => get_class($this), |
121 | 121 | 'exception' => $e |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @var Config |
47 | 47 | */ |
48 | - protected $option_log ; |
|
48 | + protected $option_log; |
|
49 | 49 | |
50 | 50 | |
51 | 51 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | protected function setErrorHandler() |
144 | 144 | { |
145 | - set_error_handler(function ($errno, $errstr, $errfile, $errline) { |
|
145 | + set_error_handler(function($errno, $errstr, $errfile, $errline) { |
|
146 | 146 | $msg = $errstr." in ".$errfile.":".$errline; |
147 | 147 | switch ($errno) { |
148 | 148 | case E_ERROR: |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @param bool $single |
59 | 59 | * @return Response |
60 | 60 | */ |
61 | - public function getAclRoles(string $q, bool $single=false): Response |
|
61 | + public function getAclRoles(string $q, bool $single = false): Response |
|
62 | 62 | { |
63 | 63 | $resource = new UserResource($this->user, $this->logger, $this->fs); |
64 | 64 | $result = $resource->searchRole($q, $single); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $name = $this->camelCase2Dashes($method->name); |
158 | 158 | $parts = explode('-', $name); |
159 | 159 | $verb = strtoupper($parts[0]); |
160 | - $func = substr($name, strlen($verb)+1); |
|
160 | + $func = substr($name, strlen($verb) + 1); |
|
161 | 161 | $url = '/rest/'.strtolower($controller).'/'.$func; |
162 | 162 | $doc = $this->parsePhpDoc($method->getDocComment()); |
163 | 163 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Balloon |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @param string $encode |
56 | 56 | * @return void |
57 | 57 | */ |
58 | - public function getPreview(?string $id=null, ?string $p=null, ?string $encode=null): void |
|
58 | + public function getPreview(? string $id = null, ? string $p = null, ? string $encode = null) : void |
|
59 | 59 | { |
60 | 60 | $node = $this->_getNode($id, $p); |
61 | 61 | $data = $node->getPreview(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param string $p |
129 | 129 | * @return Response |
130 | 130 | */ |
131 | - public function getHistory(?string $id=null, ?string $p=null): Response |
|
131 | + public function getHistory(? string $id = null, ? string $p = null) : Response |
|
132 | 132 | { |
133 | 133 | $result = Helper::escape( |
134 | 134 | $this->_getNode($id, $p)->getHistory() |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @param string $version |
162 | 162 | * @return Response |
163 | 163 | */ |
164 | - public function postRestore(int $version, ?string $id=null, ?string $p=null): Response |
|
164 | + public function postRestore(int $version, ? string $id = null, ? string $p = null) : Response |
|
165 | 165 | { |
166 | 166 | $result = $this->_getNode($id, $p)->restore($version); |
167 | 167 | return (new Response())->setCode(204); |
@@ -297,15 +297,15 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function putChunk( |
299 | 299 | string $chunkgroup, |
300 | - ?string $id=null, |
|
301 | - ?string $p=null, |
|
302 | - ?string $collection=null, |
|
303 | - ?string $name=null, |
|
304 | - int $index=1, |
|
305 | - int $chunks=0, |
|
306 | - int $size=0, |
|
307 | - array $attributes=[], |
|
308 | - int $conflict=0) |
|
300 | + ? string $id = null, |
|
301 | + ? string $p = null, |
|
302 | + ? string $collection = null, |
|
303 | + ? string $name = null, |
|
304 | + int $index = 1, |
|
305 | + int $chunks = 0, |
|
306 | + int $size = 0, |
|
307 | + array $attributes = [], |
|
308 | + int $conflict = 0) |
|
309 | 309 | { |
310 | 310 | ini_set('auto_detect_line_endings', '1'); |
311 | 311 | $input_handler = fopen('php://input', 'rb'); |
@@ -464,12 +464,12 @@ discard block |
||
464 | 464 | * @return Response |
465 | 465 | */ |
466 | 466 | public function put( |
467 | - ?string $id=null, |
|
468 | - ?string $p=null, |
|
469 | - ?string $collection=null, |
|
470 | - ?string $name=null, |
|
471 | - array $attributes=[], |
|
472 | - int $conflict=0): Response |
|
467 | + ? string $id = null, |
|
468 | + ? string $p = null, |
|
469 | + ? string $collection = null, |
|
470 | + ? string $name = null, |
|
471 | + array $attributes = [], |
|
472 | + int $conflict = 0) : Response |
|
473 | 473 | { |
474 | 474 | $attributes = $this->_verifyAttributes($attributes); |
475 | 475 | |
@@ -493,12 +493,12 @@ discard block |
||
493 | 493 | */ |
494 | 494 | protected function _put( |
495 | 495 | $content, |
496 | - ?string $id=null, |
|
497 | - ?string $p=null, |
|
498 | - ?string $collection=null, |
|
499 | - ?string $name=null, |
|
500 | - array $attributes=[], |
|
501 | - int $conflict=0): Response |
|
496 | + ? string $id = null, |
|
497 | + ? string $p = null, |
|
498 | + ? string $collection = null, |
|
499 | + ? string $name = null, |
|
500 | + array $attributes = [], |
|
501 | + int $conflict = 0) : Response |
|
502 | 502 | { |
503 | 503 | if ($id === null && $p === null && $name === null) { |
504 | 504 | throw new Exception\InvalidArgument('neither id, p nor name was set'); |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $result = $node->put($content, false, $attributes); |
519 | 519 | return (new Response())->setCode(200)->setBody($result); |
520 | 520 | } elseif ($p === null && $id === null && $name !== null) { |
521 | - $collection = $this->_getNode($collection, null, 'Collection', false, true); |
|
521 | + $collection = $this->_getNode($collection, null, 'Collection', false, true); |
|
522 | 522 | |
523 | 523 | if ($collection->childExists($name)) { |
524 | 524 | $child = $collection->getChild($name); |