Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 11, 2024
1 parent 3778be0 commit 867ca63
Show file tree
Hide file tree
Showing 39 changed files with 55 additions and 71 deletions.
5 changes: 1 addition & 4 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -22,17 +22,14 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
//
}
}
2 changes: 1 addition & 1 deletion app/Enums/ResponseCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
2 changes: 1 addition & 1 deletion app/Events/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
3 changes: 1 addition & 2 deletions app/Events/ExampleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -20,6 +20,5 @@ class ExampleEvent extends Event
*/
public function __construct()
{
//
}
}
7 changes: 3 additions & 4 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down Expand Up @@ -40,7 +40,6 @@ class Handler extends ExceptionHandler
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Throwable $exception
* @return void
*
* @throws \Exception
Expand All @@ -53,8 +52,8 @@ public function report(Throwable $exception)
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*
* @throws \Throwable
Expand Down
7 changes: 4 additions & 3 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down Expand Up @@ -34,7 +34,7 @@ public function login()
{
$credentials = request(['email', 'password']);

if (! $token = auth()->attempt($credentials)) {
if (!$token = auth()->attempt($credentials)) {
return Response::errorUnauthorized();
}

Expand Down Expand Up @@ -76,7 +76,8 @@ public function refresh()
/**
* Get the token array structure.
*
* @param string $token
* @param string $token
*
* @return \Illuminate\Http\JsonResponse
*/
protected function respondWithToken($token)
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -15,5 +15,4 @@

abstract class Controller extends BaseController
{
//
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
9 changes: 4 additions & 5 deletions app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -27,7 +27,6 @@ class Authenticate
/**
* Create a new middleware instance.
*
* @param \Illuminate\Contracts\Auth\Factory $auth
* @return void
*/
public function __construct(Auth $auth)
Expand All @@ -38,9 +37,9 @@ public function __construct(Auth $auth)
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @param \Illuminate\Http\Request $request
* @param string|null $guard
*
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
4 changes: 1 addition & 3 deletions app/Jobs/ExampleJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -20,7 +20,6 @@ class ExampleJob extends Job
*/
public function __construct()
{
//
}

/**
Expand All @@ -30,6 +29,5 @@ public function __construct()
*/
public function handle()
{
//
}
}
6 changes: 4 additions & 2 deletions app/Jobs/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -29,5 +29,7 @@ abstract class Job implements ShouldQueue
|
*/

use InteractsWithQueue, Queueable, SerializesModels;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
}
5 changes: 1 addition & 4 deletions app/Listeners/ExampleListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -22,17 +22,14 @@ class ExampleListener
*/
public function __construct()
{
//
}

/**
* Handle the event.
*
* @param \App\Events\ExampleEvent $event
* @return void
*/
public function handle(ExampleEvent $event)
{
//
}
}
6 changes: 4 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -21,7 +21,9 @@

class User extends Model implements AuthenticatableContract, AuthorizableContract, JWTSubject
{
use Authenticatable, Authorizable, HasFactory;
use Authenticatable;
use Authorizable;
use HasFactory;

/**
* The attributes that are mass assignable.
Expand Down
3 changes: 1 addition & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -22,6 +22,5 @@ class AppServiceProvider extends ServiceProvider
*/
public function register()
{
//
}
}
3 changes: 1 addition & 2 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -23,7 +23,6 @@ class AuthServiceProvider extends ServiceProvider
*/
public function register()
{
//
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
2 changes: 1 addition & 1 deletion app/Services/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
2 changes: 1 addition & 1 deletion app/Support/Traits/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
3 changes: 1 addition & 2 deletions app/Support/Traits/SerializeDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand All @@ -19,7 +19,6 @@ trait SerializeDate
/**
* 为数组 / JSON 序列化准备日期。(Laravel 7).
*
* @param \DateTimeInterface $date
* @return string
*/
protected function serializeDate(DateTimeInterface $date)
Expand Down
2 changes: 1 addition & 1 deletion app/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
Expand Down
4 changes: 1 addition & 3 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <[email protected]>
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

return [

/*
|--------------------------------------------------------------------------
| Application Name
Expand Down Expand Up @@ -116,5 +115,4 @@
'key' => env('APP_KEY'),

'cipher' => 'AES-256-CBC',

];
Loading

0 comments on commit 867ca63

Please sign in to comment.