Completed
Branch master (b140cc)
by Alejandro
07:49
created
src/Form/ContactFilter.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-     * @param $name
42
+     * @param string $name
43 43
      * @param bool|true $required
44 44
      * @return Input
45 45
      */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     {
48 48
         $input = new Input($name);
49 49
         $input->setRequired($required)
50
-              ->getFilterChain()->attach(new StripTags())
50
+                ->getFilterChain()->attach(new StripTags())
51 51
                                 ->attach(new StringTrim());
52 52
         return $input;
53 53
     }
Please login to merge, or discard this 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/Factory/SwiftMailerFactory.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
         $mailConfig = $container->get('config')['mail'];
11 11
         $smtp = $mailConfig['smtp'];
12 12
         $transport = \Swift_SmtpTransport::newInstance($smtp['server'], $smtp['port'], $smtp['ssl'])
13
-                                         ->setUsername($smtp['username'])
14
-                                         ->setPassword($smtp['password']);
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.
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.
config/container.php 1 patch
Spacing   +7 added lines, -7 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
 use Dotenv\Dotenv;
5 5
 use Zend\ServiceManager\ServiceManager;
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
 chdir(dirname(__DIR__));
9 9
 
10 10
 // Setup autoloading
11
-require __DIR__ . '/../vendor/autoload.php';
11
+require __DIR__.'/../vendor/autoload.php';
12 12
 
13 13
 // Load environment variables
14 14
 if (class_exists(Dotenv::class)) {
15
-    $dotenv = new Dotenv(__DIR__ . '/..');
15
+    $dotenv = new Dotenv(__DIR__.'/..');
16 16
     $dotenv->load();
17
-    $dotenv->required('APP_ENV')->allowedValues(['pro', 'dev']);
17
+    $dotenv->required('APP_ENV')->allowedValues([ 'pro', 'dev' ]);
18 18
 }
19 19
 
20 20
 // Create a ServiceManager from service_manager config and register the merged config as a service
