Passed
Pull Request — master (#1205)
by Aleksei
18:36 queued 06:28
created
src/Cache/src/Event/KeyDeleting.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,4 +7,4 @@
 block discarded – undo
7 7
 /**
8 8
  * Triggered before cache item is deleted.
9 9
  */
10
-final class KeyDeleting extends CacheEvent {}
10
+final class KeyDeleting extends CacheEvent{}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,4 +7,6 @@
 block discarded – undo
7 7
 /**
8 8
  * Triggered before cache item is deleted.
9 9
  */
10
-final class KeyDeleting extends CacheEvent {}
10
+final class KeyDeleting extends CacheEvent
11
+{
12
+}
Please login to merge, or discard this patch.
src/Router/src/Loader/LoaderRegistry.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@
 block discarded – undo
16 16
      */
17 17
     public function __construct(array $loaders = [])
18 18
     {
19
-        foreach ($loaders as $loader) {
19
+        foreach ($loaders as $loader){
20 20
             $this->addLoader($loader);
21 21
         }
22 22
     }
23 23
 
24
-    public function resolve(mixed $resource, ?string $type = null): LoaderInterface|false
24
+    public function resolve(mixed $resource, ?string $type = null): LoaderInterface | false
25 25
     {
26
-        foreach ($this->loaders as $loader) {
27
-            if ($loader->supports($resource, $type)) {
26
+        foreach ($this->loaders as $loader){
27
+            if ($loader->supports($resource, $type)){
28 28
                 return $loader;
29 29
             }
30 30
         }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,15 +16,18 @@
 block discarded – undo
16 16
      */
17 17
     public function __construct(array $loaders = [])
18 18
     {
19
-        foreach ($loaders as $loader) {
19
+        foreach ($loaders as $loader)
20
+        {
20 21
             $this->addLoader($loader);
21 22
         }
22 23
     }
23 24
 
24 25
     public function resolve(mixed $resource, ?string $type = null): LoaderInterface|false
25 26
     {
26
-        foreach ($this->loaders as $loader) {
27
-            if ($loader->supports($resource, $type)) {
27
+        foreach ($this->loaders as $loader)
28
+        {
29
+            if ($loader->supports($resource, $type))
30
+            {
28 31
                 return $loader;
29 32
             }
30 33
         }
Please login to merge, or discard this patch.
src/Router/src/Loader/LoaderRegistryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,5 +11,5 @@
 block discarded – undo
11 11
      *
12 12
      * @param string|null $type The resource type or null if unknown
13 13
      */
14
-    public function resolve(mixed $resource, ?string $type = null): LoaderInterface|false;
14
+    public function resolve(mixed $resource, ?string $type = null): LoaderInterface | false;
15 15
 }
Please login to merge, or discard this patch.
src/Translator/src/Traits/TranslatorTrait.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
      */
33 33
     protected function say(string $string, array $options = [], ?string $bundle = null): string
34 34
     {
35
-        if (Translator::isMessage($string)) {
35
+        if (Translator::isMessage($string)){
36 36
             //Cut [[ and ]]
37 37
             $string = \substr($string, 2, -2);
38 38
         }
39 39
 
40 40
         $container = ContainerScope::getContainer();
41
-        if (empty($container) || !$container->has(TranslatorInterface::class)) {
41
+        if (empty($container) || !$container->has(TranslatorInterface::class)){
42 42
             return Translator::interpolate($string, $options);
43 43
         }
44 44
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
          */
48 48
         $translator = $container->get(TranslatorInterface::class);
49 49
 
50
-        if (\is_null($bundle)) {
50
+        if (\is_null($bundle)){
51 51
             $bundle = $translator->getDomain(static::class);
52 52
         }
53 53
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,13 +32,15 @@  discard block
 block discarded – undo
32 32
      */
33 33
     protected function say(string $string, array $options = [], ?string $bundle = null): string
34 34
     {
35
-        if (Translator::isMessage($string)) {
35
+        if (Translator::isMessage($string))
36
+        {
36 37
             //Cut [[ and ]]
37 38
             $string = \substr($string, 2, -2);
38 39
         }
39 40
 
40 41
         $container = ContainerScope::getContainer();
41
-        if (empty($container) || !$container->has(TranslatorInterface::class)) {
42
+        if (empty($container) || !$container->has(TranslatorInterface::class))
43
+        {
42 44
             return Translator::interpolate($string, $options);
43 45
         }
44 46
 
@@ -47,7 +49,8 @@  discard block
 block discarded – undo
47 49
          */
48 50
         $translator = $container->get(TranslatorInterface::class);
49 51
 
50
-        if (\is_null($bundle)) {
52
+        if (\is_null($bundle))
53
+        {
51 54
             $bundle = $translator->getDomain(static::class);
52 55
         }
53 56
 
Please login to merge, or discard this patch.
src/Views/src/LoaderInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,5 +43,5 @@
 block discarded – undo
43 43
      *
44 44
      * @throws LoaderException
45 45
      */
46
-    public function list(?string $namespace = null): array;
46
+    public function list(?string $namespace = null) : array;
47 47
 }
Please login to merge, or discard this patch.
src/Views/src/Exception/CompileException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 
11 11
     public function __construct(?\Throwable $previous = null)
12 12
     {
13
-        parent::__construct((string) $previous?->getMessage(), (int) ($previous?->getCode() ?? 0), $previous);
13
+        parent::__construct((string)$previous?->getMessage(), (int)($previous?->getCode() ?? 0), $previous);
14 14
 
15
-        $this->file = (string) $previous?->getFile();
16
-        $this->line = (int) $previous?->getLine();
15
+        $this->file = (string)$previous?->getFile();
16
+        $this->line = (int)$previous?->getLine();
17 17
     }
18 18
 
19 19
     /**
Please login to merge, or discard this patch.
src/Views/src/Exception/RenderException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@
 block discarded – undo
10 10
 
11 11
     public function __construct(?\Throwable $previous = null)
12 12
     {
13
-        parent::__construct((string) $previous?->getMessage(), (int) ($previous?->getCode() ?? 0), $previous);
14
-        $this->file = (string) $previous?->getFile();
15
-        $this->line = (int) $previous?->getLine();
13
+        parent::__construct((string)$previous?->getMessage(), (int)($previous?->getCode() ?? 0), $previous);
14
+        $this->file = (string)$previous?->getFile();
15
+        $this->line = (int)$previous?->getLine();
16 16
     }
17 17
 
18 18
     /**
Please login to merge, or discard this patch.
src/Views/src/ViewCache.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function reset(?ContextInterface $context = null): void
14 14
     {
15
-        if (empty($context)) {
15
+        if (empty($context)){
16 16
             $this->cache = [];
17 17
             return;
18 18
         }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function resetPath(string $path): void
27 27
     {
28
-        foreach ($this->cache as &$cache) {
28
+        foreach ($this->cache as &$cache){
29 29
             unset($cache[$path], $cache);
30 30
         }
31 31
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function get(ContextInterface $context, string $path): ViewInterface
47 47
     {
48
-        if (!$this->has($context, $path)) {
48
+        if (!$this->has($context, $path)){
49 49
             throw new CacheException(\sprintf('No cache is available for %s.', $path));
50 50
         }
51 51
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,8 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function reset(?ContextInterface $context = null): void
14 14
     {
15
-        if (empty($context)) {
15
+        if (empty($context))
16
+        {
16 17
             $this->cache = [];
17 18
             return;
18 19
         }
@@ -25,7 +26,8 @@  discard block
 block discarded – undo
25 26
      */
26 27
     public function resetPath(string $path): void
27 28
     {
28
-        foreach ($this->cache as &$cache) {
29
+        foreach ($this->cache as &$cache)
30
+        {
29 31
             unset($cache[$path], $cache);
30 32
         }
31 33
     }
@@ -45,7 +47,8 @@  discard block
 block discarded – undo
45 47
      */
46 48
     public function get(ContextInterface $context, string $path): ViewInterface
47 49
     {
48
-        if (!$this->has($context, $path)) {
50
+        if (!$this->has($context, $path))
51
+        {
49 52
             throw new CacheException(\sprintf('No cache is available for %s.', $path));
50 53
         }
51 54
 
Please login to merge, or discard this patch.
src/Logger/src/Traits/LoggerTrait.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      */
30 30
     protected function getLogger(?string $channel = null): LoggerInterface
31 31
     {
32
-        if ($channel !== null) {
32
+        if ($channel !== null){
33 33
             return $this->allocateLogger($channel);
34 34
         }
35 35
 
36
-        if ($this->logger !== null) {
36
+        if ($this->logger !== null){
37 37
             return $this->logger;
38 38
         }
39 39
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     private function allocateLogger(string $channel): LoggerInterface
48 48
     {
49 49
         $container = ContainerScope::getContainer();
50
-        if ($container === null || !$container->has(LogsInterface::class)) {
50
+        if ($container === null || !$container->has(LogsInterface::class)){
51 51
             return $this->logger ?? new NullLogger();
52 52
         }
53 53
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,11 +29,13 @@  discard block
 block discarded – undo
29 29
      */
30 30
     protected function getLogger(?string $channel = null): LoggerInterface
31 31
     {
32
-        if ($channel !== null) {
32
+        if ($channel !== null)
33
+        {
33 34
             return $this->allocateLogger($channel);
34 35
         }
35 36
 
36
-        if ($this->logger !== null) {
37
+        if ($this->logger !== null)
38
+        {
37 39
             return $this->logger;
38 40
         }
39 41
 
@@ -47,7 +49,8 @@  discard block
 block discarded – undo
47 49
     private function allocateLogger(string $channel): LoggerInterface
48 50
     {
49 51
         $container = ContainerScope::getContainer();
50
-        if ($container === null || !$container->has(LogsInterface::class)) {
52
+        if ($container === null || !$container->has(LogsInterface::class))
53
+        {
51 54
             return $this->logger ?? new NullLogger();
52 55
         }
53 56
 
Please login to merge, or discard this patch.