Completed
Branch master (b140cc)
by Alejandro
07:49
created
src/Service/ContactServiceInterface.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\Service;
5 5
 
Please login to merge, or discard this patch.
src/Service/RouteAssembler.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\Service;
5 5
 
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function assembleUrl(
37 37
         string $name = null,
38
-        $routeParams = [],
39
-        $queryParams = [],
38
+        $routeParams = [ ],
39
+        $queryParams = [ ],
40 40
         bool $inherit = false
41 41
     ): string {
42 42
         $routeResult = $this->getCurrentRouteResult();
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
 
47 47
         if (is_bool($routeParams)) {
48 48
             $inherit = $routeParams;
49
-            $routeParams = [];
49
+            $routeParams = [ ];
50 50
         }
51 51
 
52 52
         if (is_bool($queryParams)) {
53 53
             $inherit = $queryParams;
54
-            $queryParams = [];
54
+            $queryParams = [ ];
55 55
         }
56 56
 
57 57
         if ($inherit) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         }
61 61
 
62 62
         $queryString = empty($queryParams) ? '' : sprintf('?%s', http_build_query($queryParams));
63
-        return $this->router->generateUri($name, $routeParams) . $queryString;
63
+        return $this->router->generateUri($name, $routeParams).$queryString;
64 64
     }
65 65
 
66 66
     /**
Please login to merge, or discard this patch.
src/I18n/FakeTranslator.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\I18n;
5 5
 
Please login to merge, or discard this patch.
src/Form/RecaptchaValidator.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\Form;
5 5
 
Please login to merge, or discard this patch.
src/Form/ContactFilter.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\Form;
5 5
 
Please login to merge, or discard this patch.
src/Action/Redirect.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\Action;
5 5
 
Please login to merge, or discard this patch.
src/Action/Template.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\Action;
5 5
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param array $viewParams
32 32
      * @return HtmlResponse
33 33
      */
34
-    protected function createTemplateResponse(Request $request, array $viewParams = []): HtmlResponse
34
+    protected function createTemplateResponse(Request $request, array $viewParams = [ ]): HtmlResponse
35 35
     {
36 36
         $template = $request->getAttribute('template', self::NOT_FOUND_TEMPLATE);
37 37
         $status = $template === self::NOT_FOUND_TEMPLATE ? self::STATUS_NOT_FOUND : self::STATUS_OK;
Please login to merge, or discard this patch.
src/Action/AbstractAction.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\Action;
5 5
 
Please login to merge, or discard this patch.
src/Action/Contact.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\Action;
5 5
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         parent::__construct($renderer);
39 39
         $this->contactService = $contactService;
40 40
         $this->contactFilter = $contactFilter;
41
-        $this->session= $session ?: new Container(__CLASS__);
41
+        $this->session = $session ?: new Container(__CLASS__);
42 42
     }
43 43
 
44 44
     /**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function dispatch(Request $request, DelegateInterface $delegate): Response
52 52
     {
53 53
         // On GET requests that are not comming from PRG, just return the template
54
-        if ($request->getMethod() === self::METHOD_GET && ! $this->session->offsetExists(self::PRG_DATA)) {
54
+        if ($request->getMethod() === self::METHOD_GET && !$this->session->offsetExists(self::PRG_DATA)) {
55 55
             return $this->createTemplateResponse($request);
56 56
         }
57 57
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $this->session->offsetUnset(self::PRG_DATA);
68 68
         $filter = $this->contactFilter;
69 69
         $filter->setData($params);
70
-        if (! $filter->isValid()) {
70
+        if (!$filter->isValid()) {
71 71
             return $this->createTemplateResponse($request, [
72 72
                 'errors' => $filter->getMessages(),
73 73
                 'currentData' => $params,
@@ -76,6 +76,6 @@  discard block
 block discarded – undo
76 76
 
77 77
         // If the form is valid, send the email
78 78
         $result = $this->contactService->send($filter->getValues());
79
-        return $this->createTemplateResponse($request, $result ? ['success' => true] : ['errors' => []]);
79
+        return $this->createTemplateResponse($request, $result ? [ 'success' => true ] : [ 'errors' => [ ] ]);
80 80
     }
81 81
 }
Please login to merge, or discard this patch.