Passed
Pull Request — master (#961)
by Maxim
09:14
created
src/Queue/src/Driver/NullDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,6 @@
 block discarded – undo
17 17
     {
18 18
         // Do nothing
19 19
 
20
-        return (string) Uuid::uuid4();
20
+        return (string)Uuid::uuid4();
21 21
     }
22 22
 }
Please login to merge, or discard this patch.
src/Framework/Bootloader/Http/SessionBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
                 'handler' => new Autowire(
63 63
                     FileHandler::class,
64 64
                     [
65
-                        'directory' => $directories->get('runtime') . 'session',
65
+                        'directory' => $directories->get('runtime').'session',
66 66
                         'lifetime' => 86400,
67 67
                     ]
68 68
                 ),
Please login to merge, or discard this patch.
src/Bridge/Monolog/tests/HandlersTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $finalizer->shouldReceive('addFinalizer')->once();
41 41
 
42 42
         $this->container->bind(ConfiguratorInterface::class, new ConfigManager(
43
-            new class() implements LoaderInterface {
43
+            new class() implements LoaderInterface{
44 44
                 public function has(string $section): bool
45 45
                 {
46 46
                     return false;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@
 block discarded – undo
40 40
         $finalizer->shouldReceive('addFinalizer')->once();
41 41
 
42 42
         $this->container->bind(ConfiguratorInterface::class, new ConfigManager(
43
-            new class() implements LoaderInterface {
43
+            new class() implements LoaderInterface
44
+            {
44 45
                 public function has(string $section): bool
45 46
                 {
46 47
                     return false;
Please login to merge, or discard this patch.
src/Bridge/Monolog/tests/ProcessorsTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $finalizer->shouldReceive('addFinalizer')->once();
33 33
 
34 34
         $this->container->bind(ConfiguratorInterface::class, new ConfigManager(
35
-            new class() implements LoaderInterface {
35
+            new class() implements LoaderInterface{
36 36
                 public function has(string $section): bool
37 37
                 {
38 38
                     return false;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             ]
84 84
         ]));
85 85
 
86
-        $logger = $this->container->get(LogsInterface::class)->getLogger('test');;
86
+        $logger = $this->container->get(LogsInterface::class)->getLogger('test'); ;
87 87
 
88 88
         $this->assertCount(1, $logger->getProcessors());
89 89
         $this->assertInstanceOf(PsrLogMessageProcessor::class, $logger->getProcessors()[0]);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@
 block discarded – undo
40 40
         $finalizer->shouldReceive('addFinalizer')->once();
41 41
 
42 42
         $this->container->bind(ConfiguratorInterface::class, new ConfigManager(
43
-            new class() implements LoaderInterface {
43
+            new class() implements LoaderInterface
44
+            {
44 45
                 public function has(string $section): bool
45 46
                 {
46 47
                     return false;
Please login to merge, or discard this patch.
src/Framework/Console/CommandLocator.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,10 @@
 block discarded – undo
38 38
     public function locateCommands(): array
39 39
     {
40 40
         $commands = [];
41
-        foreach ($this->classes->getScopedClasses('consoleCommands', SymfonyCommand::class) as $class) {
42
-            if ($class->isAbstract()) {
41
+        foreach ($this->classes->getScopedClasses('consoleCommands', SymfonyCommand::class) as $class)
42
+        {
43
+            if ($class->isAbstract())
44
+            {
43 45
                 continue;
44 46
             }
45 47
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         private readonly ScopedClassesInterface $classes,
18 18
         ContainerInterface $container,
19 19
         array $interceptors = [],
20
-    ) {
20
+    ){
21 21
         $this->container = $container;
22 22
         $this->interceptors = $interceptors;
23 23
     }
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
     public function locateCommands(): array
26 26
     {
27 27
         $commands = [];
28
-        foreach ($this->classes->getScopedClasses('consoleCommands', SymfonyCommand::class) as $class) {
29
-            if ($class->isAbstract()) {
28
+        foreach ($this->classes->getScopedClasses('consoleCommands', SymfonyCommand::class) as $class){
29
+            if ($class->isAbstract()){
30 30
                 continue;
31 31
             }
32 32
 
Please login to merge, or discard this patch.
src/Prototype/tests/LocatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             'directories' => [],
48 48
             'scopes' => [
49 49
                 'prototypes' => [
50
-                    'directories' => [__DIR__ . '/Fixtures']
50
+                    'directories' => [__DIR__.'/Fixtures']
51 51
                 ]
52 52
             ]
53 53
         ])));
Please login to merge, or discard this patch.
src/Cache/tests/Core/CacheInjectorTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
                     'test' => $this->defaultCache,
77 77
                     'array' => new ArrayStorage(),
78 78
                 ][$name] ?? null;
79
-            if ($result === null) {
79
+            if ($result === null){
80 80
                 throw new NotFoundException();
81 81
             }
82 82
             return $result;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,8 @@
 block discarded – undo
76 76
                     'test' => $this->defaultCache,
77 77
                     'array' => new ArrayStorage(),
78 78
                 ][$name] ?? null;
79
-            if ($result === null) {
79
+            if ($result === null)
80
+            {
80 81
                 throw new NotFoundException();
81 82
             }
82 83
             return $result;
Please login to merge, or discard this patch.
src/Http/tests/Stream/GeneratorStreamTest.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@
 block discarded – undo
48 48
 
49 49
     public function testRewindAfterRead(): void
50 50
     {
51
-        if (PHP_VERSION_ID < 80000) {
51
+        if (PHP_VERSION_ID < 80000)
52
+        {
52 53
             $this->markTestSkipped('See issue https://bugs.php.net/bug.php?id=79927.');
53 54
         }
54 55
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function testRewindAfterRead(): void
50 50
     {
51
-        if (PHP_VERSION_ID < 80000) {
51
+        if (PHP_VERSION_ID < 80000){
52 52
             $this->markTestSkipped('See issue https://bugs.php.net/bug.php?id=79927.');
53 53
         }
54 54
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
         $rValue = 'return-value';
104 104
         $stream = $this->createStream(self::DEFAULT_SEQUENCE, $rValue);
105 105
 
106
-        $result = (string) $stream;
106
+        $result = (string)$stream;
107 107
 
108
-        $this->assertSame(self::DEFAULT_CONTENT_RESULT . $rValue, $result);
108
+        $this->assertSame(self::DEFAULT_CONTENT_RESULT.$rValue, $result);
109 109
     }
110 110
 
111 111
     public function testToStringWithReturnOnly(): void
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $rValue = 'return-value';
114 114
         $stream = $this->createStream([], $rValue);
115 115
 
116
-        $result = (string) $stream;
116
+        $result = (string)$stream;
117 117
 
118 118
         $this->assertSame($rValue, $result);
119 119
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $stream = $this->createStream();
124 124
         $stream->close();
125 125
 
126
-        $this->assertSame('', (string) $stream);
126
+        $this->assertSame('', (string)$stream);
127 127
 
128 128
         $this->expectException(RuntimeException::class);
129 129
         $this->expectExceptionMessage('Unable to read stream contents.');
Please login to merge, or discard this patch.
src/Http/src/Stream/GeneratorStream.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -27,23 +27,23 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function __toString(): string
29 29
     {
30
-        try {
30
+        try{
31 31
             return $this->getContents();
32
-        } catch (\Exception $e) {
32
+        }catch (\Exception $e){
33 33
             return '';
34 34
         }
35 35
     }
36 36
 
37 37
     public function close(): void
38 38
     {
39
-        if ($this->stream !== null) {
39
+        if ($this->stream !== null){
40 40
             $this->detach();
41 41
         }
42 42
     }
43 43
 
44 44
     public function detach()
45 45
     {
46
-        if ($this->stream === null) {
46
+        if ($this->stream === null){
47 47
             return null;
48 48
         }
49 49
         $this->stream = null;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     public function rewind(): void
83 83
     {
84
-        if ($this->stream !== null) {
84
+        if ($this->stream !== null){
85 85
             $this->stream->rewind();
86 86
         }
87 87
         $this->caret = 0;
@@ -105,26 +105,26 @@  discard block
 block discarded – undo
105 105
 
106 106
     public function read($length): string
107 107
     {
108
-        if (!$this->readable) {
108
+        if (!$this->readable){
109 109
             throw new RuntimeException('Cannot read from non-readable stream.');
110 110
         }
111
-        if ($this->stream === null) {
111
+        if ($this->stream === null){
112 112
             throw new RuntimeException('Cannot read from detached stream.');
113 113
         }
114
-        do {
115
-            if ($this->started) {
114
+        do{
115
+            if ($this->started){
116 116
                 $read = (string)$this->stream->send(null);
117
-            } else {
117
+            }else{
118 118
                 $this->started = true;
119 119
                 $read = (string)$this->stream->current();
120 120
             }
121
-            if (!$this->stream->valid()) {
121
+            if (!$this->stream->valid()){
122 122
                 $read .= $this->stream->getReturn();
123 123
                 break;
124 124
             }
125
-        } while ($read === '');
125
+        }while ($read === '');
126 126
         $this->caret += \strlen($read);
127
-        if (!$this->stream->valid()) {
127
+        if (!$this->stream->valid()){
128 128
             $this->size = $this->caret;
129 129
         }
130 130
         return $read;
@@ -132,19 +132,19 @@  discard block
 block discarded – undo
132 132
 
133 133
     public function getContents(): string
134 134
     {
135
-        if ($this->stream === null) {
135
+        if ($this->stream === null){
136 136
             throw new RuntimeException('Unable to read stream contents.');
137 137
         }
138 138
         $content = '';
139
-        do {
139
+        do{
140 140
             $content .= $this->read(PHP_INT_MAX);
141
-        } while ($this->stream->valid());
141
+        }while ($this->stream->valid());
142 142
         return $content;
143 143
     }
144 144
 
145 145
     public function getMetadata($key = null)
146 146
     {
147
-        if ($this->stream === null) {
147
+        if ($this->stream === null){
148 148
             return $key ? null : [];
149 149
         }
150 150
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             'eof' => $this->eof(),
154 154
         ];
155 155
 
156
-        if (null === $key) {
156
+        if (null === $key){
157 157
             return $meta;
158 158
         }
159 159
 
Please login to merge, or discard this patch.
Braces   +34 added lines, -16 removed lines patch added patch discarded remove patch
@@ -27,23 +27,28 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function __toString(): string
29 29
     {
30
-        try {
30
+        try
31
+        {
31 32
             return $this->getContents();
32
-        } catch (\Exception $e) {
33
+        }
34
+        catch (\Exception $e)
35
+        {
33 36
             return '';
34 37
         }
35 38
     }
36 39
 
37 40
     public function close(): void
38 41
     {
39
-        if ($this->stream !== null) {
42
+        if ($this->stream !== null)
43
+        {
40 44
             $this->detach();
41 45
         }
42 46
     }
43 47
 
44 48
     public function detach()
45 49
     {
46
-        if ($this->stream === null) {
50
+        if ($this->stream === null)
51
+        {
47 52
             return null;
48 53
         }
49 54
         $this->stream = null;
@@ -81,7 +86,8 @@  discard block
 block discarded – undo
81 86
 
82 87
     public function rewind(): void
83 88
     {
84
-        if ($this->stream !== null) {
89
+        if ($this->stream !== null)
90
+        {
85 91
             $this->stream->rewind();
86 92
         }
87 93
         $this->caret = 0;
@@ -105,26 +111,34 @@  discard block
 block discarded – undo
105 111
 
106 112
     public function read($length): string
107 113
     {
108
-        if (!$this->readable) {
114
+        if (!$this->readable)
115
+        {
109 116
             throw new RuntimeException('Cannot read from non-readable stream.');
110 117
         }
111
-        if ($this->stream === null) {
118
+        if ($this->stream === null)
119
+        {
112 120
             throw new RuntimeException('Cannot read from detached stream.');
113 121
         }
114
-        do {
115
-            if ($this->started) {
122
+        do
123
+        {
124
+            if ($this->started)
125
+            {
116 126
                 $read = (string)$this->stream->send(null);
117
-            } else {
127
+            }
128
+            else
129
+            {
118 130
                 $this->started = true;
119 131
                 $read = (string)$this->stream->current();
120 132
             }
121
-            if (!$this->stream->valid()) {
133
+            if (!$this->stream->valid())
134
+            {
122 135
                 $read .= $this->stream->getReturn();
123 136
                 break;
124 137
             }
125 138
         } while ($read === '');
126 139
         $this->caret += \strlen($read);
127
-        if (!$this->stream->valid()) {
140
+        if (!$this->stream->valid())
141
+        {
128 142
             $this->size = $this->caret;
129 143
         }
130 144
         return $read;
@@ -132,11 +146,13 @@  discard block
 block discarded – undo
132 146
 
133 147
     public function getContents(): string
134 148
     {
135
-        if ($this->stream === null) {
149
+        if ($this->stream === null)
150
+        {
136 151
             throw new RuntimeException('Unable to read stream contents.');
137 152
         }
138 153
         $content = '';
139
-        do {
154
+        do
155
+        {
140 156
             $content .= $this->read(PHP_INT_MAX);
141 157
         } while ($this->stream->valid());
142 158
         return $content;
@@ -144,7 +160,8 @@  discard block
 block discarded – undo
144 160
 
145 161
     public function getMetadata($key = null)
146 162
     {
147
-        if ($this->stream === null) {
163
+        if ($this->stream === null)
164
+        {
148 165
             return $key ? null : [];
149 166
         }
150 167
 
@@ -153,7 +170,8 @@  discard block
 block discarded – undo
153 170
             'eof' => $this->eof(),
154 171
         ];
155 172
 
156
-        if (null === $key) {
173
+        if (null === $key)
174
+        {
157 175
             return $meta;
158 176
         }
159 177
 
Please login to merge, or discard this patch.