@@ -51,6 +51,6 @@ |
||
51 | 51 | */ |
52 | 52 | public function index(DataResponseFactoryInterface $responseFactory): ResponseInterface |
53 | 53 | { |
54 | - return $responseFactory->createResponse(['version' => '3.0', 'author' => 'yiisoft']); |
|
54 | + return $responseFactory->createResponse([ 'version' => '3.0', 'author' => 'yiisoft' ]); |
|
55 | 55 | } |
56 | 56 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * @psalm-suppress UndefinedClass |
16 | 16 | */ |
17 | - public static function postUpdate(Event $event = null): void |
|
17 | + public static function postUpdate(Event $event=null): void |
|
18 | 18 | { |
19 | 19 | self::chmodRecursive('runtime', 0777); |
20 | 20 | self::chmodRecursive('public/assets', 0777); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | chmod($path, $mode); |
26 | 26 | |
27 | 27 | /** @var iterable<string, string> $iterator */ |
28 | - $iterator = new RIterator( |
|
28 | + $iterator=new RIterator( |
|
29 | 29 | new DirIterator($path, FSIterator::SKIP_DOTS | FSIterator::CURRENT_AS_PATHNAME), |
30 | 30 | RIterator::SELF_FIRST |
31 | 31 | ); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | use Symfony\Component\Console\Output\OutputInterface; |
11 | 11 | use Yiisoft\Yii\Console\ExitCode; |
12 | 12 | |
13 | -#[AsCommand(name: 'hello', description: 'An example command', hidden: false)] |
|
13 | +#[AsCommand(name: 'hello', description: 'An example command', hidden: false) ] |
|
14 | 14 | final class HelloCommand extends Command |
15 | 15 | { |
16 | 16 | protected function execute(InputInterface $input, OutputInterface $output): int |
@@ -27,7 +27,7 @@ |
||
27 | 27 | return $this->dataResponseFactory->createResponse($e->getMessage(), $e->getCode()); |
28 | 28 | } catch (InputValidationException $e) { |
29 | 29 | return $this->dataResponseFactory->createResponse( |
30 | - $e->getResult()->getErrorMessages()[0], |
|
30 | + $e->getResult()->getErrorMessages()[ 0 ], |
|
31 | 31 | Status::BAD_REQUEST |
32 | 32 | ); |
33 | 33 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * enum={"success", "failed"} |
41 | 41 | * ) |
42 | 42 | */ |
43 | - private string $status = ''; |
|
43 | + private string $status=''; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @OA\Property( |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * example="" |
50 | 50 | * ) |
51 | 51 | */ |
52 | - private string $errorMessage = ''; |
|
52 | + private string $errorMessage=''; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * @OA\Property( |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * example=null |
60 | 60 | * ) |
61 | 61 | */ |
62 | - private ?int $errorCode = null; |
|
62 | + private ?int $errorCode=null; |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * @OA\Property( |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * nullable=true, |
69 | 69 | * ) |
70 | 70 | */ |
71 | - private ?array $data = null; |
|
71 | + private ?array $data=null; |
|
72 | 72 | |
73 | 73 | public function getStatus(): string |
74 | 74 | { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | public function setStatus(string $status): self |
79 | 79 | { |
80 | - $this->status = $status; |
|
80 | + $this->status=$status; |
|
81 | 81 | return $this; |
82 | 82 | } |
83 | 83 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | public function setErrorMessage(string $errorMessage): self |
90 | 90 | { |
91 | - $this->errorMessage = $errorMessage; |
|
91 | + $this->errorMessage=$errorMessage; |
|
92 | 92 | return $this; |
93 | 93 | } |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | public function setErrorCode(int $errorCode): self |
101 | 101 | { |
102 | - $this->errorCode = $errorCode; |
|
102 | + $this->errorCode=$errorCode; |
|
103 | 103 | return $this; |
104 | 104 | } |
105 | 105 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | public function setData(?array $data): self |
112 | 112 | { |
113 | - $this->data = $data; |
|
113 | + $this->data=$data; |
|
114 | 114 | return $this; |
115 | 115 | } |
116 | 116 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | ->setErrorMessage($this->getErrorMessage($response)); |
20 | 20 | } |
21 | 21 | |
22 | - $data = $response->getData(); |
|
22 | + $data=$response->getData(); |
|
23 | 23 | |
24 | 24 | if ($data !== null && !is_array($data)) { |
25 | 25 | throw new RuntimeException('The response data must be either null or an array'); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | private function getErrorMessage(DataResponse $response): string |
53 | 53 | { |
54 | - $data = $response->getData(); |
|
54 | + $data=$response->getData(); |
|
55 | 55 | if (is_string($data) && !empty($data)) { |
56 | 56 | return $data; |
57 | 57 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | public function format(DataResponse $dataResponse): ResponseInterface |
19 | 19 | { |
20 | - $response = $dataResponse->withData( |
|
20 | + $response=$dataResponse->withData( |
|
21 | 21 | $this->apiResponseDataFactory |
22 | 22 | ->createFromResponse($dataResponse) |
23 | 23 | ->toArray(), |