| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function __construct(AdminManager $adminManager) |
||
| 23 | { |
||
| 24 | // Must call parent __construct otherwise |
||
| 25 | // we need to redeclare checkpermissions |
||
| 26 | // middleware for authentication check |
||
| 27 | parent::__construct($adminManager); |
||
| 28 | |||
| 29 | $this->admin = $this->adminManager->getAdminInstance(); |
||
| 30 | |||
| 31 | view()->share('moduleAdmin', $this->admin); |
||
|
|
|||
| 32 | } |
||
| 33 | |||
| 57 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: