@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * @param array $data |
| 43 | 43 | * |
| 44 | - * @return mixed |
|
| 44 | + * @return boolean |
|
| 45 | 45 | */ |
| 46 | 46 | public function create(array $data) |
| 47 | 47 | { |
@@ -50,9 +50,8 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * @param array $data |
|
| 54 | 53 | * @param $id |
| 55 | - * @param string $attribute |
|
| 54 | + * @param string $attributes |
|
| 56 | 55 | * |
| 57 | 56 | * @return mixed |
| 58 | 57 | */ |
@@ -61,6 +60,9 @@ discard block |
||
| 61 | 60 | return $this->model->update($attributes, $options); |
| 62 | 61 | } |
| 63 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $method |
|
| 65 | + */ |
|
| 64 | 66 | protected function transaction($method) |
| 65 | 67 | { |
| 66 | 68 | return DB::transaction([$this, $method]); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * Insert add note to message queue. |
| 30 | 30 | * |
| 31 | 31 | * @param Note $note |
| 32 | - * @param User $changeBy |
|
| 32 | + * @param UserInterface $changeBy |
|
| 33 | 33 | * |
| 34 | 34 | * @return void |
| 35 | 35 | */ |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * Insert update note to message queue. |
| 43 | 43 | * |
| 44 | 44 | * @param Note $note |
| 45 | - * @param User $changeBy |
|
| 45 | + * @param UserInterface $changeBy |
|
| 46 | 46 | * |
| 47 | 47 | * @return void |
| 48 | 48 | */ |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * Insert delete note to message queue. |
| 61 | 61 | * |
| 62 | 62 | * @param Note $note |
| 63 | - * @param User $changeBy |
|
| 63 | + * @param UserInterface $changeBy |
|
| 64 | 64 | * |
| 65 | 65 | * @return void |
| 66 | 66 | */ |
@@ -72,8 +72,27 @@ |
||
| 72 | 72 | return $this->morphMany('Tinyissue\Model\Message\Queue', 'model'); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param string $related |
|
| 77 | + * @param string $name |
|
| 78 | + */ |
|
| 75 | 79 | abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null); |
| 80 | + |
|
| 81 | + /** |
|
| 82 | + * @param string $related |
|
| 83 | + * @param string $foreignKey |
|
| 84 | + */ |
|
| 76 | 85 | abstract public function hasOne($related, $foreignKey = null, $localKey = null); |
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * @param string $related |
|
| 89 | + * @param string $foreignKey |
|
| 90 | + */ |
|
| 77 | 91 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
| 92 | + |
|
| 93 | + /** |
|
| 94 | + * @param string $related |
|
| 95 | + * @param string $foreignKey |
|
| 96 | + */ |
|
| 78 | 97 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
| 79 | 98 | } |
@@ -161,9 +161,30 @@ |
||
| 161 | 161 | return $this->morphMany('Tinyissue\Model\Message\Queue', 'model'); |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | + /** |
|
| 165 | + * @param string $related |
|
| 166 | + * @param string $table |
|
| 167 | + * @param string $foreignKey |
|
| 168 | + * @param string $otherKey |
|
| 169 | + */ |
|
| 164 | 170 | abstract public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null); |
| 171 | + |
|
| 172 | + /** |
|
| 173 | + * @param string $related |
|
| 174 | + * @param string $foreignKey |
|
| 175 | + */ |
|
| 165 | 176 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
| 177 | + |
|
| 178 | + /** |
|
| 179 | + * @param string $related |
|
| 180 | + * @param string $name |
|
| 181 | + */ |
|
| 166 | 182 | abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null); |
| 167 | 183 | abstract public function hasOne($related, $foreignKey = null, $localKey = null); |
| 184 | + |
|
| 185 | + /** |
|
| 186 | + * @param string $related |
|
| 187 | + * @param string $foreignKey |
|
| 188 | + */ |
|
| 168 | 189 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
| 169 | 190 | } |
@@ -65,7 +65,21 @@ |
||
| 65 | 65 | return $this->morphMany('Tinyissue\Model\Message\Queue', 'model'); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param string $related |
|
| 70 | + * @param string $name |
|
| 71 | + */ |
|
| 68 | 72 | abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null); |
| 73 | + |
|
| 74 | + /** |
|
| 75 | + * @param string $related |
|
| 76 | + * @param string $foreignKey |
|
| 77 | + */ |
|
| 69 | 78 | abstract public function hasOne($related, $foreignKey = null, $localKey = null); |
| 79 | + |
|
| 80 | + /** |
|
| 81 | + * @param string $related |
|
| 82 | + * @param string $foreignKey |
|
| 83 | + */ |
|
| 70 | 84 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
| 71 | 85 | } |
@@ -128,6 +128,17 @@ |
||
| 128 | 128 | }); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $related |
|
| 133 | + * @param string $foreignKey |
|
| 134 | + */ |
|
| 131 | 135 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
| 136 | + |
|
| 137 | + /** |
|
| 138 | + * @param string $related |
|
| 139 | + * @param string $table |
|
| 140 | + * @param string $foreignKey |
|
| 141 | + * @param string $otherKey |
|
| 142 | + */ |
|
| 132 | 143 | abstract public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null); |
| 133 | 144 | } |
@@ -32,5 +32,10 @@ |
||
| 32 | 32 | return $this->hasOne('Tinyissue\Model\Permission', 'id', 'permission_id'); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param string $related |
|
| 37 | + * @param string $foreignKey |
|
| 38 | + * @param string $localKey |
|
| 39 | + */ |
|
| 35 | 40 | abstract public function hasOne($related, $foreignKey = null, $localKey = null); |
| 36 | 41 | } |
@@ -62,6 +62,19 @@ |
||
| 62 | 62 | ); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | + /** |
|
| 66 | + * @param string $related |
|
| 67 | + * @param string $foreignKey |
|
| 68 | + * @param string $localKey |
|
| 69 | + */ |
|
| 65 | 70 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * @param string $related |
|
| 74 | + * @param string $table |
|
| 75 | + * @param string $foreignKey |
|
| 76 | + * @param string $otherKey |
|
| 77 | + * @param string $relation |
|
| 78 | + */ |
|
| 66 | 79 | abstract public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null); |
| 67 | 80 | } |
@@ -62,7 +62,23 @@ |
||
| 62 | 62 | return $this->belongsToMany('Tinyissue\Model\Project', 'projects_kanban_tags', 'project_id', 'tag_id'); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | + /** |
|
| 66 | + * @param string $related |
|
| 67 | + * @param string $foreignKey |
|
| 68 | + */ |
|
| 65 | 69 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * @param string $related |
|
| 73 | + * @param string $foreignKey |
|
| 74 | + */ |
|
| 66 | 75 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
| 76 | + |
|
| 77 | + /** |
|
| 78 | + * @param string $related |
|
| 79 | + * @param string $table |
|
| 80 | + * @param string $foreignKey |
|
| 81 | + * @param string $otherKey |
|
| 82 | + */ |
|
| 67 | 83 | abstract public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null); |
| 68 | 84 | } |