Last active
November 2, 2015 10:38
Revisions
-
dadamssg revised this gist
Jul 13, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,4 @@ Acme\Project\Model\User\Value\PhoneNumber: value: type: string column: phone_number nullable: false -
dadamssg revised this gist
Jul 13, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,4 @@ Acme\Project\Model\User\Value\PhoneNumber: value: type: string column: phone_number nullable: true -
dadamssg revised this gist
Jul 13, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Acme\Project\Model\User\Entity\User: type: datetime column: registered_at embedded: phoneNumber: class: Acme\Project\Model\User\Value\PhoneNumber columnPrefix: false nullable: true # <--- new option -
dadamssg revised this gist
Jul 13, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,4 +14,4 @@ Acme\Project\Model\User\Entity\User: email: class: Acme\Project\Model\User\Value\Email columnPrefix: false nullable: true # <--- new option -
dadamssg revised this gist
Jul 13, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ <?php namespace Acme\Project\Model\User\Value; use Acme\Project\Model\Core\Validation\Assert; final class PhoneNumber { -
dadamssg revised this gist
Jul 13, 2015 . 3 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes. -
dadamssg revised this gist
Jul 13, 2015 . 2 changed files with 24 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Acme\Project\Model\User\Value\PhoneNumber: type: embeddable fields: value: type: string column: phone_number nullable: false This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ Acme\Project\Model\User\Entity\User: type: entity table: user id: id: type: guid generator: strategy: none fields: registeredAt: type: datetime column: registered_at embedded: email: class: Acme\Project\Model\User\Value\Email columnPrefix: false nullable: true -
dadamssg revised this gist
Jul 13, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,6 @@ public function __construct($phoneNumber) */ public function __toString() { return $this->value ?: ''; // required because doctrine disables the constructor when creating } } -
dadamssg created this gist
Jul 13, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ <?php namespace Acme\Project\Domain\User\Value; use Acme\Project\Domain\Core\Validation\Assert; final class PhoneNumber { /** * @var string */ private $value; /** * @param string $phoneNumber */ public function __construct($phoneNumber) { Assert::string($phoneNumber, "Invalid phone number."); $this->value = $phoneNumber; } /** * @return string */ public function __toString() { return $this->value; } }