From 364a55f7c75a636fc0684ade0a68214c9801afc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 29 Mar 2022 16:57:54 +0200 Subject: [PATCH] PHPCS update + phpcbf pass --- app/Console/Commands/CreateUser.php | 13 +- app/Console/Commands/LdcWebStatusChecker.php | 25 +- app/Console/Kernel.php | 3 +- app/Enums/Planning/ActivityType.php | 1 - app/Events/FileCreated.php | 3 +- app/Events/Loggable.php | 2 +- app/Events/NotifyAdmin.php | 2 +- app/Events/NotifySubscriptions.php | 4 +- app/Events/NotifyTicketCreator.php | 2 +- app/Events/ProjectUpdated.php | 1 - app/Events/SiteUpdated.php | 3 +- app/Events/TicketStatusChanged.php | 6 +- app/Exceptions/Handler.php | 5 +- .../Auth/ConfirmPasswordController.php | 16 +- .../Auth/ForgotPasswordController.php | 16 +- app/Http/Controllers/Auth/LoginController.php | 16 +- .../Auth/ResetPasswordController.php | 16 +- app/Http/Controllers/Controller.php | 24 +- app/Http/Controllers/ScheduleController.php | 73 +++--- app/Http/Controllers/TicketController.php | 24 +- app/Http/Controllers/UserController.php | 7 +- app/Http/Kernel.php | 1 - app/Http/Middleware/Authenticate.php | 2 +- app/Http/Middleware/EncryptCookies.php | 4 +- app/Http/Middleware/IsAdmin.php | 4 +- .../PreventRequestsDuringMaintenance.php | 4 +- .../Middleware/RedirectIfAuthenticated.php | 6 +- app/Http/Middleware/TrimStrings.php | 1 - app/Http/Middleware/TrustProxies.php | 3 +- app/Http/Middleware/VerifyCsrfToken.php | 4 +- app/Http/Requests/ChangeTicketStatus.php | 2 +- app/Http/Requests/CreateMessage.php | 2 +- app/Http/Requests/EraseCellContentRequest.php | 2 +- app/Http/Requests/SetCellContentRequest.php | 2 +- app/Http/Requests/SortTickets.php | 2 +- app/Http/Requests/StoreScheduleRequest.php | 2 +- app/Http/Requests/StoreSite.php | 2 +- app/Http/Requests/StoreTicket.php | 2 +- app/Jobs/AutoCloseOldTickets.php | 7 +- app/Jobs/WarnBeforeAutoCloseTicket.php | 4 +- app/Lib/Utils.php | 36 +-- app/Listeners/AddStatusMessages.php | 4 +- app/Listeners/HandleLoggable.php | 2 +- app/Listeners/SendNotificationMailToAdmin.php | 2 +- .../SendNotificationMailToTicketCreator.php | 2 +- .../SendSubscriptionsNotificationsMail.php | 4 +- app/Mail/TicketMention.php | 4 +- app/Mail/TicketUpdate.php | 4 +- app/Mail/UserCreatedMail.php | 1 - app/Models/Message.php | 8 +- app/Models/ProjetSite.php | 1 - app/Models/Schedule.php | 4 +- app/Models/Site.php | 3 +- app/Models/SiteFile.php | 1 - app/Models/SiteUser.php | 1 - app/Models/Ticket.php | 11 +- app/Models/User.php | 2 +- app/Notifications/ResetPassword.php | 2 +- app/Policies/Rules/LogStaticRules.php | 3 +- app/Policies/Rules/SiteStaticRules.php | 3 +- app/Policies/Rules/TicketStaticRules.php | 3 +- app/Policies/Rules/UserRoleRules.php | 3 +- app/Providers/AppServiceProvider.php | 2 - app/Providers/AuthServiceProvider.php | 3 - app/Providers/EventServiceProvider.php | 2 - app/Providers/TranslationServiceProvider.php | 3 +- config/app.php | 176 ++++++------- config/auth.php | 112 ++++----- config/broadcasting.php | 36 +-- config/cache.php | 54 ++-- config/cors.php | 20 +- config/database.php | 74 +++--- config/filesystems.php | 68 ++--- config/hashing.php | 52 ++-- config/logging.php | 40 +-- config/mail.php | 78 +++--- config/queue.php | 52 ++-- config/services.php | 18 +- config/session.php | 238 +++++++++--------- config/tickets.php | 3 +- config/view.php | 32 +-- database/factories/UserFactory.php | 4 +- phpcs.xml | 159 +++++++----- routes/api.php | 16 +- routes/channels.php | 16 +- routes/console.php | 16 +- routes/web.php | 25 +- 87 files changed, 871 insertions(+), 850 deletions(-) diff --git a/app/Console/Commands/CreateUser.php b/app/Console/Commands/CreateUser.php index d06c319..4e49151 100644 --- a/app/Console/Commands/CreateUser.php +++ b/app/Console/Commands/CreateUser.php @@ -9,7 +9,6 @@ use Illuminate\Support\Facades\Hash; class CreateUser extends Command { - /** * The name and signature of the console command. * @@ -27,15 +26,15 @@ class CreateUser extends Command /** * Execute the console command. * - * @return int + * @return integer */ public function handle() { - $name = $this->ask('What is the name?'); - $email = $this->ask('What is the email?'); - $pwd = $this->secret('What is the password?'); - $user = new User(); - $user->name = $name; + $name = $this->ask('What is the name?'); + $email = $this->ask('What is the email?'); + $pwd = $this->secret('What is the password?'); + $user = new User(); + $user->name = $name; $user->email = $email; if ($this->confirm('Is the user an admin?')) { $user->role = Role::admin(); diff --git a/app/Console/Commands/LdcWebStatusChecker.php b/app/Console/Commands/LdcWebStatusChecker.php index 563db63..df24f31 100644 --- a/app/Console/Commands/LdcWebStatusChecker.php +++ b/app/Console/Commands/LdcWebStatusChecker.php @@ -5,16 +5,15 @@ namespace App\Console\Commands; use Illuminate\Console\Command; /* -* Command Name: LDC Web Status Checker -* Description: Envoi des infos Serveur/Laravel vers LDC Web -* Version: 1.1 -* Author: Vincent BRIDIER -* Author URI: vincent.bridier@ldc.fr -*/ + * Command Name: LDC Web Status Checker + * Description: Envoi des infos Serveur/Laravel vers LDC Web + * Version: 1.1 + * Author: Vincent BRIDIER + * Author URI: vincent.bridier@ldc.fr + */ class LdcWebStatusChecker extends Command { - /** * The name and signature of the console command. * @@ -36,7 +35,7 @@ class LdcWebStatusChecker extends Command */ public function handle() { - $data = []; + $data = []; $data['uuid'] = config('ldcweb.project_uuid'); // Sitemap.xml ? @@ -53,10 +52,10 @@ class LdcWebStatusChecker extends Command $data['robots'] = 'false'; } - //Check logs + // Check logs $data['logs'] = 0; - $patherror = storage_path('/logs'); - $files = glob($patherror . '/*.log'); + $patherror = storage_path('/logs'); + $files = glob($patherror . '/*.log'); if (count($files) > 0) { foreach ($files as $file) { $data['logs'] = $data['logs'] + filesize($file); @@ -66,8 +65,8 @@ class LdcWebStatusChecker extends Command $data['code']['version'] = app()->version(); // Send by cURL - $url = 'https://ldc-web.ldc.fr/api/status-checker'; - $ch = curl_init($url); + $url = 'https://ldc-web.ldc.fr/api/status-checker'; + $ch = curl_init($url); $payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)]; curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4745ce3..c356b30 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -9,7 +9,6 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { - /** * The Artisan commands provided by your application. * @@ -20,7 +19,7 @@ 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) diff --git a/app/Enums/Planning/ActivityType.php b/app/Enums/Planning/ActivityType.php index 76bc307..88244f0 100644 --- a/app/Enums/Planning/ActivityType.php +++ b/app/Enums/Planning/ActivityType.php @@ -18,7 +18,6 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ class ActivityType extends BaseEnumRoutable { - public static function labels() { return [ diff --git a/app/Events/FileCreated.php b/app/Events/FileCreated.php index 3b2b99d..788541d 100644 --- a/app/Events/FileCreated.php +++ b/app/Events/FileCreated.php @@ -7,7 +7,6 @@ use App\Models\User; class FileCreated extends Loggable { - /** @var File */ public $file; @@ -19,7 +18,7 @@ class FileCreated extends Loggable public function __construct(File $file, User $user) { parent::__construct($user); - $this->file = $file; + $this->file = $file; $this->message = trans(':username à crée le fichier :filename', [ 'username' => $user->name, 'filename' => $file->name diff --git a/app/Events/Loggable.php b/app/Events/Loggable.php index 60e514c..495e470 100644 --- a/app/Events/Loggable.php +++ b/app/Events/Loggable.php @@ -23,7 +23,7 @@ abstract class Loggable */ public function __construct(User $user) { - $this->user = $user; + $this->user = $user; $this->message = trans(':username did someting', [ 'username' => $user->name ]); diff --git a/app/Events/NotifyAdmin.php b/app/Events/NotifyAdmin.php index d319fba..3254bf1 100644 --- a/app/Events/NotifyAdmin.php +++ b/app/Events/NotifyAdmin.php @@ -26,7 +26,7 @@ class NotifyAdmin */ public function __construct(Ticket $ticket, string $corpsMaj) { - $this->ticket = $ticket; + $this->ticket = $ticket; $this->corpsMaj = $corpsMaj; } } diff --git a/app/Events/NotifySubscriptions.php b/app/Events/NotifySubscriptions.php index b2c15bd..eecec0d 100644 --- a/app/Events/NotifySubscriptions.php +++ b/app/Events/NotifySubscriptions.php @@ -30,8 +30,8 @@ class NotifySubscriptions */ public function __construct(Ticket $ticket, string $corpsMaj, Collection $ignoreUsers = null) { - $this->ticket = $ticket; - $this->corpsMaj = $corpsMaj; + $this->ticket = $ticket; + $this->corpsMaj = $corpsMaj; $this->ignoreUsers = $ignoreUsers; } } diff --git a/app/Events/NotifyTicketCreator.php b/app/Events/NotifyTicketCreator.php index f2e8284..9515f4d 100644 --- a/app/Events/NotifyTicketCreator.php +++ b/app/Events/NotifyTicketCreator.php @@ -26,7 +26,7 @@ class NotifyTicketCreator */ public function __construct(Ticket $ticket, string $corpsMaj) { - $this->ticket = $ticket; + $this->ticket = $ticket; $this->corpsMaj = $corpsMaj; } } diff --git a/app/Events/ProjectUpdated.php b/app/Events/ProjectUpdated.php index 31f0a10..2237d7c 100644 --- a/app/Events/ProjectUpdated.php +++ b/app/Events/ProjectUpdated.php @@ -7,7 +7,6 @@ use App\Models\User; class ProjectUpdated extends Loggable { - /** @var Project */ public $project; diff --git a/app/Events/SiteUpdated.php b/app/Events/SiteUpdated.php index ec6a535..582540d 100644 --- a/app/Events/SiteUpdated.php +++ b/app/Events/SiteUpdated.php @@ -7,7 +7,6 @@ use App\Models\User; class SiteUpdated extends Loggable { - /** @var Site */ public $site; @@ -19,7 +18,7 @@ class SiteUpdated extends Loggable public function __construct(Site $site, User $user) { parent::__construct($user); - $this->site = $site; + $this->site = $site; $this->message = trans(':username à mis à jour site :sitename', [ 'username' => $user->name, 'sitename' => $site->name diff --git a/app/Events/TicketStatusChanged.php b/app/Events/TicketStatusChanged.php index fb4c471..4652421 100644 --- a/app/Events/TicketStatusChanged.php +++ b/app/Events/TicketStatusChanged.php @@ -32,9 +32,9 @@ class TicketStatusChanged */ public function __construct(Ticket $ticket, $status, User $user = null, string $message = null) { - $this->ticket = $ticket; - $this->status = $status; - $this->user = $user; + $this->ticket = $ticket; + $this->status = $status; + $this->user = $user; $this->message = $message; } } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 19a1a9f..eaa865d 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -6,15 +6,13 @@ use Kwaadpepper\ExceptionHandler\Exceptions\ExceptionHandler; class Handler extends ExceptionHandler { - /** * A list of the exception types that are not reported. * * @var array */ protected $dontReport = [ - // - ]; + ]; /** * A list of the inputs that are never flashed for validation exceptions. @@ -33,6 +31,5 @@ class Handler extends ExceptionHandler */ public function register() { - // } } diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php index d90f81e..f6112b2 100644 --- a/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\ConfirmsPasswords; class ConfirmPasswordController extends Controller { /* - |-------------------------------------------------------------------------- - | Confirm Password Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password confirmations and - | uses a simple trait to include the behavior. You're free to explore - | this trait and override any functions that require customization. - | + |-------------------------------------------------------------------------- + | Confirm Password Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling password confirmations and + | uses a simple trait to include the behavior. You're free to explore + | this trait and override any functions that require customization. + | */ use ConfirmsPasswords; diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 19354dc..5e0f0d2 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -8,14 +8,14 @@ use Illuminate\Foundation\Auth\SendsPasswordResetEmails; class ForgotPasswordController extends Controller { /* - |-------------------------------------------------------------------------- - | Password Reset Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password reset emails and - | includes a trait which assists in sending these notifications from - | your application to your users. Feel free to explore this trait. - | + |-------------------------------------------------------------------------- + | Password Reset Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling password reset emails and + | includes a trait which assists in sending these notifications from + | your application to your users. Feel free to explore this trait. + | */ use SendsPasswordResetEmails; diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 018c583..606216c 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers; class LoginController extends Controller { /* - |-------------------------------------------------------------------------- - | Login Controller - |-------------------------------------------------------------------------- - | - | This controller handles authenticating users for the application and - | redirecting them to your home screen. The controller uses a trait - | to conveniently provide its functionality to your applications. - | + |-------------------------------------------------------------------------- + | Login Controller + |-------------------------------------------------------------------------- + | + | This controller handles authenticating users for the application and + | redirecting them to your home screen. The controller uses a trait + | to conveniently provide its functionality to your applications. + | */ use AuthenticatesUsers; diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 6195419..1b62616 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -10,14 +10,14 @@ use Illuminate\Validation\Rules\Password; class ResetPasswordController extends Controller { /* - |-------------------------------------------------------------------------- - | Password Reset Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password reset requests - | and uses a simple trait to include this behavior. You're free to - | explore this trait and override any methods you wish to tweak. - | + |-------------------------------------------------------------------------- + | Password Reset Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling password reset requests + | and uses a simple trait to include this behavior. You're free to + | explore this trait and override any methods you wish to tweak. + | */ use ResetsPasswords; diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 034189c..91b282c 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -6,7 +6,6 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; - use App\Enums\TicketStatus; use App\Models\Ticket; use Illuminate\Support\Facades\Auth; @@ -21,15 +20,20 @@ class Controller extends BaseController public function __construct() { $ignore = [ - 9, // Support Web - 15, // Gen-Game- Web - 19, // Store LDC - 27, // CRM - 55, // LDC - WEB + 9, +// Support Web + 15, +// Gen-Game- Web + 19, +// Store LDC + 27, +// CRM + 55, +// LDC - WEB ]; - $ticketsNew = Ticket::where('status', TicketStatus::new()); - $ticketsWaiting = Ticket::where('status', TicketStatus::waiting()); + $ticketsNew = Ticket::where('status', TicketStatus::new()); + $ticketsWaiting = Ticket::where('status', TicketStatus::waiting()); $ticketsInProgress = Ticket::whereNotIn( 'status', [ @@ -47,8 +51,8 @@ class Controller extends BaseController $user = Auth::user(); if (!is_null($user) && !$user->isAdmin()) { - $ticketsNew = $ticketsNew->where('is_internal', 0)->whereNotIn('site_id', $ignore); - $ticketsWaiting = $ticketsWaiting->where('is_internal', 0)->whereNotIn('site_id', $ignore); + $ticketsNew = $ticketsNew->where('is_internal', 0)->whereNotIn('site_id', $ignore); + $ticketsWaiting = $ticketsWaiting->where('is_internal', 0)->whereNotIn('site_id', $ignore); $ticketsInProgress = $ticketsInProgress->where('is_internal', 0)->whereNotIn('site_id', $ignore); } diff --git a/app/Http/Controllers/ScheduleController.php b/app/Http/Controllers/ScheduleController.php index 42e0036..1f555f5 100644 --- a/app/Http/Controllers/ScheduleController.php +++ b/app/Http/Controllers/ScheduleController.php @@ -19,7 +19,7 @@ class ScheduleController extends Controller { public function index(Request $request) { - $date = CarbonImmutable::now()->startOfWeek(); + $date = CarbonImmutable::now()->startOfWeek(); $nbweeks = config('schedules.shownWeeks'); if ($request->p) { $date = CarbonImmutable::createFromFormat('d/m/Y', $request->p)->startOfWeek(); @@ -27,7 +27,7 @@ class ScheduleController extends Controller $dbusers = User::where('role', Role::developper())->get(); - $users = []; + $users = []; foreach ($dbusers as $user) { $users[$user->id] = ['name' => $user->name]; } @@ -40,72 +40,75 @@ class ScheduleController extends Controller ->get(); $arSchedules = array(); - $prevUserId = null; - $prevDate = null; - $prevSlot = null; + $prevUserId = null; + $prevDate = null; + $prevSlot = null; foreach ($schedules as $schedule) { - $id_lie = array('label'=> null, 'value'=> null); - if(!is_null($schedule->model_lie)) { + $id_lie = array('label' => null, 'value' => null); + if (!is_null($schedule->model_lie)) { if (isset($schedule->relatedModel->name)) { - $id_lie = array('label'=>$schedule->relatedModel->name, 'value'=>$schedule->id_lie); + $id_lie = array('label' => $schedule->relatedModel->name, 'value' => $schedule->id_lie); } else { - $id_lie = array('label'=>'Ticket '.$schedule->id_lie, 'value'=>$schedule->id_lie); + $id_lie = array('label' => 'Ticket ' . $schedule->id_lie, 'value' => $schedule->id_lie); } $model_lie = $schedule->model_lie; } else { - $model_lie = array('label'=> null, 'value'=> null); + $model_lie = array('label' => null, 'value' => null); } if ($prevUserId != $schedule->user_id) { - //nouveau user + // nouveau user $arSchedules[$schedule->user_id] = array( $schedule->slot => array( $schedule->date->format('d/m/Y') => array( 'id' => $schedule->id, 'type' => $schedule->activity, 'text' => $schedule->description, - 'id_lie' => $id_lie, //$schedule->id_lie, + 'id_lie' => $id_lie, +// $schedule->id_lie, 'model_lie' => $model_lie, ), ) ); } else { - //same user + // same user if ($prevSlot != $schedule->slot) { - //new slot + // new slot $arSchedules[$schedule->user_id][$schedule->slot] = array( $schedule->date->format('d/m/Y') => array( 'id' => $schedule->id, 'type' => $schedule->activity, 'text' => $schedule->description, - 'id_lie' => $id_lie, //$schedule->id_lie, + 'id_lie' => $id_lie, +// $schedule->id_lie, 'model_lie' => $model_lie, ), ); } else { - //same slot + // same slot if ($prevDate != $schedule->date) { - //new date + // new date $arSchedules[$schedule->user_id][$schedule->slot][$schedule->date->format('d/m/Y')] = array( 'id' => $schedule->id, 'type' => $schedule->activity, 'text' => $schedule->description, - 'id_lie' => $id_lie, //$schedule->id_lie, + 'id_lie' => $id_lie, +// $schedule->id_lie, 'model_lie' => $model_lie, ); } else { - //same date - //should never be here + // same date + // should never be here } - } - } + }//end if + }//end if $prevUserId = $schedule->user_id; - $prevDate = $schedule->date; - $prevSlot = $schedule->slot; - } + $prevDate = $schedule->date; + $prevSlot = $schedule->slot; + }//end foreach $weekCells = array(); - for ($i=0; $i < $nbweeks; $i++) { + for ($i = 0; $i < $nbweeks; $i++) { $weekCells[] = array( "num" => $date->addDays($i * 7)->weekOfYear, "month" => $date->addDays($i * 7)->shortLocaleMonth, @@ -118,23 +121,23 @@ class ScheduleController extends Controller public function setCellContent(StoreScheduleRequest $request) { - $date = CarbonImmutable::createFromFormat('d/m/Y', $request->date); - $fill = $request->all(); + $date = CarbonImmutable::createFromFormat('d/m/Y', $request->date); + $fill = $request->all(); $fill['date'] = $date; - $schedule = Schedule::updateOrCreate(['id' => $request->id],$fill); + $schedule = Schedule::updateOrCreate(['id' => $request->id], $fill); $schedule->saveOrFail(); - $id_lie = array('label'=> null, 'value'=> null); - if(!is_null($schedule->model_lie)) { + $id_lie = array('label' => null, 'value' => null); + if (!is_null($schedule->model_lie)) { if (isset($schedule->relatedModel->name)) { - $id_lie = array('label'=>$schedule->relatedModel->name, 'value'=>$schedule->id_lie); + $id_lie = array('label' => $schedule->relatedModel->name, 'value' => $schedule->id_lie); } else { - $id_lie = array('label'=>'Ticket '.$schedule->id_lie, 'value'=>$schedule->id_lie); + $id_lie = array('label' => 'Ticket ' . $schedule->id_lie, 'value' => $schedule->id_lie); } $model_lie = $schedule->model_lie; } else { - $model_lie = array('label'=> null, 'value'=> null); + $model_lie = array('label' => null, 'value' => null); } $arSchd = [ @@ -148,7 +151,7 @@ class ScheduleController extends Controller 'slot' => $schedule->slot, ]; - return \response()->json(['status' => true, 'sched'=>$arSchd]); + return \response()->json(['status' => true, 'sched' => $arSchd]); } public function eraseCellContent(Request $request) diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index 3523dc5..f2c96e5 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -58,11 +58,11 @@ class TicketController extends Controller 'value' => $ticket->id ]; })); - } + }//end if /** @var \App\Models\User */ - $user = auth()->user(); + $user = auth()->user(); $tickets = Ticket::with('site')->has('site'); if (!$user->isAdmin()) { $tickets = $tickets->whereHas('site', function ($q) use ($user) { @@ -80,7 +80,7 @@ class TicketController extends Controller $tickets = $this->filterTickets($tickets, $request); $tickets = $tickets->paginate(); - $sites = Site::select('id', 'name')->orderBy('name')->get(); + $sites = Site::select('id', 'name')->orderBy('name')->get(); $status = TicketStatus::toArray(); return view('ticket.index', compact('tickets', 'sites', 'status')); @@ -169,7 +169,7 @@ class TicketController extends Controller $q->where('name', 'LIKE', "%$word%"); }); }); - } + }//end foreach }); } @@ -197,7 +197,7 @@ class TicketController extends Controller abort(403); } - $messages = $ticket->messages()->orderBy('created_at', 'DESC')->get(); + $messages = $ticket->messages()->orderBy('created_at', 'DESC')->get(); $isSubscribed = (bool)$ticket->subscriptions()->where('user_id', $user->id)->count(); return view('ticket.show', compact('ticket', 'messages', 'isSubscribed')); } @@ -328,15 +328,15 @@ class TicketController extends Controller $message->saveOrFail(); - //ici $message->id n'est pas connu lors de la création du message. - //on doit donc sauvegarder cette info après le create initial + // ici $message->id n'est pas connu lors de la création du message. + // on doit donc sauvegarder cette info après le create initial if ($request->file_message) { - $siteSlug = Str::slug($ticket->site->name); + $siteSlug = Str::slug($ticket->site->name); $fileMessage = $request->file_message; - $fileName = $siteSlug . '-ticket-' . $ticket->id . + $fileName = $siteSlug . '-ticket-' . $ticket->id . '-message-' . $message->id . '.' . $fileMessage->extension(); $fileMessage->move(public_path('fichiers/' . $siteSlug . '/' . $ticket->id . '/'), $fileName); - $filePath = 'fichiers/' . $siteSlug . '/' . $ticket->id . '/' . $fileName; + $filePath = 'fichiers/' . $siteSlug . '/' . $ticket->id . '/' . $fileName; $message->file = $filePath; $message->saveOrFail(); } @@ -369,8 +369,8 @@ class TicketController extends Controller public function reopen(Ticket $ticket) { - $message = "{$ticket->user->name} à réouvert le ticket n°{$ticket->id}"; - $oldStatus = $ticket->status; + $message = "{$ticket->user->name} à réouvert le ticket n°{$ticket->id}"; + $oldStatus = $ticket->status; $ticket->status = TicketStatus::inprogress(); $ticket->saveQuietly(); event(new TicketStatusChanged($ticket, $oldStatus, null, $message)); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index dd15db9..4e14d20 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers; use App\Http\Controllers\Auth\ForgotPasswordController; -use App\Models\Schedule; use App\Models\User; use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Request; @@ -29,19 +28,19 @@ class UserController extends Controller public function passwordResetSubmit() { /** @var \App\Models\User */ - $user = auth()->user(); + $user = auth()->user(); $request = new Request(['email' => $user->email]); return app(ForgotPasswordController::class)->sendResetLinkEmail($request); } public function stats() { - $user = Auth::user(); + $user = Auth::user(); $stats = []; for ($i = 2021; $i <= date('Y'); $i++) { $start = $i . '-03-01'; - $end = $i + 1 . '-02-' . $this->getLastDayFebruary($i + 1); + $end = $i + 1 . '-02-' . $this->getLastDayFebruary($i + 1); $datas = $user->schedules()->selectRaw('count(id) as nb, activity') ->whereBetween('date', [$start, $end]) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 6ce05ef..46846a4 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -6,7 +6,6 @@ use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { - /** * The application's global HTTP middleware stack. * diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 704089a..aeb9d80 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -9,7 +9,7 @@ class Authenticate extends Middleware /** * Get the path the user should be redirected to when they are not authenticated. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * @return string|null */ protected function redirectTo($request) diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 5cf30b3..20c5039 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -6,13 +6,11 @@ use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; class EncryptCookies extends Middleware { - /** * The names of the cookies that should not be encrypted. * * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Middleware/IsAdmin.php b/app/Http/Middleware/IsAdmin.php index e53ae9d..4c91f3d 100644 --- a/app/Http/Middleware/IsAdmin.php +++ b/app/Http/Middleware/IsAdmin.php @@ -10,8 +10,8 @@ class IsAdmin /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * @return mixed */ public function handle(Request $request, Closure $next) diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php index 2a8072e..402ea32 100644 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ b/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -6,13 +6,11 @@ use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Mi class PreventRequestsDuringMaintenance extends Middleware { - /** * The URIs that should be reachable while maintenance mode is enabled. * * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 362b48b..764ee81 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -12,9 +12,9 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null ...$guards + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null ...$guards * @return mixed */ public function handle(Request $request, Closure $next, ...$guards) diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index 7eb899a..5a50e7b 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -6,7 +6,6 @@ use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; class TrimStrings extends Middleware { - /** * The names of the attributes that should not be trimmed. * diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 919aec9..03b7890 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -7,7 +7,6 @@ use Illuminate\Http\Request; class TrustProxies extends Middleware { - /** * The trusted proxies for this application. * @@ -18,7 +17,7 @@ class TrustProxies extends Middleware /** * The headers that should be used to detect proxies. * - * @var int + * @var integer */ protected $headers = Request::HEADER_X_FORWARDED_ALL; } diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 680465e..ed591f2 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -6,13 +6,11 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; class VerifyCsrfToken extends Middleware { - /** * The URIs that should be excluded from CSRF verification. * * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Requests/ChangeTicketStatus.php b/app/Http/Requests/ChangeTicketStatus.php index ec925ad..84b524b 100644 --- a/app/Http/Requests/ChangeTicketStatus.php +++ b/app/Http/Requests/ChangeTicketStatus.php @@ -10,7 +10,7 @@ class ChangeTicketStatus extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/CreateMessage.php b/app/Http/Requests/CreateMessage.php index 68c443a..3d85442 100644 --- a/app/Http/Requests/CreateMessage.php +++ b/app/Http/Requests/CreateMessage.php @@ -9,7 +9,7 @@ class CreateMessage extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/EraseCellContentRequest.php b/app/Http/Requests/EraseCellContentRequest.php index 2e08203..63d7b27 100644 --- a/app/Http/Requests/EraseCellContentRequest.php +++ b/app/Http/Requests/EraseCellContentRequest.php @@ -11,7 +11,7 @@ class EraseCellContentRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/SetCellContentRequest.php b/app/Http/Requests/SetCellContentRequest.php index 54b671d..4ec5fc4 100644 --- a/app/Http/Requests/SetCellContentRequest.php +++ b/app/Http/Requests/SetCellContentRequest.php @@ -13,7 +13,7 @@ class SetCellContentRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/SortTickets.php b/app/Http/Requests/SortTickets.php index a70b880..4b74c16 100644 --- a/app/Http/Requests/SortTickets.php +++ b/app/Http/Requests/SortTickets.php @@ -10,7 +10,7 @@ class SortTickets extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreScheduleRequest.php b/app/Http/Requests/StoreScheduleRequest.php index f2334e4..339c5c2 100644 --- a/app/Http/Requests/StoreScheduleRequest.php +++ b/app/Http/Requests/StoreScheduleRequest.php @@ -13,7 +13,7 @@ class StoreScheduleRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreSite.php b/app/Http/Requests/StoreSite.php index 3044046..8caf667 100644 --- a/app/Http/Requests/StoreSite.php +++ b/app/Http/Requests/StoreSite.php @@ -9,7 +9,7 @@ class StoreSite extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreTicket.php b/app/Http/Requests/StoreTicket.php index 0ca9d21..0cce664 100644 --- a/app/Http/Requests/StoreTicket.php +++ b/app/Http/Requests/StoreTicket.php @@ -11,7 +11,7 @@ class StoreTicket extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Jobs/AutoCloseOldTickets.php b/app/Jobs/AutoCloseOldTickets.php index 8e06cba..08566e2 100644 --- a/app/Jobs/AutoCloseOldTickets.php +++ b/app/Jobs/AutoCloseOldTickets.php @@ -18,16 +18,17 @@ class AutoCloseOldTickets public function handle() { $limitDays = 15; - $message = 'En l\'absence d\'activitée depuis 15 jours ce ticket est automatiquement clos et archivé.'; - $tickets = Ticket::where(function ($q) { + $message = 'En l\'absence d\'activitée depuis 15 jours ce ticket est automatiquement clos et archivé.'; + $tickets = Ticket::where(function ($q) { $q->where('status', TicketStatus::production()) ->orWhere('status', TicketStatus::processed()); })->whereDate('updated_at', '<=', Carbon::now()->subDays($limitDays)) ->whereDoesntHave('messages', function ($q) use ($limitDays) { $q->whereDate('updated_at', '>', Carbon::now()->subDays($limitDays)); })->get(); + /** @var \App\Models\Ticket $ticket */ foreach ($tickets as $ticket) { - $oldStatus = $ticket->status; + $oldStatus = $ticket->status; $ticket->status = TicketStatus::archived(); $ticket->saveQuietly(); event(new TicketStatusChanged($ticket, $oldStatus, null, $message)); diff --git a/app/Jobs/WarnBeforeAutoCloseTicket.php b/app/Jobs/WarnBeforeAutoCloseTicket.php index 6609c37..46acc22 100644 --- a/app/Jobs/WarnBeforeAutoCloseTicket.php +++ b/app/Jobs/WarnBeforeAutoCloseTicket.php @@ -22,7 +22,7 @@ class WarnBeforeAutoCloseTicket $messageToAll = "En l'absence d'activitée, ou de réponse de la part du requérant ce ticket sera automatiquement clos et archivé dans $warningDays jours."; // phpcs:ignore Generic.Files.LineLength.TooLong $messageToUser = 'En l\'absence d\'activitée, ou de réponse de votre part ce ticket sera automatiquement clos et archivé dans %s jours.'; - $tickets = Ticket::where(function ($q) { + $tickets = Ticket::where(function ($q) { $q->where('status', TicketStatus::production()) ->orWhere('status', TicketStatus::processed()); })->whereDate('updated_at', '<=', Carbon::now()->subDays($warningDays)) @@ -30,7 +30,7 @@ class WarnBeforeAutoCloseTicket $q->whereDate('updated_at', '>', Carbon::now()->subDays($warningDays)); })->get(); foreach ($tickets as $ticket) { - $date = $ticket->messages->sortByDesc('updated_at')->first()->updated_at ?? $ticket->updated_at; + $date = $ticket->messages->sortByDesc('updated_at')->first()->updated_at ?? $ticket->updated_at; $limitDate = $date->addDays($warningDays); if (intval(Carbon::now()->diff($limitDate)->format('%a')) >= $warningDays) { event(new NotifySubscriptions($ticket, $messageToAll, collect($ticket->user))); diff --git a/app/Lib/Utils.php b/app/Lib/Utils.php index a977e4f..cc4d20f 100644 --- a/app/Lib/Utils.php +++ b/app/Lib/Utils.php @@ -79,25 +79,29 @@ class Utils */ public static function computeWorkload(): LoadLevel { - $Tnew = View::shared('ticketsNew'); + $Tnew = View::shared('ticketsNew'); $Tprogress = View::shared('ticketsInProgress'); - $Twaiting = View::shared('ticketsWaiting'); - - $worked = config('tickets.workedHoursInAWeek'); - $workedDays = config('tickets.workedDaysInAWeek'); - $morningWorkTime = ($worked / $workedDays / 2); // in hours - $workingDevsPerWeek = config('tickets.workingDevsPerWeek'); // Devs handlings tickets per week - $timePerWeekDev = $workingDevsPerWeek * $morningWorkTime; // Worktime per week to handle tickets - - $avgTimeForTicket = config('tickets.avgTimeForTicket'); // 45min for a ticket - - $todoListDelay = $Tnew * $avgTimeForTicket; // The time needed to handle new ticket (average) - $waitingListDelay = $Twaiting * $avgTimeForTicket; // The time needed to handle new ticket (average) - $progressListDelay = $Tprogress * $avgTimeForTicket; // The time needed to handle new ticket (average) + $Twaiting = View::shared('ticketsWaiting'); + $worked = config('tickets.workedHoursInAWeek'); + $workedDays = config('tickets.workedDaysInAWeek'); + $morningWorkTime = ($worked / $workedDays / 2); +// in hours + $workingDevsPerWeek = config('tickets.workingDevsPerWeek'); +// Devs handlings tickets per week + $timePerWeekDev = $workingDevsPerWeek * $morningWorkTime; +// Worktime per week to handle tickets + $avgTimeForTicket = config('tickets.avgTimeForTicket'); +// 45min for a ticket + $todoListDelay = $Tnew * $avgTimeForTicket; +// The time needed to handle new ticket (average) + $waitingListDelay = $Twaiting * $avgTimeForTicket; +// The time needed to handle new ticket (average) + $progressListDelay = $Tprogress * $avgTimeForTicket; +// The time needed to handle new ticket (average) $totalTicketsDelay = $todoListDelay + $progressListDelay + $waitingListDelay; - $ETAForAnewTicket = $totalTicketsDelay / $timePerWeekDev; // in weeks - + $ETAForAnewTicket = $totalTicketsDelay / $timePerWeekDev; +// in weeks switch ((int)round($ETAForAnewTicket)) { case LoadLevel::weak()->value: case LoadLevel::stable()->value: diff --git a/app/Listeners/AddStatusMessages.php b/app/Listeners/AddStatusMessages.php index 64f3377..879d58c 100644 --- a/app/Listeners/AddStatusMessages.php +++ b/app/Listeners/AddStatusMessages.php @@ -10,12 +10,12 @@ class AddStatusMessages /** * Handle the event. * - * @param TicketStatusChanged $event + * @param TicketStatusChanged $event * @return void */ public function handle(TicketStatusChanged $event) { - $message = new Message(); + $message = new Message(); $message->ticket_id = $event->ticket->id; if ($event->message) { $message->message = $event->message; diff --git a/app/Listeners/HandleLoggable.php b/app/Listeners/HandleLoggable.php index b550374..47c0b49 100644 --- a/app/Listeners/HandleLoggable.php +++ b/app/Listeners/HandleLoggable.php @@ -13,7 +13,7 @@ class HandleLoggable /** * Handle the event. * - * @param Loggable $loggable + * @param Loggable $loggable * @return void */ public function handle(Loggable $loggable) diff --git a/app/Listeners/SendNotificationMailToAdmin.php b/app/Listeners/SendNotificationMailToAdmin.php index ac0d903..e6c05cd 100644 --- a/app/Listeners/SendNotificationMailToAdmin.php +++ b/app/Listeners/SendNotificationMailToAdmin.php @@ -11,7 +11,7 @@ class SendNotificationMailToAdmin /** * Handle the event. * - * @param NotifyTicketCreator $event + * @param NotifyTicketCreator $event * @return void */ public function handle(NotifyAdmin $event) diff --git a/app/Listeners/SendNotificationMailToTicketCreator.php b/app/Listeners/SendNotificationMailToTicketCreator.php index 7eb4e5a..64ecf4a 100644 --- a/app/Listeners/SendNotificationMailToTicketCreator.php +++ b/app/Listeners/SendNotificationMailToTicketCreator.php @@ -11,7 +11,7 @@ class SendNotificationMailToTicketCreator /** * Handle the event. * - * @param NotifyTicketCreator $event + * @param NotifyTicketCreator $event * @return void */ public function handle(NotifyTicketCreator $event) diff --git a/app/Listeners/SendSubscriptionsNotificationsMail.php b/app/Listeners/SendSubscriptionsNotificationsMail.php index 53da1d1..87ab230 100644 --- a/app/Listeners/SendSubscriptionsNotificationsMail.php +++ b/app/Listeners/SendSubscriptionsNotificationsMail.php @@ -13,13 +13,13 @@ class SendSubscriptionsNotificationsMail /** * Handle the event. * - * @param NotifySubscriptions $event + * @param NotifySubscriptions $event * @return void */ public function handle(NotifySubscriptions $event) { $ignoreConnectedUserEmail = Auth::user()->email ?? ''; - $ignoreUsers = $event->ignoreUsers ?? collect(); + $ignoreUsers = $event->ignoreUsers ?? collect(); foreach ($event->ticket->subscriptions as $sub) { if ( $sub->email !== $ignoreConnectedUserEmail and diff --git a/app/Mail/TicketMention.php b/app/Mail/TicketMention.php index 9eb0b25..c131173 100644 --- a/app/Mail/TicketMention.php +++ b/app/Mail/TicketMention.php @@ -26,7 +26,7 @@ class TicketMention extends Mailable */ public function __construct(Ticket $ticket, string $corpsMaj) { - $this->ticket = $ticket; + $this->ticket = $ticket; $this->corpsMaj = $corpsMaj; } @@ -37,7 +37,7 @@ class TicketMention extends Mailable */ public function build() { - $ticket = $this->ticket; + $ticket = $this->ticket; $corpsMaj = Utils::plainToHtml($this->corpsMaj); return $this->subject("[SupportWeb] Vous avez été mentionné sur le ticket n° $ticket->id") ->view('emails.ticket-mention', compact('ticket', 'corpsMaj')); diff --git a/app/Mail/TicketUpdate.php b/app/Mail/TicketUpdate.php index 33ed6e9..0b2bdc2 100644 --- a/app/Mail/TicketUpdate.php +++ b/app/Mail/TicketUpdate.php @@ -26,7 +26,7 @@ class TicketUpdate extends Mailable */ public function __construct(Ticket $ticket, string $corpsMaj) { - $this->ticket = $ticket; + $this->ticket = $ticket; $this->corpsMaj = $corpsMaj; } @@ -37,7 +37,7 @@ class TicketUpdate extends Mailable */ public function build() { - $ticket = $this->ticket; + $ticket = $this->ticket; $corpsMaj = \html_entity_decode(Utils::plainToHtml($this->corpsMaj)); return $this->subject("[SupportWeb][{$ticket->site->name}] Ticket n°$ticket->id") ->view('emails.ticket-update', compact('ticket', 'corpsMaj')); diff --git a/app/Mail/UserCreatedMail.php b/app/Mail/UserCreatedMail.php index 41f59cd..00291c0 100644 --- a/app/Mail/UserCreatedMail.php +++ b/app/Mail/UserCreatedMail.php @@ -7,7 +7,6 @@ use Illuminate\Mail\Mailable; class UserCreatedMail extends Mailable { - protected $user; /** diff --git a/app/Models/Message.php b/app/Models/Message.php index 08ce554..170b601 100644 --- a/app/Models/Message.php +++ b/app/Models/Message.php @@ -50,7 +50,6 @@ class Message extends Model // https://supportweb.ldc.fr/ticket/583/message/create // SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '583-8' for key 'PRIMARY' // $ticket->subscriptions()->attach($messageUser); - // Add subscription if (!$messageUser->subscriptions()->find($ticket->id)) { $messageUser->subscriptions()->attach($ticket->id); @@ -66,8 +65,7 @@ class Message extends Model ]), $usersNotified )); - // - } + }//end if }); } @@ -84,8 +82,8 @@ class Message extends Model public function saveFile(Site $site, Ticket $ticket, UploadedFile $file) { $siteAssetFullPath = Site::ticketAssetsFullPath($site->slug_name); - $fileAssetPath = Site::ticketAssetsPath($site->slug_name); - $fileName = sprintf( + $fileAssetPath = Site::ticketAssetsPath($site->slug_name); + $fileName = sprintf( '%s-%s-%d-%d.%s', $site->slug_name, $ticket->id, diff --git a/app/Models/ProjetSite.php b/app/Models/ProjetSite.php index f259612..e51ff3a 100644 --- a/app/Models/ProjetSite.php +++ b/app/Models/ProjetSite.php @@ -6,5 +6,4 @@ use Illuminate\Database\Eloquent\Relations\Pivot; class ProjetSite extends Pivot { - // } diff --git a/app/Models/Schedule.php b/app/Models/Schedule.php index 01b2c00..95b50bf 100644 --- a/app/Models/Schedule.php +++ b/app/Models/Schedule.php @@ -43,7 +43,7 @@ class Schedule extends Model return $this->belongsTo(User::class); } - //relationship to linked objet + // relationship to linked objet public function relatedModel() { switch ($this->model_lie) { @@ -57,7 +57,7 @@ class Schedule extends Model return $this->belongsTo(Ticket::class, 'id_lie'); break; default: - //no model + // no model return new BelongsTo($this->newQuery(), $this, '', '', ''); break; } diff --git a/app/Models/Site.php b/app/Models/Site.php index 5b5820d..3f49fef 100644 --- a/app/Models/Site.php +++ b/app/Models/Site.php @@ -70,7 +70,8 @@ class Site extends Model 'max:255' ], 'required' => false, - 'nullable' => true, // n'est pas vraiment nullable en base + 'nullable' => true, +// n'est pas vraiment nullable en base 'actions' => [ CrudAction::view(), CrudAction::create(), diff --git a/app/Models/SiteFile.php b/app/Models/SiteFile.php index 9e7105f..da39144 100644 --- a/app/Models/SiteFile.php +++ b/app/Models/SiteFile.php @@ -6,5 +6,4 @@ use Illuminate\Database\Eloquent\Relations\Pivot; class SiteFile extends Pivot { - // } diff --git a/app/Models/SiteUser.php b/app/Models/SiteUser.php index a2ce503..5c05968 100644 --- a/app/Models/SiteUser.php +++ b/app/Models/SiteUser.php @@ -6,6 +6,5 @@ use Illuminate\Database\Eloquent\Relations\Pivot; class SiteUser extends Pivot { - public $timestamps = false; } diff --git a/app/Models/Ticket.php b/app/Models/Ticket.php index 5c6bda8..219d0ba 100644 --- a/app/Models/Ticket.php +++ b/app/Models/Ticket.php @@ -87,8 +87,8 @@ class Ticket extends Model public static function saveFile(Site $site, Ticket $ticket, TicketType $type, UploadedFile $file) { $siteAssetFullPath = Site::ticketAssetsFullPath($site->slug_name); - $fileAssetPath = Site::ticketAssetsPath($site->slug_name); - $fileName = sprintf( + $fileAssetPath = Site::ticketAssetsPath($site->slug_name); + $fileName = sprintf( '%s-%s-%d-%d.%s', $site->slug_name, $type->getDefinition(), @@ -112,12 +112,13 @@ class Ticket extends Model $ticket = $this; // find @user + send mail si un seul user est trouvé $usersNotified = collect([]); - $matches = []; + $matches = []; $ticket->load('site'); \preg_match_all('/@\w*/', $message->message, $matches); $matches = collect($matches[0] ?? [])->unique(); foreach ($matches as $pseudo_usertag) { try { + /** @var \App\Models\User $user */ $user = User::where('name', 'LIKE', '%' . ltrim($pseudo_usertag, '@') . '%') ->where('email', '!=', $ticket->user->email) ->where(function ($q) use ($ticket) { @@ -144,8 +145,8 @@ class Ticket extends Model } } catch (ModelNotFoundException $e) { continue; - } - } + }//end try + }//end foreach return $usersNotified; } } diff --git a/app/Models/User.php b/app/Models/User.php index 4374473..0ae64c5 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -153,7 +153,7 @@ class User extends Authenticatable static::creating(function (User $user) { if (\is_null($user->password)) { $user->password = Str::random(10); - $user->tmpPass = $user->password; + $user->tmpPass = $user->password; } if (Hash::needsRehash($user->password)) { $user->password = Hash::make($user->password); diff --git a/app/Notifications/ResetPassword.php b/app/Notifications/ResetPassword.php index 351bd5a..afee7cb 100644 --- a/app/Notifications/ResetPassword.php +++ b/app/Notifications/ResetPassword.php @@ -13,7 +13,7 @@ class ResetPassword extends ResetPasswordNotification /** * Get the reset password notification mail message for the given URL. * - * @param string $url + * @param string $url * @return \Illuminate\Notifications\Messages\MailMessage */ protected function buildMailMessage($url) diff --git a/app/Policies/Rules/LogStaticRules.php b/app/Policies/Rules/LogStaticRules.php index 26971d0..eafeadc 100644 --- a/app/Policies/Rules/LogStaticRules.php +++ b/app/Policies/Rules/LogStaticRules.php @@ -8,11 +8,10 @@ use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules - *! Rules has to return boolean value + * ! Rules has to return boolean value */ abstract class LogStaticRules extends StaticRules { - protected static function logIsOwnedByUser(User $user, Log $log) { return $log->user->id === $user->id; diff --git a/app/Policies/Rules/SiteStaticRules.php b/app/Policies/Rules/SiteStaticRules.php index da9cb45..2920397 100644 --- a/app/Policies/Rules/SiteStaticRules.php +++ b/app/Policies/Rules/SiteStaticRules.php @@ -8,11 +8,10 @@ use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules - *! Rules has to return boolean value + * ! Rules has to return boolean value */ abstract class SiteStaticRules extends StaticRules { - protected static function userSitesHasTicket(User $user, Ticket $ticket) { return $user->sites->contains($ticket->site_id); diff --git a/app/Policies/Rules/TicketStaticRules.php b/app/Policies/Rules/TicketStaticRules.php index fff9b25..bafd3f0 100644 --- a/app/Policies/Rules/TicketStaticRules.php +++ b/app/Policies/Rules/TicketStaticRules.php @@ -8,11 +8,10 @@ use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules - *! Rules has to return boolean value + * ! Rules has to return boolean value */ abstract class TicketStaticRules extends StaticRules { - protected static function ticketIsNotArchived(Ticket $ticket) { return !$ticket->status->equals(TicketStatus::archived()); diff --git a/app/Policies/Rules/UserRoleRules.php b/app/Policies/Rules/UserRoleRules.php index 0d4b185..034aca1 100644 --- a/app/Policies/Rules/UserRoleRules.php +++ b/app/Policies/Rules/UserRoleRules.php @@ -8,11 +8,10 @@ use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules - *! Rules has to return boolean value + * ! Rules has to return boolean value */ abstract class UserRoleRules extends StaticRules { - protected static function userIsAdmin(User $user) { return $user->isAdmin(); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index e38e5b0..07d8e60 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,7 +2,6 @@ namespace App\Providers; - use Illuminate\Pagination\Paginator; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\URL; @@ -18,7 +17,6 @@ class AppServiceProvider extends ServiceProvider */ public function register() { - // } /** diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index cb23efd..3ffc67d 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvid class AuthServiceProvider extends ServiceProvider { - /** * The policy mappings for the application. * @@ -22,7 +21,5 @@ class AuthServiceProvider extends ServiceProvider public function boot() { $this->registerPolicies(); - - // } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 5aa3010..7fcc35f 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -20,7 +20,6 @@ use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvi class EventServiceProvider extends ServiceProvider { - /** * The event listener mappings for the application. * @@ -44,6 +43,5 @@ class EventServiceProvider extends ServiceProvider */ public function boot() { - // } } diff --git a/app/Providers/TranslationServiceProvider.php b/app/Providers/TranslationServiceProvider.php index a91772e..7d7270b 100644 --- a/app/Providers/TranslationServiceProvider.php +++ b/app/Providers/TranslationServiceProvider.php @@ -17,7 +17,8 @@ class TranslationServiceProvider extends ServiceProvider { $translations = collect(); - foreach ($this->collectLocalesStrings() as $locale) { // suported locales + foreach ($this->collectLocalesStrings() as $locale) { +// suported locales Cache::rememberForever(sprintf('translations.%s', $locale), function () use ($locale) { $translations = [ 'php' => $this->phpTranslations($locale), diff --git a/config/app.php b/config/app.php index bb31bde..2755620 100644 --- a/config/app.php +++ b/config/app.php @@ -3,53 +3,53 @@ return [ /* - |-------------------------------------------------------------------------- - | Application Name - |-------------------------------------------------------------------------- - | - | This value is the name of your application. This value is used when the - | framework needs to place the application's name in a notification or - | any other location as required by the application or its packages. - | + |-------------------------------------------------------------------------- + | Application Name + |-------------------------------------------------------------------------- + | + | This value is the name of your application. This value is used when the + | framework needs to place the application's name in a notification or + | any other location as required by the application or its packages. + | */ 'name' => env('APP_NAME', 'Laravel'), /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services the application utilizes. Set this in your ".env" file. - | + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services the application utilizes. Set this in your ".env" file. + | */ 'env' => env('APP_ENV', 'production'), /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | */ 'debug' => (bool)env('APP_DEBUG', false), /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | */ 'url' => env('APP_URL', 'http://localhost'), @@ -57,66 +57,66 @@ return [ 'asset_url' => env('ASSET_URL', null), /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | */ 'timezone' => 'Europe/Paris', /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | */ 'locale' => 'fr', /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the current one - | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. - | + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | */ 'fallback_locale' => 'en', /* - |-------------------------------------------------------------------------- - | Faker Locale - |-------------------------------------------------------------------------- - | - | This locale will be used by the Faker PHP library when generating fake - | data for your database seeds. For example, this will be used to get - | localized telephone numbers, street address information and more. - | + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | */ 'faker_locale' => 'fr_FR', /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | */ 'key' => env('APP_KEY'), @@ -124,14 +124,14 @@ return [ 'cipher' => 'AES-256-CBC', /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | */ 'providers' => [ @@ -178,14 +178,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | */ 'aliases' => [ diff --git a/config/auth.php b/config/auth.php index 26e6ee0..6f77186 100644 --- a/config/auth.php +++ b/config/auth.php @@ -3,14 +3,14 @@ return [ /* - |-------------------------------------------------------------------------- - | Authentication Defaults - |-------------------------------------------------------------------------- - | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | + |-------------------------------------------------------------------------- + | Authentication Defaults + |-------------------------------------------------------------------------- + | + | This option controls the default authentication "guard" and password + | reset options for your application. You may change these defaults + | as required, but they're a perfect start for most applications. + | */ 'defaults' => [ @@ -19,20 +19,20 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session", "token" - | + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session", "token" + | */ 'guards' => [ @@ -49,20 +49,20 @@ return [ ], /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | */ 'providers' => [ @@ -73,18 +73,18 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expire time is the number of minutes that the reset token should be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | */ 'passwords' => [ @@ -97,14 +97,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | */ 'password_timeout' => 10800, diff --git a/config/broadcasting.php b/config/broadcasting.php index 3bba110..758e391 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Broadcaster - |-------------------------------------------------------------------------- - | - | This option controls the default broadcaster that will be used by the - | framework when an event needs to be broadcast. You may set this to - | any of the connections defined in the "connections" array below. - | - | Supported: "pusher", "redis", "log", "null" - | + |-------------------------------------------------------------------------- + | Default Broadcaster + |-------------------------------------------------------------------------- + | + | This option controls the default broadcaster that will be used by the + | framework when an event needs to be broadcast. You may set this to + | any of the connections defined in the "connections" array below. + | + | Supported: "pusher", "redis", "log", "null" + | */ 'default' => env('BROADCAST_DRIVER', 'null'), /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | */ 'connections' => [ diff --git a/config/cache.php b/config/cache.php index 9b4d7ab..5740730 100644 --- a/config/cache.php +++ b/config/cache.php @@ -5,30 +5,30 @@ use Illuminate\Support\Str; return [ /* - |-------------------------------------------------------------------------- - | Default Cache Store - |-------------------------------------------------------------------------- - | - | This option controls the default cache connection that gets used while - | using this caching library. This connection is used when another is - | not explicitly specified when executing a given caching function. - | - | Supported: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb" - | + |-------------------------------------------------------------------------- + | Default Cache Store + |-------------------------------------------------------------------------- + | + | This option controls the default cache connection that gets used while + | using this caching library. This connection is used when another is + | not explicitly specified when executing a given caching function. + | + | Supported: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb" + | */ 'default' => env('CACHE_DRIVER', 'file'), /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | */ 'stores' => [ @@ -87,14 +87,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. - | + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | */ 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), diff --git a/config/cors.php b/config/cors.php index 558369d..caccf68 100644 --- a/config/cors.php +++ b/config/cors.php @@ -3,16 +3,16 @@ return [ /* - |-------------------------------------------------------------------------- - | Cross-Origin Resource Sharing (CORS) Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure your settings for cross-origin resource sharing - | or "CORS". This determines what cross-origin operations may execute - | in web browsers. You are free to adjust these settings as needed. - | - | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS - | + |-------------------------------------------------------------------------- + | Cross-Origin Resource Sharing (CORS) Configuration + |-------------------------------------------------------------------------- + | + | Here you may configure your settings for cross-origin resource sharing + | or "CORS". This determines what cross-origin operations may execute + | in web browsers. You are free to adjust these settings as needed. + | + | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + | */ 'paths' => ['api/*'], diff --git a/config/database.php b/config/database.php index 3bfc47a..ac4559f 100644 --- a/config/database.php +++ b/config/database.php @@ -5,32 +5,32 @@ use Illuminate\Support\Str; return [ /* - |-------------------------------------------------------------------------- - | Default Database Connection Name - |-------------------------------------------------------------------------- - | - | Here you may specify which of the database connections below you wish - | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. - | + |-------------------------------------------------------------------------- + | Default Database Connection Name + |-------------------------------------------------------------------------- + | + | Here you may specify which of the database connections below you wish + | to use as your default connection for all database work. Of course + | you may use many connections at once using the Database library. + | */ 'default' => env('DB_CONNECTION', 'mysql'), /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | */ 'connections' => [ @@ -94,27 +94,27 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | */ 'migrations' => 'migrations', /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. - | + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as APC or Memcached. Laravel makes it easy to dig right in. + | */ 'redis' => [ diff --git a/config/filesystems.php b/config/filesystems.php index 8257b8c..ceceed7 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -3,42 +3,42 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Filesystem Disk - |-------------------------------------------------------------------------- - | - | Here you may specify the default filesystem disk that should be used - | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! - | + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | Here you may specify the default filesystem disk that should be used + | by the framework. The "local" disk, as well as a variety of cloud + | based disks are available to your application. Just store away! + | */ 'default' => env('FILESYSTEM_DRIVER', 'local'), /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | + |-------------------------------------------------------------------------- + | Default Cloud Filesystem Disk + |-------------------------------------------------------------------------- + | + | Many applications store files both locally and in the cloud. For this + | reason, you may specify a default "cloud" driver here. This driver + | will be bound as the Cloud disk implementation in the container. + | */ 'cloud' => env('FILESYSTEM_CLOUD', 's3'), /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. - | - | Supported Drivers: "local", "ftp", "sftp", "s3" - | + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + | Supported Drivers: "local", "ftp", "sftp", "s3" + | */ 'disks' => [ @@ -68,14 +68,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | */ 'links' => [ diff --git a/config/hashing.php b/config/hashing.php index 8425770..6641c8c 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Hash Driver - |-------------------------------------------------------------------------- - | - | This option controls the default hash driver that will be used to hash - | passwords for your application. By default, the bcrypt algorithm is - | used; however, you remain free to modify this option if you wish. - | - | Supported: "bcrypt", "argon", "argon2id" - | + |-------------------------------------------------------------------------- + | Default Hash Driver + |-------------------------------------------------------------------------- + | + | This option controls the default hash driver that will be used to hash + | passwords for your application. By default, the bcrypt algorithm is + | used; however, you remain free to modify this option if you wish. + | + | Supported: "bcrypt", "argon", "argon2id" + | */ 'driver' => 'bcrypt', /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | */ 'bcrypt' => [ @@ -33,14 +33,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | */ 'argon' => [ diff --git a/config/logging.php b/config/logging.php index 6aa77fe..1780b16 100644 --- a/config/logging.php +++ b/config/logging.php @@ -7,31 +7,31 @@ use Monolog\Handler\SyslogUdpHandler; return [ /* - |-------------------------------------------------------------------------- - | Default Log Channel - |-------------------------------------------------------------------------- - | - | This option defines the default log channel that gets used when writing - | messages to the logs. The name specified in this option should match - | one of the channels defined in the "channels" configuration array. - | + |-------------------------------------------------------------------------- + | Default Log Channel + |-------------------------------------------------------------------------- + | + | This option defines the default log channel that gets used when writing + | messages to the logs. The name specified in this option should match + | one of the channels defined in the "channels" configuration array. + | */ 'default' => env('LOG_CHANNEL', 'stack'), /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | */ 'channels' => [ diff --git a/config/mail.php b/config/mail.php index 1231c5d..3d21f8c 100644 --- a/config/mail.php +++ b/config/mail.php @@ -3,14 +3,14 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Mailer - |-------------------------------------------------------------------------- - | - | This option controls the default mailer that is used to send any email - | messages sent by your application. Alternative mailers may be setup - | and used as needed; however, this mailer will be used by default. - | + |-------------------------------------------------------------------------- + | Default Mailer + |-------------------------------------------------------------------------- + | + | This option controls the default mailer that is used to send any email + | messages sent by your application. Alternative mailers may be setup + | and used as needed; however, this mailer will be used by default. + | */ 'default' => env('MAIL_MAILER', 'smtp'), @@ -19,21 +19,21 @@ return [ 'MAIL_ADMIN' => env('MAIL_ADMIN'), /* - |-------------------------------------------------------------------------- - | Mailer Configurations - |-------------------------------------------------------------------------- - | - | Here you may configure all of the mailers used by your application plus - | their respective settings. Several examples have been configured for - | you and you are free to add your own as your application requires. - | - | Laravel supports a variety of mail "transport" drivers to be used while - | sending an e-mail. You will specify which one you are using for your - | mailers below. You are free to add additional mailers as required. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", - | "postmark", "log", "array" - | + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" + | */ 'mailers' => [ @@ -76,14 +76,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all e-mails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. - | + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | */ 'from' => [ @@ -96,14 +96,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | */ 'markdown' => [ diff --git a/config/queue.php b/config/queue.php index 1222296..08e1704 100644 --- a/config/queue.php +++ b/config/queue.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Queue Connection Name - |-------------------------------------------------------------------------- - | - | Laravel's queue API supports an assortment of back-ends via a single - | API, giving you convenient access to each back-end using the same - | syntax for every one. Here you may define a default connection. - | + |-------------------------------------------------------------------------- + | Default Queue Connection Name + |-------------------------------------------------------------------------- + | + | Laravel's queue API supports an assortment of back-ends via a single + | API, giving you convenient access to each back-end using the same + | syntax for every one. Here you may define a default connection. + | */ 'default' => env('QUEUE_CONNECTION', 'sync'), /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" - | + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | */ 'connections' => [ @@ -70,14 +70,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. - | + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | */ 'failed' => [ diff --git a/config/services.php b/config/services.php index 2a1d616..915dfe7 100644 --- a/config/services.php +++ b/config/services.php @@ -3,15 +3,15 @@ return [ /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Mailgun, Postmark, AWS and more. This file provides the de facto - | location for this type of information, allowing packages to have - | a conventional file to locate the various service credentials. - | + |-------------------------------------------------------------------------- + | Third Party Services + |-------------------------------------------------------------------------- + | + | This file is for storing the credentials for third party services such + | as Mailgun, Postmark, AWS and more. This file provides the de facto + | location for this type of information, allowing packages to have + | a conventional file to locate the various service credentials. + | */ 'mailgun' => [ diff --git a/config/session.php b/config/session.php index c0e798b..13ef89b 100644 --- a/config/session.php +++ b/config/session.php @@ -5,30 +5,30 @@ use Illuminate\Support\Str; return [ /* - |-------------------------------------------------------------------------- - | Default Session Driver - |-------------------------------------------------------------------------- - | - | This option controls the default session "driver" that will be used on - | requests. By default, we will use the lightweight native driver but - | you may specify any of the other wonderful drivers provided here. - | - | Supported: "file", "cookie", "database", "apc", - | "memcached", "redis", "dynamodb", "array" - | + |-------------------------------------------------------------------------- + | Default Session Driver + |-------------------------------------------------------------------------- + | + | This option controls the default session "driver" that will be used on + | requests. By default, we will use the lightweight native driver but + | you may specify any of the other wonderful drivers provided here. + | + | Supported: "file", "cookie", "database", "apc", + | "memcached", "redis", "dynamodb", "array" + | */ 'driver' => env('SESSION_DRIVER', 'file'), /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. - | + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | */ 'lifetime' => env('SESSION_LIFETIME', 120), @@ -36,94 +36,94 @@ return [ 'expire_on_close' => false, /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. - | + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | */ 'encrypt' => false, /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | */ 'files' => storage_path('framework/sessions'), /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | */ 'connection' => env('SESSION_CONNECTION', null), /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | */ 'table' => 'sessions', /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | While using one of the framework's cache driven session backends you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - | Affects: "apc", "dynamodb", "memcached", "redis" - | + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | While using one of the framework's cache driven session backends you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". + | + | Affects: "apc", "dynamodb", "memcached", "redis" + | */ 'store' => env('SESSION_STORE', null), /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | */ 'lottery' => [2, 100], /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | */ 'cookie' => env( @@ -132,68 +132,68 @@ return [ ), /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | */ 'path' => '/', /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | */ 'domain' => env('SESSION_DOMAIN', null), /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. - | + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you if it can not be done securely. + | */ 'secure' => env('SESSION_SECURE_COOKIE'), /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | */ 'http_only' => true, /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | will set this value to "lax" since this is a secure default value. - | - | Supported: "lax", "strict", "none", null - | + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" since this is a secure default value. + | + | Supported: "lax", "strict", "none", null + | */ 'same_site' => 'lax', diff --git a/config/tickets.php b/config/tickets.php index 3e5600e..09ddda7 100644 --- a/config/tickets.php +++ b/config/tickets.php @@ -4,5 +4,6 @@ return [ 'workedHoursInAWeek' => 37, 'workedDaysInAWeek' => 5, 'workingDevsPerWeek' => 2, - 'avgTimeForTicket' => 0.95, // 0.95 heure + 'avgTimeForTicket' => 0.95, +// 0.95 heure ]; diff --git a/config/view.php b/config/view.php index 22b8a18..53008fd 100644 --- a/config/view.php +++ b/config/view.php @@ -3,14 +3,14 @@ return [ /* - |-------------------------------------------------------------------------- - | View Storage Paths - |-------------------------------------------------------------------------- - | - | Most templating systems load templates from disk. Here you may specify - | an array of paths that should be checked for your views. Of course - | the usual Laravel view path has already been registered for you. - | + |-------------------------------------------------------------------------- + | View Storage Paths + |-------------------------------------------------------------------------- + | + | Most templating systems load templates from disk. Here you may specify + | an array of paths that should be checked for your views. Of course + | the usual Laravel view path has already been registered for you. + | */ 'paths' => [ @@ -18,14 +18,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | */ 'compiled' => env( diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index af316d5..a7d2e31 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -8,7 +8,6 @@ use Illuminate\Support\Str; class UserFactory extends Factory { - /** * The name of the factory's corresponding model. * @@ -27,7 +26,8 @@ class UserFactory extends Factory 'name' => $this->faker->name, 'email' => $this->faker->unique()->safeEmail, 'email_verified_at' => now(), - 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', +// password 'remember_token' => Str::random(10), ]; } diff --git a/phpcs.xml b/phpcs.xml index 14acd89..d81492f 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,5 +1,7 @@ - + + Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/ app/ @@ -10,67 +12,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + + + + + + + + + + + + - + @@ -78,13 +91,39 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */database/migrations/* + diff --git a/routes/api.php b/routes/api.php index bcb8b18..ea9e286 100644 --- a/routes/api.php +++ b/routes/api.php @@ -4,14 +4,14 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; /* -|-------------------------------------------------------------------------- -| API Routes -|-------------------------------------------------------------------------- -| -| Here is where you can register API routes for your application. These -| routes are loaded by the RouteServiceProvider within a group which -| is assigned the "api" middleware group. Enjoy building your API! -| + |-------------------------------------------------------------------------- + | API Routes + |-------------------------------------------------------------------------- + | + | Here is where you can register API routes for your application. These + | routes are loaded by the RouteServiceProvider within a group which + | is assigned the "api" middleware group. Enjoy building your API! + | */ Route::middleware('auth:api')->get('/user', function (Request $request) { diff --git a/routes/channels.php b/routes/channels.php index 28b4539..b75e9e1 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -3,14 +3,14 @@ use Illuminate\Support\Facades\Broadcast; /* -|-------------------------------------------------------------------------- -| Broadcast Channels -|-------------------------------------------------------------------------- -| -| Here you may register all of the event broadcasting channels that your -| application supports. The given channel authorization callbacks are -| used to check if an authenticated user can listen to the channel. -| + |-------------------------------------------------------------------------- + | Broadcast Channels + |-------------------------------------------------------------------------- + | + | Here you may register all of the event broadcasting channels that your + | application supports. The given channel authorization callbacks are + | used to check if an authenticated user can listen to the channel. + | */ Broadcast::channel('App.Models.User.{id}', function ($user, $id) { diff --git a/routes/console.php b/routes/console.php index e05f4c9..e216465 100644 --- a/routes/console.php +++ b/routes/console.php @@ -4,14 +4,14 @@ use Illuminate\Foundation\Inspiring; use Illuminate\Support\Facades\Artisan; /* -|-------------------------------------------------------------------------- -| Console Routes -|-------------------------------------------------------------------------- -| -| This file is where you may define all of your Closure based console -| commands. Each Closure is bound to a command instance allowing a -| simple approach to interacting with each command's IO methods. -| + |-------------------------------------------------------------------------- + | Console Routes + |-------------------------------------------------------------------------- + | + | This file is where you may define all of your Closure based console + | commands. Each Closure is bound to a command instance allowing a + | simple approach to interacting with each command's IO methods. + | */ Artisan::command('inspire', function () { diff --git a/routes/web.php b/routes/web.php index dbb1dff..30ac968 100644 --- a/routes/web.php +++ b/routes/web.php @@ -12,14 +12,14 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; /* -|-------------------------------------------------------------------------- -| Web Routes -|-------------------------------------------------------------------------- -| -| Here is where you can register web routes for your application. These -| routes are loaded by the RouteServiceProvider within a group which -| contains the "web" middleware group. Now create something great! -| + |-------------------------------------------------------------------------- + | Web Routes + |-------------------------------------------------------------------------- + | + | Here is where you can register web routes for your application. These + | routes are loaded by the RouteServiceProvider within a group which + | contains the "web" middleware group. Now create something great! + | */ Route::get('/', [HomeController::class, 'home'])->middleware('guest')->name('home'); @@ -30,9 +30,12 @@ Route::middleware(['throttle:credentials'])->group(function () { 'login' => true, 'logout' => true, 'register' => false, - 'reset' => true, // for resetting passwords - 'confirm' => true, // for additional password confirmations - 'verify' => false, // for email verification + 'reset' => true, +// for resetting passwords + 'confirm' => true, +// for additional password confirmations + 'verify' => false, +// for email verification ]); });