Completed
Branch master (b140cc)
by Alejandro
07:49
created
src/Factory/ErrorHandlerDelegator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\Website\Factory;
5 5
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         /** @var ErrorHandler $errorHandler */
40 40
         $errorHandler = $callback();
41
-        $errorHandler->attachListener([$this, 'logError']);
41
+        $errorHandler->attachListener([ $this, 'logError' ]);
42 42
 
43 43
         return $errorHandler;
44 44
     }
@@ -50,6 +50,6 @@  discard block
 block discarded – undo
50 50
         $logger->error(sprintf(
51 51
             'An error occurred while processing request for URI "%s"',
52 52
             (string) $request->getUri()
53
-        ) . PHP_EOL . $e);
53
+        ).PHP_EOL.$e);
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/Factory/LoggerFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\Website\Factory;
5 5
 
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
30 30
     {
31
-        $loggerConfig = $container->get('config')['logger'];
32
-        $isDebug = $container->get('config')['debug'] ?? false;
31
+        $loggerConfig = $container->get('config')[ 'logger' ];
32
+        $isDebug = $container->get('config')[ 'debug' ] ?? false;
33 33
 
34
-        $formatter = new LineFormatter('[%datetime%] %channel%.%level_name% - %message% %context%' . PHP_EOL);
34
+        $formatter = new LineFormatter('[%datetime%] %channel%.%level_name% - %message% %context%'.PHP_EOL);
35 35
         $formatter->includeStacktraces();
36 36
 
37
-        $handler = new StreamHandler($loggerConfig['file'], $isDebug ? Logger::DEBUG : Logger::INFO);
37
+        $handler = new StreamHandler($loggerConfig[ 'file' ], $isDebug ? Logger::DEBUG : Logger::INFO);
38 38
         $handler->setFormatter($formatter);
39 39
 
40
-        return new Logger('alejandrocelaya.com', [$handler]);
40
+        return new Logger('alejandrocelaya.com', [ $handler ]);
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
src/Factory/DotNotationConfigAbstractFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\Website\Factory;
5 5
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $parts = explode('.', $requestedName);
41 41
         $serviceName = array_shift($parts);
42
-        if (! $container->has($serviceName)) {
42
+        if (!$container->has($serviceName)) {
43 43
             throw new ServiceNotCreatedException(sprintf(
44 44
                 'Defined service "%s" could not be found in container after resolving dotted expression "%s".',
45 45
                 $serviceName,
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
         $key = array_shift($keys);
63 63
 
64 64
         // When one of the provided keys is not found, throw an exception
65
-        if (! isset($array[$key])) {
65
+        if (!isset($array[ $key ])) {
66 66
             throw new ServiceNotCreatedException(sprintf(
67 67
                 'The key "%s" provided in the dotted notation could not be found in the array service',
68 68
                 $key
69 69
             ));
70 70
         }
71 71
 
72
-        $value = $array[$key];
73
-        if (! empty($keys) && (is_array($value) || $value instanceof \ArrayAccess)) {
72
+        $value = $array[ $key ];
73
+        if (!empty($keys) && (is_array($value) || $value instanceof \ArrayAccess)) {
74 74
             $value = $this->readKeysFromArray($keys, $value);
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/Factory/TranslatorFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\Website\Factory;
5 5
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Translator
28 28
     {
29
-        $translatorConfig = $container->get('config')['translator'];
29
+        $translatorConfig = $container->get('config')[ 'translator' ];
30 30
         return Translator::factory($translatorConfig);
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Factory/SwiftMailerFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\Website\Factory;
5 5
 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null): \Swift_Mailer
27 27
     {
28
-        $mailConfig = $container->get('config')['mail'];
29
-        $smtp = $mailConfig['smtp'];
30
-        $transport = \Swift_SmtpTransport::newInstance($smtp['server'], $smtp['port'], $smtp['ssl'])
31
-                                         ->setUsername($smtp['username'])
32
-                                         ->setPassword($smtp['password']);
28
+        $mailConfig = $container->get('config')[ 'mail' ];
29
+        $smtp = $mailConfig[ 'smtp' ];
30
+        $transport = \Swift_SmtpTransport::newInstance($smtp[ 'server' ], $smtp[ 'port' ], $smtp[ 'ssl' ])
31
+                                         ->setUsername($smtp[ 'username' ])
32
+                                         ->setPassword($smtp[ 'password' ]);
33 33
         return new \Swift_Mailer($transport);
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/Factory/RequestFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Acelaya\Website\Factory;
5 5
 
Please login to merge, or discard this patch.