We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 36 | class Menu extends EloquentModel implements Linker |
||
| 37 | { |
||
| 38 | /* |
||
| 39 | * Laravel Deleting. |
||
| 40 | * @ https://laravel.com/docs/5.5/eloquent#soft-deleting |
||
| 41 | */ |
||
| 42 | use SoftDeletes; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Status if current menu. |
||
| 46 | * |
||
| 47 | * @var bool |
||
| 48 | */ |
||
| 49 | public $active = false; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * The table associated with the model. |
||
| 53 | * |
||
| 54 | * @var string |
||
| 55 | */ |
||
| 56 | protected $table = 'menus'; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The attributes that are not mass assignable. |
||
| 60 | * |
||
| 61 | * @var array |
||
| 62 | */ |
||
| 63 | protected $guarded = []; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * The relations to eager load on every query. |
||
| 67 | * |
||
| 68 | * @var array |
||
| 69 | */ |
||
| 70 | protected $with = ['link.to']; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * The attributes that should be mutated to dates. |
||
| 74 | * |
||
| 75 | * @var array |
||
| 76 | */ |
||
| 77 | protected $dates = ['updated_at', 'created_at', 'deleted_at']; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Return the page that this menu has. |
||
| 81 | * |
||
| 82 | * @deprecated |
||
| 83 | * @return Page|\Illuminate\Database\Eloquent\Relations\HasOne |
||
| 84 | */ |
||
| 85 | public function page() |
||
| 89 | |||
| 90 | /** |
||
| 91 | * Return the menu that this belongs to. |
||
| 92 | * |
||
| 93 | * @return Menu|\Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 94 | */ |
||
| 95 | public function parent() |
||
| 99 | |||
| 100 | /** |
||
| 101 | * The menu can have many submenu children. |
||
| 102 | * |
||
| 103 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 104 | */ |
||
| 105 | public function children() |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Return the link that this connects to, page or hyperlink. |
||
| 112 | * |
||
| 113 | * @return MorphOne|Collection|Link |
||
| 114 | */ |
||
| 115 | public function link() |
||
| 119 | |||
| 120 | /** |
||
| 121 | * Allows the CSS to set a state on the navigation. |
||
| 122 | * |
||
| 123 | * @return string |
||
| 124 | */ |
||
| 125 | public function classState() |
||
| 129 | |||
| 130 | /** |
||
| 131 | * Generate the url that this links to. |
||
| 132 | * |
||
| 133 | * @return mixed |
||
|
|
|||
| 134 | */ |
||
| 135 | public function route() |
||
| 139 | |||
| 140 | /** |
||
| 141 | * The name of the current model object. |
||
| 142 | * |
||
| 143 | * @return string |
||
| 144 | */ |
||
| 145 | public function name() |
||
| 149 | } |
||
| 150 |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.