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