@@ -23,9 +23,8 @@ |
||
23 | 23 | * @param string $table |
24 | 24 | * @param string $foreignKey |
25 | 25 | * @param string $otherKey |
26 | - * @param string $relation |
|
27 | 26 | * |
28 | - * @return BelongsToSortedMany |
|
27 | + * @return MorphToSortedMany |
|
29 | 28 | */ |
30 | 29 | public function morphToSortedMany($related, $name, $orderColumn = 'position', $table = null, $foreignKey = null, $otherKey = null, $inverse = false) |
31 | 30 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | // First, we will need to determine the foreign key and "other key" for the |
35 | 35 | // relationship. Once we have determined the keys we will make the query |
36 | 36 | // instances, as well as the relationship instances we need for these. |
37 | - $foreignKey = $foreignKey ?: $name.'_id'; |
|
37 | + $foreignKey = $foreignKey ?: $name . '_id'; |
|
38 | 38 | |
39 | 39 | $instance = new $related; |
40 | 40 |
@@ -11,6 +11,9 @@ discard block |
||
11 | 11 | { |
12 | 12 | protected $orderColumn; |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $orderColumn |
|
16 | + */ |
|
14 | 17 | protected function setOrderColumn($orderColumn) |
15 | 18 | { |
16 | 19 | $this->orderColumn = $orderColumn; |
@@ -115,7 +118,7 @@ discard block |
||
115 | 118 | /** |
116 | 119 | * Get position of new relation. |
117 | 120 | * |
118 | - * @return float |
|
121 | + * @return integer |
|
119 | 122 | */ |
120 | 123 | protected function getNextPosition() |
121 | 124 | { |