engelsystem/tests/Unit/Models/Stub/BaseModelImplementation.php

31 lines
609 B
PHP

<?php
namespace Engelsystem\Test\Unit\Models\Stub;
use Engelsystem\Models\BaseModel;
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
/**
* @property string foo
*/
class BaseModelImplementation extends BaseModel
{
/** @var array<string> */
protected $fillable = ['foo']; // phpcs:ignore
public int $saveCount = 0;
public static QueryBuilder $queryBuilder = null;
public function save(array $options = []): bool
{
$this->saveCount++;
return true;
}
public static function query(): QueryBuilder
{
return self::$queryBuilder;
}
}