21
-return (function () {
22
-    $config = include __DIR__ . '/config.php';
23
-    $sm = new ServiceManager($config['service_manager'] ?? []);
21
+return (function() {
22
+    $config = include __DIR__.'/config.php';
23
+    $sm = new ServiceManager($config[ 'service_manager' ] ?? [ ]);
24 24
     $sm->setService('config', $config);
25 25
     return $sm;
26 26
 })();
Please login to merge, or discard this patch.
config/autoload/blog.global.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
 return [
5 5
 
Please login to merge, or discard this patch.
config/autoload/cli.global.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
 use Acelaya\Website\Console\Command;
5 5
 
Please login to merge, or discard this patch.
config/autoload/routes.global.php 1 patch
Spacing   +4 added lines, -4 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
 use Acelaya\Website\Action;
5 5
 use Zend\Stdlib\ArrayUtils;
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 $home = [
8 8
     'name' => 'home',
9 9
     'path' => '(/:lang)/',
10
-    'allowed_methods' => ['GET'],
10
+    'allowed_methods' => [ 'GET' ],
11 11
     'middleware' => Action\Template::class,
12 12
     'options' => [
13 13
         'conditions' => [
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         ArrayUtils::merge($home, [
36 36
             'name' => 'contact',
37 37
             'path' => '(/:lang)/contact/',
38
-            'allowed_methods' => ['POST'],
38
+            'allowed_methods' => [ 'POST' ],
39 39
             'middleware' => Action\Contact::class,
40 40
             'options' => [
41 41
                 'defaults' => [
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         [
50 50
             'name' => 'sitemap-redirect',
51 51
             'path' => '/Sitemap.xml',
52
-            'allowed_methods' => ['GET'],
52
+            'allowed_methods' => [ 'GET' ],
53 53
             'middleware' => Action\Redirect::class,
54 54
             'options' => [
55 55
                 'defaults' => [
Please login to merge, or discard this patch.
config/autoload/services.global.php 1 patch
Spacing   +15 added lines, -15 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
 use Acelaya\Expressive\Factory\SlimRouterFactory;
5 5
 use Acelaya\Website\Action\Contact;
@@ -101,26 +101,26 @@  discard block
 block discarded – undo
101 101
     ],
102 102
 
103 103
     ConfigAbstractFactory::class => [
104
-        Extension\TranslatorExtension::class => ['translator'],
105
-        Extension\UrlExtension::class => [Service\RouteAssembler::class],
106
-        Extension\NavigationExtension::class => ['translator', Service\RouteAssembler::class, 'config.navigation'],
107
-        Extension\RecaptchaExtension::class => ['config.recaptcha'],
108
-        BlogExtension::class => [Factory\CacheFactory::FEED_CACHE, Feed\BlogOptions::class],
109
-        Contact::class => ['renderer', Service\ContactService::class, ContactFilter::class],
110
-        Template::class => ['renderer'],
111
-        Service\RouteAssembler::class => [Expressive\Router\RouterInterface::class, 'request'],
112
-        Service\ContactService::class => [Swift_Mailer::class, 'renderer', MailOptions::class],
113
-        ContactFilter::class => [ReCaptcha::class],
104
+        Extension\TranslatorExtension::class => [ 'translator' ],
105
+        Extension\UrlExtension::class => [ Service\RouteAssembler::class ],
106
+        Extension\NavigationExtension::class => [ 'translator', Service\RouteAssembler::class, 'config.navigation' ],
107
+        Extension\RecaptchaExtension::class => [ 'config.recaptcha' ],
108
+        BlogExtension::class => [ Factory\CacheFactory::FEED_CACHE, Feed\BlogOptions::class ],
109
+        Contact::class => [ 'renderer', Service\ContactService::class, ContactFilter::class ],
110
+        Template::class => [ 'renderer' ],
111
+        Service\RouteAssembler::class => [ Expressive\Router\RouterInterface::class, 'request' ],
112
+        Service\ContactService::class => [ Swift_Mailer::class, 'renderer', MailOptions::class ],
113
+        ContactFilter::class => [ ReCaptcha::class ],
114 114
         Feed\Service\BlogFeedConsumer::class => [
115 115
             Feed\GuzzleClient::class,
116 116
             Factory\CacheFactory::FEED_CACHE,
117 117
             Factory\CacheFactory::VIEWS_CACHE,
118 118
             Feed\BlogOptions::class,
119 119
         ],
120
-        Console\Task\BlogFeedConsumerTask::class => [Feed\Service\BlogFeedConsumer::class],
121
-        Feed\BlogOptions::class => ['config.blog'],
122
-        CacheMiddleware::class => [Factory\CacheFactory::VIEWS_CACHE, Expressive\Router\RouterInterface::class],
123
-        LanguageMiddleware::class => ['translator', Expressive\Router\RouterInterface::class],
120
+        Console\Task\BlogFeedConsumerTask::class => [ Feed\Service\BlogFeedConsumer::class ],
121
+        Feed\BlogOptions::class => [ 'config.blog' ],
122
+        CacheMiddleware::class => [ Factory\CacheFactory::VIEWS_CACHE, Expressive\Router\RouterInterface::class ],
123
+        LanguageMiddleware::class => [ 'translator', Expressive\Router\RouterInterface::class ],
124 124
     ],
125 125
 
126 126
 ];
Please login to merge, or discard this patch.
config/autoload/translator.global.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
 return [
5 5
 
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
         'translation_file_patterns' => [
9 9
             [
10 10
                 'type' => 'gettext',
11
-                'base_dir' => __DIR__ . '/../../data/language',
11
+                'base_dir' => __DIR__.'/../../data/language',
12 12
                 'pattern' => '%s.mo',
13 13
             ],
14 14
         ],
Please login to merge, or discard this patch.
config/autoload/recaptcha.global.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
 return [
5 5
 
Please login to merge, or discard this patch.