Completed
Push — master ( ee9f0a...ea1904 )
by Alejandro
04:45
created
src/Service/RouteAssembler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
      * @param bool $inherit Tells if route and query params should be inherited from current route
32 32
      * @return string
33 33
      */
34
-    public function assembleUrl($name = null, $routeParams = [], $queryParams = [], $inherit = false)
34
+    public function assembleUrl($name = null, $routeParams = [ ], $queryParams = [ ], $inherit = false)
35 35
     {
36 36
         $routeResult = $this->getCurrentRouteResult();
37 37
         $name = $name ?: $routeResult->getMatchedRouteName();
38 38
 
39 39
         if (is_bool($routeParams)) {
40 40
             $inherit = $routeParams;
41
-            $routeParams = [];
41
+            $routeParams = [ ];
42 42
         }
43 43
 
44 44
         if (is_bool($queryParams)) {
45 45
             $inherit = $queryParams;
46
-            $queryParams = [];
46
+            $queryParams = [ ];
47 47
         }
48 48
 
49 49
         if ($inherit) {
Please login to merge, or discard this patch.
src/Service/ContactService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         return \Swift_Message::newInstance($this->options->getSubject())
46 46
                              ->setTo($this->options->getTo())
47 47
                              ->setFrom($this->options->getFrom())
48
-                             ->setReplyTo($messageData['email'])
48
+                             ->setReplyTo($messageData[ 'email' ])
49 49
                              ->setBody($this->composeBody($messageData), 'text/html');
50 50
     }
51 51
 
Please login to merge, or discard this patch.
src/Service/RouteAssemblerInterface.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
      * @param bool $inherit Tells if route and query params should be inherited from current route
16 16
      * @return string
17 17
      */
18
-    public function assembleUrl($name = null, $routeParams = [], $queryParams = [], $inherit = false);
18
+    public function assembleUrl($name = null, $routeParams = [ ], $queryParams = [ ], $inherit = false);
19 19
 
20 20
     /**
21 21
      * @return RouteResult
Please login to merge, or discard this patch.
src/Factory/TranslatorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __invoke(ContainerInterface $container)
10 10
     {
11
-        $translatorConfig = $container->get('config')['translator'];
11
+        $translatorConfig = $container->get('config')[ 'translator' ];
12 12
         return Translator::factory($translatorConfig);
13 13
     }
14 14
 }
Please login to merge, or discard this patch.
src/Factory/RendererFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
         $twig->addExtension(new NavigationExtension(
25 25
             $container->get('translator'),
26 26
             $container->get(RouteAssembler::class),
27
-            $container->get('config')['navigation']
27
+            $container->get('config')[ 'navigation' ]
28 28
         ));
29
-        $twig->addExtension(new RecaptchaExtension($container->get('config')['recaptcha']));
29
+        $twig->addExtension(new RecaptchaExtension($container->get('config')[ 'recaptcha' ]));
30 30
 
31 31
         return new Twig($twig);
32 32
     }
Please login to merge, or discard this patch.
src/Factory/RecaptchaFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __invoke(ContainerInterface $container)
10 10
     {
11
-        $recaptchaConfig = $container->get('config')['recaptcha'];
12
-        return new ReCaptcha($recaptchaConfig['private_key']);
11
+        $recaptchaConfig = $container->get('config')[ 'recaptcha' ];
12
+        return new ReCaptcha($recaptchaConfig[ 'private_key' ]);
13 13
     }
14 14
 }
Please login to merge, or discard this patch.
src/Factory/SwiftMailerFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 {
8 8
     public function __invoke(ContainerInterface $container)
9 9
     {
10
-        $mailConfig = $container->get('config')['mail'];
11
-        $smtp = $mailConfig['smtp'];
12
-        $transport = \Swift_SmtpTransport::newInstance($smtp['server'], $smtp['port'], $smtp['ssl'])
13
-                                         ->setUsername($smtp['username'])
14
-                                         ->setPassword($smtp['password']);
10
+        $mailConfig = $container->get('config')[ 'mail' ];
11
+        $smtp = $mailConfig[ 'smtp' ];
12
+        $transport = \Swift_SmtpTransport::newInstance($smtp[ 'server' ], $smtp[ 'port' ], $smtp[ 'ssl' ])
13
+                                         ->setUsername($smtp[ 'username' ])
14
+                                         ->setPassword($smtp[ 'password' ]);
15 15
         return new \Swift_Mailer($transport);
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
config/container.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,5 +3,5 @@
 block discarded – undo
3 3
 
4 4
 // Create a ServiceManager from service_manager config and register the merged config as a service
5 5
 $config = include __DIR__ . '/config.php';
6
-$config['service_manager']['services']['config'] = $config;
7
-return new ServiceManager(isset($config['service_manager']) ? $config['service_manager'] : []);
6
+$config[ 'service_manager' ][ 'services' ][ 'config' ] = $config;
7
+return new ServiceManager(isset($config[ 'service_manager' ]) ? $config[ 'service_manager' ] : [ ]);
Please login to merge, or discard this patch.
src/Action/Contact.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         parent::__construct($renderer);
36 36
         $this->contactService = $contactService;
37 37
         $this->contactFilter = $contactFilter;
38
-        $this->session= $session ?: new Container(__CLASS__);
38
+        $this->session = $session ?: new Container(__CLASS__);
39 39
     }
40 40
 
41 41
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function dispatch(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
50 50
     {
51 51
         // On GET requests that are not comming from PRG, just return the template
52
-        if ($request->getMethod() === 'GET' && ! $this->session->offsetExists(self::PRG_DATA)) {
52
+        if ($request->getMethod() === 'GET' && !$this->session->offsetExists(self::PRG_DATA)) {
53 53
             return $this->createTemplateResponse($request);
54 54
         }
55 55
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this->session->offsetUnset(self::PRG_DATA);
66 66
         $filter = $this->contactFilter;
67 67
         $filter->setData($params);
68
-        if (! $filter->isValid()) {
68
+        if (!$filter->isValid()) {
69 69
             return $this->createTemplateResponse($request, [
70 70
                 'errors' => $filter->getMessages(),
71 71
                 'currentData' => $params
@@ -74,6 +74,6 @@  discard block
 block discarded – undo
74 74
 
75 75
         // If the form is valid, send the email
76 76
         $result = $this->contactService->send($filter->getValues());
77
-        return $this->createTemplateResponse($request, $result ? ['success' => true] : ['errors' => []]);
77
+        return $this->createTemplateResponse($request, $result ? [ 'success' => true ] : [ 'errors' => [ ] ]);
78 78
     }
79 79
 }
Please login to merge, or discard this patch.