Allow arguments to come after options
Showing 1 of 1 files from the diff.
src/MultiTester/Config.php
changed.
@@ -76,12 +76,12 @@
Loading
76 | 76 | { |
|
77 | 77 | $arguments = $this->filterArguments($arguments, '--add'); |
|
78 | 78 | $this->tester = $multiTester; |
|
79 | - | $this->verbose = in_array('--verbose', $arguments) || in_array('-v', $arguments); |
|
80 | - | $this->quiet = in_array('--quiet-install', $arguments) || in_array('-q', $arguments); |
|
81 | - | $arguments = array_filter($arguments, function ($argument) { |
|
82 | - | return $argument !== '--verbose' && $argument !== '-v'; |
|
83 | - | }); |
|
84 | - | $this->configFile = $arguments[1] ?? $multiTester->getMultiTesterFile(); |
|
79 | + | $this->verbose = in_array('--verbose', $arguments, true) || in_array('-v', $arguments, true); |
|
80 | + | $this->quiet = in_array('--quiet-install', $arguments, true) || in_array('-q', $arguments, true); |
|
81 | + | $arguments = array_slice(array_values(array_filter($arguments, function ($argument) { |
|
82 | + | return !in_array($argument, ['--verbose', '-v', '--quiet-install', '-q'], true); |
|
83 | + | })), 1); |
|
84 | + | $this->configFile = $arguments[0] ?? $multiTester->getMultiTesterFile(); |
|
85 | 85 | $this->addProjects(); |
|
86 | 86 | ||
87 | 87 | if (!file_exists($this->configFile)) { |
Files | Coverage |
---|---|
src/MultiTester | 100.00% |
Project Totals (13 files) | 100.00% |
1922732081
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.