Passed
Push — main ( 222c14...83f636 )
by Sebastian
10:37 queued 06:56
created
tests/unit/Mockery.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
     public function createResolverMock(string $executable = 'vendor/bin/captainhook', bool $isPhar = false): Resolver
33 33
     {
34 34
         $repo = $this->getMockBuilder(Resolver::class)
35
-                     ->disableOriginalConstructor()
36
-                     ->getMock();
35
+                        ->disableOriginalConstructor()
36
+                        ->getMock();
37 37
 
38 38
         $repo->method('getExecutable')->willReturn($executable);
39 39
         $repo->method('isPharRelease')->willReturn($isPhar);
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     {
52 52
 
53 53
         $repo = $this->getMockBuilder(Repository::class)
54
-                     ->disableOriginalConstructor()
55
-                     ->getMock();
54
+                        ->disableOriginalConstructor()
55
+                        ->getMock();
56 56
 
57 57
         $repo->method('getRoot')->willReturn($root);
58 58
         $repo->method('getHooksDir')->willReturn($root . '/.git/hooks');
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
     public function createGitInfoOperator(string $tag = 'v1.0.0', string $branch = 'master'): Info
71 71
     {
72 72
         $operator = $this->getMockBuilder(Info::class)
73
-                         ->disableOriginalConstructor()
74
-                         ->getMock();
73
+                            ->disableOriginalConstructor()
74
+                            ->getMock();
75 75
 
76 76
         $operator->method('getCurrentTag')->willReturn($tag);
77 77
         $operator->method('getCurrentBranch')->willReturn($branch);
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
     public function createGitDiffOperator(array $changedFiles = []): Diff
89 89
     {
90 90
         $operator = $this->getMockBuilder(Diff::class)
91
-                         ->disableOriginalConstructor()
92
-                         ->getMock();
91
+                            ->disableOriginalConstructor()
92
+                            ->getMock();
93 93
 
94 94
         $operator->method('getChangedFiles')->willReturn($changedFiles);
95 95
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
     public function createGitIndexOperator(array $stagedFiles = []): Index
120 120
     {
121 121
         $operator = $this->getMockBuilder(Index::class)
122
-                         ->disableOriginalConstructor()
123
-                         ->getMock();
122
+                            ->disableOriginalConstructor()
123
+                            ->getMock();
124 124
 
125 125
         $operator->method('getStagedFiles')->willReturn($stagedFiles);
126 126
 
Please login to merge, or discard this patch.
src/Plugin/Hook/PreserveWorkingTree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $this->io->write('<info>Unstaged intent-to-add files detected.</info>');
121 121
 
122 122
         $this->repository->getIndexOperator()->removeFiles(
123
-            array_map(function (Path $path): string {
123
+            array_map(function(Path $path): string {
124 124
                 return $path->getPath();
125 125
             }, $this->intentToAddFiles),
126 126
             false,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         }
142 142
 
143 143
         $this->repository->getIndexOperator()->recordIntentToAddFiles(
144
-            array_map(function (Path $path): string {
144
+            array_map(function(Path $path): string {
145 145
                 return $path->getPath();
146 146
             }, $this->intentToAddFiles)
147 147
         );
Please login to merge, or discard this patch.
src/Hooks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
         return array_keys(
121 121
             array_filter(
122 122
                 self::$virtualHookTriggers,
123
-                function ($e) use ($virtualHook) {
123
+                function($e) use ($virtualHook) {
124 124
                     return $e === $virtualHook;
125 125
                 }
126 126
             )
Please login to merge, or discard this patch.
src/Console/IO/Message.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @var string|array<string>
28 28
      */
29
-    private string|array $message;
29
+    private string | array $message;
30 30
 
31 31
     /**
32 32
      * Should message be ended with a new line character
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @param bool                 $newLine
50 50
      * @param int                  $verbosity
51 51
      */
52
-    public function __construct(string|array $message, bool $newLine, int $verbosity)
52
+    public function __construct(string | array $message, bool $newLine, int $verbosity)
53 53
     {
54 54
         $this->message   = $message;
55 55
         $this->newLine   = $newLine;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return string|array<string>
63 63
      */
64
-    public function message(): string|array
64
+    public function message(): string | array
65 65
     {
66 66
         return $this->message;
67 67
     }
Please login to merge, or discard this patch.
src/Console/Command/Hook.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@
 block discarded – undo
47 47
     {
48 48
         parent::configure();
49 49
         $this->setName('hook:' . $this->hookName)
50
-             ->setAliases([$this->hookName])
51
-             ->setDescription('Run git ' . $this->hookName . ' hook')
52
-             ->setHelp('This command executes the ' . $this->hookName . ' hook');
50
+                ->setAliases([$this->hookName])
51
+                ->setDescription('Run git ' . $this->hookName . ' hook')
52
+                ->setHelp('This command executes the ' . $this->hookName . ' hook');
53 53
 
54 54
         $this->addOption(
55 55
             'bootstrap',
Please login to merge, or discard this patch.
src/Console/Command/Disable.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('config:disable')
39
-             ->setAliases(['disable'])
40
-             ->setDescription('Disable the handling for a hook in your configuration')
41
-             ->setHelp('Disable the handling for a hook in your configuration')
42
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
39
+                ->setAliases(['disable'])
40
+                ->setDescription('Disable the handling for a hook in your configuration')
41
+                ->setHelp('Disable the handling for a hook in your configuration')
42
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable');
43 43
     }
44 44
 
45 45
     /**
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
         $editor = new Editor($io, $config);
60 60
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
61
-               ->setChange('DisableHook')
62
-               ->run();
61
+                ->setChange('DisableHook')
62
+                ->run();
63 63
 
64 64
         return 0;
65 65
     }
Please login to merge, or discard this patch.
src/Console/Command/Add.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('config:add')
39
-             ->setAliases(['add'])
40
-             ->setDescription('Add an action to your hook configuration')
41
-             ->setHelp('Add an action to your hook configuration')
42
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
39
+                ->setAliases(['add'])
40
+                ->setDescription('Add an action to your hook configuration')
41
+                ->setHelp('Add an action to your hook configuration')
42
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to add the action to');
43 43
     }
44 44
 
45 45
     /**
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
         $editor = new Editor($io, $config);
60 60
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
61
-               ->setChange('AddAction')
62
-               ->run();
61
+                ->setChange('AddAction')
62
+                ->run();
63 63
 
64 64
         return 0;
65 65
     }
Please login to merge, or discard this patch.
src/Console/Command/Enable.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     {
37 37
         parent::configure();
38 38
         $this->setName('config:enable')
39
-             ->setAliases(['enable'])
40
-             ->setDescription('Enable the handling for a hook in your configuration')
41
-             ->setHelp('Enable the handling for a hook in your configuration')
42
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to enable');
39
+                ->setAliases(['enable'])
40
+                ->setDescription('Enable the handling for a hook in your configuration')
41
+                ->setHelp('Enable the handling for a hook in your configuration')
42
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to enable');
43 43
     }
44 44
 
45 45
     /**
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
         $editor = new Editor($io, $config);
60 60
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
61
-               ->setChange('EnableHook')
62
-               ->run();
61
+                ->setChange('EnableHook')
62
+                ->run();
63 63
 
64 64
         return 0;
65 65
     }
Please login to merge, or discard this patch.
src/Console/Command/Configuration.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
     {
38 38
         parent::configure();
39 39
         $this->setName('configure')
40
-             ->setDescription('Create or update a captainhook.json configuration')
41
-             ->setHelp('Create or update a captainhook.json configuration')
42
-             ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file')
43
-             ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file')
44
-             ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type')
45
-             ->addOption(
46
-                 'bootstrap',
47
-                 null,
48
-                 InputOption::VALUE_OPTIONAL,
49
-                 'Path to composers vendor/autoload.php'
50
-             );
40
+                ->setDescription('Create or update a captainhook.json configuration')
41
+                ->setHelp('Create or update a captainhook.json configuration')
42
+                ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file')
43
+                ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file')
44
+                ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type')
45
+                ->addOption(
46
+                    'bootstrap',
47
+                    null,
48
+                    InputOption::VALUE_OPTIONAL,
49
+                    'Path to composers vendor/autoload.php'
50
+                );
51 51
     }
52 52
 
53 53
     /**
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 
66 66
         $configurator = new Creator($io, $config);
67 67
         $configurator->force(IOUtil::argToBool($input->getOption('force')))
68
-                     ->extend(IOUtil::argToBool($input->getOption('extend')))
69
-                     ->advanced(IOUtil::argToBool($input->getOption('advanced')))
70
-                     ->setExecutable($this->resolver->getExecutable())
71
-                     ->run();
68
+                        ->extend(IOUtil::argToBool($input->getOption('extend')))
69
+                        ->advanced(IOUtil::argToBool($input->getOption('advanced')))
70
+                        ->setExecutable($this->resolver->getExecutable())
71
+                        ->run();
72 72
         return 0;
73 73
     }
74 74
 }
Please login to merge, or discard this patch.