1 | <?php |
||
2 | |||
3 | /* |
||
4 | * @copyright 2014 Mautic Contributors. All rights reserved |
||
5 | * @author Mautic |
||
6 | * |
||
7 | * @link http://mautic.org |
||
8 | * |
||
9 | * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html |
||
10 | */ |
||
11 | |||
12 | namespace Mautic\AssetBundle\Event; |
||
13 | |||
14 | use Gaufrette\Adapter; |
||
15 | use Mautic\CoreBundle\Event\CommonEvent; |
||
16 | use Mautic\PluginBundle\Integration\AbstractIntegration; |
||
17 | use Mautic\PluginBundle\Integration\UnifiedIntegrationInterface; |
||
18 | |||
19 | /** |
||
20 | * Class RemoteAssetBrowseEvent. |
||
21 | */ |
||
22 | class RemoteAssetBrowseEvent extends CommonEvent |
||
23 | { |
||
24 | /** |
||
25 | * @var Adapter |
||
26 | */ |
||
27 | private $adapter; |
||
28 | |||
29 | /** |
||
30 | * @var AbstractIntegration |
||
31 | */ |
||
32 | private $integration; |
||
33 | |||
34 | public function __construct(UnifiedIntegrationInterface $integration) |
||
35 | { |
||
36 | $this->integration = $integration; |
||
0 ignored issues
–
show
|
|||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return Adapter |
||
41 | */ |
||
42 | public function getAdapter() |
||
43 | { |
||
44 | return $this->adapter; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return AbstractIntegration |
||
49 | */ |
||
50 | public function getIntegration() |
||
51 | { |
||
52 | return $this->integration; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setAdapter(Adapter $adapter) |
||
59 | { |
||
60 | $this->adapter = $adapter; |
||
61 | |||
62 | return $this; |
||
63 | } |
||
64 | } |
||
65 |
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.