style: run php-cs-fixer

This commit is contained in:
Bruno F. Fontes 2021-05-20 20:37:35 -03:00
parent 92a6410321
commit 54efb095fe
43 changed files with 84 additions and 102 deletions

View File

@ -3,13 +3,10 @@
namespace App\Events; namespace App\Events;
use \App\Item; use \App\Item;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class ReturnItem class ReturnItem
{ {

View File

@ -3,8 +3,8 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Exception;
Use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {

View File

@ -2,12 +2,12 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Auth; use \App\Mail\UserWaiting;
use Mail;
use \App\User; use \App\User;
use App\FlashMessage; use App\FlashMessage;
use \App\Mail\UserWaiting; use Auth;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Mail;
class AlertController extends Controller class AlertController extends Controller
{ {

View File

@ -2,13 +2,13 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
use App\User; use App\FlashMessage;
use App\Mail\Welcome;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Mail\Welcome;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
use App\FlashMessage;
use Mail; use Mail;
class RegisterController extends Controller class RegisterController extends Controller

View File

@ -2,10 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController class Controller extends BaseController
{ {

View File

@ -4,8 +4,8 @@ namespace App\Http\Controllers;
use \App\Item; use \App\Item;
use \App\User; use \App\User;
use Illuminate\Http\Request;
use App\FlashMessage as flash; use App\FlashMessage as flash;
use Illuminate\Http\Request;
class ItemController extends Controller class ItemController extends Controller
{ {
@ -13,7 +13,8 @@ class ItemController extends Controller
{ {
$item = Item::find($id); $item = Item::find($id);
if (!$item || $item->product->user_id != \Auth::id()) { if (!$item || $item->product->user_id != \Auth::id()) {
session()->flash(flash::DANGER, session()->flash(
flash::DANGER,
\Lang::getFromJson( \Lang::getFromJson(
"The item doesn't exist." "The item doesn't exist."
) )

View File

@ -3,7 +3,6 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App; use App;
use Lang;
use App\User; use App\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View File

@ -3,10 +3,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use \App\Item; use \App\Item;
use \App\User;
use \App\Product; use \App\Product;
use Illuminate\Http\Request; use \App\User;
use App\FlashMessage as flash; use App\FlashMessage as flash;
use Illuminate\Http\Request;
class ProductController extends Controller class ProductController extends Controller
{ {

View File

@ -2,13 +2,11 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Auth; use App\Events\ReturnItem;
use Lang;
use App\Item; use App\Item;
use App\User; use App\User;
use App\Events\ReturnItem;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use PhpParser\Node\Stmt\TryCatch; use Lang;
/** /**
* Responsible to Take and Return an Item. * Responsible to Take and Return an Item.
@ -51,7 +49,6 @@ class TakeController extends Controller
try { try {
$item->returnItem(); $item->returnItem();
} catch (\Exception $e) { } catch (\Exception $e) {
return back()->withErrors( return back()->withErrors(
Lang::getFromJson("You cannot return an item that is not with you") Lang::getFromJson("You cannot return an item that is not with you")

View File

@ -2,10 +2,9 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use \Lang;
use \App\User;
use \App\Item; use \App\Item;
use \App\Product; use \App\User;
use \Lang;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class UserController extends Controller class UserController extends Controller

View File

@ -2,8 +2,8 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware; use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware class TrustProxies extends Middleware
{ {

View File

@ -3,9 +3,8 @@
namespace App; namespace App;
use Auth; use Auth;
use Lang;
use Illuminate\Database\Eloquent\Model;
use Exception; use Exception;
use Illuminate\Database\Eloquent\Model;
class Item extends Model class Item extends Model
{ {

View File

@ -2,12 +2,10 @@
namespace App\Listeners; namespace App\Listeners;
use Mail;
use App\User;
use App\Events\ReturnItem; use App\Events\ReturnItem;
use App\Mail\ItemAvailable; use App\Mail\ItemAvailable;
use Illuminate\Queue\InteractsWithQueue; use App\User;
use Illuminate\Contracts\Queue\ShouldQueue; use Mail;
class AlertReturnedItem class AlertReturnedItem
{ {

View File

@ -3,10 +3,8 @@
namespace App\Listeners; namespace App\Listeners;
use App\User; use App\User;
use IlluminateAuthEventsLogin;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Auth\Events\Login; use Illuminate\Auth\Events\Login;
use IlluminateAuthEventsLogin;
class SetLanguage class SetLanguage
{ {

View File

@ -6,7 +6,6 @@ use \App\Item;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable; use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class ItemAvailable extends Mailable class ItemAvailable extends Mailable
{ {

View File

@ -2,12 +2,11 @@
namespace App\Mail; namespace App\Mail;
use Lang;
use \App\Item; use \App\Item;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable; use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue; use Lang;
class UserWaiting extends Mailable class UserWaiting extends Mailable
{ {

View File

@ -2,12 +2,11 @@
namespace App\Mail; namespace App\Mail;
use \Lang;
use \App\User; use \App\User;
use \Lang;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable; use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class Welcome extends Mailable class Welcome extends Mailable
{ {

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {

View File

@ -2,7 +2,6 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider class AuthServiceProvider extends ServiceProvider

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider class BroadcastServiceProvider extends ServiceProvider
{ {

View File

@ -3,12 +3,12 @@
namespace App\Providers; namespace App\Providers;
use App\Events\ReturnItem; use App\Events\ReturnItem;
use App\Listeners\SetLanguage;
use App\Listeners\AlertReturnedItem; use App\Listeners\AlertReturnedItem;
use Illuminate\Support\Facades\Event; use App\Listeners\SetLanguage;
use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider class EventServiceProvider extends ServiceProvider
{ {

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider class RouteServiceProvider extends ServiceProvider
{ {

View File

@ -3,10 +3,9 @@
namespace App; namespace App;
use Auth; use Auth;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Support\Facades\Request; use Illuminate\Notifications\Notifiable;
class User extends Authenticatable implements MustVerifyEmail class User extends Authenticatable implements MustVerifyEmail
{ {

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration class CreateUsersTable extends Migration
{ {

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration class CreatePasswordResetsTable extends Migration
{ {

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductsTable extends Migration class CreateProductsTable extends Migration
{ {

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateItemsTable extends Migration class CreateItemsTable extends Migration
{ {

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddLocationToUsers extends Migration class AddLocationToUsers extends Migration
{ {

View File

@ -3,8 +3,8 @@
namespace Tests\Feature; namespace Tests\Feature;
use \App\Product; use \App\Product;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ExampleTest extends TestCase class ExampleTest extends TestCase
{ {

View File

@ -3,7 +3,6 @@
namespace Tests\Unit; namespace Tests\Unit;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase class ExampleTest extends TestCase
{ {