From 5dc0f181cfbef1db55257c1775d0f9a2d4c6e6a1 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Mon, 16 Feb 2015 11:20:18 +0000 Subject: [PATCH] Fixing base store docblocks. --- PHPCI/Store/Base/BuildMetaStoreBase.php | 29 +++++++++++++++++++++++++ PHPCI/Store/Base/BuildStoreBase.php | 29 +++++++++++++++++++++++++ PHPCI/Store/Base/ProjectStoreBase.php | 21 ++++++++++++++++++ PHPCI/Store/Base/UserStoreBase.php | 20 +++++++++++++++++ 4 files changed, 99 insertions(+) diff --git a/PHPCI/Store/Base/BuildMetaStoreBase.php b/PHPCI/Store/Base/BuildMetaStoreBase.php index 6c4cfc15..7a3d4159 100644 --- a/PHPCI/Store/Base/BuildMetaStoreBase.php +++ b/PHPCI/Store/Base/BuildMetaStoreBase.php @@ -20,11 +20,24 @@ class BuildMetaStoreBase extends Store protected $modelName = '\PHPCI\Model\BuildMeta'; protected $primaryKey = 'id'; + /** + * Returns a BuildMeta model by primary key. + * @param mixed $value + * @param string $useConnection + * @return \@appNamespace\Model\BuildMeta|null + */ public function getByPrimaryKey($value, $useConnection = 'read') { return $this->getById($value, $useConnection); } + /** + * Returns a BuildMeta model by Id. + * @param mixed $value + * @param string $useConnection + * @throws HttpException + * @return \@appNamespace\Model\BuildMeta|null + */ public function getById($value, $useConnection = 'read') { if (is_null($value)) { @@ -44,6 +57,14 @@ class BuildMetaStoreBase extends Store return null; } + /** + * Returns an array of BuildMeta models by ProjectId. + * @param mixed $value + * @param int $limit + * @param string $useConnection + * @throws HttpException + * @return array + */ public function getByProjectId($value, $limit = 1000, $useConnection = 'read') { if (is_null($value)) { @@ -72,6 +93,14 @@ class BuildMetaStoreBase extends Store } } + /** + * Returns an array of BuildMeta models by BuildId. + * @param mixed $value + * @param int $limit + * @param string $useConnection + * @throws HttpException + * @return array + */ public function getByBuildId($value, $limit = 1000, $useConnection = 'read') { if (is_null($value)) { diff --git a/PHPCI/Store/Base/BuildStoreBase.php b/PHPCI/Store/Base/BuildStoreBase.php index 89d3a82f..0560d72b 100644 --- a/PHPCI/Store/Base/BuildStoreBase.php +++ b/PHPCI/Store/Base/BuildStoreBase.php @@ -20,11 +20,24 @@ class BuildStoreBase extends Store protected $modelName = '\PHPCI\Model\Build'; protected $primaryKey = 'id'; + /** + * Returns a Build model by primary key. + * @param mixed $value + * @param string $useConnection + * @return \@appNamespace\Model\Build|null + */ public function getByPrimaryKey($value, $useConnection = 'read') { return $this->getById($value, $useConnection); } + /** + * Returns a Build model by Id. + * @param mixed $value + * @param string $useConnection + * @throws HttpException + * @return \@appNamespace\Model\Build|null + */ public function getById($value, $useConnection = 'read') { if (is_null($value)) { @@ -44,6 +57,14 @@ class BuildStoreBase extends Store return null; } + /** + * Returns an array of Build models by ProjectId. + * @param mixed $value + * @param int $limit + * @param string $useConnection + * @throws HttpException + * @return array + */ public function getByProjectId($value, $limit = 1000, $useConnection = 'read') { if (is_null($value)) { @@ -72,6 +93,14 @@ class BuildStoreBase extends Store } } + /** + * Returns an array of Build models by Status. + * @param mixed $value + * @param int $limit + * @param string $useConnection + * @throws HttpException + * @return array + */ public function getByStatus($value, $limit = 1000, $useConnection = 'read') { if (is_null($value)) { diff --git a/PHPCI/Store/Base/ProjectStoreBase.php b/PHPCI/Store/Base/ProjectStoreBase.php index e5a01cdd..562afba2 100644 --- a/PHPCI/Store/Base/ProjectStoreBase.php +++ b/PHPCI/Store/Base/ProjectStoreBase.php @@ -20,11 +20,24 @@ class ProjectStoreBase extends Store protected $modelName = '\PHPCI\Model\Project'; protected $primaryKey = 'id'; + /** + * Returns a Project model by primary key. + * @param mixed $value + * @param string $useConnection + * @return \@appNamespace\Model\Project|null + */ public function getByPrimaryKey($value, $useConnection = 'read') { return $this->getById($value, $useConnection); } + /** + * Returns a Project model by Id. + * @param mixed $value + * @param string $useConnection + * @throws HttpException + * @return \@appNamespace\Model\Project|null + */ public function getById($value, $useConnection = 'read') { if (is_null($value)) { @@ -44,6 +57,14 @@ class ProjectStoreBase extends Store return null; } + /** + * Returns an array of Project models by Title. + * @param mixed $value + * @param int $limit + * @param string $useConnection + * @throws HttpException + * @return array + */ public function getByTitle($value, $limit = 1000, $useConnection = 'read') { if (is_null($value)) { diff --git a/PHPCI/Store/Base/UserStoreBase.php b/PHPCI/Store/Base/UserStoreBase.php index fd903d8e..d91271d0 100644 --- a/PHPCI/Store/Base/UserStoreBase.php +++ b/PHPCI/Store/Base/UserStoreBase.php @@ -20,11 +20,24 @@ class UserStoreBase extends Store protected $modelName = '\PHPCI\Model\User'; protected $primaryKey = 'id'; + /** + * Returns a User model by primary key. + * @param mixed $value + * @param string $useConnection + * @return \@appNamespace\Model\User|null + */ public function getByPrimaryKey($value, $useConnection = 'read') { return $this->getById($value, $useConnection); } + /** + * Returns a User model by Id. + * @param mixed $value + * @param string $useConnection + * @throws HttpException + * @return \@appNamespace\Model\User|null + */ public function getById($value, $useConnection = 'read') { if (is_null($value)) { @@ -44,6 +57,13 @@ class UserStoreBase extends Store return null; } + /** + * Returns a User model by Email. + * @param mixed $value + * @param string $useConnection + * @throws HttpException + * @return \@appNamespace\Model\User|null + */ public function getByEmail($value, $useConnection = 'read') { if (is_null($value)) {