We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 20 | class PageRepository extends BaseRepository |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var Page|Builder|Collection |
||
| 24 | */ |
||
| 25 | protected $model; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * PageRepository constructor. |
||
| 29 | * |
||
| 30 | * @param Page $model |
||
| 31 | */ |
||
| 32 | public function __construct(Page $model) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param $plugin_name |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function restoreTrashedPlugin($plugin_name) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | public function makeList() : array |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @deprecated |
||
| 56 | */ |
||
| 57 | public function listAllPagesWithoutMenusAndEditable() |
||
| 61 | |||
| 62 | public function listPagesWithoutMenus() |
||
| 66 | |||
| 67 | public function allPagesWithoutMenusAndEditable() : Collection |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Get the page based on its name. |
||
| 74 | * |
||
| 75 | * @param $string |
||
| 76 | * @return Page|array|\stdClass |
||
| 77 | */ |
||
| 78 | public function whereName($string) : Page |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @param $string |
||
| 85 | * @return Page |
||
| 86 | */ |
||
| 87 | public function whereRoute($string) : Page |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @param $string |
||
| 94 | * @return Page |
||
| 95 | */ |
||
| 96 | public function wherePlugin($string) : Page |
||
| 100 | |||
| 101 | /** |
||
| 102 | * Sitemap enabled pages. |
||
| 103 | */ |
||
| 104 | public function whereSitemap() : Collection |
||
| 108 | |||
| 109 | /** |
||
| 110 | * Return all pages that are enabled. |
||
| 111 | */ |
||
| 112 | public function enabled() : Collection |
||
| 116 | |||
| 117 | public function frontendPageCollection() |
||
| 124 | } |
||
| 125 |
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: