Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
austinkregel committed Dec 26, 2023
1 parent bf5c9fa commit d23edef
Show file tree
Hide file tree
Showing 148 changed files with 617 additions and 1,133 deletions.
2 changes: 1 addition & 1 deletion app/Actions/Spork/CustomAction.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace App\Actions\Spork;
Expand All @@ -9,7 +10,6 @@
* Actions are implemented as invokable controllers.
* They should expect to be sent an array of ids that represent the main model.
* public function __invoke(Dispatcher $dispatcher, Request $request)
*
*/
abstract class CustomAction
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Spork/Domains/SyncNamecheapDnsAction.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Actions\Spork\Domains;

use App\Actions\Spork\CustomAction;
use App\Contracts\ActionInterface;
use App\Contracts\Services\NamecheapServiceContract;

class SyncNamecheapDnsAction implements ActionInterface
{
Expand Down
7 changes: 6 additions & 1 deletion app/Actions/Spork/SyncDataFromCredential.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Actions\Spork;

use App\Jobs\FetchDomainsForCredential;
Expand All @@ -12,7 +14,10 @@

class SyncDataFromCredential extends CustomAction
{
public function __construct($name = 'Sync Data From Credential', $url = '/api/basement/namecheap') {parent::__construct($name,$url);}
public function __construct($name = 'Sync Data From Credential', $url = '/api/basement/namecheap')
{
parent::__construct($name, $url);
}

public function __invoke(Dispatcher $dispatcher, Request $request)
{
Expand Down
15 changes: 8 additions & 7 deletions app/Console/Commands/CompileNewInstanceOfClass.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Console\Commands;

use App\Events\AbstractLogicalEvent;
Expand All @@ -8,7 +10,6 @@
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Model;
use Nette\PhpGenerator\Parameter;
use Nette\PhpGenerator\Type;

class CompileNewInstanceOfClass extends Command
{
Expand All @@ -34,27 +35,27 @@ public function handle()
$sourceClass = $this->argument('sourceClass');
$destinationClass = $this->argument('destination');

if (!str_contains($destinationClass, '\\')) {
if (! str_contains($destinationClass, '\\')) {
$namespace = str_replace(class_basename($sourceClass), '', $sourceClass);

$destinationClass = $namespace.$destinationClass;
}

if (!str_starts_with($sourceClass, 'App\\')) {
throw new \Exception('Not setup for '. $sourceClass);
if (! str_starts_with($sourceClass, 'App\\')) {
throw new \Exception('Not setup for '.$sourceClass);
}

$newEvent = LaravelProgrammingStyle::for($sourceClass)
->renameClass($filename = class_basename($destinationClass), trim(str_replace(class_basename($destinationClass), '', $destinationClass), '\\'))
->renameClass($filename = class_basename($destinationClass), trim(str_replace(class_basename($destinationClass), '', $destinationClass), '\\'))
->modifyMethod('__construct', '//', parameters: [
(new Parameter('model'))
->setType(Model::class)
->setType(Model::class),
])
->import(AbstractLogicalEvent::class)
->import(Model::class)
->toFile(Code::RETURN_CONTENTS);

$newFileName = str_replace('\\', '/', lcfirst($destinationClass)).'.php';
$newFileName = str_replace('\\', '/', lcfirst($destinationClass)).'.php';

file_put_contents(base_path($newFileName), $newEvent);
}
Expand Down
2 changes: 2 additions & 0 deletions app/Console/Commands/Generate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Console\Commands;

use Illuminate\Console\Command;
Expand Down
3 changes: 2 additions & 1 deletion app/Console/Commands/MakeUser.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

declare(strict_types=1);

namespace App\Console\Commands;

use App\Models\Team;
use App\Models\User;
use Illuminate\Console\Command;

Expand Down
2 changes: 2 additions & 0 deletions app/Console/Commands/Messaging/MatrixBeeperRequestCode.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Console\Commands\Messaging;

use Illuminate\Console\Command;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Console\Commands\Messaging;

use Illuminate\Console\Command;
Expand Down Expand Up @@ -29,7 +31,7 @@ public function handle()

$response = $client->loginWithJwt($this->argument('code'));

$this->info("Login successful");
$this->info('Login successful');
dd($response);
}
}
4 changes: 3 additions & 1 deletion app/Console/Commands/Messaging/MatrixBeeperVerifyCode.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Console\Commands\Messaging;

use Illuminate\Console\Command;
Expand Down Expand Up @@ -29,7 +31,7 @@ public function handle()

$response = $client->loginWithBeeperCode($this->argument('email'), $this->argument('code'));

$this->info("Login successful");
$this->info('Login successful');
dd($response);
}
}
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function schedule(Schedule $schedule): void
$schedule->job(FetchResourcesFromCredentials::class)->everyOddHour();
$schedule->job(FetchCloudflareAnalytics::class)->everyFourHours();

// $schedule->command('operations:queue')->everyFiveMinutes();
// $schedule->command('operations:queue')->everyFiveMinutes();
}

