1 | <?php namespace Mews\Purifier; |
||
21 | class Purifier |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var Filesystem |
||
26 | */ |
||
27 | protected $files; |
||
28 | |||
29 | /** |
||
30 | * @var Repository |
||
31 | */ |
||
32 | protected $config; |
||
33 | |||
34 | /** |
||
35 | * @var HTMLPurifier |
||
36 | */ |
||
37 | protected $purifier; |
||
38 | |||
39 | /** |
||
40 | * Constructor |
||
41 | * |
||
42 | * @param Filesystem $files |
||
43 | * @param Repository $config |
||
44 | * @throws Exception |
||
45 | */ |
||
46 | public function __construct(Filesystem $files, Repository $config) |
||
53 | |||
54 | /** |
||
55 | * Setup |
||
56 | * |
||
57 | * @throws Exception |
||
58 | */ |
||
59 | private function setUp() |
||
83 | |||
84 | /** |
||
85 | * Check/Create cache directory |
||
86 | */ |
||
87 | private function checkCacheDirectory() |
||
97 | |||
98 | /** |
||
99 | * @param HTMLPurifier_Config $config |
||
100 | * @return HTMLPurifier_Config |
||
101 | */ |
||
102 | protected function configure(HTMLPurifier_Config $config) |
||
106 | |||
107 | /** |
||
108 | * @param null $config |
||
109 | * @return mixed|null |
||
110 | */ |
||
111 | protected function getConfig($config = null) |
||
131 | |||
132 | /** |
||
133 | * @param $dirty |
||
134 | * @param null $config |
||
135 | * @return mixed |
||
136 | */ |
||
137 | public function clean($dirty, $config = null) |
||
148 | |||
149 | /** |
||
150 | * Get HTMLPurifier instance. |
||
151 | * |
||
152 | * @return \HTMLPurifier |
||
153 | */ |
||
154 | public function getInstance() |
||
158 | } |
||
159 |
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: