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

40 lines
706 B
PHP
Raw Normal View History

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
{
/** @var array */
protected $fillable = ['foo'];
/** @var int */
public $saveCount = 0;
2018-09-15 17:24:59 +02:00
/** @var QueryBuilder */
public static $queryBuilder = null;
2018-08-31 01:55:05 +02:00
/**
* @param array $options
* @return bool
*/
public function save(array $options = [])
{
$this->saveCount++;
return true;
}
2018-09-15 17:24:59 +02:00
/**
* @return QueryBuilder
*/
public static function query()
{
return self::$queryBuilder;
}
2018-08-31 01:55:05 +02:00
}