/**
Expand Down
2 changes: 2 additions & 0 deletions app/Contracts/ActionInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Contracts;

interface ActionInterface
Expand Down
2 changes: 1 addition & 1 deletion app/Contracts/LogicalEvent.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);

namespace App\Contracts;

interface LogicalEvent
{

}
2 changes: 1 addition & 1 deletion app/Contracts/LogicalListener.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);

namespace App\Contracts;

interface LogicalListener
{

}
2 changes: 2 additions & 0 deletions app/Contracts/Services/LogicalOperator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Contracts\Services;

interface LogicalOperator
Expand Down
1 change: 1 addition & 0 deletions app/Events/AbstractLogicalEvent.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace App\Events;
Expand Down
5 changes: 2 additions & 3 deletions app/Events/Admin/Composer/ActionFailed.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

declare(strict_types=1);

namespace App\Events\Admin\Composer;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

Expand Down
5 changes: 2 additions & 3 deletions app/Events/Admin/Composer/ActionFinished.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

declare(strict_types=1);

namespace App\Events\Admin\Composer;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

Expand Down
5 changes: 2 additions & 3 deletions app/Events/Admin/Composer/ActionLoggedToConsole.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

declare(strict_types=1);

namespace App\Events\Admin\Composer;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

Expand Down
1 change: 0 additions & 1 deletion app/Events/Pages/PageCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Events\Pages;

use App\Contracts\LogicalEvent;
use App\Events\AbstractLogicalEvent;
use App\Models\Page;
use Illuminate\Broadcasting\InteractsWithSockets;
Expand Down
1 change: 0 additions & 1 deletion app/Events/Pages/PageUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace App\Events\Pages;

use App\Contracts\LogicalEvent;
use App\Events\AbstractLogicalEvent;
use App\Models\Page;
use Illuminate\Broadcasting\InteractsWithSockets;
Expand Down
5 changes: 2 additions & 3 deletions app/Events/SubscribeToJobEvent.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

declare(strict_types=1);

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

Expand Down
9 changes: 4 additions & 5 deletions app/Filament/Resources/CredentialResource.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Filament\Resources\CredentialResource\Pages;
use App\Filament\Resources\CredentialResource\RelationManagers;
use App\Models\Credential;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class CredentialResource extends Resource
{
Expand All @@ -37,7 +36,7 @@ public static function form(Form $form): Form
Forms\Components\Select::make('service')->options([
'cloudflare',
'namecheap',
'forge'
'forge',
]),
]);
}
Expand All @@ -49,7 +48,7 @@ public static function table(Table $table): Table
Tables\Columns\TextColumn::make('name'),
Tables\Columns\TextColumn::make('type'),
Tables\Columns\TextColumn::make('service'),
Tables\Columns\TextColumn::make('enabled_on')
Tables\Columns\TextColumn::make('enabled_on'),

])
->filters([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\CredentialResource\Pages;

use App\Filament\Resources\CredentialResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateCredential extends CreateRecord
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\CredentialResource\Pages;

use App\Filament\Resources\CredentialResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\CredentialResource\Pages;

use App\Filament\Resources\CredentialResource;
Expand Down
5 changes: 3 additions & 2 deletions app/Filament/Resources/NavigationResource.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Models\Navigation;
use Filament\Tables\Table;
use Miguilim\FilamentAutoPanel\AutoResource;

class NavigationResource extends AutoResource
Expand Down Expand Up @@ -31,7 +32,7 @@ public static function getActions(): array
//
];
}

public static function getRelations(): array
{
return [
Expand Down
3 changes: 2 additions & 1 deletion app/Filament/Resources/PageResource.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Models\Page;
use Filament\Tables\Table;
use Miguilim\FilamentAutoPanel\AutoResource;

class PageResource extends AutoResource
Expand Down
3 changes: 2 additions & 1 deletion app/Filament/Resources/PersonResource.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Models\Person;
use Filament\Tables\Table;
use Miguilim\FilamentAutoPanel\AutoResource;

class PersonResource extends AutoResource
Expand Down
Loading

0 comments on commit d23edef

Please sign in to comment.