Applied latest StyleCI changes

This commit is contained in:
Dan Brown 2022-04-25 18:42:31 +01:00
parent d5b7fff102
commit f1a8ad4980
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
4 changed files with 18 additions and 18 deletions

View File

@ -10,10 +10,10 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Database\Eloquent\Relations\MorphTo;
/** /**
* @property int $id * @property int $id
* @property int $deleted_by * @property int $deleted_by
* @property string $deletable_type * @property string $deletable_type
* @property int $deletable_id * @property int $deletable_id
* @property Deletable $deletable * @property Deletable $deletable
*/ */
class Deletion extends Model implements Loggable class Deletion extends Model implements Loggable

View File

@ -71,7 +71,7 @@ class RecycleBinApiController extends ApiController
protected function listFormatter(Deletion $deletion) protected function listFormatter(Deletion $deletion)
{ {
$deletable = $deletion->deletable; $deletable = $deletion->deletable;
$withTrashedQuery = fn(Builder $query) => $query->withTrashed(); $withTrashedQuery = fn (Builder $query) => $query->withTrashed();
if ($deletable instanceof BookChild) { if ($deletable instanceof BookChild) {
$parent = $deletable->getParent(); $parent = $deletable->getParent();

View File

@ -19,15 +19,15 @@ class UpdatePolymorphicTypes extends Migration
* Mapping of tables and columns that contain polymorphic types. * Mapping of tables and columns that contain polymorphic types.
*/ */
protected $columnsByTable = [ protected $columnsByTable = [
'activities' => 'entity_type', 'activities' => 'entity_type',
'comments' => 'entity_type', 'comments' => 'entity_type',
'deletions' => 'deletable_type', 'deletions' => 'deletable_type',
'entity_permissions' => 'restrictable_type', 'entity_permissions' => 'restrictable_type',
'favourites' => 'favouritable_type', 'favourites' => 'favouritable_type',
'joint_permissions' => 'entity_type', 'joint_permissions' => 'entity_type',
'search_terms' => 'entity_type', 'search_terms' => 'entity_type',
'tags' => 'entity_type', 'tags' => 'entity_type',
'views' => 'viewable_type', 'views' => 'viewable_type',
]; ];
/** /**

View File

@ -125,9 +125,9 @@ class RecycleBinApiTest extends TestCase
'parent' => [ 'parent' => [
'id' => $page->chapter->id, 'id' => $page->chapter->id,
'name' => $page->chapter->name, 'name' => $page->chapter->name,
'type' => 'chapter' 'type' => 'chapter',
] ],
] ],
], ],
]; ];
@ -152,7 +152,7 @@ class RecycleBinApiTest extends TestCase
$resp = $this->putJson($this->baseEndpoint . '/' . $deletion->id); $resp = $this->putJson($this->baseEndpoint . '/' . $deletion->id);
$resp->assertJson([ $resp->assertJson([
'restore_count' => 1 'restore_count' => 1,
]); ]);
$this->assertDatabaseHas('pages', [ $this->assertDatabaseHas('pages', [
@ -176,7 +176,7 @@ class RecycleBinApiTest extends TestCase
$resp = $this->deleteJson($this->baseEndpoint . '/' . $deletion->id); $resp = $this->deleteJson($this->baseEndpoint . '/' . $deletion->id);
$resp->assertJson([ $resp->assertJson([
'delete_count' => 1 'delete_count' => 1,
]); ]);
$this->assertDatabaseMissing('pages', ['id' => $page->id]); $this->assertDatabaseMissing('pages', ['id' => $page->id]);