Refactored Store.

This commit is contained in:
Dmitry Khomutov 2018-03-04 14:30:34 +07:00
commit 8b5a874789
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
44 changed files with 397 additions and 424 deletions

View file

@ -3,7 +3,7 @@
namespace PHPCensor\Model;
use PHPCensor\Model;
use b8\Store\Factory;
use PHPCensor\Store\Factory;
class ProjectGroup extends Model
{
@ -115,8 +115,6 @@ class ProjectGroup extends Model
*/
public function setCreateDate(\DateTime $value)
{
$this->validateDate('create_date', $value);
$stringValue = $value->format('Y-m-d H:i:s');
if ($this->data['create_date'] === $stringValue) {
@ -162,6 +160,6 @@ class ProjectGroup extends Model
*/
public function getGroupProjects()
{
return Factory::getStore('Project', 'PHPCensor')->getByGroupId($this->getId(), false);
return Factory::getStore('Project')->getByGroupId($this->getId(), false);
}
}