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

Update Stubs to Follow Laravel Pint Standards #2035

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 1 addition & 4 deletions src/Commands/stubs/action-invoke.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ namespace $CLASS_NAMESPACE$;

class $CLASS$
{
public function __invoke()
{
//
}
public function __invoke() {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/action.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ namespace $CLASS_NAMESPACE$;

class $CLASS$
{
public function handle()
{
//
}
public function handle() {}
}
4 changes: 0 additions & 4 deletions src/Commands/stubs/cast.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class $CLASS$ implements CastsAttributes
{
/**
* Cast the given value.
*
* @param array<string, mixed> $attributes
*/
public function get(Model $model, string $key, mixed $value, array $attributes): mixed
{
Expand All @@ -19,8 +17,6 @@ class $CLASS$ implements CastsAttributes

/**
* Prepare the given value for storage.
*
* @param array<string, mixed> $attributes
*/
public function set(Model $model, string $key, mixed $value, array $attributes): mixed
{
Expand Down
16 changes: 4 additions & 12 deletions src/Commands/stubs/channel.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@ namespace $NAMESPACE$;

class $CLASS$
{

/**
* Create a new channel instance.
*/
public function __construct()
{
//
}

public function __construct() {}

/**
* Authenticate the user's access to the channel.
*/
public function join(Operator $user): array|bool
{
//
}

}
public function join(Operator $user): array|bool {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/class-invoke.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ namespace $NAMESPACE$;

class $CLASS$
{
public function __invoke()
{
//
}
public function __invoke() {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/class.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ namespace $NAMESPACE$;

class $CLASS$
{
public function __construct()
{
//
}
public function __construct() {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/command.stub
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ class $CLASS$ extends Command
/**
* Execute the console command.
*/
public function handle()
{
//
}
public function handle() {}

/**
* Get the console command arguments.
Expand Down
5 changes: 1 addition & 4 deletions src/Commands/stubs/component-class.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ class $CLASS$ extends Component
/**
* Create a new component instance.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Get the view/contents that represent the component.
Expand Down
4 changes: 1 addition & 3 deletions src/Commands/stubs/controller-plain.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ namespace $CLASS_NAMESPACE$;

use Illuminate\Routing\Controller;

class $CLASS$ extends Controller
{
}
class $CLASS$ extends Controller {}
15 changes: 3 additions & 12 deletions src/Commands/stubs/controller.stub
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ class $CLASS$ extends Controller
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
public function store(Request $request) {}

/**
* Show the specified resource.
Expand All @@ -50,16 +47,10 @@ class $CLASS$ extends Controller
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
{
//
}
public function update(Request $request, $id) {}

/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
public function destroy($id) {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/enum.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace $CLASS_NAMESPACE$;

enum $CLASS$
{
//
}
enum $CLASS$ {}
5 changes: 1 addition & 4 deletions src/Commands/stubs/event-provider.stub
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,5 @@ class $CLASS$ extends ServiceProvider
/**
* Configure the proper event listeners for email verification.
*/
protected function configureEmailVerification(): void
{
//
}
protected function configureEmailVerification(): void {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/event.stub
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ class $CLASS$
/**
* Create a new event instance.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Get the channels the event should be broadcast on.
Expand Down
10 changes: 2 additions & 8 deletions src/Commands/stubs/exception-render-report.stub
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ class $CLASS$ extends Exception
/**
* Report the exception.
*/
public function report(): void
{
//
}
public function report(): void {}

/**
* Render the exception as an HTTP response.
*/
public function render(Request $request): Response
{
//
}
public function render(Request $request): Response {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/exception-render.stub
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ class $CLASS$ extends Exception
/**
* Render the exception as an HTTP response.
*/
public function render(Request $request): Response
{
//
}
public function render(Request $request): Response {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/exception-report.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ class $CLASS$ extends Exception
/**
* Report the exception.
*/
public function report(): void
{
//
}
public function report(): void {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/exception.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ namespace $CLASS_NAMESPACE$;

use Exception;

class $CLASS$ extends Exception
{
//
}
class $CLASS$ extends Exception {}
5 changes: 1 addition & 4 deletions src/Commands/stubs/helper-invoke.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ namespace $CLASS_NAMESPACE$;

class $CLASS$
{
public function __invoke()
{
//
}
public function __invoke() {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/helper.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ namespace $CLASS_NAMESPACE$;

class $CLASS$
{
public function handle()
{
//
}
public function handle() {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/interface.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace $CLASS_NAMESPACE$;

interface $CLASS$
{

}
interface $CLASS$ {}
10 changes: 2 additions & 8 deletions src/Commands/stubs/job-queued.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ class $CLASS$ implements ShouldQueue
/**
* Create a new job instance.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Execute the job.
*/
public function handle(): void
{
//
}
public function handle(): void {}
}
10 changes: 2 additions & 8 deletions src/Commands/stubs/job.stub
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ class $CLASS$ implements ShouldQueue
/**
* Create a new job instance.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Execute the job.
*/
public function handle(): void
{
//
}
public function handle(): void {}
}
10 changes: 2 additions & 8 deletions src/Commands/stubs/listener-duck.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ class $CLASS$
/**
* Create the event listener.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Handle the event.
*/
public function handle($event): void
{
//
}
public function handle($event): void {}
}
10 changes: 2 additions & 8 deletions src/Commands/stubs/listener-queued-duck.stub
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ class $CLASS$ implements ShouldQueue
/**
* Create the event listener
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Handle the event.
*/
public function handle($event): void
{
//
}
public function handle($event): void {}
}
10 changes: 2 additions & 8 deletions src/Commands/stubs/listener-queued.stub
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@ class $CLASS$ implements ShouldQueue
/**
* Create the event listener.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Handle the event.
*/
public function handle($SHORTEVENTNAME$ $event): void
{
//
}
public function handle($SHORTEVENTNAME$ $event): void {}
}
10 changes: 2 additions & 8 deletions src/Commands/stubs/listener.stub
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ class $CLASS$
/**
* Create the event listener.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Handle the event.
*/
public function handle($SHORTEVENTNAME$ $event): void
{
//
}
public function handle($SHORTEVENTNAME$ $event): void {}
}
5 changes: 1 addition & 4 deletions src/Commands/stubs/mail.stub
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ class $CLASS$ extends Mailable
/**
* Create a new message instance.
*/
public function __construct()
{
//
}
public function __construct() {}

/**
* Build the message.
Expand Down
Loading