@@ -63,7 +63,7 @@ |
||
63 | 63 | { |
64 | 64 | $arg = new Arg( |
65 | 65 | $hook, |
66 | - static function (string $hook): bool { |
|
66 | + static function(string $hook): bool { |
|
67 | 67 | return !HookUtil::isValid($hook); |
68 | 68 | } |
69 | 69 | ); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | { |
85 | 85 | $arg = new Arg( |
86 | 86 | $hook, |
87 | - static function (string $hook): bool { |
|
87 | + static function(string $hook): bool { |
|
88 | 88 | return !HookUtil::isInstallable($hook); |
89 | 89 | } |
90 | 90 | ); |
@@ -37,40 +37,40 @@ discard block |
||
37 | 37 | { |
38 | 38 | parent::configure(); |
39 | 39 | $this->setName('config:info') |
40 | - ->setAliases(['info']) |
|
41 | - ->setDescription('Displays information about the configuration') |
|
42 | - ->setHelp('Displays information about the configuration') |
|
43 | - ->addArgument('hook', InputArgument::OPTIONAL, 'Hook you want to investigate') |
|
44 | - ->addOption( |
|
45 | - 'list-actions', |
|
46 | - 'a', |
|
47 | - InputOption::VALUE_NONE, |
|
48 | - 'List all actions' |
|
49 | - ) |
|
50 | - ->addOption( |
|
51 | - 'list-conditions', |
|
52 | - 'p', |
|
53 | - InputOption::VALUE_NONE, |
|
54 | - 'List all conditions' |
|
55 | - ) |
|
56 | - ->addOption( |
|
57 | - 'list-options', |
|
58 | - 'o', |
|
59 | - InputOption::VALUE_NONE, |
|
60 | - 'List all options' |
|
61 | - ) |
|
62 | - ->addOption( |
|
63 | - 'list-config', |
|
64 | - 's', |
|
65 | - InputOption::VALUE_NONE, |
|
66 | - 'List all config settings' |
|
67 | - ) |
|
68 | - ->addOption( |
|
69 | - 'extensive', |
|
70 | - 'e', |
|
71 | - InputOption::VALUE_NONE, |
|
72 | - 'Show more detailed information' |
|
73 | - ); |
|
40 | + ->setAliases(['info']) |
|
41 | + ->setDescription('Displays information about the configuration') |
|
42 | + ->setHelp('Displays information about the configuration') |
|
43 | + ->addArgument('hook', InputArgument::OPTIONAL, 'Hook you want to investigate') |
|
44 | + ->addOption( |
|
45 | + 'list-actions', |
|
46 | + 'a', |
|
47 | + InputOption::VALUE_NONE, |
|
48 | + 'List all actions' |
|
49 | + ) |
|
50 | + ->addOption( |
|
51 | + 'list-conditions', |
|
52 | + 'p', |
|
53 | + InputOption::VALUE_NONE, |
|
54 | + 'List all conditions' |
|
55 | + ) |
|
56 | + ->addOption( |
|
57 | + 'list-options', |
|
58 | + 'o', |
|
59 | + InputOption::VALUE_NONE, |
|
60 | + 'List all options' |
|
61 | + ) |
|
62 | + ->addOption( |
|
63 | + 'list-config', |
|
64 | + 's', |
|
65 | + InputOption::VALUE_NONE, |
|
66 | + 'List all config settings' |
|
67 | + ) |
|
68 | + ->addOption( |
|
69 | + 'extensive', |
|
70 | + 'e', |
|
71 | + InputOption::VALUE_NONE, |
|
72 | + 'Show more detailed information' |
|
73 | + ); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | |
91 | 91 | $editor = new Reader($io, $config, $repo); |
92 | 92 | $editor->setHook(IOUtil::argToString($input->getArgument('hook'))) |
93 | - ->display(Reader::OPT_ACTIONS, $input->getOption('list-actions')) |
|
94 | - ->display(Reader::OPT_CONDITIONS, $input->getOption('list-conditions')) |
|
95 | - ->display(Reader::OPT_OPTIONS, $input->getOption('list-options')) |
|
96 | - ->extensive($input->getOption('extensive')) |
|
97 | - ->run(); |
|
93 | + ->display(Reader::OPT_ACTIONS, $input->getOption('list-actions')) |
|
94 | + ->display(Reader::OPT_CONDITIONS, $input->getOption('list-conditions')) |
|
95 | + ->display(Reader::OPT_OPTIONS, $input->getOption('list-options')) |
|
96 | + ->extensive($input->getOption('extensive')) |
|
97 | + ->run(); |
|
98 | 98 | |
99 | 99 | return 0; |
100 | 100 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $runner = new Reader($io, $config, $repo); |
38 | 38 | $runner->setHook('pre-commit') |
39 | - ->run(); |
|
39 | + ->run(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function testDoesNotAllowInvalidHookNames(): void |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $runner = new Reader($io, $config, $repo); |
51 | 51 | $runner->setHook('foo') |
52 | - ->run(); |
|
52 | + ->run(); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function testItDisplaysOnlyActions(): void |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | |
64 | 64 | $runner = new Reader($io, $config, $repo); |
65 | 65 | $runner->setHook('pre-commit') |
66 | - ->display(Reader::OPT_ACTIONS, true) |
|
67 | - ->run(); |
|
66 | + ->display(Reader::OPT_ACTIONS, true) |
|
67 | + ->run(); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | public function testItDisplaysActionsAndConditions(): void |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | { |
27 | 27 | $input = new ArrayInput(['--version' => true]); |
28 | 28 | $output = $this->getMockBuilder(NullOutput::class) |
29 | - ->disableOriginalConstructor() |
|
30 | - ->getMock(); |
|
29 | + ->disableOriginalConstructor() |
|
30 | + ->getMock(); |
|
31 | 31 | |
32 | 32 | $output->expects($this->once())->method('writeLn'); |
33 | 33 | |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | { |
47 | 47 | $input = new ArrayInput(['command' => 'list']); |
48 | 48 | $output = $this->getMockBuilder(NullOutput::class) |
49 | - ->disableOriginalConstructor() |
|
50 | - ->getMock(); |
|
49 | + ->disableOriginalConstructor() |
|
50 | + ->getMock(); |
|
51 | 51 | |
52 | 52 | $app = new Application('captainhook'); |
53 | 53 | $app->setAutoExit(false); |