| Conditions | 1 |
| Paths | 1 |
| Total Lines | 58 |
| Code Lines | 48 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 46 | public function configure(): void |
||
| 47 | { |
||
| 48 | $this->setName('inspector:daemon') |
||
| 49 | ->setDescription('periodically get running function name from an outer process or thread') |
||
| 50 | ->addOption( |
||
| 51 | 'target-regex', |
||
| 52 | 'P', |
||
| 53 | InputOption::VALUE_OPTIONAL, |
||
| 54 | 'regex to find the php binary loaded in the target process' |
||
| 55 | ) |
||
| 56 | ->addOption('depth', 'd', InputOption::VALUE_OPTIONAL, 'max depth') |
||
| 57 | ->addOption( |
||
| 58 | 'sleep-ns', |
||
| 59 | 's', |
||
| 60 | InputOption::VALUE_OPTIONAL, |
||
| 61 | 'nanoseconds between traces (default: 1000 * 1000 * 10)' |
||
| 62 | ) |
||
| 63 | ->addOption( |
||
| 64 | 'max-retries', |
||
| 65 | 'r', |
||
| 66 | InputOption::VALUE_OPTIONAL, |
||
| 67 | 'max retries on contiguous errors of read (default: 10)' |
||
| 68 | ) |
||
| 69 | ->addOption( |
||
| 70 | 'threads', |
||
| 71 | 'T', |
||
| 72 | InputOption::VALUE_OPTIONAL, |
||
| 73 | 'number of workers (default: 8)' |
||
| 74 | ) |
||
| 75 | ->addOption( |
||
| 76 | 'php-regex', |
||
| 77 | null, |
||
| 78 | InputOption::VALUE_OPTIONAL, |
||
| 79 | 'regex to find the php binary loaded in the target process' |
||
| 80 | ) |
||
| 81 | ->addOption( |
||
| 82 | 'libpthread-regex', |
||
| 83 | null, |
||
| 84 | InputOption::VALUE_OPTIONAL, |
||
| 85 | 'regex to find the libpthread.so loaded in the target process' |
||
| 86 | ) |
||
| 87 | ->addOption( |
||
| 88 | 'php-version', |
||
| 89 | null, |
||
| 90 | InputOption::VALUE_OPTIONAL, |
||
| 91 | 'php version of the target' |
||
| 92 | ) |
||
| 93 | ->addOption( |
||
| 94 | 'php-path', |
||
| 95 | null, |
||
| 96 | InputOption::VALUE_OPTIONAL, |
||
| 97 | 'path to the php binary (only needed in tracing chrooted ZTS target)' |
||
| 98 | ) |
||
| 99 | ->addOption( |
||
| 100 | 'libpthread-path', |
||
| 101 | null, |
||
| 102 | InputOption::VALUE_OPTIONAL, |
||
| 103 | 'path to the libpthread.so (only needed in tracing chrooted ZTS target)' |
||
| 104 | ) |
||
| 186 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths