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
<?php | |
namespace Directory\Foundation; | |
use Framework\Jobs\Job; | |
use Illuminate\Contracts\Bus\SelfHandling; | |
abstract class AbstractJob extends Job implements SelfHandling | |
{ |
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
<?php | |
namespace Directory\Data\Repositories; | |
class CitizenRepository extends AbstractRepository | |
{ | |
private $citizen; | |
public function __construct(Citizen $citizen) | |
{ |
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
<?php | |
namespace Directory\Data\Entities\Citizen; | |
use Directory\Foundation\Entity; | |
use Directory\Data\Entities\Citizen\Values\SSN; | |
use Directory\Data\Entities\Citizen\Values\Name; | |
use Directory\Data\Entities\Citizen\Values\Email; | |
use Directory\Data\Entities\Citizen\Values\Address; | |
use Directory\Data\Entities\Citizen\Values\Occupation; |
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
<?php | |
namespace Directory\Data\Entities\Citizen\Values; | |
use Directory\Foundation\Value; | |
use Directory\Foundation\Validation; | |
use Directory\Data\Entities\Citizen\Values\Exceptions\InvalidCitizenEmailException; | |
class Email extends Value | |
{ |
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
<?php | |
namespace Directory\Data\Entities\Citizen\Values; | |
use Directory\Foundation\Value; | |
class Name extends Value | |
{ | |
} |
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
<?php | |
namespace Directory\Foundation; | |
class Value | |
{ | |
protected $value; | |
public function __construct($value) |
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
<?php | |
namespace Directory\Foundation; | |
use Exception; | |
use Illuminate\Validation\Validator as IlluminateValidator; | |
class InvalidInputException extends Exception | |
{ | |
public function __construct($message = “”, $code = 0, Exception $previous = null) |
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
<?php | |
namespace App\Foundation; | |
class Validation | |
{ | |
public function make(array $data, array $rules, array $messages = [], array $customAttributes = []) | |
{ | |
return $this->getValidationFactory()->make($data, $rules, $messages, $customAttributes); | |
} |
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
<?php | |
namespace Directory\Foundation; | |
class Validator | |
{ | |
protected $rules = []; | |
protected $validation; |
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
<?php | |
namespace Directory\Domains\Citizen\Validators; | |
use Directory\Foundation\Validator; | |
class CitizenCreationValidator extends Validator | |
{ | |
protected $rules = [ | |
'name' => 'required', |