Skip to content

Commit

Permalink
fix php cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Aug 20, 2024
1 parent ce52502 commit 88df6c6
Show file tree
Hide file tree
Showing 41 changed files with 45 additions and 56 deletions.
2 changes: 1 addition & 1 deletion app/Console/Commands/IdeHelperModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected function createPhpDocs($class): string
);
}

$serializer = new DocBlockSerializer();
$serializer = new DocBlockSerializer;
$docComment = $serializer->getDocComment($phpdoc);

if ($this->write_mixin) {
Expand Down
2 changes: 1 addition & 1 deletion app/Eloquent/Concerns/Blockable.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait Blockable
{
public static function bootBlockable(): void
{
static::addGlobalScope(new BlockableScope());
static::addGlobalScope(new BlockableScope);

static::saving(static function (Model $model): void {
if ($model->block_reason !== null) {
Expand Down
4 changes: 2 additions & 2 deletions app/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

abstract class Model extends IlluminateModel
{
use HasFactory;
use CachesAttributes;
use HasFactory;

protected $guarded = [];

Expand All @@ -24,7 +24,7 @@ public function __construct(array $attributes = [])

public static function table(): string
{
return (new static())->getTable();
return (new static)->getTable();
}

public function delete()
Expand Down
2 changes: 1 addition & 1 deletion app/Eloquent/Orbit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

abstract class Orbit extends Model
{
use Orbital;
use HasSlug;
use Orbital;

public $incrementing = false;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/FallbackController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public function __invoke(Request $request): Response
}
}

throw new NotFoundHttpException();
throw new NotFoundHttpException;
}
}
4 changes: 1 addition & 3 deletions app/Http/Policies/PermissionsPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

class PermissionsPolicy extends Policy implements \Stringable
{
public function configure(): void
{
}
public function configure(): void {}

public function __toString()
{
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
*/
class Repository extends Model
{
use HasFactory;
use Blockable;
use HasFactory;

public $incrementing = false;

Expand Down
6 changes: 3 additions & 3 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
* @method static \Database\Factories\UserFactory factory(...$parameters)
* @method static \App\Eloquent\QueryBuilders\UserQueryBuilder|\App\Models\User query()
*/
class User extends Model implements AuthenticatableContract, AuthorizableContract, CachableAttributesContract, SitemapableContract, FilamentUser, HasAvatar, HasName
class User extends Model implements AuthenticatableContract, AuthorizableContract, CachableAttributesContract, FilamentUser, HasAvatar, HasName, SitemapableContract
{
use Authenticatable;
use Authorizable;
use RoutesNotifications;
use Blockable;
use Searchable;
use CachesAttributes;
use RoutesNotifications;
use Searchable;

public $incrementing = false;

Expand Down
4 changes: 2 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class AppServiceProvider extends ServiceProvider
public function register(): void
{
$this->app->singleton(Numeral::class, static function (): Numeral {
$numeral = new Numeral();
$numeral->setLanguageManager(new LanguageManager());
$numeral = new Numeral;
$numeral->setLanguageManager(new LanguageManager);

return $numeral;
});
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function boot(): void
return $organization;
}

throw (new ModelNotFoundException())->setModel(
throw (new ModelNotFoundException)->setModel(
User::class.'|'.Organization::class,
$name
);
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Numeral.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class Numeral extends Component
{
public function __construct(
public string $format = '4a'
) {
}
) {}

public function render(): View
{
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Web/Faqs.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class Faqs extends Component
{
public function __construct(
protected ?int $limit = null
) {
}
) {}

public function render(): View
{
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Web/GithubSponsors.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class GithubSponsors extends Component
{
public function __construct(
protected GithubSponsorRepository $githubSponsorRepository
) {
}
) {}

public function render(): View
{
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Web/Home/RandomContributors.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class RandomContributors extends Component
{
public function __construct(
public int $limit = 6
) {
}
) {}

public function render(): View
{
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Web/Home/RandomOrganizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class RandomOrganizations extends Component
{
public function __construct(
public int $limit = 6
) {
}
) {}

public function render(): View
{
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Web/Home/RandomRepositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class RandomRepositories extends Component
{
public function __construct(
protected int $limit = 3
) {
}
) {}

public function render(): View
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
2 changes: 1 addition & 1 deletion database/migrations/2021_03_27_164922_add_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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 Down
2 changes: 1 addition & 1 deletion database/migrations/2021_04_11_181126_drop_faqs_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
2 changes: 1 addition & 1 deletion database/migrations/2021_08_23_104301_purge_filament.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
2 changes: 1 addition & 1 deletion database/migrations/2021_08_23_105107_purge_nova.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
public function up(): void
{
Expand Down
4 changes: 1 addition & 3 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ class DatabaseSeeder extends Seeder
*
* @return void
*/
public function run()
{
}
public function run() {}
}
3 changes: 1 addition & 2 deletions tests/Feature/Jobs/GithubJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
$user->block_reason = BlockReason::INAPPROPRIATE();
$user->update();

$job = githubJob(function () {
}, $user);
$job = githubJob(function () {}, $user);
app(Dispatcher::class)->dispatchNow($job);

expect($job->job->isDeleted())->toBeTrue();
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Jobs/LoadUserRepositoriesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Carbon\CarbonInterval;

it('has the expected configuration')
->expect(fn () => new LoadUserRepositories(new User()))
->expect(fn () => new LoadUserRepositories(new User))
->timeout->toEqual(CarbonInterval::minutes(15)->totalSeconds)
->queue->toEqual('github');

Expand Down

0 comments on commit 88df6c6

Please sign in to comment.