| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | final class Has |
||
| 18 | { |
||
| 19 | private function __construct() {} |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Defines a has-one relationship with another class. |
||
| 23 | * |
||
| 24 | * @param string $class The fully qualified class name. |
||
| 25 | * @param FindsKeys|null $key The input array offset (optional) |
||
| 26 | * @return DefinesRelationships The relationship definition. |
||
| 27 | */ |
||
| 28 | public static function one( |
||
| 29 | string $class, |
||
| 30 | FindsKeys $key = null |
||
| 31 | ): DefinesRelationships { |
||
| 32 | return HasOne::ofThe($class, $key); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Defines a has-many relationship with another class. |
||
| 37 | * |
||
| 38 | * @param string $class The fully qualified class name. |
||
| 39 | * @param FindsKeys|null $key The input array offset (optional) |
||
| 40 | * @return DefinesRelationships The relationship definition. |
||
| 41 | */ |
||
| 42 | public static function many( |
||
| 47 | } |
||
| 48 | } |
||
| 49 |