Skip to content

NOW MANAGED ON CODEBERG

Applied latest StyleCI changes

Dan Brownf1a8ad4980a6
diff --git a/app/Entities/Models/Deletion.php b/app/Entities/Models/Deletion.php
index 101a138d1..25f0ea6db 100644
--- a/app/Entities/Models/Deletion.php
+++ b/app/Entities/Models/Deletion.php
@@ -10,10 +10,10 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
/**
- * @property int $id
- * @property int $deleted_by
- * @property string $deletable_type
- * @property int $deletable_id
+ * @property int $id
+ * @property int $deleted_by
+ * @property string $deletable_type
+ * @property int $deletable_id
* @property Deletable $deletable
*/
class Deletion extends Model implements Loggable
diff --git a/app/Http/Controllers/Api/RecycleBinApiController.php b/app/Http/Controllers/Api/RecycleBinApiController.php
index bbe19bd86..f327bae93 100644
--- a/app/Http/Controllers/Api/RecycleBinApiController.php
+++ b/app/Http/Controllers/Api/RecycleBinApiController.php
@@ -71,7 +71,7 @@ class RecycleBinApiController extends ApiController
protected function listFormatter(Deletion $deletion)
{
$deletable = $deletion->deletable;
- $withTrashedQuery = fn(Builder $query) => $query->withTrashed();
+ $withTrashedQuery = fn (Builder $query) => $query->withTrashed();
if ($deletable instanceof BookChild) {
$parent = $deletable->getParent();
diff --git a/database/migrations/2022_04_25_140741_update_polymorphic_types.php b/database/migrations/2022_04_25_140741_update_polymorphic_types.php
index 4645ab2db..9f312bf75 100644
--- a/database/migrations/2022_04_25_140741_update_polymorphic_types.php
+++ b/database/migrations/2022_04_25_140741_update_polymorphic_types.php
@@ -19,15 +19,15 @@ class UpdatePolymorphicTypes extends Migration
* Mapping of tables and columns that contain polymorphic types.
*/
protected $columnsByTable = [
- 'activities' => 'entity_type',
- 'comments' => 'entity_type',
- 'deletions' => 'deletable_type',
+ 'activities' => 'entity_type',
+ 'comments' => 'entity_type',
+ 'deletions' => 'deletable_type',
'entity_permissions' => 'restrictable_type',
- 'favourites' => 'favouritable_type',
- 'joint_permissions' => 'entity_type',
- 'search_terms' => 'entity_type',
- 'tags' => 'entity_type',
- 'views' => 'viewable_type',
+ 'favourites' => 'favouritable_type',
+ 'joint_permissions' => 'entity_type',
+ 'search_terms' => 'entity_type',
+ 'tags' => 'entity_type',
+ 'views' => 'viewable_type',
];
/**
diff --git a/tests/Api/RecycleBinApiTest.php b/tests/Api/RecycleBinApiTest.php
index 05c896bd9..83cd82480 100644
--- a/tests/Api/RecycleBinApiTest.php
+++ b/tests/Api/RecycleBinApiTest.php
@@ -125,9 +125,9 @@ class RecycleBinApiTest extends TestCase
'parent' => [
'id' => $page->chapter->id,
'name' => $page->chapter->name,
- 'type' => 'chapter'
- ]
- ]
+ 'type' => 'chapter',
+ ],
+ ],
],
];
@@ -152,7 +152,7 @@ class RecycleBinApiTest extends TestCase
$resp = $this->putJson($this->baseEndpoint . '/' . $deletion->id);
$resp->assertJson([
- 'restore_count' => 1
+ 'restore_count' => 1,
]);
$this->assertDatabaseHas('pages', [
@@ -176,7 +176,7 @@ class RecycleBinApiTest extends TestCase
$resp = $this->deleteJson($this->baseEndpoint . '/' . $deletion->id);
$resp->assertJson([
- 'delete_count' => 1
+ 'delete_count' => 1,
]);
$this->assertDatabaseMissing('pages', ['id' => $page->id]);