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