1 | <?php |
||
2 | |||
3 | /* |
||
4 | * @copyright 2017 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\PluginBundle\Event; |
||
13 | |||
14 | use Mautic\PluginBundle\Integration\UnifiedIntegrationInterface; |
||
15 | use Symfony\Component\Form\FormBuilder; |
||
16 | |||
17 | class PluginIntegrationFormBuildEvent extends AbstractPluginIntegrationEvent |
||
18 | { |
||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $options; |
||
23 | |||
24 | /** |
||
25 | * @var FormBuilder |
||
26 | */ |
||
27 | private $builder; |
||
28 | |||
29 | public function __construct(UnifiedIntegrationInterface $integration, FormBuilder $builder, array $options) |
||
30 | { |
||
31 | $this->integration = $integration; |
||
0 ignored issues
–
show
|
|||
32 | $this->builder = $builder; |
||
33 | $this->options = $options; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return FormBuilder |
||
38 | */ |
||
39 | public function getFormBuilder() |
||
40 | { |
||
41 | return $this->builder; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getOptions() |
||
48 | { |
||
49 | return $this->options; |
||
50 | } |
||
51 | } |
||
52 |
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.