Completed
Push — master ( 1fda69...492ee7 )
by Dmitry
03:16
created
src/Rutorika/Sortable/SortableServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function boot()
24 24
     {
25 25
         $this->publishes([
26
-            __DIR__ . '/../../config/sortable.php' => config_path('sortable.php'),
26
+            __DIR__.'/../../config/sortable.php' => config_path('sortable.php'),
27 27
         ]);
28 28
     }
29 29
 
Please login to merge, or discard this patch.
src/Rutorika/Sortable/SortableController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $rules = [
60 60
             'type' => ['required', 'in:moveAfter,moveBefore'],
61
-            'entityName' => ['required', 'in:' . implode(',', array_keys($sortableEntities))],
61
+            'entityName' => ['required', 'in:'.implode(',', array_keys($sortableEntities))],
62 62
             'id' => 'required',
63 63
             'positionEntityId' => 'required',
64 64
         ];
@@ -76,20 +76,20 @@  discard block
 block discarded – undo
76 76
         $primaryKey = with(new $entityClass())->getKeyName();
77 77
 
78 78
         if (!empty($connectionName)) {
79
-            $tableName = $connectionName . '.' . $tableName;
79
+            $tableName = $connectionName.'.'.$tableName;
80 80
         }
81 81
 
82 82
         if (!$relation) {
83
-            $rules['id'] .= '|exists:' . $tableName . ',' . $primaryKey;
84
-            $rules['positionEntityId'] .= '|exists:' . $tableName . ',' . $primaryKey;
83
+            $rules['id'] .= '|exists:'.$tableName.','.$primaryKey;
84
+            $rules['positionEntityId'] .= '|exists:'.$tableName.','.$primaryKey;
85 85
         } else {
86 86
             /** @var BelongsToSortedMany $relationObject */
87 87
             $relationObject = with(new $entityClass())->$relation();
88 88
             $pivotTable = $relationObject->getTable();
89 89
 
90
-            $rules['parentId'] = 'required|exists:' . $tableName . ',' . $primaryKey;
91
-            $rules['id'] .= '|exists:' . $pivotTable . ',' . $relationObject->getRelatedKey() . ',' . $relationObject->getForeignKey() . ',' . $request->input('parentId');
92
-            $rules['positionEntityId'] .= '|exists:' . $pivotTable . ',' . $relationObject->getRelatedKey() . ',' . $relationObject->getForeignKey() . ',' . $request->input('parentId');
90
+            $rules['parentId'] = 'required|exists:'.$tableName.','.$primaryKey;
91
+            $rules['id'] .= '|exists:'.$pivotTable.','.$relationObject->getRelatedKey().','.$relationObject->getForeignKey().','.$request->input('parentId');
92
+            $rules['positionEntityId'] .= '|exists:'.$pivotTable.','.$relationObject->getRelatedKey().','.$relationObject->getForeignKey().','.$request->input('parentId');
93 93
         }
94 94
 
95 95
         return $validator->make($request->all(), $rules);
Please login to merge, or discard this patch.
src/Rutorika/Sortable/MorphToSortedManyTrait.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
71 71
      */
72 72
     public function morphedBySortedMany($related, $name, $orderColumn = 'position', $table = null, $foreignPivotKey = null,
73
-                                  $relatedPivotKey = null, $parentKey = null, $relatedKey = null)
73
+                                    $relatedPivotKey = null, $parentKey = null, $relatedKey = null)
74 74
     {
75 75
         $foreignPivotKey = $foreignPivotKey ?: $this->getForeignKey();
76 76
 
Please login to merge, or discard this patch.
src/Rutorika/Sortable/BelongsToSortedManyTrait.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * @return BelongsToSortedMany
28 28
      */
29 29
     public function belongsToSortedMany($related, $orderColumn = 'position', $table = null, $foreignPivotKey = null, $relatedPivotKey = null,
30
-                                  $parentKey = null, $relatedKey = null, $relation = null)
30
+                                    $parentKey = null, $relatedKey = null, $relation = null)
31 31
     {
32 32
         // If no relationship name was passed, we will pull backtraces to get the
33 33
         // name of the calling function. We will use that function name as the
Please login to merge, or discard this patch.