1 | <?php |
||
20 | class BaseDashboardController extends Controller |
||
21 | { |
||
22 | /** |
||
23 | * Auth interface. |
||
24 | * |
||
25 | * @var \Laraflock\Dashboard\Repositories\Auth\AuthRepositoryInterface |
||
26 | */ |
||
27 | protected $authRepositoryInterface; |
||
28 | |||
29 | /** |
||
30 | * Permission interface. |
||
31 | * |
||
32 | * @var \Laraflock\Dashboard\Repositories\Permission\PermissionRepositoryInterface |
||
33 | */ |
||
34 | protected $permissionRepositoryInterface; |
||
35 | |||
36 | /** |
||
37 | * Role interface. |
||
38 | * |
||
39 | * @var \Laraflock\Dashboard\Repositories\Role\RoleRepositoryInterface |
||
40 | */ |
||
41 | protected $roleRepositoryInterface; |
||
42 | |||
43 | /** |
||
44 | * User interface. |
||
45 | * |
||
46 | * @var \Laraflock\Dashboard\Repositories\User\UserRepositoryInterface |
||
47 | */ |
||
48 | protected $userRepositoryInterface; |
||
49 | |||
50 | /** |
||
51 | * The constructor. |
||
52 | * |
||
53 | * @param \Laraflock\Dashboard\Repositories\Auth\AuthRepositoryInterface $authRepositoryInterface |
||
54 | * @param \Laraflock\Dashboard\Repositories\Permission\PermissionRepositoryInterface $permissionRepositoryInterface |
||
55 | * @param \Laraflock\Dashboard\Repositories\Role\RoleRepositoryInterface $roleRepositoryInterface |
||
56 | * @param \Laraflock\Dashboard\Repositories\User\UserRepositoryInterface $userRepositoryInterface |
||
57 | * @param \Laraflock\Dashboard\Repositories\Module\ModuleRepositoryInterface $moduleRepositoryInterface |
||
58 | */ |
||
59 | 40 | public function __construct( |
|
82 | |||
83 | /** |
||
84 | * Parses a view, using the package view namespace |
||
85 | * |
||
86 | * @param $view |
||
87 | * @param array $data |
||
88 | * |
||
89 | * @return \Illuminate\View\View |
||
90 | */ |
||
91 | 17 | public function view($view, $data = []) |
|
95 | } |
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: