Passed
Push — master ( 3db212...288d3b )
by Aleksei
20:14 queued 09:04
created
src/Broadcasting/src/Event/Authorized.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
     public function __construct(
13 13
         public AuthorizationStatus $status,
14 14
         public readonly ServerRequestInterface $request
15
-    ) {
15
+    ){
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
src/Broadcasting/src/Driver/NullBroadcast.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 final class NullBroadcast implements BroadcastInterface
10 10
 {
11
-    public function publish(iterable|string|\Stringable $topics, iterable|string $messages): void
11
+    public function publish(iterable | string | \Stringable $topics, iterable | string $messages): void
12 12
     {
13 13
         // Do nothing
14 14
     }
Please login to merge, or discard this patch.
src/Broadcasting/src/Driver/LogBroadcast.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@
 block discarded – undo
12 12
     public function __construct(
13 13
         private readonly LoggerInterface $logger,
14 14
         private readonly string $level = LogLevel::INFO
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18
-    public function publish(iterable|string|\Stringable $topics, iterable|string $messages): void
18
+    public function publish(iterable | string | \Stringable $topics, iterable | string $messages): void
19 19
     {
20 20
         $topics = \implode(', ', $this->formatTopics($this->toArray($topics)));
21 21
 
22 22
         /** @var string $message */
23
-        foreach ($this->toArray($messages) as $message) {
23
+        foreach ($this->toArray($messages) as $message){
24 24
             \assert(\is_string($message), 'Message argument must be a type of string');
25
-            $this->logger->log($this->level, 'Broadcasting on channels [' . $topics . '] with payload: ' . $message);
25
+            $this->logger->log($this->level, 'Broadcasting on channels ['.$topics.'] with payload: '.$message);
26 26
         }
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
         $topics = \implode(', ', $this->formatTopics($this->toArray($topics)));
21 21
 
22 22
         /** @var string $message */
23
-        foreach ($this->toArray($messages) as $message) {
23
+        foreach ($this->toArray($messages) as $message)
24
+        {
24 25
             \assert(\is_string($message), 'Message argument must be a type of string');
25 26
             $this->logger->log($this->level, 'Broadcasting on channels [' . $topics . '] with payload: ' . $message);
26 27
         }
Please login to merge, or discard this patch.
src/Broadcasting/src/Bootloader/BroadcastingBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     public function __construct(
29 29
         private readonly ConfiguratorInterface $config
30
-    ) {
30
+    ){
31 31
     }
32 32
 
33 33
     public function registerDriverAlias(string $driverClass, string $alias): void
Please login to merge, or discard this patch.
src/Broadcasting/src/BroadcastInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,5 +26,5 @@
 block discarded – undo
26 26
      * @param MessagesList $messages
27 27
      * @throws BroadcastException
28 28
      */
29
-    public function publish(iterable|string|\Stringable $topics, iterable|string $messages): void;
29
+    public function publish(iterable | string | \Stringable $topics, iterable | string $messages): void;
30 30
 }
Please login to merge, or discard this patch.
src/Broadcasting/src/Middleware/AuthorizationMiddleware.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,20 +22,20 @@  discard block
 block discarded – undo
22 22
         private readonly ResponseFactoryInterface $responseFactory,
23 23
         private readonly ?string $authorizationPath = null,
24 24
         private readonly ?EventDispatcherInterface $dispatcher = null
25
-    ) {
25
+    ){
26 26
     }
27 27
 
28 28
     public function process(
29 29
         ServerRequestInterface $request,
30 30
         RequestHandlerInterface $handler
31 31
     ): ResponseInterface {
32
-        if ($request->getUri()->getPath() !== $this->authorizationPath) {
32
+        if ($request->getUri()->getPath() !== $this->authorizationPath){
33 33
             return $handler->handle($request);
34 34
         }
35 35
 
36
-        if ($this->broadcast instanceof GuardInterface) {
36
+        if ($this->broadcast instanceof GuardInterface){
37 37
             $status = $this->broadcast->authorize($request);
38
-        } else {
38
+        }else{
39 39
             $status = new AuthorizationStatus(
40 40
                 success: true,
41 41
                 topics: null
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 
45 45
         $this->dispatcher?->dispatch(new Authorized($status, $request));
46 46
 
47
-        if ($status->response !== null) {
47
+        if ($status->response !== null){
48 48
             return $status->response;
49 49
         }
50 50
 
51
-        if (!$status->success) {
51
+        if (!$status->success){
52 52
             return $this->responseFactory->createResponse(403);
53 53
         }
54 54
 
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,13 +29,17 @@  discard block
 block discarded – undo
29 29
         ServerRequestInterface $request,
30 30
         RequestHandlerInterface $handler
31 31
     ): ResponseInterface {
32
-        if ($request->getUri()->getPath() !== $this->authorizationPath) {
32
+        if ($request->getUri()->getPath() !== $this->authorizationPath)
33
+        {
33 34
             return $handler->handle($request);
34 35
         }
35 36
 
36
-        if ($this->broadcast instanceof GuardInterface) {
37
+        if ($this->broadcast instanceof GuardInterface)
38
+        {
37 39
             $status = $this->broadcast->authorize($request);
38
-        } else {
40
+        }
41
+        else
42
+        {
39 43
             $status = new AuthorizationStatus(
40 44
                 success: true,
41 45
                 topics: null
@@ -44,11 +48,13 @@  discard block
 block discarded – undo
44 48
 
45 49
         $this->dispatcher?->dispatch(new Authorized($status, $request));
46 50
 
47
-        if ($status->response !== null) {
51
+        if ($status->response !== null)
52
+        {
48 53
             return $status->response;
49 54
         }
50 55
 
51
-        if (!$status->success) {
56
+        if (!$status->success)
57
+        {
52 58
             return $this->responseFactory->createResponse(403);
53 59
         }
54 60
 
Please login to merge, or discard this patch.
src/Broadcasting/src/AuthorizationStatus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
13 13
      */
14 14
     public function __construct(
15 15
         public readonly bool $success,
16
-        public readonly ?array $topics,
16
+        public readonly ? array $topics,
17 17
         public readonly array $attributes = [],
18 18
         public readonly ?ResponseInterface $response = null
19
-    ) {
19
+    ){
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
src/Scaffolder/src/Declaration/ConfigDeclaration/Defaults.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function get(array $values): array
27 27
     {
28 28
         $output = [];
29
-        foreach ($values as $key => $value) {
29
+        foreach ($values as $key => $value){
30 30
             $output[$key] = self::TYPE_DEFAULTS[\gettype($value)] ?? null;
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@
 block discarded – undo
26 26
     public function get(array $values): array
27 27
     {
28 28
         $output = [];
29
-        foreach ($values as $key => $value) {
29
+        foreach ($values as $key => $value)
30
+        {
30 31
             $output[$key] = self::TYPE_DEFAULTS[\gettype($value)] ?? null;
31 32
         }
32 33
 
Please login to merge, or discard this patch.
src/Scaffolder/src/Declaration/ConfigDeclaration/TypeAnnotations.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function getAnnotation(mixed $value): string
28 28
     {
29
-        if (\is_array($value)) {
29
+        if (\is_array($value)){
30 30
             return $this->arrayAnnotationString($value);
31 31
         }
32 32
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     private function arrayAnnotationString(array $value): string
42 42
     {
43 43
         $types = [];
44
-        foreach ($value as $item) {
44
+        foreach ($value as $item){
45 45
             $types[] = \gettype($item);
46 46
         }
47 47
         $types = \array_unique($types);
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function getAnnotation(mixed $value): string
28 28
     {
29
-        if (\is_array($value)) {
29
+        if (\is_array($value))
30
+        {
30 31
             return $this->arrayAnnotationString($value);
31 32
         }
32 33
 
@@ -41,7 +42,8 @@  discard block
 block discarded – undo
41 42
     private function arrayAnnotationString(array $value): string
42 43
     {
43 44
         $types = [];
44
-        foreach ($value as $item) {
45
+        foreach ($value as $item)
46
+        {
45 47
             $types[] = \gettype($item);
46 48
         }
47 49
         $types = \array_unique($types);
Please login to merge, or discard this patch.