It seems like $uid ?: $this->uid can also be of type string; however, BestServedCold\LaravelZe...\Store\Delete::delete() does only seem to accept boolean, maybe add an additional type check?
If a method or function can return multiple different values and unless you are
sure that you only can receive a single value in this context, we recommend
to add an additional type check:
/** * @return array|string */functionreturnsDifferentValues($x){if($x){return'foo';}returnarray();}$x=returnsDifferentValues($y);if(is_array($x)){// $x is an array.}
If this a common case that PHP Analyzer should handle natively, please let us
know by opening an issue.
Loading history...
52
}
53
54
/**
55
* Insert
56
*
57
* @param $id
58
* @param array $fields
59
* @param bool $uid
60
* @return mixed
61
*/
62
1
public function insert($id, array $fields, $uid = false, $deleteFirst = true)
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.