mathieutu /
laravel-json-syncer
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace MathieuTu\JsonSyncer\Tests\Stubs; |
||||
| 4 | |||||
| 5 | use MathieuTu\JsonSyncer\Helpers\JsonImporter; |
||||
| 6 | |||||
| 7 | class Model extends \Illuminate\Database\Eloquent\Model |
||||
| 8 | { |
||||
| 9 | public $timestamps = false; |
||||
| 10 | |||||
| 11 | public function setJsonImportableRelationsForTests($relations) |
||||
| 12 | { |
||||
| 13 | $this->jsonImportableRelations = $relations; |
||||
|
0 ignored issues
–
show
|
|||||
| 14 | |||||
| 15 | return $this; |
||||
| 16 | } |
||||
| 17 | |||||
| 18 | public function setJsonImportableAttributesForTests($attributes) |
||||
| 19 | { |
||||
| 20 | $this->jsonImportableAttributes = $attributes; |
||||
|
0 ignored issues
–
show
|
|||||
| 21 | |||||
| 22 | return $this; |
||||
| 23 | } |
||||
| 24 | |||||
| 25 | public function instanceImportForTests($objects) |
||||
| 26 | { |
||||
| 27 | JsonImporter::importFromJson($this, $objects); |
||||
|
0 ignored issues
–
show
$this of type MathieuTu\JsonSyncer\Tests\Stubs\Model is incompatible with the type MathieuTu\JsonSyncer\Contracts\JsonImportable expected by parameter $importable of MathieuTu\JsonSyncer\Hel...orter::importFromJson().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 28 | } |
||||
| 29 | } |
||||
| 30 |
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.