Skip to content

Commit bf5bcfc

Browse files
hudsonpereiraStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 1979a7d commit bf5bcfc

File tree

80 files changed

+403
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+403
-397
lines changed

app/Console/Commands/EnergyUp.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Console\Commands;
44

5-
use Illuminate\Console\Command;
65
use App\User;
6+
use Illuminate\Console\Command;
77
use Log;
88

99
class EnergyUp extends Command
@@ -45,7 +45,7 @@ public function handle()
4545
Log::info('energy up');
4646
$users = $this->users->all();
4747

48-
$users->each(function($user) {
48+
$users->each(function ($user) {
4949
$user->increaseStamina();
5050
$user->increaseHealth();
5151
$user->increaseMana();

app/Console/Commands/OpenArena.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Console\Commands;
44

5-
use Illuminate\Console\Command;
65
use App\Arena;
6+
use Illuminate\Console\Command;
77
use Log;
88

99
class OpenArena extends Command
@@ -49,6 +49,6 @@ public function handle()
4949

5050
$arena->save();
5151

52-
Log::info('Arena ' . $arena->id . ' is open.');
52+
Log::info('Arena '.$arena->id.' is open.');
5353
}
5454
}

app/Console/Commands/ResetCharacters.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Console\Commands;
44

5-
use Illuminate\Console\Command;
65
use App\User;
6+
use Illuminate\Console\Command;
77

88
class ResetCharacters extends Command
99
{
@@ -39,7 +39,7 @@ public function __construct(User $users)
3939
*/
4040
public function handle()
4141
{
42-
$this->users->all()->each(function($user) {
42+
$this->users->all()->each(function ($user) {
4343
$user->reset()
4444
->save();
4545
});

app/Console/Kernel.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class Kernel extends ConsoleKernel
2121
/**
2222
* Define the application's command schedule.
2323
*
24-
* @param \Illuminate\Console\Scheduling\Schedule $schedule
24+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
25+
*
2526
* @return void
2627
*/
2728
protected function schedule(Schedule $schedule)

app/Creature.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Creature extends Model
88
{
99
public function getImageAttribute($value)
1010
{
11-
return url('/img/creatures/' . $value);
11+
return url('/img/creatures/'.$value);
1212
}
1313

1414
public function getFancyNameAttribute()

app/Events/UserRegistered.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
namespace App\Events;
44

5+
use App\User;
56
use Illuminate\Broadcasting\Channel;
6-
use Illuminate\Queue\SerializesModels;
7-
use Illuminate\Broadcasting\PrivateChannel;
8-
use Illuminate\Broadcasting\PresenceChannel;
97
use Illuminate\Broadcasting\InteractsWithSockets;
10-
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
11-
use App\User;
8+
use Illuminate\Broadcasting\PrivateChannel;
9+
use Illuminate\Queue\SerializesModels;
1210

1311
class UserRegistered
1412
{
1513
use InteractsWithSockets, SerializesModels;
1614

1715
protected $user;
16+
1817
/**
1918
* Create a new event instance.
2019
*

app/Exceptions/Handler.php

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use Exception;
66
use Illuminate\Auth\AuthenticationException;
77
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
8-
use Laravel\Socialite\Two\InvalidStateException;
98
use Illuminate\Validation\ValidationException;
9+
use Laravel\Socialite\Two\InvalidStateException;
1010

1111
class Handler extends ExceptionHandler
1212
{
@@ -29,7 +29,8 @@ class Handler extends ExceptionHandler
2929
*
3030
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
3131
*
32-
* @param \Exception $exception
32+
* @param \Exception $exception
33+
*
3334
* @return void
3435
*/
3536
public function report(Exception $exception)
@@ -40,8 +41,9 @@ public function report(Exception $exception)
4041
/**
4142
* Render an exception into an HTTP response.
4243
*
43-
* @param \Illuminate\Http\Request $request
44-
* @param \Exception $exception
44+
* @param \Illuminate\Http\Request $request
45+
* @param \Exception $exception
46+
*
4547
* @return \Illuminate\Http\Response
4648
*/
4749
public function render($request, Exception $exception)
@@ -64,8 +66,9 @@ public function render($request, Exception $exception)
6466
/**
6567
* Convert an authentication exception into an unauthenticated response.
6668
*
67-
* @param \Illuminate\Http\Request $request
68-
* @param \Illuminate\Auth\AuthenticationException $exception
69+
* @param \Illuminate\Http\Request $request
70+
* @param \Illuminate\Auth\AuthenticationException $exception
71+
*
6972
* @return \Illuminate\Http\Response
7073
*/
7174
protected function unauthenticated($request, AuthenticationException $exception)

app/Http/Controllers/ArenaController.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace App\Http\Controllers;
44

5-
use Illuminate\Http\Request;
6-
use App\Timongo\Battle\PvP;
75
use App\Arena;
6+
use App\Timongo\Battle\PvP;
87
use Auth;
8+
use Illuminate\Http\Request;
99

1010
class ArenaController extends Controller
1111
{
@@ -24,13 +24,13 @@ public function index()
2424
$arena = $this->arenas->with('participants')->whereStatus('open')->first();
2525
$loggedUser = Auth::user();
2626

27-
if (! $arena) {
27+
if (!$arena) {
2828
return view('arena.unavailable');
2929
}
3030

3131
if ($arena->isSubscribed($loggedUser->id)) {
3232
//Remove logged in user
33-
$arena->participants = $arena->participants->filter(function($user) use ($loggedUser) {
33+
$arena->participants = $arena->participants->filter(function ($user) use ($loggedUser) {
3434
return $loggedUser->id != $user->id && $loggedUser->isWorthyOpponent($user);
3535
});
3636

@@ -78,21 +78,21 @@ public function battle(Request $request, $userId)
7878

7979
$arena = $this->arenas->with('participants')->whereStatus('open')->first();
8080

81-
if (! $hero = $arena->participants->find($user->id)) {
81+
if (!$hero = $arena->participants->find($user->id)) {
8282
return redirect('/arena')
8383
->withError('Você só pode enfrentar alguém que está na arena.');
8484
}
8585

86-
if (! $opponent = $arena->participants->find($userId)) {
86+
if (!$opponent = $arena->participants->find($userId)) {
8787
return redirect('/arena')
8888
->withError('Você só pode enfrentar alguém que está na arena.');
8989
}
9090

9191
$log = $this->pvp->battle($hero, $opponent);
9292

9393
return view('battle-pvp-results', [
94-
'log' => $log,
95-
'opponent' => $opponent
94+
'log' => $log,
95+
'opponent' => $opponent,
9696
]);
9797
}
9898
}

app/Http/Controllers/Auth/LoginController.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
namespace App\Http\Controllers\Auth;
44

55
use App\Http\Controllers\Controller;
6+
use App\User;
7+
use Auth;
68
use Illuminate\Http\Request;
7-
use Illuminate\Foundation\Auth\AuthenticatesUsers;
89
use Socialite;
9-
use Auth;
10-
use App\User;
11-
use App\Events\UserRegistered;
1210

1311
class LoginController extends Controller
1412
{

app/Http/Controllers/Auth/RegisterController.php

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace App\Http\Controllers\Auth;
44

5-
use App\User;
6-
use Validator;
75
use App\Http\Controllers\Controller;
6+
use App\User;
87
use Illuminate\Foundation\Auth\RegistersUsers;
8+
use Validator;
99

1010
class RegisterController extends Controller
1111
{
@@ -42,29 +42,31 @@ public function __construct()
4242
/**
4343
* Get a validator for an incoming registration request.
4444
*
45-
* @param array $data
45+
* @param array $data
46+
*
4647
* @return \Illuminate\Contracts\Validation\Validator
4748
*/
4849
protected function validator(array $data)
4950
{
5051
return Validator::make($data, [
51-
'name' => 'required|max:255',
52-
'email' => 'required|email|max:255|unique:users',
52+
'name' => 'required|max:255',
53+
'email' => 'required|email|max:255|unique:users',
5354
'password' => 'required|min:6|confirmed',
5455
]);
5556
}
5657

5758
/**
5859
* Create a new user instance after a valid registration.
5960
*
60-
* @param array $data
61+
* @param array $data
62+
*
6163
* @return User
6264
*/
6365
protected function create(array $data)
6466
{
6567
return User::create([
66-
'name' => $data['name'],
67-
'email' => $data['email'],
68+
'name' => $data['name'],
69+
'email' => $data['email'],
6870
'password' => bcrypt($data['password']),
6971
]);
7072
}

app/Http/Controllers/Controller.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace App\Http\Controllers;
44

5+
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
56
use Illuminate\Foundation\Bus\DispatchesJobs;
6-
use Illuminate\Routing\Controller as BaseController;
77
use Illuminate\Foundation\Validation\ValidatesRequests;
8-
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
8+
use Illuminate\Routing\Controller as BaseController;
99

1010
class Controller extends BaseController
1111
{

0 commit comments

Comments
 (0)