| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | protected function registerFields() |
||
| 27 | { |
||
| 28 | $namespace = '\\Tacone\\Bees\\Field'; |
||
| 29 | $fields = ['string', 'integer', 'float', 'boolean']; |
||
| 30 | foreach ($fields as $class) { |
||
| 31 | App::bind("bees.$class", function ($app, $arguments) use ($class, $namespace) { |
||
| 32 | $class = Str::studly($class).'Field'; |
||
|
|
|||
| 33 | $reflect = new ReflectionClass($namespace."\\$class"); |
||
| 34 | $instance = $reflect->newInstanceArgs($arguments); |
||
| 35 | |||
| 36 | return $instance; |
||
| 37 | }); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 49 |
It seems like you are assigning to a variable which was imported through a
usestatement which was not imported by reference.For clarity, we suggest to use a different name or import by reference depending on whether you would like to have the change visibile in outer-scope.
Change not visible in outer-scope
Change visible in outer-scope