chore: add phpstan static analysis minimum (#4511)
This commit is contained in:
parent
3f7e2a565f
commit
a1a52754ad
67 changed files with 561 additions and 279 deletions
|
@ -78,6 +78,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
|
|||
*/
|
||||
public function create(array $fields, bool $validate = true, bool $force = false): Model|bool
|
||||
{
|
||||
/** @var \Pterodactyl\Models\Model $instance */
|
||||
$instance = $this->getBuilder()->newModelInstance();
|
||||
($force) ? $instance->forceFill($fields) : $instance->fill($fields);
|
||||
|
||||
|
@ -163,6 +164,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
|
|||
public function update(int $id, array $fields, bool $validate = true, bool $force = false): Model|bool
|
||||
{
|
||||
try {
|
||||
/** @var \Pterodactyl\Models\Model $instance */
|
||||
$instance = $this->getBuilder()->where('id', $id)->firstOrFail();
|
||||
} catch (ModelNotFoundException) {
|
||||
throw new RecordNotFoundException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue