mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-23 20:10:52 +00:00
style: run php-cs-fixer
This commit is contained in:
parent
92a6410321
commit
54efb095fe
@ -3,13 +3,10 @@
|
||||
namespace App\Events;
|
||||
|
||||
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\Contracts\Broadcasting\ShouldBroadcast;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ReturnItem
|
||||
{
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
Use Throwable;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use Mail;
|
||||
use \App\Mail\UserWaiting;
|
||||
use \App\User;
|
||||
use App\FlashMessage;
|
||||
use \App\Mail\UserWaiting;
|
||||
use Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use Mail;
|
||||
|
||||
class AlertController extends Controller
|
||||
{
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Mail\Welcome;
|
||||
use App\FlashMessage;
|
||||
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\Validator;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use App\FlashMessage;
|
||||
use Mail;
|
||||
|
||||
class RegisterController extends Controller
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
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\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
|
@ -4,8 +4,8 @@ namespace App\Http\Controllers;
|
||||
|
||||
use \App\Item;
|
||||
use \App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use App\FlashMessage as flash;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ItemController extends Controller
|
||||
{
|
||||
@ -13,7 +13,8 @@ class ItemController extends Controller
|
||||
{
|
||||
$item = Item::find($id);
|
||||
if (!$item || $item->product->user_id != \Auth::id()) {
|
||||
session()->flash(flash::DANGER,
|
||||
session()->flash(
|
||||
flash::DANGER,
|
||||
\Lang::getFromJson(
|
||||
"The item doesn't exist."
|
||||
)
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App;
|
||||
use Lang;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use \App\Item;
|
||||
use \App\User;
|
||||
use \App\Product;
|
||||
use Illuminate\Http\Request;
|
||||
use \App\User;
|
||||
use App\FlashMessage as flash;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProductController extends Controller
|
||||
{
|
||||
|
@ -2,13 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use Lang;
|
||||
use App\Events\ReturnItem;
|
||||
use App\Item;
|
||||
use App\User;
|
||||
use App\Events\ReturnItem;
|
||||
use Illuminate\Http\Request;
|
||||
use PhpParser\Node\Stmt\TryCatch;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
* Responsible to Take and Return an Item.
|
||||
@ -51,7 +49,6 @@ class TakeController extends Controller
|
||||
|
||||
try {
|
||||
$item->returnItem();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return back()->withErrors(
|
||||
Lang::getFromJson("You cannot return an item that is not with you")
|
||||
|
@ -2,10 +2,9 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use \Lang;
|
||||
use \App\User;
|
||||
use \App\Item;
|
||||
use \App\Product;
|
||||
use \App\User;
|
||||
use \Lang;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UserController extends Controller
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
|
@ -3,9 +3,8 @@
|
||||
namespace App;
|
||||
|
||||
use Auth;
|
||||
use Lang;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
|
@ -2,12 +2,10 @@
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use Mail;
|
||||
use App\User;
|
||||
use App\Events\ReturnItem;
|
||||
use App\Mail\ItemAvailable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use App\User;
|
||||
use Mail;
|
||||
|
||||
class AlertReturnedItem
|
||||
{
|
||||
|
@ -3,10 +3,8 @@
|
||||
namespace App\Listeners;
|
||||
|
||||
use App\User;
|
||||
use IlluminateAuthEventsLogin;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Auth\Events\Login;
|
||||
use IlluminateAuthEventsLogin;
|
||||
|
||||
class SetLanguage
|
||||
{
|
||||
|
@ -6,7 +6,6 @@ use \App\Item;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class ItemAvailable extends Mailable
|
||||
{
|
||||
|
@ -2,12 +2,11 @@
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Lang;
|
||||
use \App\Item;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Lang;
|
||||
|
||||
class UserWaiting extends Mailable
|
||||
{
|
||||
|
@ -2,12 +2,11 @@
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use \Lang;
|
||||
use \App\User;
|
||||
use \Lang;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class Welcome extends Mailable
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -14,7 +14,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Schema::defaultStringLength(191); //Solved by increasing StringLength
|
||||
Schema::defaultStringLength(191); //Solved by increasing StringLength
|
||||
//
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -3,12 +3,12 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Events\ReturnItem;
|
||||
use App\Listeners\SetLanguage;
|
||||
use App\Listeners\AlertReturnedItem;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use App\Listeners\SetLanguage;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -3,10 +3,9 @@
|
||||
namespace App;
|
||||
|
||||
use Auth;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProductsTable extends Migration
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateItemsTable extends Migration
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddLocationToUsers extends Migration
|
||||
{
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
use \App\Product;
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace Tests\Unit;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user