Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ilestis authored and github-actions[bot] committed Nov 9, 2023
1 parent 02848b1 commit c26a577
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 32 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function crudIndex(Request $request)
// Don't use total as it won't use the distinct() filters (typically when doing
// left join on the entities table)
$filteredCount = $models->total();
//$filteredCount = count($models); //->total()
//$filteredCount = count($models); //->total()
} else {
/** @var Paginator $models */
$models = $base->paginate();
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ protected function calculateListConstraints(): self
*/
public function listRange(): array
{
if (! is_array($this->listRange)) {
if (!is_array($this->listRange)) {
return [];
}
return $this->listRange;
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Character.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class Character extends MiscModel
use CampaignTrait;
use ExportableTrait;
use HasFactory;
use Searchable;
use SoftDeletes;
use SortableTrait;
use Searchable;

/** @var string[] */
protected $fillable = [
Expand Down
28 changes: 14 additions & 14 deletions app/Models/Concerns/Nested.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ protected function callPendingAction()
{
$this->moved = false;

if (! $this->pending && ! $this->exists) {
if (!$this->pending && !$this->exists) {
$this->makeRoot();
}

if (! $this->pending) {
if (!$this->pending) {
return;
}

Expand Down Expand Up @@ -189,7 +189,7 @@ protected function actionRaw()
protected function actionRoot()
{
// Simplest case that do not affect other nodes.
if (! $this->exists) {
if (!$this->exists) {
$cut = $this->getLowerBound() + 1;

$this->setLft($cut);
Expand Down Expand Up @@ -228,7 +228,7 @@ protected function actionAppendOrPrepend(self $parent, $prepend = false)

$cut = $prepend ? $parent->getLft() + 1 : $parent->getRgt();

if (! $this->insertAt($cut)) {
if (!$this->insertAt($cut)) {
return false;
}

Expand Down Expand Up @@ -271,7 +271,7 @@ protected function actionBeforeOrAfter(self $node, $after = false)
*/
public function refreshNode()
{
if (! $this->exists || static::$actionsPerformed === 0) {
if (!$this->exists || static::$actionsPerformed === 0) {
return;
}

Expand Down Expand Up @@ -523,7 +523,7 @@ public function beforeOrAfterNode(self $node, $after = false)
->assertNotDescendant($node)
->assertSameScope($node);

if (! $this->isSiblingOf($node)) {
if (!$this->isSiblingOf($node)) {
$this->setParent($node->getRelationValue('parent'));
}

Expand Down Expand Up @@ -551,7 +551,7 @@ public function insertAfterNode(self $node)
*/
public function insertBeforeNode(self $node)
{
if (! $this->beforeNode($node)->save()) {
if (!$this->beforeNode($node)->save()) {
return false;
}

Expand Down Expand Up @@ -587,7 +587,7 @@ public function up($amount = 1)
->skip($amount - 1)
->first();

if (! $sibling) {
if (!$sibling) {
return false;
}

Expand All @@ -609,7 +609,7 @@ public function down($amount = 1)
->skip($amount - 1)
->first();

if (! $sibling) {
if (!$sibling) {
return false;
}

Expand Down Expand Up @@ -752,12 +752,12 @@ public function newScopedQuery(string $table = null)
public function applyNestedSetScope($query, $table = null)
{
// @phpstan-ignore-next-line
if (! $scoped = $this->getScopeAttributes()) {
if (!$scoped = $this->getScopeAttributes()) {
return $query;
}

// @phpstan-ignore-next-line
if (! $table) {
if (!$table) {
$table = $this->getTable();
}

Expand Down Expand Up @@ -839,7 +839,7 @@ public static function create(array $attributes = [], self $parent = null)
*/
public function getNodeHeight()
{
if (! $this->exists) {
if (!$this->exists) {
return 2;
}

Expand Down Expand Up @@ -1138,7 +1138,7 @@ protected function getArrayableRelations()
*/
protected function hardDeleting()
{
return ! $this->usesSoftDelete() || $this->forceDeleting;
return !$this->usesSoftDelete() || $this->forceDeleting;
}

/**
Expand Down Expand Up @@ -1217,7 +1217,7 @@ protected function assertNotDescendant(self $node)
*/
protected function assertNodeExists(self $node)
{
if (! $node->getLft() || ! $node->getRgt()) {
if (!$node->getLft() || !$node->getRgt()) {
$field = $node->getParentIdName();
$error = \Illuminate\Validation\ValidationException::withMessages([
$field => [__('crud.errors.invalid_node')]
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ public function explorable(): bool
if (empty($this->entity->image_path) && !$this->isReal()) {
return false;
}
return ! ($this->isChunked() && ($this->chunkingError() || $this->chunkingRunning()));
return !($this->isChunked() && ($this->chunkingError() || $this->chunkingRunning()));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Models/PluginVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ protected function emptyBlock(array $matches)
if (Str::contains($condition, '<i class="missing">')) {
return false;
}
return ! (empty($condition));
return !(empty($condition));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Scopes/AclScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function extend(Builder $builder)
protected function addWithInvisible(Builder $builder)
{
$builder->macro('withInvisible', function (Builder $builder, $withInvisible = true) {
if (! $withInvisible) {
if (!$withInvisible) {
// Sends the default scope
return $builder;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Observers/CampaignObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function saving(Campaign $campaign)
$isPublic = request()->get('is_public', null);
if (!empty($isPublic) && $previousVisibility == Campaign::VISIBILITY_PRIVATE) {
$campaign->visibility_id = Campaign::VISIBILITY_PUBLIC;
// Default to public for now. Later will have REVIEW mode.
// Default to public for now. Later will have REVIEW mode.
} elseif (empty($isPublic) && $previousVisibility != Campaign::VISIBILITY_PRIVATE) {
$campaign->visibility_id = Campaign::VISIBILITY_PRIVATE;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Renderers/DatagridRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private function renderHeadColumn($column)
$class = $column['type'];
if ($type == 'avatar') {
$class = (!empty($column['parent']) ? $this->hidden : $class) . ' w-14';
//$html = null;
//$html = null;
} elseif ($type == 'location') {
$class .= ' ' . $this->hidden;
$label = Arr::get($column, 'label', Module::singular(config('entities.ids.location'), __('entities.location')));
Expand Down
2 changes: 1 addition & 1 deletion app/Renderers/DatagridRenderer2.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function bulks(): array
}
continue;
}
// More specific use cases?
// More specific use cases?
} elseif ($bulk === Layout::ACTION_DELETE) {
if (auth()->check() && auth()->user()->isAdmin()) {
$this->bulks[] = $bulk;
Expand Down
4 changes: 2 additions & 2 deletions app/Rules/EntityFileRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct()
public function passes($attribute, $value)
{
// Not a valid file, don't go further
if ($value instanceof UploadedFile && ! $value->isValid()) {
if ($value instanceof UploadedFile && !$value->isValid()) {
return false;
}

Expand All @@ -48,7 +48,7 @@ public function passes($attribute, $value)
return false;
}

return ! (!in_array($value->getClientOriginalExtension(), ['mp3', 'ogg', 'json']))
return !(!in_array($value->getClientOriginalExtension(), ['mp3', 'ogg', 'json']))



Expand Down
2 changes: 1 addition & 1 deletion app/Services/AttributeMentionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function validField(string $value = null): bool
if (!Str::contains($value, ['{', '}'])) {
return false;
}
return ! (Str::contains($value, ['<', '>']));
return !(Str::contains($value, ['<', '>']));
}
/**
* Load all the entity attributes and pre-calculate the values
Expand Down
6 changes: 3 additions & 3 deletions app/Services/Users/PurgeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function firstWarning(): int
FirstWarningJob::dispatch($user->id);
}

$this->count ++;
$this->count++;
}
}, 'users.id', 'id');
return $this->count;
Expand Down Expand Up @@ -245,7 +245,7 @@ public function secondWarning(): int
SecondWarningJob::dispatch($user->id);
}

$this->count ++;
$this->count++;
}
}, 'users.id', 'id');
return $this->count;
Expand Down Expand Up @@ -292,7 +292,7 @@ public function purge(): int
DeleteUser::dispatch($user);
}

$this->count ++;
$this->count++;
}
});
return $this->count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
/**
* Run the migrations.
*/
Expand All @@ -22,7 +21,7 @@ public function up(): void
public function down(): void
{
Schema::table('entities', function (Blueprint $table) {
//

});
}
};

0 comments on commit c26a577

Please sign in to comment.