We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 38 | class Page extends EloquentModel implements AuditInterface |
||
| 39 | { |
||
| 40 | /* |
||
| 41 | * Laravel Deleting. |
||
| 42 | * @ https://laravel.com/docs/5.5/eloquent#soft-deleting |
||
| 43 | */ |
||
| 44 | use SoftDeletes; |
||
| 45 | /* |
||
| 46 | * Laravel Audits. |
||
| 47 | * @ http://www.laravel-auditing.com |
||
| 48 | */ |
||
| 49 | use Auditable; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * The table associated with the model. |
||
| 53 | * |
||
| 54 | * @var string |
||
| 55 | */ |
||
| 56 | protected $table = 'pages'; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The attributes that are mass assignable. |
||
| 60 | * |
||
| 61 | * @var array |
||
| 62 | */ |
||
| 63 | protected $fillable = ['seo_title', 'slug']; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * The table date columns, casted to Carbon. |
||
| 67 | * |
||
| 68 | * @var array |
||
| 69 | */ |
||
| 70 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Attributes to exclude from the Audit. |
||
| 74 | * |
||
| 75 | * @var array |
||
| 76 | */ |
||
| 77 | protected $auditExclude = [ |
||
| 78 | 'views', |
||
| 79 | ]; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Increment the view count of the page. |
||
| 83 | * |
||
| 84 | * @return int |
||
| 85 | */ |
||
| 86 | public function incrementViews() |
||
| 90 | |||
| 91 | /** |
||
| 92 | * A page belongs to a single menu. |
||
| 93 | * |
||
| 94 | * @return Menu|BelongsTo |
||
| 95 | */ |
||
| 96 | public function menu() |
||
| 100 | |||
| 101 | /** |
||
| 102 | * A page can have a redirect to another url, external or internal. |
||
| 103 | * |
||
| 104 | * @return Redirect|\Illuminate\Database\Eloquent\Relations\HasOne |
||
| 105 | */ |
||
| 106 | public function redirect() |
||
| 110 | |||
| 111 | /** |
||
| 112 | * Get the creator model of the eloquent model. |
||
| 113 | * |
||
| 114 | * @return Account|\Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 115 | */ |
||
| 116 | public function creator() |
||
| 120 | |||
| 121 | /** |
||
| 122 | * Get the creator model of the eloquent model. |
||
| 123 | * |
||
| 124 | * @return Account|\Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 125 | */ |
||
| 126 | public function editor() |
||
| 130 | |||
| 131 | /** |
||
| 132 | * Generate a link for the audit log. |
||
| 133 | * |
||
| 134 | * @return string |
||
| 135 | */ |
||
| 136 | public function auditTitle() |
||
| 140 | |||
| 141 | /** |
||
| 142 | * Generate a url to the audited data. |
||
| 143 | * |
||
| 144 | * @return mixed |
||
|
|
|||
| 145 | */ |
||
| 146 | public function auditUrl() |
||
| 150 | |||
| 151 | /** |
||
| 152 | * Generate a url slug based on the relationship this belongs to. |
||
| 153 | * |
||
| 154 | * @return string |
||
| 155 | */ |
||
| 156 | public function slug() |
||
| 166 | } |
||
| 167 |
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.