2018-08-31 01:55:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Test\Unit\Models\Stub;
|
|
|
|
|
|
|
|
use Engelsystem\Models\BaseModel;
|
2018-09-15 17:24:59 +02:00
|
|
|
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
|
2018-08-31 01:55:05 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @property string foo
|
|
|
|
*/
|
|
|
|
class BaseModelImplementation extends BaseModel
|
|
|
|
{
|
2022-12-15 19:50:56 +01:00
|
|
|
/** @var array<string> */
|
|
|
|
protected $fillable = ['foo']; // phpcs:ignore
|
2018-08-31 01:55:05 +02:00
|
|
|
|
2022-12-15 19:50:56 +01:00
|
|
|
public int $saveCount = 0;
|
2018-08-31 01:55:05 +02:00
|
|
|
|
2023-02-03 15:04:24 +01:00
|
|
|
public static ?QueryBuilder $queryBuilder = null;
|
2018-09-15 17:24:59 +02:00
|
|
|
|
2022-12-14 19:15:20 +01:00
|
|
|
public function save(array $options = []): bool
|
2018-08-31 01:55:05 +02:00
|
|
|
{
|
|
|
|
$this->saveCount++;
|
|
|
|
return true;
|
|
|
|
}
|
2018-09-15 17:24:59 +02:00
|
|
|
|
2022-12-14 19:15:20 +01:00
|
|
|
public static function query(): QueryBuilder
|
2018-09-15 17:24:59 +02:00
|
|
|
{
|
|
|
|
return self::$queryBuilder;
|
|
|
|
}
|
2018-08-31 01:55:05 +02:00
|
|
|
}
|