Conditions | 1 |
Paths | 1 |
Total Lines | 63 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
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 |
||
25 | public function __construct() |
||
26 | { |
||
27 | /** @var \FFI\Libc\ptrace_ffi ffi */ |
||
28 | $this->ffi = \FFI::cdef(' |
||
29 | struct user_regs_struct { |
||
30 | unsigned long r15; |
||
31 | unsigned long r14; |
||
32 | unsigned long r13; |
||
33 | unsigned long r12; |
||
34 | unsigned long bp; |
||
35 | unsigned long bx; |
||
36 | unsigned long r11; |
||
37 | unsigned long r10; |
||
38 | unsigned long r9; |
||
39 | unsigned long r8; |
||
40 | unsigned long ax; |
||
41 | unsigned long cx; |
||
42 | unsigned long dx; |
||
43 | unsigned long si; |
||
44 | unsigned long di; |
||
45 | unsigned long orig_ax; |
||
46 | unsigned long ip; |
||
47 | unsigned long cs; |
||
48 | unsigned long flags; |
||
49 | unsigned long sp; |
||
50 | unsigned long ss; |
||
51 | unsigned long fs_base; |
||
52 | unsigned long gs_base; |
||
53 | unsigned long ds; |
||
54 | unsigned long es; |
||
55 | unsigned long fs; |
||
56 | unsigned long gs; |
||
57 | }; |
||
58 | typedef int pid_t; |
||
59 | enum __ptrace_request |
||
60 | { |
||
61 | PTRACE_TRACEME = 0, |
||
62 | PTRACE_PEEKTEXT = 1, |
||
63 | PTRACE_PEEKDATA = 2, |
||
64 | PTRACE_PEEKUSER = 3, |
||
65 | PTRACE_POKETEXT = 4, |
||
66 | PTRACE_POKEDATA = 5, |
||
67 | PTRACE_POKEUSER = 6, |
||
68 | PTRACE_CONT = 7, |
||
69 | PTRACE_KILL = 8, |
||
70 | PTRACE_SINGLESTEP = 9, |
||
71 | PTRACE_GETREGS = 12, |
||
72 | PTRACE_SETREGS = 13, |
||
73 | PTRACE_GETFPREGS = 14, |
||
74 | PTRACE_SETFPREGS = 15, |
||
75 | PTRACE_ATTACH = 16, |
||
76 | PTRACE_DETACH = 17, |
||
77 | PTRACE_GETFPXREGS = 18, |
||
78 | PTRACE_SETFPXREGS = 19, |
||
79 | PTRACE_SYSCALL = 24, |
||
80 | PTRACE_SETOPTIONS = 0x4200, |
||
81 | PTRACE_GETEVENTMSG = 0x4201, |
||
82 | PTRACE_GETSIGINFO = 0x4202, |
||
83 | PTRACE_SETSIGINFO = 0x4203 |
||
84 | }; |
||
85 | long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data); |
||
86 | int errno; |
||
87 | ', 'libc.so.6'); |
||
88 | } |
||
121 |
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