Skip to content

Commit

Permalink
Misc: update magic methods docs
Browse files Browse the repository at this point in the history
  • Loading branch information
satrun77 committed Apr 28, 2015
1 parent ad3f1c7 commit 1504ff3
Show file tree
Hide file tree
Showing 27 changed files with 175 additions and 181 deletions.
2 changes: 1 addition & 1 deletion app/Model/Traits/Project/FilterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* @author Mohamed Alsharaf <[email protected]>
*
* @property int $id
* @property int $id
*
* @method Query\Builder where($column, $operator = null, $value = null, $boolean = 'and')
* @method Query\Builder join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false)
Expand Down
24 changes: 12 additions & 12 deletions app/Model/Traits/Project/Issue/Attachment/CrudTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
*
* @author Mohamed Alsharaf <[email protected]>
*
* @property int $id
* @property int $uploaded_by
* @property int $issue_id
* @property int $comment_id
* @property string $filename
* @property string $fileextension
* @property int $filesize
* @property string $upload_token
* @property Project\Issue $issue
* @property int $id
* @property int $uploaded_by
* @property int $issue_id
* @property int $comment_id
* @property string $filename
* @property string $fileextension
* @property int $filesize
* @property string $upload_token
* @property Project\Issue $issue
*
* @method Eloquent\Model save()
* @method Eloquent\Model delete()
* @method Eloquent\Model where()
* @method Eloquent\Model save()
* @method Eloquent\Model delete()
* @method Eloquent\Model where()
*/
trait CrudTrait
{
Expand Down
13 changes: 5 additions & 8 deletions app/Model/Traits/Project/Issue/Attachment/RelationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,21 @@

namespace Tinyissue\Model\Traits\Project\Issue\Attachment;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;

/**
* RelationTrait is trait class containing the relationship methods for the Project\Issue\Attachment model
*
* @author Mohamed Alsharaf <[email protected]>
*
* @method Eloquent\Model hasMany($related, $foreignKey = null, $localKey = null)
* @method Eloquent\Model hasOne($related, $foreignKey = null, $localKey = null)
* @method Eloquent\Model belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null)
* @method Eloquent\Model belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
* @method Relations\BelongsTo belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
*/
trait RelationTrait
{
/**
* An attachment is belong to one issue (inverse relationship of Project\Issue::attachments)
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function issue()
{
Expand All @@ -38,7 +35,7 @@ public function issue()
/**
* An attachment has one user upladed to (inverse relationship of User::attachments).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function user()
{
Expand All @@ -48,7 +45,7 @@ public function user()
/**
* An attachment can belong to a comment (inverse relationship of Comments::attachments).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function comment()
{
Expand Down
27 changes: 14 additions & 13 deletions app/Model/Traits/Project/Issue/Comment/CrudTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Tinyissue\Model\Traits\Project\Issue\Comment;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;
use Tinyissue\Model;
use Tinyissue\Model\Activity;
use Tinyissue\Model\User;
Expand All @@ -25,20 +26,20 @@
*
* @author Mohamed Alsharaf <[email protected]>
*
* @property int $id
* @property int $issue_id
* @property int $project_id
* @property string $comment
* @property int $created_by
* @property User $user
* @property Project $project
* @property Issue $issue
* @property Collection $attachments
* @property int $id
* @property int $issue_id
* @property int $project_id
* @property string $comment
* @property int $created_by
* @property User $user
* @property Project $project
* @property Issue $issue
* @property Collection $attachments
*
* @method Eloquent\Model save()
* @method Eloquent\Model fill(array $attributes)
* @method Eloquent\Model activity()
* @method Eloquent\Model delete()
* @method Eloquent\Model save()
* @method Eloquent\Model fill(array $attributes)
* @method Relations\HasOne activity()
* @method Eloquent\Model delete()
*/
trait CrudTrait
{
Expand Down
15 changes: 7 additions & 8 deletions app/Model/Traits/Project/Issue/Comment/RelationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@

namespace Tinyissue\Model\Traits\Project\Issue\Comment;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;

/**
* RelationTrait is trait class containing the relationship methods for the Project\Issue\Comment model
*
* @author Mohamed Alsharaf <[email protected]>
*
* @method Eloquent\Model hasMany($related, $foreignKey = null, $localKey = null)
* @method Eloquent\Model hasOne($related, $foreignKey = null, $localKey = null)
* @method Eloquent\Model belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null)
* @method Eloquent\Model belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
* @method Relations\HasMany hasMany($related, $foreignKey = null, $localKey = null)
* @method Relations\BelongsTo belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
* @method Relations\HasOne hasOne($related, $foreignKey = null, $localKey = null)
*/
trait RelationTrait
{
/**
* A comment has one user (inverse relationship of User::comments).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function user()
{
Expand All @@ -38,7 +37,7 @@ public function user()
/**
* Comment can have many attachments
*
* @return Eloquent\Relations\HasMany
* @return Relations\HasMany
*/
public function attachments()
{
Expand All @@ -48,7 +47,7 @@ public function attachments()
/**
* Comment can have one activity
*
* @return Eloquent\Relations\HasOne
* @return Relations\HasOne
*/
public function activity()
{
Expand Down
8 changes: 3 additions & 5 deletions app/Model/Traits/Project/Issue/CountTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Tinyissue\Model\Traits\Project\Issue;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;
use Tinyissue\Model;

/**
Expand All @@ -25,16 +25,14 @@
* @property Model\Project $project
* @property Model\User $createdBy
*
* @method Eloquent\Model belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
* @method Eloquent\Model save()
* @method Model\Project\Note activity()
* @method Relations\HasOne hasOne($related, $foreignKey = null, $localKey = null)
*/
trait CountTrait
{
/**
* Count number of comments in an issue
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
* @return Relations\HasOne
*/
public function countComments()
{
Expand Down
41 changes: 21 additions & 20 deletions app/Model/Traits/Project/Issue/CrudTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Tinyissue\Model\Traits\Project\Issue;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;
use Tinyissue\Model;
use Tinyissue\Model\Activity;
use Tinyissue\Model\Project;
Expand All @@ -23,27 +24,27 @@
*
* @author Mohamed Alsharaf <[email protected]>
*
* @property int $id
* @property int $created_by
* @property int $project_id
* @property string $title
* @property string $body
* @property int $assigned_to
* @property int $time_quote
* @property int $closed_by
* @property int $closed_at
* @property int status
* @property int $updated_at
* @property int $updated_by
* @property Project $project
* @property User $user
* @property User $updatedBy
* @property int $id
* @property int $created_by
* @property int $project_id
* @property string $title
* @property string $body
* @property int $assigned_to
* @property int $time_quote
* @property int $closed_by
* @property int $closed_at
* @property int status
* @property int $updated_at
* @property int $updated_by
* @property Project $project
* @property User $user
* @property User $updatedBy
*
* @method Eloquent\Model save()
* @method Eloquent\Model fill(array $attributes)
* @method Project\Issue tags()
* @method Project\Issue activities()
* @method Project\Issue comments()
* @method Eloquent\Model save()
* @method Eloquent\Model fill(array $attributes)
* @method Relations\BelongsToMany tags()
* @method Relations\HasMany activities()
* @method Relations\HasMany comments()
*/
trait CrudTrait
{
Expand Down
3 changes: 2 additions & 1 deletion app/Model/Traits/Project/Issue/QueryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
namespace Tinyissue\Model\Traits\Project\Issue;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;
use Tinyissue\Model\Tag;

/**
* QueryTrait is trait class containing the database queries methods for the Project|Issue model
*
* @author Mohamed Alsharaf <[email protected]>
*
* @method Eloquent\Collection tags()
* @method Relations\BelongsToMany tags()
*/
trait QueryTrait
{
Expand Down
27 changes: 13 additions & 14 deletions app/Model/Traits/Project/Issue/RelationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@

namespace Tinyissue\Model\Traits\Project\Issue;

use Illuminate\Database\Eloquent;
use Illuminate\Database\Eloquent\Relations;
use Tinyissue\Model;

/**
* RelationTrait is trait class containing the relationship methods for the Project\Issue model
*
* @author Mohamed Alsharaf <[email protected]>
*
* @method Eloquent\Model hasMany($related, $foreignKey = null, $localKey = null)
* @method Eloquent\Model hasOne($related, $foreignKey = null, $localKey = null)
* @method Eloquent\Model belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null)
* @method Eloquent\Model belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
* @method Relations\HasMany hasMany($related, $foreignKey = null, $localKey = null)
* @method Relations\BelongsToMany belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null)
* @method Relations\BelongsTo belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null)
*/
trait RelationTrait
{
/**
* An issue has one user assigned to (inverse relationship of User::issues).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function assigned()
{
Expand All @@ -39,7 +38,7 @@ public function assigned()
/**
* An issue has one user updated by (inverse relationship of User::issuesUpdatedBy).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function updatedBy()
{
Expand All @@ -49,7 +48,7 @@ public function updatedBy()
/**
* An issue has one user closed it (inverse relationship of User::issuesClosedBy).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function closer()
{
Expand All @@ -59,7 +58,7 @@ public function closer()
/**
* An issue has one user created it (inverse relationship of User::issuesCreatedBy).
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function user()
{
Expand All @@ -69,7 +68,7 @@ public function user()
/**
* Issue belong to a project
*
* @return Eloquent\Relations\BelongsTo
* @return Relations\BelongsTo
*/
public function project()
{
Expand All @@ -79,7 +78,7 @@ public function project()
/**
* Issue can have many attachments
*
* @return Eloquent\Relations\HasMany
* @return Relations\HasMany
*/
public function attachments()
{
Expand All @@ -92,7 +91,7 @@ public function attachments()
/**
* Issue have many users activities
*
* @return Eloquent\Relations\HasMany
* @return Relations\HasMany
*/
public function activities()
{
Expand All @@ -104,7 +103,7 @@ public function activities()
/**
* Issue have many tags
*
* @return Eloquent\Relations\BelongsToMany
* @return Relations\BelongsToMany
*/
public function tags()
{
Expand All @@ -114,7 +113,7 @@ public function tags()
/**
* Issue have many comments
*
* @return Eloquent\Relations\HasMany
* @return Relations\HasMany
*/
public function comments()
{
Expand Down
Loading

0 comments on commit 1504ff3

Please sign in to comment.