| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function setModel(Model $model): ModelInterface |
||
| 29 | { |
||
| 30 | if (!($model instanceof ModelInterface)) { |
||
| 31 | |||
| 32 | $modelClass = (new\ReflectionClass($model)); |
||
|
|
|||
| 33 | |||
| 34 | throw new InvalidConfigException($modelClass->getNamespaceName() . |
||
| 35 | '\\' . $modelClass->getShortName().' class must be implemented from |
||
| 36 | Itstructure\RbacModule\interfaces\ModelInterface.'); |
||
| 37 | } |
||
| 38 | |||
| 39 | $model->setAuthManager($this->authManager); |
||
| 40 | |||
| 41 | return $model; |
||
| 42 | } |
||
| 44 |