psalm / psalm-plugin-laravel

A Psalm plugin for Laravel
MIT License
307 stars 72 forks source link

test(laravel): run make:* commands #189

Closed caugner closed 3 years ago

caugner commented 3 years ago
ERROR: UnusedClass - app/Broadcasting/ExampleChannel.php:7:7 - Class App\Broadcasting\ExampleChannel is never used (see https://psalm.dev/075)
class ExampleChannel

ERROR: InvalidReturnType - app/Broadcasting/ExampleChannel.php:23:16 - No return statements were found for method App\Broadcasting\ExampleChannel::join but return type 'array<array-key, mixed>|bool' was expected (see https://psalm.dev/011)
     * @return array|bool

ERROR: UnusedClass - app/Casts/ExampleCast.php:7:7 - Class App\Casts\ExampleCast is never used (see https://psalm.dev/075)
class ExampleCast implements CastsAttributes

ERROR: UnusedClass - app/Console/Commands/ExampleCommand.php:7:7 - Class App\Console\Commands\ExampleCommand is never used (see https://psalm.dev/075)
class ExampleCommand extends Command

ERROR: PossiblyUnusedMethod - app/Events/ExampleEvent.php:32:21 - Cannot find any calls to method App\Events\ExampleEvent::broadcastOn (see https://psalm.dev/087)
    public function broadcastOn()

ERROR: UnusedClass - app/Exceptions/ExampleException.php:7:7 - Class App\Exceptions\ExampleException is never used (see https://psalm.dev/075)
class ExampleException extends Exception

ERROR: UnusedClass - app/Http/Controllers/ExampleController.php:7:7 - Class App\Http\Controllers\ExampleController is never used (see https://psalm.dev/075)
class ExampleController extends Controller

ERROR: UnusedClass - app/Http/Middleware/ExampleMiddleware.php:8:7 - Class App\Http\Middleware\ExampleMiddleware is never used (see https://psalm.dev/075)
class ExampleMiddleware

ERROR: UnusedClass - app/Http/Requests/ExampleRequest.php:7:7 - Class App\Http\Requests\ExampleRequest is never used (see https://psalm.dev/075)
class ExampleRequest extends FormRequest

ERROR: UnusedClass - app/Http/Resources/ExampleResource.php:7:7 - Class App\Http\Resources\ExampleResource is never used (see https://psalm.dev/075)
class ExampleResource extends JsonResource

ERROR: PropertyNotSetInConstructor - app/Jobs/ExampleJob.php:12:7 - Property App\Jobs\ExampleJob::$job is not defined in constructor of App\Jobs\ExampleJob or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleJob implements ShouldQueue

ERROR: PossiblyUnusedMethod - app/Jobs/ExampleJob.php:31:21 - Cannot find any calls to method App\Jobs\ExampleJob::handle (see https://psalm.dev/087)
    public function handle()

ERROR: UnusedClass - app/Listeners/ExampleListener.php:8:7 - Class App\Listeners\ExampleListener is never used (see https://psalm.dev/075)
class ExampleListener

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$locale is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$subject is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$markdown is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$html is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$view is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$textView is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$mailer is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PropertyNotSetInConstructor - app/Mail/ExampleMail.php:10:7 - Property App\Mail\ExampleMail::$assertionableRenderStrings is not defined in constructor of App\Mail\ExampleMail or in any methods called in the constructor (see https://psalm.dev/074)
class ExampleMail extends Mailable

ERROR: PossiblyUnusedMethod - app/Mail/ExampleMail.php:19:21 - Cannot find any calls to method App\Mail\ExampleMail::__construct (see https://psalm.dev/087)
    public function __construct()

ERROR: PossiblyUnusedMethod - app/Mail/ExampleMail.php:29:21 - Cannot find any calls to method App\Mail\ExampleMail::build (see https://psalm.dev/087)
    public function build()

ERROR: PossiblyUnusedMethod - app/Notifications/ExampleNotification.php:19:21 - Cannot find any calls to method App\Notifications\ExampleNotification::__construct (see https://psalm.dev/087)
    public function __construct()

ERROR: PossiblyUnusedMethod - app/Notifications/ExampleNotification.php:30:21 - Cannot find any calls to method App\Notifications\ExampleNotification::via (see https://psalm.dev/087)
    public function via($notifiable)

ERROR: PossiblyUnusedMethod - app/Notifications/ExampleNotification.php:41:21 - Cannot find any calls to method App\Notifications\ExampleNotification::toMail (see https://psalm.dev/087)
    public function toMail($notifiable)

ERROR: PossiblyUnusedMethod - app/Notifications/ExampleNotification.php:55:21 - Cannot find any calls to method App\Notifications\ExampleNotification::toArray (see https://psalm.dev/087)
    public function toArray($notifiable)

ERROR: UnusedClass - app/Observers/ExampleObserver.php:5:7 - Class App\Observers\ExampleObserver is never used (see https://psalm.dev/075)
class ExampleObserver

ERROR: UnusedClass - app/Policies/ExamplePolicy.php:8:7 - Class App\Policies\ExamplePolicy is never used (see https://psalm.dev/075)
class ExamplePolicy

ERROR: UnusedClass - app/Providers/ExampleProvider.php:7:7 - Class App\Providers\ExampleProvider is never used (see https://psalm.dev/075)
class ExampleProvider extends ServiceProvider

ERROR: UnusedClass - app/Rules/ExampleRule.php:7:7 - Class App\Rules\ExampleRule is never used (see https://psalm.dev/075)
class ExampleRule implements Rule

ERROR: InvalidReturnType - app/Rules/ExampleRule.php:24:16 - No return statements were found for method App\Rules\ExampleRule::passes but return type 'bool' was expected (see https://psalm.dev/011)
     * @return bool

------------------------------
32 errors found
------------------------------
mr-feek commented 3 years ago

Awesome, thanks for this!!