1 | <?php |
||
14 | class ConfigController extends Controller { |
||
15 | |||
16 | /** |
||
17 | * @var \OCA\Chat\Db\ConfigMapper |
||
18 | */ |
||
19 | private $configMapper; |
||
20 | |||
21 | /** |
||
22 | * @var \OCA\Chat\BackendManager |
||
23 | */ |
||
24 | private $backendManager; |
||
25 | |||
26 | public function __construct($appName, IRequest $request, ConfigMapper $configMapper, IBackendManager $backendManager){ |
||
31 | |||
32 | /** |
||
33 | * @NoAdminRequired |
||
34 | * @param $backends |
||
35 | * @return JSONResponse |
||
36 | */ |
||
37 | public function set($backends){ |
||
47 | |||
48 | /** |
||
49 | * @param $id |
||
50 | * @return JSONResponse |
||
51 | */ |
||
52 | public function enableBackend($id){ |
||
60 | |||
61 | /** |
||
62 | * @param $id |
||
63 | * @return JSONResponse |
||
64 | */ |
||
65 | public function disableBackend($id){ |
||
73 | } |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.