Skip to content

Commit e362b60

Browse files
committed
Allow laravel 5.5 and 5.6
1 parent d54312c commit e362b60

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pion/laravel-eloquent-position",
33
"description": "Position logic for Eloquent models with minimum setup",
44
"require": {
5-
"laravel/framework": "5.1.* || 5.2.* || 5.3.* || 5.4.*"
5+
"laravel/framework": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.*"
66
},
77
"require-dev": {
88
"squizlabs/php_codesniffer": "2.*"
@@ -20,7 +20,7 @@
2020
"authors": [
2121
{
2222
"name": "Martin Kluska",
23-
"email": "martin.kluska@imakers.cz"
23+
"email": "martin@kluska.cz"
2424
}
2525
],
2626
"minimum-stability": "stable"

src/Commands/RecalculatePositionCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Pion\Support\Eloquent\Position\Commands;
34

45
use Pion\Support\Eloquent\Position\Traits\PositionTrait;
@@ -106,7 +107,7 @@ protected function getPositionForGroup($groupKey, &$positionsByGroup)
106107
/**
107108
* Builds the group key from the group columns and the values form the model
108109
*
109-
* @param Model|PositionTrait $model
110+
* @param Model|PositionTrait $model The eloquent model
110111
* @param array $groups
111112
*
112113
* @return string

src/PositionObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function saving($model)
5252
// Check if the position is set
5353
if (is_null($position) || $position == '') {
5454
$this->appendLast($model, $oldPosition);
55-
} else if (is_null($oldPosition)) {
55+
} elseif (is_null($oldPosition)) {
5656
$this->forcedPosition($model, $position);
5757
} else {
5858
$this->move($model, $position, $oldPosition);

src/Query/PositionQuery.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
2+
23
namespace Pion\Support\Eloquent\Position\Query;
34

45
use Illuminate\Database\Eloquent\Model;
56
use Pion\Support\Eloquent\Position\Traits\PositionTrait;
67

7-
class PositionQuery extends AbstractPositionQuery {
8+
class PositionQuery extends AbstractPositionQuery
9+
{
810
/**
911
* @var string
1012
*/
@@ -84,4 +86,4 @@ public function runQuery($query)
8486

8587
return $this->model()->getPosition();
8688
}
87-
}
89+
}

0 commit comments

Comments
 (0)