1 | <?php |
||
14 | final class InnmindNeo4jExtension extends Extension |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | 24 | public function load(array $configs, ContainerBuilder $container) |
|
41 | |||
42 | /** |
||
43 | * Inject the defined service in the unit of work |
||
44 | * |
||
45 | * @param ContainerBuilder $container |
||
46 | * @param string $service |
||
47 | * |
||
48 | * @return self |
||
49 | */ |
||
50 | 24 | private function injectPersister( |
|
60 | |||
61 | /** |
||
62 | * Inject value objects to make the connection work |
||
63 | * |
||
64 | * @param ContainerBuilder $container |
||
65 | * @param array $config |
||
66 | * |
||
67 | * @return self |
||
68 | */ |
||
69 | 24 | private function configureConnection( |
|
88 | |||
89 | /** |
||
90 | * Register the classes as added property types |
||
91 | * |
||
92 | * @param ContainerBuilder $container |
||
93 | * @param array $types |
||
94 | * |
||
95 | * @return self |
||
96 | */ |
||
97 | 24 | private function registerTypes( |
|
109 | |||
110 | /** |
||
111 | * Inject the configuration object into the metadata builder |
||
112 | * |
||
113 | * @param ContainerBuilder $container |
||
114 | * @param string $config |
||
115 | * |
||
116 | * @return self |
||
117 | */ |
||
118 | 24 | private function injectMetadataConfiguration( |
|
128 | |||
129 | /** |
||
130 | * Inject the clock in the transactions service |
||
131 | * |
||
132 | * @param ContainerBuilder $container |
||
133 | * @param string $clock |
||
134 | * |
||
135 | * @return self |
||
136 | */ |
||
137 | 24 | private function injectClock( |
|
147 | |||
148 | /** |
||
149 | * Create the alias for the event bus |
||
150 | * |
||
151 | * @param ContainerBuilder $container |
||
152 | * @param string $eventBus |
||
153 | * |
||
154 | * @return self |
||
155 | */ |
||
156 | 24 | private function aliasEventBus( |
|
164 | |||
165 | /** |
||
166 | * Create the alias for dbal connection |
||
167 | * |
||
168 | * @param ContainerBuilder $container |
||
169 | * @param string $connection |
||
170 | * |
||
171 | * @return self |
||
172 | */ |
||
173 | 24 | private function aliasDbalConnection( |
|
181 | } |
||
182 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.