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