Issues (25)

src/Models/BaseModel.php (3 issues)

1
<?php
2
3
namespace TarfinLabs\Parasut\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Sushi\Sushi;
7
8
class BaseModel extends Model
9
{
10
    use Sushi;
0 ignored issues
show
The trait Sushi\Sushi requires some properties which are not provided by TarfinLabs\Parasut\Models\BaseModel: $schema, $class, $rows
Loading history...
11
12 10
    public function __construct(array $attributes = [])
13
    {
14 10
        parent::__construct($attributes);
15
16 10
        $this->fillable = array_keys($this->schema);
0 ignored issues
show
The property schema does not seem to exist on TarfinLabs\Parasut\Models\BaseModel. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
17 10
    }
18
19 10
    public function getRows(): array
20
    {
21 10
        return [array_merge(['id' => 'integer'], $this->schema)];
0 ignored issues
show
The property schema does not seem to exist on TarfinLabs\Parasut\Models\BaseModel. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
22
    }
23
}
24