Skip to content

Commit

Permalink
Apply fixes from StyleCI (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
austintoddj authored Aug 9, 2022
1 parent 8608285 commit ea9a108
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 52 deletions.
1 change: 0 additions & 1 deletion src/Canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public static function availableLanguageCodes()
* Return an encoded string of app translations.
*
* @param $locale
*
* @return string
*/
public static function availableTranslations($locale)
Expand Down
7 changes: 4 additions & 3 deletions src/CanvasServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Canvas\Listeners\CaptureView;
use Canvas\Listeners\CaptureVisit;
use Canvas\Models\User;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Events\Dispatcher;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
Expand All @@ -34,8 +33,9 @@ public function register()
/**
* Bootstrap any application services.
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
* @return void
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function boot()
{
Expand All @@ -54,8 +54,9 @@ public function boot()
/**
* Register the events and listeners.
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
* @return void
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
private function registerEvents()
{
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/Auth/AuthenticatedSessionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ public function create()
/**
* Handle an incoming authentication request.
*
* @throws \Illuminate\Validation\ValidationException
* @param \Canvas\Http\Requests\AuthenticatedSessionRequest $request
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(AuthenticatedSessionRequest $request)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/Auth/PasswordResetLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ public function create()
/**
* Handle an incoming password reset link request.
*
* @throws Exception
* @param \Canvas\Http\Requests\PasswordResetLinkRequest $request
* @return \Illuminate\Http\RedirectResponse
*
* @throws Exception
*/
public function store(PasswordResetLinkRequest $request)
{
Expand Down
13 changes: 7 additions & 6 deletions src/Http/Controllers/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Canvas\Models\User;
use Exception;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Ramsey\Uuid\Uuid;

Expand Down Expand Up @@ -97,10 +96,11 @@ public function create()
/**
* Store a newly created resource in storage.
*
* @throws Exception
* @param \Canvas\Http\Requests\StorePostRequest $request
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*
* @throws Exception
*/
public function store(StorePostRequest $request, string $id)
{
Expand Down Expand Up @@ -170,7 +170,7 @@ public function store(StorePostRequest $request, string $id)
/**
* Display the specified resource.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function show(string $id)
Expand All @@ -191,9 +191,10 @@ public function show(string $id)
/**
* Remove the specified resource from storage.
*
* @throws Exception
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*
* @throws Exception
*/
public function destroy(string $id)
{
Expand Down
1 change: 0 additions & 1 deletion src/Http/Controllers/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Canvas\Models\Topic;
use Canvas\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Cache;

Expand Down
12 changes: 6 additions & 6 deletions src/Http/Controllers/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Canvas\Models\Tag;
use Exception;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Ramsey\Uuid\Uuid;

Expand Down Expand Up @@ -52,7 +51,7 @@ public function create()
* Store a newly created resource in storage.
*
* @param \Canvas\Http\Requests\StoreTagRequest $request
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function store(StoreTagRequest $request, string $id)
Expand Down Expand Up @@ -83,7 +82,7 @@ public function store(StoreTagRequest $request, string $id)
/**
* Display the specified resource.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function show(string $id)
Expand All @@ -96,7 +95,7 @@ public function show(string $id)
/**
* Display the specified relationship.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function posts(string $id)
Expand All @@ -109,9 +108,10 @@ public function posts(string $id)
/**
* Remove the specified resource from storage.
*
* @throws Exception
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*
* @throws Exception
*/
public function destroy(string $id)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Http/Controllers/TopicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Canvas\Models\Topic;
use Exception;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Ramsey\Uuid\Uuid;

Expand Down Expand Up @@ -52,7 +51,7 @@ public function create()
* Store a newly created resource in storage.
*
* @param \Canvas\Http\Requests\StoreTopicRequest $request
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function store(StoreTopicRequest $request, string $id)
Expand Down Expand Up @@ -83,7 +82,7 @@ public function store(StoreTopicRequest $request, string $id)
/**
* Display the specified resource.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function show(string $id)
Expand All @@ -96,7 +95,7 @@ public function show(string $id)
/**
* Display the specified relationship.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function posts(string $id)
Expand All @@ -109,9 +108,10 @@ public function posts(string $id)
/**
* Remove the specified resource from storage.
*
* @throws Exception
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*
* @throws Exception
*/
public function destroy(string $id)
{
Expand Down
1 change: 0 additions & 1 deletion src/Http/Controllers/UploadsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Canvas\Http\Controllers;

use Canvas\Canvas;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Storage;

Expand Down
9 changes: 4 additions & 5 deletions src/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Canvas\Http\Requests\StoreUserRequest;
use Canvas\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Hash;
Expand Down Expand Up @@ -55,7 +54,7 @@ public function create()
* Store a newly created resource in storage.
*
* @param \Canvas\Http\Requests\StoreUserRequest $request
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function store(StoreUserRequest $request, string $id)
Expand Down Expand Up @@ -100,7 +99,7 @@ public function store(StoreUserRequest $request, string $id)
/**
* Display the specified resource.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function show(string $id)
Expand All @@ -113,7 +112,7 @@ public function show(string $id)
/**
* Display the specified relationship.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function posts(string $id)
Expand All @@ -126,7 +125,7 @@ public function posts(string $id)
/**
* Remove the specified resource from storage.
*
* @param string $id
* @param string $id
* @return \Illuminate\Http\JsonResponse
*/
public function destroy(string $id)
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Middleware/AuthenticateSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ public function __construct(Auth $auth)
/**
* Handle the incoming request.
*
* @throws \Illuminate\Auth\AuthenticationException
* @param \Illuminate\Http\Request $request
* @param Closure $next
* @return mixed
*
* @throws \Illuminate\Auth\AuthenticationException
*/
public function handle(Request $request, Closure $next)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Requests/AuthenticatedSessionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ public function rules()
/**
* Attempt to authenticate the request's credentials.
*
* @throws \Illuminate\Validation\ValidationException
* @return void
*
* @throws \Illuminate\Validation\ValidationException
*/
public function authenticate()
{
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class Post extends Model
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
namespace Canvas\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class Tag extends Model
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
namespace Canvas\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class Topic extends Model
Expand Down
1 change: 0 additions & 1 deletion src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Canvas\Canvas;
use Canvas\Traits\HasRole;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;

Expand Down
1 change: 0 additions & 1 deletion src/Models/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Canvas\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class View extends Model
{
Expand Down
1 change: 0 additions & 1 deletion src/Models/Visit.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Canvas\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Visit extends Model
{
Expand Down
15 changes: 5 additions & 10 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Canvas\CanvasServiceProvider;
use Canvas\Models\User;
use Exception;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Orchestra\Testbench\TestCase as OrchestraTestCase;

Expand Down Expand Up @@ -35,9 +34,9 @@ abstract class TestCase extends OrchestraTestCase
protected $admin;

/**
* @throws Exception
*
* @return void
*
* @throws Exception
*/
protected function setUp(): void
{
Expand All @@ -50,7 +49,6 @@ protected function setUp(): void

/**
* @param \Illuminate\Foundation\Application $app
*
* @return array
*/
protected function getPackageProviders($app): array
Expand All @@ -62,7 +60,6 @@ protected function getPackageProviders($app): array

/**
* @param \Illuminate\Foundation\Application $app
*
* @return void
*/
protected function resolveApplicationCore($app): void
Expand All @@ -75,8 +72,7 @@ protected function resolveApplicationCore($app): void
}

/**
* @param \Illuminate\Foundation\Application $app
*
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app): void
Expand Down Expand Up @@ -105,11 +101,10 @@ protected function getEnvironmentSetUp($app): void
}

/**
* @throws Exception
*
* @param \Illuminate\Foundation\Application $app
*
* @return void
*
* @throws Exception
*/
protected function setUpDatabase($app)
{
Expand Down

0 comments on commit ea9a108

Please sign in to comment.