Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix errors #176

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/Jobs/SyncUserContributions.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function run(): void
],
])->json('data.viewer.contributionsCollection');

foreach (data_get($response, 'commitContributionsByRepository.*.repository.nameWithOwner') as $name) {
foreach (data_get($response, 'commitContributionsByRepository.*.repository.nameWithOwner', []) as $name) {
$repository = Repository::fromName($name);

if ($repository === null) {
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
16 changes: 8 additions & 8 deletions config/horizon.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@
*/

'trim' => [
'recent' => CarbonInterval::day()->totalMinutes,
'pending' => CarbonInterval::day()->totalMinutes,
'completed' => CarbonInterval::day()->totalMinutes,
'recent_failed' => CarbonInterval::day()->totalMinutes,
'failed' => CarbonInterval::week()->totalMinutes,
'monitored' => CarbonInterval::week()->totalMinutes,
'recent' => CarbonInterval::hour()->totalMinutes,
'pending' => CarbonInterval::hour()->totalMinutes,
'completed' => CarbonInterval::hour()->totalMinutes,
'recent_failed' => CarbonInterval::hours(6)->totalMinutes,
'failed' => CarbonInterval::day()->totalMinutes,
'monitored' => CarbonInterval::hours(6)->totalMinutes,
],

/*
Expand All @@ -133,8 +133,8 @@

'metrics' => [
'trim_snapshots' => [
'job' => CarbonInterval::day()->totalMinutes / 5,
'queue' => CarbonInterval::day()->totalMinutes / 5,
'job' => CarbonInterval::hours(3)->totalMinutes / 5,
'queue' => CarbonInterval::hours(3)->totalMinutes / 5,
],
],

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
Loading
Loading