| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | private function getReplaceKeys(): array |
||
| 53 | { |
||
| 54 | static $result = []; |
||
| 55 | if ($result !== []) { |
||
| 56 | return $result; |
||
| 57 | } |
||
| 58 | $constants = (new \ReflectionClass(Relation::class))->getConstants(); |
||
| 59 | foreach ($constants as $name => $value) { |
||
| 60 | if (!in_array($name, self::RELATION_SCHEMA_KEYS, true) || array_key_exists($value, $result)) { |
||
| 61 | continue; |
||
| 62 | } |
||
| 63 | $result[$value] = 'Relation::' . $name; |
||
| 64 | } |
||
| 65 | |||
| 66 | return $result; |
||
| 67 | } |
||
| 69 |