We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 39 | class Page extends EloquentModel implements AuditInterface |
||
| 40 | { |
||
| 41 | /* |
||
| 42 | * Laravel Deleting. |
||
| 43 | * @ https://laravel.com/docs/5.5/eloquent#soft-deleting |
||
| 44 | */ |
||
| 45 | use SoftDeletes; |
||
| 46 | /* |
||
| 47 | * Laravel Audits. |
||
| 48 | * @ http://www.laravel-auditing.com |
||
| 49 | */ |
||
| 50 | use Auditable; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * The table associated with the model. |
||
| 54 | * |
||
| 55 | * @var string |
||
| 56 | */ |
||
| 57 | protected $table = 'pages'; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * The table date columns, casted to Carbon. |
||
| 61 | * |
||
| 62 | * @var array |
||
| 63 | */ |
||
| 64 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Attributes to exclude from the Audit. |
||
| 68 | * |
||
| 69 | * @var array |
||
| 70 | */ |
||
| 71 | protected $auditExclude = [ |
||
| 72 | 'views', |
||
| 73 | ]; |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Increment the view count of the page. |
||
| 77 | * |
||
| 78 | * @return int |
||
| 79 | */ |
||
| 80 | public function incrementViews() |
||
| 84 | |||
| 85 | /** |
||
| 86 | * A page can have many menus. (Polymorphic) |
||
| 87 | * |
||
| 88 | * @return Collection|HasMany |
||
| 89 | */ |
||
| 90 | public function menus() |
||
| 94 | |||
| 95 | /** |
||
| 96 | * A page can have many menus. (Polymorphic) |
||
| 97 | * |
||
| 98 | * @return Menu|\Illuminate\Database\Eloquent\Relations\HasOne |
||
| 99 | */ |
||
| 100 | public function menu() |
||
| 104 | |||
| 105 | /** |
||
| 106 | * A page can have a redirect to another url, external or internal. |
||
| 107 | * |
||
| 108 | * @return Redirect|\Illuminate\Database\Eloquent\Relations\HasOne |
||
| 109 | */ |
||
| 110 | public function redirect() |
||
| 114 | |||
| 115 | |||
| 116 | /** |
||
| 117 | * Get the creator model of the eloquent model. |
||
| 118 | * |
||
| 119 | * @return Account|\Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 120 | */ |
||
| 121 | public function creator() |
||
| 125 | |||
| 126 | /** |
||
| 127 | * Get the creator model of the eloquent model. |
||
| 128 | * |
||
| 129 | * @return Account|\Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 130 | */ |
||
| 131 | public function editor() |
||
| 135 | |||
| 136 | /** |
||
| 137 | * Generate a link for the audit log. |
||
| 138 | * |
||
| 139 | * @return string |
||
| 140 | */ |
||
| 141 | public function auditTitle() |
||
| 145 | |||
| 146 | /** |
||
| 147 | * Generate a url to the audited data. |
||
| 148 | * |
||
| 149 | * @return mixed |
||
|
|
|||
| 150 | */ |
||
| 151 | public function auditUrl() |
||
| 155 | } |
||
| 156 |
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.