1 | <?php |
||
12 | class Background |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $errors; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $pid; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $log = '/dev/null'; |
||
28 | |||
29 | /** |
||
30 | * Construct |
||
31 | * |
||
32 | * @param string $log String Log |
||
33 | */ |
||
34 | 4 | public function __construct($log = null) |
|
42 | |||
43 | /** |
||
44 | * Initialize |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | 2 | protected function init() |
|
53 | |||
54 | /** |
||
55 | * Start Process Background |
||
56 | * |
||
57 | * @param string $cmd String Cmd |
||
58 | * |
||
59 | * @return bool |
||
60 | */ |
||
61 | 2 | public function start($cmd) |
|
76 | |||
77 | /** |
||
78 | * Stop Process Background |
||
79 | * |
||
80 | * @param string $cmd String Cmd |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | 1 | public function stop($cmd) |
|
95 | |||
96 | /** |
||
97 | * Busca Pid do Cmd |
||
98 | * |
||
99 | * @param string $cmd String Cmd |
||
100 | * |
||
101 | * @return this |
||
102 | */ |
||
103 | 2 | public function pid($cmd) |
|
107 | |||
108 | /** |
||
109 | * Get Pid |
||
110 | * |
||
111 | * @return int |
||
112 | */ |
||
113 | 1 | public function getPid() |
|
117 | |||
118 | /** |
||
119 | * Gets the value of log. |
||
120 | * |
||
121 | * @return mixed |
||
122 | */ |
||
123 | 1 | public function getLog() |
|
127 | |||
128 | /** |
||
129 | * Sets the value of log. |
||
130 | * |
||
131 | * @param mixed $log Mixed Log |
||
132 | * |
||
133 | * @return self |
||
134 | */ |
||
135 | 2 | public function setLog($log) |
|
145 | |||
146 | /** |
||
147 | * Gets the value of error |
||
148 | * |
||
149 | * @return mixed |
||
150 | */ |
||
151 | 1 | public function getErrors() |
|
155 | } |
||
156 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: