| Conditions | 1 |
| Paths | 1 |
| Total Lines | 52 |
| Code Lines | 43 |
| 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 |
||
| 29 | public function configure(): void |
||
| 30 | { |
||
| 31 | $this->setName('inspector:daemon') |
||
| 32 | ->setDescription('periodically get running function name from an outer process or thread') |
||
| 33 | ->addOption( |
||
| 34 | 'target-regex', |
||
| 35 | 'P', |
||
| 36 | InputOption::VALUE_OPTIONAL, |
||
| 37 | 'regex to find the php binary loaded in the target process' |
||
| 38 | ) |
||
| 39 | ->addOption('depth', 'd', InputOption::VALUE_OPTIONAL, 'max depth') |
||
| 40 | ->addOption( |
||
| 41 | 'sleep-ns', |
||
| 42 | 's', |
||
| 43 | InputOption::VALUE_OPTIONAL, |
||
| 44 | 'nanoseconds between traces (default: 1000 * 1000 * 10)' |
||
| 45 | ) |
||
| 46 | ->addOption( |
||
| 47 | 'max-retries', |
||
| 48 | 'r', |
||
| 49 | InputOption::VALUE_OPTIONAL, |
||
| 50 | 'max retries on contiguous errors of read (default: 10)' |
||
| 51 | ) |
||
| 52 | ->addOption( |
||
| 53 | 'php-regex', |
||
| 54 | null, |
||
| 55 | InputOption::VALUE_OPTIONAL, |
||
| 56 | 'regex to find the php binary loaded in the target process' |
||
| 57 | ) |
||
| 58 | ->addOption( |
||
| 59 | 'libpthread-regex', |
||
| 60 | null, |
||
| 61 | InputOption::VALUE_OPTIONAL, |
||
| 62 | 'regex to find the libpthread.so loaded in the target process' |
||
| 63 | ) |
||
| 64 | ->addOption( |
||
| 65 | 'php-version', |
||
| 66 | null, |
||
| 67 | InputOption::VALUE_OPTIONAL, |
||
| 68 | 'php version of the target' |
||
| 69 | ) |
||
| 70 | ->addOption( |
||
| 71 | 'php-path', |
||
| 72 | null, |
||
| 73 | InputOption::VALUE_OPTIONAL, |
||
| 74 | 'path to the php binary (only needed in tracing chrooted ZTS target)' |
||
| 75 | ) |
||
| 76 | ->addOption( |
||
| 77 | 'libpthread-path', |
||
| 78 | null, |
||
| 79 | InputOption::VALUE_OPTIONAL, |
||
| 80 | 'path to the libpthread.so (only needed in tracing chrooted ZTS target)' |
||
| 81 | ) |
||
| 153 |
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