Skip to content

Commit

Permalink
Apply fixes from StyleCI (delaford#17)
Browse files Browse the repository at this point in the history
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/XN5VRy).
  • Loading branch information
Dan Jasnowski authored Nov 30, 2018
1 parent 1e37e48 commit 1f9bb0a
Show file tree
Hide file tree
Showing 49 changed files with 305 additions and 281 deletions.
3 changes: 2 additions & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class Kernel extends ConsoleKernel
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @return void
*/
protected function schedule(Schedule $schedule)
Expand Down
13 changes: 8 additions & 5 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ class Handler extends ExceptionHandler
/**
* Let the user know they are unauthorized to perform this request.
*
* @param \Illuminiate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @param \Illuminiate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
*
* @return json
*/
protected function unauthenticated($request, AuthenticationException $exception)
Expand All @@ -44,7 +45,8 @@ protected function unauthenticated($request, AuthenticationException $exception)
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @param \Exception $exception
*
* @return void
*/
public function report(Exception $exception)
Expand All @@ -55,8 +57,9 @@ public function report(Exception $exception)
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
*
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
Expand Down
5 changes: 3 additions & 2 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;

class LoginController extends Controller
{
Expand Down Expand Up @@ -51,7 +51,8 @@ public function __construct()
/**
* Get the needed authorization credentials from the request.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*
* @return array
*/
protected function credentials(Request $request)
Expand Down
10 changes: 6 additions & 4 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace App\Http\Controllers\Auth;

use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Validator;

class RegisterController extends Controller
{
Expand Down Expand Up @@ -42,7 +42,8 @@ public function __construct()
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @param array $data
*
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
Expand All @@ -56,7 +57,8 @@ protected function validator(array $data)
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @param array $data
*
* @return \App\User
*/
protected function create(array $data)
Expand Down
56 changes: 28 additions & 28 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace App\Http\Controllers;

use Auth;
use App\Inventory;
use App\Skills;
use App\User;
use App\Wear;
use App\Skills;
use App\Inventory;
use Auth;
use Illuminate\Http\Request;

class AuthController extends Controller
Expand Down Expand Up @@ -71,17 +71,17 @@ public function me()
$id = auth()->id();

$player = [
'x' => $player['x'],
'y' => $player['y'],
'x' => $player['x'],
'y' => $player['y'],
'username' => $player['username'],
'uuid' => $player['uuid'],
'level' => $player['level'],
'online' => true,
'sign_in' => time(),
'hp' => [
'uuid' => $player['uuid'],
'level' => $player['level'],
'online' => true,
'sign_in' => time(),
'hp' => [
'current' => $player['hp_current'],
'max' => $player['hp_max']
]
'max' => $player['hp_max'],
],
];

// Get skills
Expand All @@ -93,9 +93,9 @@ public function me()

foreach ($skillList as $skill) {
$skills[] = [
'level' => $getSkills[$skill . '_level'],
'exp' => $getSkills[$skill . '_experience'],
'name' => ucfirst($skill),
'level' => $getSkills[$skill.'_level'],
'exp' => $getSkills[$skill.'_experience'],
'name' => ucfirst($skill),
];
}

Expand All @@ -105,19 +105,19 @@ public function me()
$getWear = Wear::find($id);

$wear = [
'head' => $getWear['head'],
'back' => $getWear['back'],
'head' => $getWear['head'],
'back' => $getWear['back'],
'necklace' => $getWear['necklace'],
'arrows' => [
'arrows' => [
'quantity' => $getWear['arrows_qty'],
'id' => $getWear['arrows_id']
'id' => $getWear['arrows_id'],
],
'right_hand' => $getWear['right_hand'],
'armor' => $getWear['armor'],
'left_hand' => $getWear['left_hand'],
'gloves' => $getWear['gloves'],
'feet' => $getWear['feet'],
'ring' => $getWear['ring']
'armor' => $getWear['armor'],
'left_hand' => $getWear['left_hand'],
'gloves' => $getWear['gloves'],
'feet' => $getWear['feet'],
'ring' => $getWear['ring'],
];

$player = array_merge($player, ['wear' => $wear]);
Expand All @@ -127,7 +127,7 @@ public function me()
$player = array_merge($player, ['inventory' => $getInventory['data']]);

if (auth()->user()) {
auth()->user()->setOnline();
auth()->user()->setOnline();
}

return response()->json($player);
Expand Down Expand Up @@ -159,16 +159,16 @@ public function refresh()
/**
* Get the token array structure.
*
* @param string $token
* @param string $token
*
* @return \Illuminate\Http\JsonResponse
*/
protected function respondWithToken($token)
{
return response()->json([
'access_token' => $token,
'token_type' => 'bearer',
'expires_in' => auth('api')->factory()->getTTL() * 60
'token_type' => 'bearer',
'expires_in' => auth('api')->factory()->getTTL() * 60,
]);
}
}
17 changes: 11 additions & 6 deletions app/Http/Controllers/BankController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function create()
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
Expand All @@ -41,7 +42,8 @@ public function store(Request $request)
/**
* Display the specified resource.
*
* @param \App\Bank $bank
* @param \App\Bank $bank
*
* @return \Illuminate\Http\Response
*/
public function show(Bank $bank)
Expand All @@ -52,7 +54,8 @@ public function show(Bank $bank)
/**
* Show the form for editing the specified resource.
*
* @param \App\Bank $bank
* @param \App\Bank $bank
*
* @return \Illuminate\Http\Response
*/
public function edit(Bank $bank)
Expand All @@ -63,8 +66,9 @@ public function edit(Bank $bank)
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Bank $bank
* @param \Illuminate\Http\Request $request
* @param \App\Bank $bank
*
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Bank $bank)
Expand All @@ -75,7 +79,8 @@ public function update(Request $request, Bank $bank)
/**
* Remove the specified resource from storage.
*
* @param \App\Bank $bank
* @param \App\Bank $bank
*
* @return \Illuminate\Http\Response
*/
public function destroy(Bank $bank)
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
Expand Down
17 changes: 11 additions & 6 deletions app/Http/Controllers/FriendlistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function create()
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
Expand All @@ -41,7 +42,8 @@ public function store(Request $request)
/**
* Display the specified resource.
*
* @param \App\Friendlist $friendlist
* @param \App\Friendlist $friendlist
*
* @return \Illuminate\Http\Response
*/
public function show(Friendlist $friendlist)
Expand All @@ -52,7 +54,8 @@ public function show(Friendlist $friendlist)
/**
* Show the form for editing the specified resource.
*
* @param \App\Friendlist $friendlist
* @param \App\Friendlist $friendlist
*
* @return \Illuminate\Http\Response
*/
public function edit(Friendlist $friendlist)
Expand All @@ -63,8 +66,9 @@ public function edit(Friendlist $friendlist)
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Friendlist $friendlist
* @param \Illuminate\Http\Request $request
* @param \App\Friendlist $friendlist
*
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Friendlist $friendlist)
Expand All @@ -75,7 +79,8 @@ public function update(Request $request, Friendlist $friendlist)
/**
* Remove the specified resource from storage.
*
* @param \App\Friendlist $friendlist
* @param \App\Friendlist $friendlist
*
* @return \Illuminate\Http\Response
*/
public function destroy(Friendlist $friendlist)
Expand Down
2 changes: 0 additions & 2 deletions app/Http/Controllers/InventoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class InventoryController extends Controller
{
//
Expand Down
17 changes: 11 additions & 6 deletions app/Http/Controllers/SkillsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function create()
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
Expand All @@ -41,7 +42,8 @@ public function store(Request $request)
/**
* Display the specified resource.
*
* @param \App\Skills $skills
* @param \App\Skills $skills
*
* @return \Illuminate\Http\Response
*/
public function show(Skills $skills)
Expand All @@ -52,7 +54,8 @@ public function show(Skills $skills)
/**
* Show the form for editing the specified resource.
*
* @param \App\Skills $skills
* @param \App\Skills $skills
*
* @return \Illuminate\Http\Response
*/
public function edit(Skills $skills)
Expand All @@ -63,8 +66,9 @@ public function edit(Skills $skills)
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Skills $skills
* @param \Illuminate\Http\Request $request
* @param \App\Skills $skills
*
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Skills $skills)
Expand All @@ -75,7 +79,8 @@ public function update(Request $request, Skills $skills)
/**
* Remove the specified resource from storage.
*
* @param \App\Skills $skills
* @param \App\Skills $skills
*
* @return \Illuminate\Http\Response
*/
public function destroy(Skills $skills)
Expand Down
Loading

0 comments on commit 1f9bb0a

Please sign in to comment.