Passed
Pull Request — master (#1025)
by butschster
09:34
created
src/SendIt/src/Event/MessageSent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
 {
11 11
     public function __construct(
12 12
         public readonly Email $message
13
-    ) {
13
+    ){
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/SendIt/src/Event/MessageNotSent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,6 @@
 block discarded – undo
11 11
     public function __construct(
12 12
         public readonly Email $message,
13 13
         public readonly \Throwable $exception
14
-    ) {
14
+    ){
15 15
     }
16 16
 }
Please login to merge, or discard this patch.
src/SendIt/src/MailJob.php 2 patches
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,11 +32,13 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function handle(string $name, string $id, string|array $payload): void
34 34
     {
35
-        if (\is_string($payload)) {
35
+        if (\is_string($payload))
36
+        {
36 37
             $payload = \json_decode($payload, true, 512, JSON_THROW_ON_ERROR);
37 38
         }
38 39
 
39
-        if (!\is_array($payload)) {
40
+        if (!\is_array($payload))
41
+        {
40 42
             throw new InvalidArgumentException('Mail job payload should be an array.');
41 43
         }
42 44
 
@@ -44,13 +46,17 @@  discard block
 block discarded – undo
44 46
 
45 47
         $email = $this->renderer->render($message);
46 48
 
47
-        if ($email->getFrom() === []) {
49
+        if ($email->getFrom() === [])
50
+        {
48 51
             $email->from(Address::create($this->config->getFromAddress()));
49 52
         }
50 53
 
51
-        try {
54
+        try
55
+        {
52 56
             $this->mailer->send($email);
53
-        } catch (TransportExceptionInterface $e) {
57
+        }
58
+        catch (TransportExceptionInterface $e)
59
+        {
54 60
             $this->dispatcher?->dispatch(new MessageNotSent($email, $e));
55 61
 
56 62
             throw $e;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,20 +21,20 @@  discard block
 block discarded – undo
21 21
         private readonly SymfonyMailer $mailer,
22 22
         private readonly RendererInterface $renderer,
23 23
         private readonly ?EventDispatcherInterface $dispatcher = null
24
-    ) {
24
+    ){
25 25
     }
26 26
 
27 27
     /**
28 28
      * @throws TransportExceptionInterface
29 29
      * @throws InvalidArgumentException
30 30
      */
31
-    public function handle(string $name, string $id, string|array $payload): void
31
+    public function handle(string $name, string $id, string | array $payload): void
32 32
     {
33
-        if (\is_string($payload)) {
33
+        if (\is_string($payload)){
34 34
             $payload = \json_decode($payload, true, 512, JSON_THROW_ON_ERROR);
35 35
         }
36 36
 
37
-        if (!\is_array($payload)) {
37
+        if (!\is_array($payload)){
38 38
             throw new InvalidArgumentException('Mail job payload should be an array.');
39 39
         }
40 40
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
         $email = $this->renderer->render($message);
44 44
 
45
-        if ($email->getFrom() === []) {
45
+        if ($email->getFrom() === []){
46 46
             $email->from(Address::create($this->config->getFromAddress()));
47 47
         }
48 48
 
49
-        try {
49
+        try{
50 50
             $this->mailer->send($email);
51
-        } catch (TransportExceptionInterface $e) {
51
+        }catch (TransportExceptionInterface $e){
52 52
             $this->dispatcher?->dispatch(new MessageNotSent($email, $e));
53 53
 
54 54
             throw $e;
Please login to merge, or discard this patch.
src/SendIt/src/Bootloader/BuilderBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
 
26 26
     public function init(ViewsBootloader $views): void
27 27
     {
28
-        $views->addDirectory('sendit', __DIR__ . '/../../views');
28
+        $views->addDirectory('sendit', __DIR__.'/../../views');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
src/SendIt/src/Listener/LoggerListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct(
16 16
         private readonly LoggerInterface $logger
17
-    ) {
17
+    ){
18 18
     }
19 19
 
20 20
     public function onMessageSent(MessageSent $event): void
Please login to merge, or discard this patch.
src/AuthHttp/src/Transport/HeaderTransport.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
     public function __construct(
17 17
         private readonly string $header = 'X-Auth-Token',
18 18
         private readonly string $valueFormat = '%s'
19
-    ) {
19
+    ){
20 20
     }
21 21
 
22 22
     public function fetchToken(Request $request): ?string
23 23
     {
24
-        if ($request->hasHeader($this->header)) {
24
+        if ($request->hasHeader($this->header)){
25 25
             return $this->extractToken($request);
26 26
         }
27 27
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         string $tokenID,
35 35
         \DateTimeInterface $expiresAt = null
36 36
     ): Response {
37
-        if ($request->hasHeader($this->header) && $this->extractToken($request) === $tokenID) {
37
+        if ($request->hasHeader($this->header) && $this->extractToken($request) === $tokenID){
38 38
             return $response;
39 39
         }
40 40
 
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $headerLine = $request->getHeaderLine($this->header);
52 52
 
53
-        if ($this->valueFormat !== '%s') {
53
+        if ($this->valueFormat !== '%s'){
54 54
             [$token] = sscanf($headerLine, $this->valueFormat);
55 55
 
56
-            return $token !== null ? (string) $token : null;
56
+            return $token !== null ? (string)$token : null;
57 57
         }
58 58
 
59 59
         return $headerLine;
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function fetchToken(Request $request): ?string
23 23
     {
24
-        if ($request->hasHeader($this->header)) {
24
+        if ($request->hasHeader($this->header))
25
+        {
25 26
             return $this->extractToken($request);
26 27
         }
27 28
 
@@ -34,7 +35,8 @@  discard block
 block discarded – undo
34 35
         string $tokenID,
35 36
         \DateTimeInterface $expiresAt = null
36 37
     ): Response {
37
-        if ($request->hasHeader($this->header) && $this->extractToken($request) === $tokenID) {
38
+        if ($request->hasHeader($this->header) && $this->extractToken($request) === $tokenID)
39
+        {
38 40
             return $response;
39 41
         }
40 42
 
@@ -50,7 +52,8 @@  discard block
 block discarded – undo
50 52
     {
51 53
         $headerLine = $request->getHeaderLine($this->header);
52 54
 
53
-        if ($this->valueFormat !== '%s') {
55
+        if ($this->valueFormat !== '%s')
56
+        {
54 57
             [$token] = sscanf($headerLine, $this->valueFormat);
55 58
 
56 59
             return $token !== null ? (string) $token : null;
Please login to merge, or discard this patch.
src/AuthHttp/src/Middleware/Firewall/ExceptionFirewall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 {
16 16
     public function __construct(
17 17
         private readonly \Throwable $e
18
-    ) {
18
+    ){
19 19
     }
20 20
 
21 21
     /**
Please login to merge, or discard this patch.
src/AuthHttp/src/Middleware/Firewall/OverwriteFirewall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function __construct(
18 18
         private readonly UriInterface $uri,
19 19
         private readonly int $status = 401
20
-    ) {
20
+    ){
21 21
     }
22 22
 
23 23
     protected function denyAccess(Request $request, RequestHandlerInterface $handler): Response
Please login to merge, or discard this patch.
src/AuthHttp/src/Middleware/AuthTransportMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         TokenStorageInterface $tokenStorage,
29 29
         TransportRegistry $transportRegistry,
30 30
         ?EventDispatcherInterface $eventDispatcher = null
31
-    ) {
31
+    ){
32 32
         $this->authMiddleware = new AuthMiddleware(
33 33
             $scope,
34 34
             $actorProvider,
Please login to merge, or discard this patch.