-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nurlan Mukhanov
committed
Apr 6, 2023
1 parent
805e6c0
commit c3427bd
Showing
5 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace DBD\Entity\Tests\Entities; | ||
|
||
use DBD\Entity\Column; | ||
use DBD\Entity\Interfaces\SyntheticEntity; | ||
use DBD\Entity\Mapper; | ||
use DBD\Entity\Primitives\StringPrimitives; | ||
use DBD\Entity\View; | ||
|
||
class EntityWithDefaults extends View implements SyntheticEntity | ||
{ | ||
public const PREFILL = "shouldn't be changed"; | ||
|
||
public ?string $prefiled = self::PREFILL; | ||
|
||
public ?string $unfiled; | ||
} | ||
|
||
|
||
class EntityWithDefaultsMap extends Mapper | ||
{ | ||
public $prefiled = [ | ||
Column::NAME => "prefilled", | ||
Column::PRIMITIVE_TYPE => StringPrimitives::String, | ||
Column::NULLABLE => true | ||
]; | ||
|
||
public $unfiled = [ | ||
Column::NAME => "unfilled", | ||
Column::PRIMITIVE_TYPE => StringPrimitives::String, | ||
Column::NULLABLE => true | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters