-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
157 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
class ChildModel | ||
{ | ||
protected $id; | ||
/** @var string */ | ||
protected $name; | ||
/** @var string */ | ||
protected $login; | ||
/** @var DateTime */ | ||
protected $creAt; | ||
/** @var bool */ | ||
protected $active; | ||
|
||
public function __construct() | ||
{ | ||
$this->creAt = new DateTime; | ||
} | ||
|
||
public function __toString(): string | ||
{ | ||
return (string)$this->id; | ||
} | ||
|
||
public function getEmail(): string | ||
{ | ||
return $this->email; | ||
} | ||
|
||
public function setEmail(string $email): void | ||
{ | ||
$this->email = $email; | ||
} | ||
|
||
/** @var string */ | ||
protected $email; | ||
|
||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function setId($id): void | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
public function getName(): ?string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function setName(string $name): void | ||
{ | ||
$this->name = $name; | ||
} | ||
|
||
public function getLogin(): ?string | ||
{ | ||
return $this->login; | ||
} | ||
|
||
public function setLogin(string $login): void | ||
{ | ||
$this->login = $login; | ||
} | ||
|
||
public function getCreAt(): DateTime | ||
{ | ||
return $this->creAt; | ||
} | ||
|
||
public function setCreAt(DateTime $creAt): void | ||
{ | ||
$this->creAt = $creAt; | ||
} | ||
|
||
public function isActive(): bool | ||
{ | ||
return $this->active; | ||
} | ||
|
||
public function setActive(bool $active): void | ||
{ | ||
$this->active = $active; | ||
} | ||
|
||
public function getCreAtTimestamp(): int | ||
{ | ||
return $this->creAt->getTimestamp(); | ||
} | ||
|
||
public function getTitleName(string $title): string | ||
{ | ||
return $title . ' ' . $this->name; | ||
} | ||
|
||
public function setTitleName(string $name, string $suffix): void | ||
{ | ||
$this->name = $name . ' ' . $suffix; | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
return [ | ||
'id' => [], | ||
'creAt' => [], | ||
'name' => [], | ||
'login' => [], | ||
'active' => [], | ||
'email' => [], | ||
]; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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