Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | 8 | public static function create(ClassMetadataBuilder $builder, NamingStrategy $namingStrategy, $name, callable $callback) |
|
21 | { |
||
22 | 8 | foreach (self::getFactories() as $buildable => $check) { |
|
23 | 8 | if ($check($builder->getClassMetadata(), $name)) { |
|
24 | 7 | return new $buildable($builder, $namingStrategy, $name, $callback); |
|
25 | } |
||
26 | 5 | } |
|
27 | |||
28 | 1 | throw new InvalidArgumentException('No attribute or association could be found for ' . $name); |
|
29 | } |
||
30 | |||
46 |