| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | trait AttachDaftFramework |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Framework|null |
||
| 15 | */ |
||
| 16 | protected $daftFrameworkInstance; |
||
| 17 | |||
| 18 | public function AttachDaftFramework(Framework $framework) : void |
||
| 19 | { |
||
| 20 | if ($this->daftFrameworkInstance instanceof Framework) { |
||
| 21 | throw new BadMethodCallException( |
||
| 22 | 'Framework must not be attached if a framework is already attached!' |
||
| 23 | ); |
||
| 24 | } |
||
| 25 | |||
| 26 | $this->daftFrameworkInstance = $framework; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function DetachDaftFramework() : ? Framework |
||
| 38 | } |
||
| 39 | |||
| 40 | public function GetDaftFramework() : ? Framework |
||
| 43 | } |
||
| 44 | |||
| 45 | public function CheckIfUsingFrameworkInstance(Framework ...$instances) : bool |
||
| 50 |