Conditions | 1 |
Paths | 1 |
Total Lines | 50 |
Code Lines | 46 |
Lines | 0 |
Ratio | 0 % |
Tests | 46 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | 25 | public function getConfigTreeBuilder() |
|
39 | { |
||
40 | 25 | $treeBuilder = new TreeBuilder(); |
|
41 | |||
42 | 25 | $treeBuilder->root('task') |
|
43 | 25 | ->children() |
|
44 | 25 | ->enumNode('storage')->values(['array', 'doctrine'])->defaultValue('doctrine')->end() |
|
45 | 25 | ->arrayNode('adapters') |
|
46 | 25 | ->addDefaultsIfNotSet() |
|
47 | 25 | ->children() |
|
48 | 25 | ->arrayNode('doctrine') |
|
49 | 25 | ->addDefaultsIfNotSet() |
|
50 | 25 | ->children() |
|
51 | 25 | ->booleanNode('clear')->defaultTrue()->end() |
|
52 | 25 | ->end() |
|
53 | 25 | ->end() |
|
54 | 25 | ->end() |
|
55 | 25 | ->end() |
|
56 | 25 | ->arrayNode('run') |
|
57 | 25 | ->addDefaultsIfNotSet() |
|
58 | 25 | ->children() |
|
59 | 25 | ->enumNode('mode')->values(['off', 'listener'])->defaultValue('off')->end() |
|
60 | 25 | ->end() |
|
61 | 25 | ->end() |
|
62 | 25 | ->arrayNode('locking') |
|
63 | 25 | ->canBeEnabled() |
|
64 | 25 | ->addDefaultsIfNotSet() |
|
65 | 25 | ->children() |
|
66 | 25 | ->enumNode('storage') |
|
67 | 25 | ->values(array_keys($this->lockingStorageAliases)) |
|
68 | 25 | ->defaultValue('file') |
|
69 | 25 | ->end() |
|
70 | 25 | ->arrayNode('storages') |
|
71 | 25 | ->addDefaultsIfNotSet() |
|
72 | 25 | ->children() |
|
73 | 25 | ->arrayNode('file') |
|
74 | 25 | ->addDefaultsIfNotSet() |
|
75 | 25 | ->children() |
|
76 | 25 | ->scalarNode('directory')->defaultValue(sys_get_temp_dir() . '/task')->end() |
|
77 | 25 | ->end() |
|
78 | 25 | ->end() |
|
79 | 25 | ->end() |
|
80 | 25 | ->end() |
|
81 | 25 | ->enumNode('mode')->values(['off', 'listener'])->defaultValue('off')->end() |
|
82 | 25 | ->end() |
|
83 | 25 | ->end() |
|
84 | 25 | ->end(); |
|
85 | |||
86 | 25 | return $treeBuilder; |
|
87 | } |
||
88 | |||
101 |
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..