| 1 | <?php |
||
| 9 | trait HasTestimonials |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Register a deleted model event with the dispatcher. |
||
| 13 | * |
||
| 14 | * @param \Closure|string $callback |
||
| 15 | * |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | abstract public static function deleted($callback); |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Define a one-to-many relationship. |
||
| 22 | * |
||
| 23 | * @param string $related |
||
| 24 | * @param string $foreignKey |
||
|
|
|||
| 25 | * @param string $localKey |
||
| 26 | * |
||
| 27 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 28 | */ |
||
| 29 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Boot the HasTestimonials trait for the model. |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | public static function bootHasTestimonials() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get all attached testimonials to the model. |
||
| 45 | * |
||
| 46 | * @return \Illuminate\Database\Eloquent\Relations\MorphMany |
||
| 47 | */ |
||
| 48 | public function testimonials(): HasMany |
||
| 52 | } |
||
| 53 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.