Total Complexity | 2 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | trait BuilderOptions |
||
9 | { |
||
10 | /** @var bool */ |
||
11 | public $setters = false; |
||
12 | /** @var bool */ |
||
13 | public $getters = false; |
||
14 | /** @var bool */ |
||
15 | public $noEnumConst = false; |
||
16 | |||
17 | /** @var bool */ |
||
18 | public $declarePropertyDefaults = false; |
||
19 | |||
20 | /** @var bool */ |
||
21 | public $buildAdditionalPropertiesAccessors = false; |
||
22 | |||
23 | /** |
||
24 | * @param \stdClass|static $options |
||
25 | */ |
||
26 | static public function setupBuilderOptions($options) |
||
27 | { |
||
28 | $options->setters = Option::create()->setDescription('Build setters'); |
||
|
|||
29 | $options->getters = Option::create()->setDescription('Build getters'); |
||
30 | $options->noEnumConst = Option::create() |
||
31 | ->setDescription('Do not create constants for enum/const values'); |
||
32 | |||
33 | $options->declarePropertyDefaults = Option::create() |
||
34 | ->setDescription('Use default values to initialize properties'); |
||
35 | |||
36 | $options->buildAdditionalPropertiesAccessors = Option::create() |
||
37 | ->setDescription('Build accessors for additionalProperties'); |
||
38 | } |
||
39 | |||
40 | protected function setupBuilder(PhpBuilder $builder) |
||
48 | } |
||
49 | |||
50 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..