Passed
Push — master ( b89ee9...82ea21 )
by Sebastian
03:18
created
src/Hook/Message/Rule/UseImperativeMood.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
 
46 46
         if ($checkOnlyBeginning) {
47 47
             // overwrite the detection logic to only check the beginning og the string
48
-            $this->stringDetection = function (string $content, string $term): bool {
48
+            $this->stringDetection = function(string $content, string $term): bool {
49 49
                 return strpos($content, $term) === 0;
50 50
             };
51 51
         }
Please login to merge, or discard this patch.
src/Hook/Message/Rule/Blacklist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     {
55 55
         $this->isCaseSensitive = $caseSensitive;
56 56
         $this->hint            = 'Commit message should not contain blacklisted words';
57
-        $this->stringDetection = function (string $content, string $term): bool {
57
+        $this->stringDetection = function(string $content, string $term): bool {
58 58
             return strpos($content, $term) !== false;
59 59
         };
60 60
     }
Please login to merge, or discard this patch.
src/Hook/Composer/Action/CheckLockFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
         ksort($relevantContent);
114 114
 
115
-        return md5((string)json_encode($relevantContent));
115
+        return md5((string) json_encode($relevantContent));
116 116
     }
117 117
 
118 118
     /**
@@ -127,6 +127,6 @@  discard block
 block discarded – undo
127 127
         if (!file_exists($file)) {
128 128
             throw new Exception($file . ' not found');
129 129
         }
130
-        return (string)file_get_contents($file);
130
+        return (string) file_get_contents($file);
131 131
     }
132 132
 }
Please login to merge, or discard this patch.
src/Console/IO/DefaultIO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
      */
91 91
     public function getArgument(string $name, string $default = ''): string
92 92
     {
93
-        return (string)($this->getArguments()[$name] ?? $default);
93
+        return (string) ($this->getArguments()[$name] ?? $default);
94 94
     }
95 95
 
96 96
     /**
Please login to merge, or discard this patch.
src/Console/Command/Add.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('add')
39
-             ->setDescription('Add an action to a hook configuration')
40
-             ->setHelp('This command will add an action configuration to a given hook configuration')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
39
+                ->setDescription('Add an action to a hook configuration')
40
+                ->setHelp('This command will add an action configuration to a given hook configuration')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
42 42
     }
43 43
 
44 44
     /**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
         $editor = new Editor($io, $config);
59 59
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
60
-               ->setChange('AddAction')
61
-               ->run();
60
+                ->setChange('AddAction')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
src/Console/Command/Disable.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('disable')
39
-             ->setDescription('Disable a hook execution')
40
-             ->setHelp('This command will disable a hook configuration for a given hook')
41
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
39
+                ->setDescription('Disable a hook execution')
40
+                ->setHelp('This command will disable a hook configuration for a given hook')
41
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
42 42
     }
43 43
 
44 44
     /**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
         $editor = new Editor($io, $config);
59 59
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
60
-               ->setChange('DisableHook')
61
-               ->run();
60
+                ->setChange('DisableHook')
61
+                ->run();
62 62
 
63 63
         return 0;
64 64
     }
Please login to merge, or discard this patch.
src/Console/Command/Hook.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
     {
47 47
         parent::configure();
48 48
         $this->setName('hook:' . $this->hookName)
49
-             ->setDescription('Run git ' . $this->hookName . ' hook.')
50
-             ->setHelp('This command executes the ' . $this->hookName . ' hook.');
49
+                ->setDescription('Run git ' . $this->hookName . ' hook.')
50
+                ->setHelp('This command executes the ' . $this->hookName . ' hook.');
51 51
 
52 52
         $this->addOption(
53 53
             'bootstrap',
Please login to merge, or discard this patch.
src/Console/Command/Configuration.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('configure')
39
-             ->setDescription('Configure your hooks')
40
-             ->setHelp('This command creates or updates your captainhook configuration')
41
-             ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file')
42
-             ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file')
43
-             ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type')
44
-             ->addOption(
45
-                 'bootstrap',
46
-                 null,
47
-                 InputOption::VALUE_OPTIONAL,
48
-                 'Path to composers vendor/autoload.php'
49
-             );
39
+                ->setDescription('Configure your hooks')
40
+                ->setHelp('This command creates or updates your captainhook configuration')
41
+                ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file')
42
+                ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file')
43
+                ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type')
44
+                ->addOption(
45
+                    'bootstrap',
46
+                    null,
47
+                    InputOption::VALUE_OPTIONAL,
48
+                    'Path to composers vendor/autoload.php'
49
+                );
50 50
     }
51 51
 
52 52
     /**
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 
65 65
         $configurator = new Creator($io, $config);
66 66
         $configurator->force(IOUtil::argToBool($input->getOption('force')))
67
-                     ->extend(IOUtil::argToBool($input->getOption('extend')))
68
-                     ->advanced(IOUtil::argToBool($input->getOption('advanced')))
69
-                     ->run();
67
+                        ->extend(IOUtil::argToBool($input->getOption('extend')))
68
+                        ->advanced(IOUtil::argToBool($input->getOption('advanced')))
69
+                        ->run();
70 70
         return 0;
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
src/Console/Command/Install.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -60,43 +60,43 @@  discard block
 block discarded – undo
60 60
     {
61 61
         parent::configure();
62 62
         $this->setName('install')
63
-             ->setDescription('Install git hooks')
64
-             ->setHelp('This command will install the git hooks to your .git directory')
65
-             ->addArgument(
66
-                 'hook',
67
-                 InputArgument::OPTIONAL,
68
-                 'Limit the hook you want to install. By default all hooks get installed.'
69
-             )
70
-             ->addOption(
71
-                 'force',
72
-                 'f',
73
-                 InputOption::VALUE_NONE,
74
-                 'Force to overwrite existing hooks'
75
-             )
76
-             ->addOption(
77
-                 'bootstrap',
78
-                 null,
79
-                 InputOption::VALUE_OPTIONAL,
80
-                 'Path to composers vendor/autoload.php'
81
-             )
82
-             ->addOption(
83
-                 'run-mode',
84
-                 'm',
85
-                 InputOption::VALUE_OPTIONAL,
86
-                 'Git hook run mode [local|docker]'
87
-             )
88
-             ->addOption(
89
-                 'run-exec',
90
-                 'e',
91
-                 InputOption::VALUE_OPTIONAL,
92
-                 'The Docker command to start your container e.g. \'docker exec CONTAINER\''
93
-             )
94
-             ->addOption(
95
-                 'run-path',
96
-                 'p',
97
-                 InputOption::VALUE_OPTIONAL,
98
-                 'The path to the CaptainHook executable \'/var/www/html\''
99
-             );
63
+                ->setDescription('Install git hooks')
64
+                ->setHelp('This command will install the git hooks to your .git directory')
65
+                ->addArgument(
66
+                    'hook',
67
+                    InputArgument::OPTIONAL,
68
+                    'Limit the hook you want to install. By default all hooks get installed.'
69
+                )
70
+                ->addOption(
71
+                    'force',
72
+                    'f',
73
+                    InputOption::VALUE_NONE,
74
+                    'Force to overwrite existing hooks'
75
+                )
76
+                ->addOption(
77
+                    'bootstrap',
78
+                    null,
79
+                    InputOption::VALUE_OPTIONAL,
80
+                    'Path to composers vendor/autoload.php'
81
+                )
82
+                ->addOption(
83
+                    'run-mode',
84
+                    'm',
85
+                    InputOption::VALUE_OPTIONAL,
86
+                    'Git hook run mode [local|docker]'
87
+                )
88
+                ->addOption(
89
+                    'run-exec',
90
+                    'e',
91
+                    InputOption::VALUE_OPTIONAL,
92
+                    'The Docker command to start your container e.g. \'docker exec CONTAINER\''
93
+                )
94
+                ->addOption(
95
+                    'run-path',
96
+                    'p',
97
+                    InputOption::VALUE_OPTIONAL,
98
+                    'The path to the CaptainHook executable \'/var/www/html\''
99
+                );
100 100
     }
101 101
 
102 102
     /**
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 
123 123
         $installer = new Installer($io, $config, $repo);
124 124
         $installer->setForce(IOUtil::argToBool($input->getOption('force')))
125
-                  ->setHook(IOUtil::argToString($input->getArgument('hook')))
126
-                  ->setTemplate(
127
-                      Template\Builder::build($config, $repo, $this->executable, $this->resolver->isPharRelease())
128
-                  )
129
-                  ->run();
125
+                    ->setHook(IOUtil::argToString($input->getArgument('hook')))
126
+                    ->setTemplate(
127
+                        Template\Builder::build($config, $repo, $this->executable, $this->resolver->isPharRelease())
128
+                    )
129
+                    ->run();
130 130
 
131 131
         return 0;
132 132
     }
Please login to merge, or discard this patch.