Passed
Push — master ( 9f8f80...2ee547 )
by Aleksei
06:30 queued 17s
created
src/SendIt/src/MessageSerializer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@
 block discarded – undo
51 51
     public static function unpack(array $payload): MessageInterface
52 52
     {
53 53
         $message = new Message($payload['subject'], $payload['to'], $payload['data']);
54
-        if ($payload['from'] !== null) {
54
+        if ($payload['from'] !== null){
55 55
             $message->setFrom($payload['from']);
56 56
         }
57 57
 
58
-        if ($payload['replyTo'] !== null) {
58
+        if ($payload['replyTo'] !== null){
59 59
             $message->setReplyTo($payload['replyTo']);
60 60
         }
61 61
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,11 +51,13 @@
 block discarded – undo
51 51
     public static function unpack(array $payload): MessageInterface
52 52
     {
53 53
         $message = new Message($payload['subject'], $payload['to'], $payload['data']);
54
-        if ($payload['from'] !== null) {
54
+        if ($payload['from'] !== null)
55
+        {
55 56
             $message->setFrom($payload['from']);
56 57
         }
57 58
 
58
-        if ($payload['replyTo'] !== null) {
59
+        if ($payload['replyTo'] !== null)
60
+        {
59 61
             $message->setReplyTo($payload['replyTo']);
60 62
         }
61 63
 
Please login to merge, or discard this patch.
src/SendIt/views/builder.dark.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 $_msg_->subject(\Spiral\SendIt\Renderer\ViewRenderer::escapeSubject(inject('subject')));
9 9
 
10
-if (injected('from')) {
10
+if (injected('from')){
11 11
     $_msg_->from(\Symfony\Component\Mime\Address::create(inject('from')));
12 12
 }
13 13
 
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 
20 20
 ob_start(); ?>${html}<?php $_html_ = ob_get_clean();
21 21
 
22
-if (!empty($_html_)) {
22
+if (!empty($_html_)){
23 23
     $_msg_->html($_html_);
24 24
 }
25 25
 
26 26
 ob_start(); ?>${text}<?php $_text_ = ob_get_clean();
27 27
 
28
-if (!empty($_text_)) {
28
+if (!empty($_text_)){
29 29
     $_msg_->text($_text_);
30 30
 }
31 31
 ?>
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,8 @@  discard block
 block discarded – undo
7 7
  */
8 8
 $_msg_->subject(\Spiral\SendIt\Renderer\ViewRenderer::escapeSubject(inject('subject')));
9 9
 
10
-if (injected('from')) {
10
+if (injected('from'))
11
+{
11 12
     $_msg_->from(\Symfony\Component\Mime\Address::create(inject('from')));
12 13
 }
13 14
 
@@ -19,13 +20,15 @@  discard block
 block discarded – undo
19 20
 
20 21
 ob_start(); ?>${html}<?php $_html_ = ob_get_clean();
21 22
 
22
-if (!empty($_html_)) {
23
+if (!empty($_html_))
24
+{
23 25
     $_msg_->html($_html_);
24 26
 }
25 27
 
26 28
 ob_start(); ?>${text}<?php $_text_ = ob_get_clean();
27 29
 
28
-if (!empty($_text_)) {
30
+if (!empty($_text_))
31
+{
29 32
     $_msg_->text($_text_);
30 33
 }
31 34
 ?>
Please login to merge, or discard this patch.
src/Bridge/Stempler/src/ExceptionMapper.php 2 patches
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,9 +45,12 @@  discard block
 block discarded – undo
45 45
         $classFilename = (new \ReflectionClass($class))->getFileName();
46 46
 
47 47
         // looking for proper view error location
48
-        if ($e->getFile() !== $classFilename) {
49
-            foreach ($e->getTrace() as $trace) {
50
-                if (isset($trace['file']) && $trace['file'] === $classFilename) {
48
+        if ($e->getFile() !== $classFilename)
49
+        {
50
+            foreach ($e->getTrace() as $trace)
51
+            {
52
+                if (isset($trace['file']) && $trace['file'] === $classFilename)
53
+                {
51 54
                     $line = $trace['line'];
52 55
                     break;
53 56
                 }
@@ -55,7 +58,8 @@  discard block
 block discarded – undo
55 58
         }
56 59
 
57 60
         $userStack = [];
58
-        foreach ($this->sourcemap->getStack($line - $this->lineOffset) as $stack) {
61
+        foreach ($this->sourcemap->getStack($line - $this->lineOffset) as $stack)
62
+        {
59 63
             $userStack[] = [
60 64
                 'file'     => $stack['file'],
61 65
                 'line'     => $stack['line'],
@@ -65,7 +69,8 @@  discard block
 block discarded – undo
65 69
                 'args'     => [$data],
66 70
             ];
67 71
 
68
-            if ($stack['file'] === $filename) {
72
+            if ($stack['file'] === $filename)
73
+            {
69 74
                 // no need to jump over root template
70 75
                 break;
71 76
             }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     public function __construct(
13 13
         private readonly SourceMap $sourcemap,
14 14
         private readonly int $lineOffset
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function mapException(\Throwable $e, string $class, string $filename, array $data): \Throwable
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
         $classFilename = (new \ReflectionClass($class))->getFileName();
22 22
 
23 23
         // looking for proper view error location
24
-        if ($e->getFile() !== $classFilename) {
25
-            foreach ($e->getTrace() as $trace) {
26
-                if (isset($trace['file']) && $trace['file'] === $classFilename) {
24
+        if ($e->getFile() !== $classFilename){
25
+            foreach ($e->getTrace() as $trace){
26
+                if (isset($trace['file']) && $trace['file'] === $classFilename){
27 27
                     $line = $trace['line'];
28 28
                     break;
29 29
                 }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         }
32 32
 
33 33
         $userStack = [];
34
-        foreach ($this->sourcemap->getStack($line - $this->lineOffset) as $stack) {
34
+        foreach ($this->sourcemap->getStack($line - $this->lineOffset) as $stack){
35 35
             $userStack[] = [
36 36
                 'file'     => $stack['file'],
37 37
                 'line'     => $stack['line'],
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 'args'     => [$data],
42 42
             ];
43 43
 
44
-            if ($stack['file'] === $filename) {
44
+            if ($stack['file'] === $filename){
45 45
                 // no need to jump over root template
46 46
                 break;
47 47
             }
Please login to merge, or discard this patch.
src/Bridge/Stempler/src/StemplerLoader.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,8 @@
 block discarded – undo
56 56
      */
57 57
     public function load(string $path): Source
58 58
     {
59
-        if ($this->context === null) {
59
+        if ($this->context === null)
60
+        {
60 61
             throw new EngineException('Unable to use StemplerLoader without given context.');
61 62
         }
62 63
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function __construct(
24 24
         private readonly LoaderInterface $loader,
25 25
         array $processors
26
-    ) {
26
+    ){
27 27
         $this->processors = $processors;
28 28
     }
29 29
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function load(string $path): Source
42 42
     {
43
-        if ($this->context === null) {
43
+        if ($this->context === null){
44 44
             throw new EngineException('Unable to use StemplerLoader without given context.');
45 45
         }
46 46
 
Please login to merge, or discard this patch.
src/Bridge/Stempler/src/StemplerView.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,8 @@
 block discarded – undo
59 59
             $this->context
60 60
         );
61 61
 
62
-        if ($sourcemap === null) {
62
+        if ($sourcemap === null)
63
+        {
63 64
             return $e;
64 65
         }
65 66
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         protected StemplerEngine $engine,
21 21
         protected ViewSource $view,
22 22
         protected ContextInterface $context
23
-    ) {
23
+    ){
24 24
         $this->container = $engine->getContainer();
25 25
     }
26 26
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             $this->context
35 35
         );
36 36
 
37
-        if ($sourcemap === null) {
37
+        if ($sourcemap === null){
38 38
             return $e;
39 39
         }
40 40
 
Please login to merge, or discard this patch.
src/Bridge/Stempler/src/StemplerCache.php 2 patches
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,15 +67,18 @@  discard block
 block discarded – undo
67 67
     public function isFresh(string $key): bool
68 68
     {
69 69
         $mapFilename = $this->mapFilename($key);
70
-        if (!$this->files->exists($mapFilename)) {
70
+        if (!$this->files->exists($mapFilename))
71
+        {
71 72
             return false;
72 73
         }
73 74
 
74 75
         $time = $this->files->time($this->filename($key));
75 76
 
76 77
         $files = (array)include $mapFilename;
77
-        foreach ($files as $file) {
78
-            if ($this->files->time($file) > $time) {
78
+        foreach ($files as $file)
79
+        {
80
+            if ($this->files->time($file) > $time)
81
+            {
79 82
                 // some partial has changed
80 83
                 return false;
81 84
             }
@@ -92,12 +95,14 @@  discard block
 block discarded – undo
92 95
     public function delete(string $key): void
93 96
     {
94 97
         $filename = $this->filename($key);
95
-        if ($this->files->exists($filename)) {
98
+        if ($this->files->exists($filename))
99
+        {
96 100
             $this->files->delete($filename);
97 101
         }
98 102
 
99 103
         $mapFilename = $this->mapFilename($key);
100
-        if ($this->files->exists($mapFilename)) {
104
+        if ($this->files->exists($mapFilename))
105
+        {
101 106
             $this->files->delete($mapFilename);
102 107
         }
103 108
     }
@@ -110,7 +115,8 @@  discard block
 block discarded – undo
110 115
     public function load(string $key): void
111 116
     {
112 117
         $filename = $this->filename($key);
113
-        if ($this->files->exists($filename)) {
118
+        if ($this->files->exists($filename))
119
+        {
114 120
             include_once $filename;
115 121
         }
116 122
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     public function __construct(
13 13
         private readonly string $directory,
14 14
         private readonly FilesInterface $files = new Files()
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     /**
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
     public function isFresh(string $key): bool
44 44
     {
45 45
         $mapFilename = $this->mapFilename($key);
46
-        if (!$this->files->exists($mapFilename)) {
46
+        if (!$this->files->exists($mapFilename)){
47 47
             return false;
48 48
         }
49 49
 
50 50
         $time = $this->files->time($this->filename($key));
51 51
 
52 52
         $files = (array)include $mapFilename;
53
-        foreach ($files as $file) {
54
-            if ($this->files->time($file) > $time) {
53
+        foreach ($files as $file){
54
+            if ($this->files->time($file) > $time){
55 55
                 // some partial has changed
56 56
                 return false;
57 57
             }
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
     public function delete(string $key): void
67 67
     {
68 68
         $filename = $this->filename($key);
69
-        if ($this->files->exists($filename)) {
69
+        if ($this->files->exists($filename)){
70 70
             $this->files->delete($filename);
71 71
         }
72 72
 
73 73
         $mapFilename = $this->mapFilename($key);
74
-        if ($this->files->exists($mapFilename)) {
74
+        if ($this->files->exists($mapFilename)){
75 75
             $this->files->delete($mapFilename);
76 76
         }
77 77
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function load(string $key): void
83 83
     {
84 84
         $filename = $this->filename($key);
85
-        if ($this->files->exists($filename)) {
85
+        if ($this->files->exists($filename)){
86 86
             include_once $filename;
87 87
         }
88 88
     }
Please login to merge, or discard this patch.
src/Bridge/Stempler/tests/config/views.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 return [
4 4
     'cache'        => [
5 5
         'enabled'   => false,
6
-        'directory' => __DIR__ . '/../cache'
6
+        'directory' => __DIR__.'/../cache'
7 7
     ],
8 8
     'namespaces'   => [
9
-        'default'    => [__DIR__ . '/../fixtures/default'],
10
-        'other'      => [__DIR__ . '/../fixtures/other'],
11
-        'extensions' => [__DIR__ . '/../fixtures/other/extensions'],
9
+        'default'    => [__DIR__.'/../fixtures/default'],
10
+        'other'      => [__DIR__.'/../fixtures/other'],
11
+        'extensions' => [__DIR__.'/../fixtures/other/extensions'],
12 12
     ],
13 13
     'dependencies' => [],
14 14
     'engines'      => []
Please login to merge, or discard this patch.
src/Framework/Domain/GuardInterceptor.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@
 block discarded – undo
41 41
     {
42 42
         $permission = $this->permissions->getPermission($controller, $action);
43 43
 
44
-        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters)) {
44
+        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters))
45
+        {
45 46
             throw new ControllerException($permission->message, $permission->code);
46 47
         }
47 48
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
     public function __construct(
19 19
         private readonly GuardInterface $guard,
20 20
         private readonly PermissionsProviderInterface $permissions
21
-    ) {
21
+    ){
22 22
     }
23 23
 
24 24
     public function process(string $controller, string $action, array $parameters, CoreInterface $core): mixed
25 25
     {
26 26
         $permission = $this->permissions->getPermission($controller, $action);
27 27
 
28
-        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters)) {
28
+        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters)){
29 29
             throw new ControllerException($permission->message, $permission->code);
30 30
         }
31 31
 
Please login to merge, or discard this patch.
src/Storage/src/File/UriResolvableTrait.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         $resolver = $this->getResolver();
33 33
 
34
-        if ($resolver === null) {
34
+        if ($resolver === null){
35 35
             throw new \LogicException('Can not generate public url: File not accessible by HTTP');
36 36
         }
37 37
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
     {
32 32
         $resolver = $this->getResolver();
33 33
 
34
-        if ($resolver === null) {
34
+        if ($resolver === null)
35
+        {
35 36
             throw new \LogicException('Can not generate public url: File not accessible by HTTP');
36 37
         }
37 38
 
Please login to merge, or discard this patch.