| Conditions | 4 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | protected static function getClassProperties($className) |
||
| 33 | { |
||
| 34 | if (\class_exists($className, true)) { |
||
| 35 | $reflection = new ReflectionClass($className); |
||
| 36 | $value = $reflection->newInstanceWithoutConstructor(); |
||
| 37 | |||
| 38 | if (\is_subclass_of($value, Model::class, true)) { |
||
|
|
|||
| 39 | $attributes = Schema::getColumnListing($value->getTable()); |
||
| 40 | |||
| 41 | self::$eloquentClasses[$className] = $attributes; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return (!empty(self::$eloquentClasses[$className])) ? self::$eloquentClasses[$className] : parent::getClassProperties($className); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |