Passed
Push — master ( a5b7b1...ebf6a9 )
by Sebastian
02:18
created
tests/CaptainHook/Runner/Config/Setup/AdvancedTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         $config->expects($this->exactly(7))->method('getHookConfig')->willReturn($this->getHookConfigMock());
24 24
         $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', 'echo \'foo\'', 'n'));
25 25
 
26
-        $setup  = new Advanced($io);
26
+        $setup = new Advanced($io);
27 27
         $setup->configureHooks($config);
28 28
     }
29 29
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', '\\Foo\\Bar', 'y', 'n'));
39 39
         $io->expects($this->once())->method('askAndValidate')->willReturn('foo:bar');
40 40
 
41
-        $setup  = new Advanced($io);
41
+        $setup = new Advanced($io);
42 42
         $setup->configureHooks($config);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
tests/CaptainHook/Runner/Config/Setup/ExpressTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $config->expects($this->exactly(2))->method('getHookConfig')->willReturn($this->getHookConfigMock());
24 24
         $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', 'y', 'phpunit', 'y', 'phpcs'));
25 25
 
26
-        $setup  = new Express($io);
26
+        $setup = new Express($io);
27 27
         $setup->configureHooks($config);
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
tests/CaptainHook/Runner/Config/EditorTest.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 
26 26
         $runner = new Editor($io, $config);
27 27
         $runner->setHook('foo')
28
-               ->setChange('EnableHook')
29
-               ->run();
28
+                ->setChange('EnableHook')
29
+                ->run();
30 30
     }
31 31
 
32 32
     /**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $runner = new Editor($io, $config);
44 44
         $runner->setChange('EnableHook')
45
-               ->run();
45
+                ->run();
46 46
     }
47 47
 
48 48
     /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $runner = new Editor($io, $config);
60 60
         $runner->setHook('pre-commit')
61
-               ->run();
61
+                ->run();
62 62
     }
63 63
 
64 64
     /**
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 
75 75
         $runner = new Editor($io, $config);
76 76
         $runner->setChange('InvalidChange')
77
-               ->setHook('pre-commit')
78
-               ->run();
77
+                ->setHook('pre-commit')
78
+                ->run();
79 79
     }
80 80
 
81 81
     /**
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 
92 92
         $runner = new Editor($io, $config);
93 93
         $runner->setChange('AddAction')
94
-               ->setHook('pre-commit')
95
-               ->run();
94
+                ->setHook('pre-commit')
95
+                ->run();
96 96
     }
97 97
 
98 98
     /**
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
         $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', '\\Foo\\Bar', 'y', 'n'));
111 111
         $io->expects($this->once())->method('askAndValidate')->willReturn('foo:bar');
112 112
         $runner->extend(true)
113
-               ->advanced(true)
114
-               ->run();
113
+                ->advanced(true)
114
+                ->run();
115 115
 
116 116
         $this->assertFileExists($path);
117 117
         unlink($path);
Please login to merge, or discard this patch.
tests/CaptainHook/Storage/File/XmlTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $this->expectException(\Exception::class);
22 22
 
23 23
         $path = realpath(CH_PATH_FILES . '/storage/invalid-xml.txt');
24
-        $file  = new Xml($path);
24
+        $file = new Xml($path);
25 25
         $file->read();
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
tests/CaptainHook/Hook/Message/Action/RegexTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $io     = new NullIO();
79 79
         $config = new Config(CH_PATH_FILES . '/captainhook.json');
80
-        $repo    = $this->createRepositoryMock();
80
+        $repo = $this->createRepositoryMock();
81 81
         $action = new Config\Action(Regex::class);
82 82
 
83 83
         $standard = new Regex();
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 'error' => 'No match for %s'
120 120
             ]
121 121
         );
122
-        $repo   = $this->createRepositoryMock();
122
+        $repo = $this->createRepositoryMock();
123 123
         $repo->expects($this->once())->method('getCommitMsg')->willReturn(new CommitMessage('Foo bar baz'));
124 124
 
125 125
         $standard = new Regex();
Please login to merge, or discard this patch.
tests/CaptainHook/Composer/CmdTest.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $composer = $this->getComposerMock($extra);
90 90
         $event    = $this->getMockBuilder(Event::class)
91
-                         ->disableOriginalConstructor()
92
-                         ->getMock();
91
+                            ->disableOriginalConstructor()
92
+                            ->getMock();
93 93
 
94 94
         $event->expects($this->once())->method('getIO')->willReturn(new NullIO());
95 95
         $event->expects($this->once())->method('getComposer')->willReturn($composer);
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
         $package->expects($this->atLeast(1))->method('getExtra')->willReturn($extra);
112 112
 
113 113
         $composer = $this->getMockBuilder(Composer::class)
114
-                         ->disableOriginalConstructor()
115
-                         ->getMock();
114
+                            ->disableOriginalConstructor()
115
+                            ->getMock();
116 116
         $composer->expects($this->atLeast(1))->method('getPackage')->willReturn($package);
117 117
 
118 118
         return $composer;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             $this->markTestSkipped('not tested on windows');
60 60
         }
61 61
 
62
-        $repo  = new DummyRepo();
62
+        $repo = new DummyRepo();
63 63
         $repo->setup();
64 64
 
65 65
         mkdir($repo->getPath() . DIRECTORY_SEPARATOR . 'vendor');
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
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
      */
89 89
     public function getArgument(string $name, string $default = '') : string
90 90
     {
91
-        return (string)($this->getArguments()[$name] ?? $default);
91
+        return (string) ($this->getArguments()[$name] ?? $default);
92 92
     }
93 93
 
94 94
     /**
Please login to merge, or discard this patch.
src/Console/Command/Help.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
     protected function configure() : void
39 39
     {
40 40
         $this->setName('help')
41
-             ->setDescription('Shows this help message')
42
-             ->setHelp('Shows command instructions')
43
-             ->setDefinition([
41
+                ->setDescription('Shows this help message')
42
+                ->setHelp('Shows command instructions')
43
+                ->setDefinition([
44 44
                 new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help')
45
-             ]);
45
+                ]);
46 46
     }
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
src/Console/Command/Disable.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
35 35
     protected function configure() : void
36 36
     {
37 37
         $this->setName('disable')
38
-             ->setDescription('Disable a hook execution')
39
-             ->setHelp('This command will disable a hook configuration for a given hook')
40
-             ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable')
41
-             ->addOption(
42
-                 'configuration',
43
-                 'c',
44
-                 InputOption::VALUE_OPTIONAL,
45
-                 'Path to your json configuration',
46
-                 getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG
47
-             );
38
+                ->setDescription('Disable a hook execution')
39
+                ->setHelp('This command will disable a hook configuration for a given hook')
40
+                ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to disable')
41
+                ->addOption(
42
+                    'configuration',
43
+                    'c',
44
+                    InputOption::VALUE_OPTIONAL,
45
+                    'Path to your json configuration',
46
+                    getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG
47
+                );
48 48
     }
49 49
 
50 50
     /**
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 
63 63
         $editor = new Editor($io, $config);
64 64
         $editor->setHook(IOUtil::argToString($input->getArgument('hook')))
65
-               ->setChange('DisableHook')
66
-               ->run();
65
+                ->setChange('DisableHook')
66
+                ->run();
67 67
 
68 68
         return 0;
69 69
     }
Please login to merge, or discard this patch.