From 53c23f3698ba9bc2f5bb2b687ba47eca730e6cb4 Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Wed, 21 Oct 2020 00:01:32 +0000 Subject: [PATCH 1/8] Changed branding for the repo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e7cbdb..50e85d4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Raspberry Teams - The Simple Staff Application Manager v 0.6.2 [![Crowdin](https://badges.crowdin.net/raspberry-staff-manager/localized.svg)](https://crowdin.com/project/raspberry-staff-manager) -## The quick and pain-free staff application manager +# RB Recruiter v 0.6.2 [![Crowdin](https://badges.crowdin.net/raspberry-staff-manager/localized.svg)](https://crowdin.com/project/raspberry-staff-manager) +## The quick and pain-free form management solution for communities Have you ever gotten tired of managing your Minecraft server/network's applications through Discord (or anything else) and having to scroll through hundreds of new messages just to find that one applicant's username? From 773ec570d95991d9deb54ad6dde0b652631d6d5d Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Wed, 21 Oct 2020 00:01:41 +0000 Subject: [PATCH 2/8] Apply fixes from StyleCI --- app/Application.php | 28 +- app/Appointment.php | 25 +- app/Ban.php | 25 +- app/Comment.php | 23 +- app/Console/Commands/CountVotes.php | 79 +++--- app/Console/Commands/Install.php | 159 ++++++------ app/Console/Commands/SetEnv.php | 43 +++- app/Console/Kernel.php | 21 +- app/CustomFacades/IP.php | 45 ++-- app/Events/ApplicationApprovedEvent.php | 25 +- app/Events/ApplicationDeniedEvent.php | 24 +- app/Events/NewApplicationEvent.php | 22 +- app/Events/UserBannedEvent.php | 30 ++- app/Exceptions/Handler.php | 19 ++ app/Facades/ContextAwareValidation.php | 30 ++- app/Facades/IP.php | 19 ++ app/Facades/Options.php | 21 +- app/Facades/UUID.php | 23 +- app/Form.php | 21 +- app/Helpers/ContextAwareValidator.php | 185 +++++++------- app/Helpers/Options.php | 61 +++-- .../Controllers/ApplicationController.php | 145 +++++------ .../Controllers/AppointmentController.php | 51 ++-- .../Auth/ConfirmPasswordController.php | 20 +- .../Auth/ForgotPasswordController.php | 19 ++ app/Http/Controllers/Auth/LoginController.php | 35 ++- .../Controllers/Auth/RegisterController.php | 33 ++- .../Auth/ResetPasswordController.php | 20 +- app/Http/Controllers/Auth/TwofaController.php | 26 +- .../Auth/VerificationController.php | 20 +- app/Http/Controllers/BanController.php | 61 ++--- app/Http/Controllers/CommentController.php | 42 +-- app/Http/Controllers/ContactController.php | 55 ++-- app/Http/Controllers/Controller.php | 19 ++ app/Http/Controllers/DashboardController.php | 38 ++- app/Http/Controllers/DevToolsController.php | 36 ++- app/Http/Controllers/FormController.php | 92 +++---- app/Http/Controllers/HomeController.php | 23 +- app/Http/Controllers/OptionsController.php | 102 ++++---- app/Http/Controllers/ProfileController.php | 78 +++--- app/Http/Controllers/ResponseController.php | 21 +- .../Controllers/StaffProfileController.php | 21 +- app/Http/Controllers/UserController.php | 241 ++++++++---------- app/Http/Controllers/VacancyController.php | 106 ++++---- app/Http/Controllers/VoteController.php | 27 +- app/Http/Kernel.php | 21 +- .../Middleware/ApplicationEligibility.php | 39 ++- app/Http/Middleware/Authenticate.php | 19 ++ app/Http/Middleware/Bancheck.php | 31 ++- .../Middleware/CheckForMaintenanceMode.php | 19 ++ app/Http/Middleware/EncryptCookies.php | 19 ++ app/Http/Middleware/ForceLogoutMiddleware.php | 23 +- .../Middleware/RedirectIfAuthenticated.php | 19 ++ app/Http/Middleware/TrimStrings.php | 19 ++ app/Http/Middleware/TrustProxies.php | 21 +- app/Http/Middleware/UsernameUUID.php | 40 ++- app/Http/Middleware/VerifyCsrfToken.php | 19 ++ app/Http/Requests/Add2FASecretRequest.php | 23 +- app/Http/Requests/BanUserRequest.php | 22 +- app/Http/Requests/ChangeEmailRequest.php | 21 +- app/Http/Requests/ChangePasswordRequest.php | 21 +- app/Http/Requests/DeleteUserRequest.php | 21 +- app/Http/Requests/FlushSessionsRequest.php | 21 +- app/Http/Requests/NewCommentRequest.php | 22 +- app/Http/Requests/ProfileSave.php | 22 +- app/Http/Requests/Remove2FASecretRequest.php | 21 +- app/Http/Requests/SaveNotesRequest.php | 21 +- app/Http/Requests/SearchPlayerRequest.php | 21 +- app/Http/Requests/UpdateUserRequest.php | 21 +- app/Http/Requests/VacancyEditRequest.php | 22 +- app/Http/Requests/VacancyRequest.php | 21 +- app/Http/Requests/VoteRequest.php | 21 +- app/Jobs/CleanBans.php | 47 ++-- app/Listeners/DenyUser.php | 24 +- app/Listeners/LogAuthenticationFailure.php | 26 +- app/Listeners/LogAuthenticationSuccess.php | 21 +- app/Listeners/OnUserBanned.php | 39 ++- app/Listeners/OnUserRegistration.php | 36 ++- app/Listeners/PromoteUser.php | 31 ++- app/Mail/NewContactSubmission.php | 20 +- app/Notifications/ApplicationApproved.php | 29 ++- app/Notifications/ApplicationDenied.php | 36 ++- app/Notifications/ApplicationMoved.php | 25 +- app/Notifications/AppointmentFinished.php | 21 +- app/Notifications/AppointmentScheduled.php | 31 ++- app/Notifications/ChangedPassword.php | 21 +- app/Notifications/EmailChanged.php | 21 +- app/Notifications/NewApplicant.php | 48 ++-- app/Notifications/NewComment.php | 30 ++- app/Notifications/NewContact.php | 35 ++- app/Notifications/NewUser.php | 58 +++-- app/Notifications/UserBanned.php | 29 ++- app/Notifications/VacancyClosed.php | 32 ++- app/Observers/ApplicationObserver.php | 33 ++- app/Observers/UserObserver.php | 30 ++- app/Observers/VacancyObserver.php | 20 +- app/Options.php | 21 +- app/Policies/ApplicationPolicy.php | 43 +++- app/Policies/AppointmentPolicy.php | 19 ++ app/Policies/BanPolicy.php | 24 +- app/Policies/CommentPolicy.php | 22 +- app/Policies/FormPolicy.php | 22 +- app/Policies/ProfilePolicy.php | 20 +- app/Policies/UserPolicy.php | 26 +- app/Policies/VacancyPolicy.php | 20 ++ app/Policies/VotePolicy.php | 19 ++ app/Profile.php | 23 +- app/Providers/AppServiceProvider.php | 21 +- app/Providers/AuthServiceProvider.php | 49 ++-- app/Providers/BroadcastServiceProvider.php | 19 ++ .../ContextAwareValidatorProvider.php | 30 ++- app/Providers/EventServiceProvider.php | 34 ++- app/Providers/IPInfoProvider.php | 25 +- app/Providers/MojangStatusProvider.php | 35 ++- app/Providers/OptionsProvider.php | 23 +- app/Providers/RouteServiceProvider.php | 19 ++ app/Providers/UUIDConversionProvider.php | 25 +- app/Response.php | 22 +- app/StaffProfile.php | 21 +- app/Traits/AuthenticatesTwoFactor.php | 56 ++-- app/Traits/Cancellable.php | 32 ++- app/UUID/UUID.php | 61 +++-- app/User.php | 34 ++- app/Vacancy.php | 58 +++-- app/View/Components/Alert.php | 20 +- app/View/Components/Card.php | 23 +- app/View/Components/Form.php | 24 +- app/View/Components/GlobalErrors.php | 19 ++ app/View/Components/Modal.php | 22 +- app/View/Components/NoPermission.php | 24 +- app/Vote.php | 21 +- bootstrap/app.php | 26 +- config/adminlte.php | 155 ++++++----- config/app.php | 24 +- config/auth.php | 19 ++ config/broadcasting.php | 19 ++ config/cache.php | 19 ++ config/cors.php | 19 ++ config/database.php | 19 ++ config/filesystems.php | 19 ++ config/general.php | 34 ++- config/google2fa.php | 21 +- config/hashing.php | 19 ++ config/laravellocalization.php | 21 +- config/log-viewer.php | 21 +- config/logging.php | 19 ++ config/mail.php | 19 ++ config/markdown.php | 18 +- config/notification.php | 27 +- config/permission.php | 19 ++ config/queue.php | 19 ++ config/recaptcha.php | 25 +- config/sentry.php | 19 ++ config/services.php | 19 ++ config/session.php | 19 ++ config/slack.php | 26 +- config/view.php | 19 ++ database/factories/UserFactory.php | 19 +- .../2014_10_12_000000_create_users_table.php | 19 ++ ...12_100000_create_password_resets_table.php | 19 ++ ..._08_19_000000_create_failed_jobs_table.php | 19 ++ ...020_04_29_022245_create_profiles_table.php | 21 +- ...04_29_022402_create_applications_table.php | 21 +- .../2020_04_29_022421_create_votes_table.php | 21 +- ...04_29_022442_create_appointments_table.php | 25 +- .../2020_04_29_022541_create_forms_table.php | 21 +- ...20_04_29_022542_create_vacancies_table.php | 20 +- ..._29_023647_create_staff_profiles_table.php | 19 ++ ...20_04_29_030107_create_responses_table.php | 20 +- ...020_04_29_195848_votes_has_application.php | 23 +- .../2020_05_02_223355_create_cache_table.php | 19 ++ ...0_05_07_021604_add_status_to_vacancies.php | 21 +- .../2020_05_08_024654_add_slug_to_vacancy.php | 19 ++ ...08_063141_add_vacancy_i_d_to_responses.php | 19 ++ ...14_004542_change_form_structure_length.php | 23 +- ..._05_29_234431_create_permission_tables.php | 23 +- .../2020_06_08_153602_create_bans_table.php | 20 +- ...020_06_20_210255_create_comments_table.php | 21 +- .../2020_06_25_093708_create_jobs_table.php | 19 ++ ...43_add_detailed_description_to_vacancy.php | 19 ++ ...07_17_053247_add_twofa_secret_to_users.php | 19 ++ ...2020_08_30_152900_create_options_table.php | 19 ++ database/seeds/DatabaseSeeder.php | 19 ++ database/seeds/DefaultOptionsSeeder.php | 21 +- database/seeds/NewPermissions.php | 23 +- database/seeds/PermissionSeeder.php | 34 ++- database/seeds/UserSeeder.php | 69 +++-- public/index.php | 20 +- resources/lang/en/auth.php | 19 ++ resources/lang/en/messages.php | 69 +++-- resources/lang/en/pagination.php | 19 ++ resources/lang/en/passwords.php | 19 ++ resources/lang/en/validation.php | 19 ++ resources/lang/es/auth.php | 19 ++ resources/lang/es/messages.php | 69 +++-- resources/lang/es/pagination.php | 19 ++ resources/lang/es/passwords.php | 19 ++ resources/lang/es/validation.php | 19 ++ resources/lang/fr/auth.php | 19 ++ resources/lang/fr/messages.php | 69 +++-- resources/lang/fr/pagination.php | 19 ++ resources/lang/fr/passwords.php | 19 ++ resources/lang/fr/validation.php | 19 ++ resources/lang/pt/auth.php | 19 ++ resources/lang/pt/messages.php | 77 +++--- resources/lang/pt/pagination.php | 19 ++ resources/lang/pt/passwords.php | 21 +- resources/lang/pt/validation.php | 19 ++ routes/api.php | 19 ++ routes/channels.php | 19 ++ routes/console.php | 19 ++ routes/web.php | 79 +++--- server.php | 20 +- tests/CreatesApplication.php | 19 ++ tests/Feature/ExampleTest.php | 20 +- tests/Feature/OptionsTest.php | 21 +- tests/TestCase.php | 19 ++ tests/Unit/ExampleTest.php | 19 ++ 218 files changed, 5137 insertions(+), 1672 deletions(-) diff --git a/app/Application.php b/app/Application.php index f1066d8..eae5c83 100644 --- a/app/Application.php +++ b/app/Application.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -10,13 +29,10 @@ class Application extends Model 'applicantUserID', 'applicantFormResponseID', - 'applicationStatus' + 'applicationStatus', ]; - - - public function user() { return $this->belongsTo('App\User', 'applicantUserID', 'id'); @@ -37,7 +53,6 @@ class Application extends Model return $this->belongsToMany('App\Vote', 'votes_has_application'); } - public function comments() { return $this->hasMany('App\Comment', 'applicationID', 'id'); @@ -46,8 +61,7 @@ class Application extends Model public function setStatus($status) { return $this->update([ - 'applicationStatus' => $status + 'applicationStatus' => $status, ]); - } } diff --git a/app/Appointment.php b/app/Appointment.php index d62e39a..a87c02f 100644 --- a/app/Appointment.php +++ b/app/Appointment.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -13,19 +32,19 @@ class Appointment extends Model 'appointmentStatus', 'appointmentLocation', 'meetingNotes', - 'userAccepted' + 'userAccepted', ]; public function application() { - // FIXME: Possible bug here, where laravel looks for the wrong column in the applications table. + // FIXME: Possible bug here, where laravel looks for the wrong column in the applications table. return $this->belongsTo('App\Application', 'id', 'applicationID'); } public function setStatus($status) { $this->update([ - 'appointmentStatus' => $status + 'appointmentStatus' => $status, ]); } } diff --git a/app/Ban.php b/app/Ban.php index c1a6e90..e08b336 100644 --- a/app/Ban.php +++ b/app/Ban.php @@ -1,29 +1,46 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; class Ban extends Model { - public $fillable = [ 'userID', 'reason', 'bannedUntil', 'userAgent', - 'authorUserID' + 'authorUserID', ]; public $dates = [ - 'bannedUntil' + 'bannedUntil', ]; public function user() { return $this->belongsTo('App\User', 'userID', 'id'); } - } diff --git a/app/Comment.php b/app/Comment.php index c8dc8cc..ea4092b 100644 --- a/app/Comment.php +++ b/app/Comment.php @@ -1,16 +1,34 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; class Comment extends Model { - protected $fillable = [ 'authorID', 'applicationID', - 'text' + 'text', ]; public function application() @@ -22,5 +40,4 @@ class Comment extends Model { return $this->belongsTo('App\User', 'authorID', 'id'); } - } diff --git a/app/Console/Commands/CountVotes.php b/app/Console/Commands/CountVotes.php index a2a7c6d..c15ce68 100644 --- a/app/Console/Commands/CountVotes.php +++ b/app/Console/Commands/CountVotes.php @@ -1,5 +1,24 @@ . + */ + namespace App\Console\Commands; use App\Application; @@ -43,28 +62,23 @@ class CountVotes extends Command $eligibleApps = Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get(); $pbar = $this->output->createProgressBar($eligibleApps->count()); - if($eligibleApps->isEmpty()) - { + if ($eligibleApps->isEmpty()) { $this->error('𐄂 There are no applications that need to be processed.'); return false; } - foreach ($eligibleApps as $application) - { + foreach ($eligibleApps as $application) { $votes = $application->votes; $voteCount = $application->votes->count(); $positiveVotes = 0; $negativeVotes = 0; - if ($voteCount > 5) - { - $this->info('Counting votes for application ID ' . $application->id); - foreach ($votes as $vote) - { - switch ($vote->allowedVoteType) - { + if ($voteCount > 5) { + $this->info('Counting votes for application ID '.$application->id); + foreach ($votes as $vote) { + switch ($vote->allowedVoteType) { case 'VOTE_APPROVE': $positiveVotes++; break; @@ -74,7 +88,7 @@ class CountVotes extends Command } } - $this->info('Total votes for application ID ' . $application->id . ': ' . $voteCount); + $this->info('Total votes for application ID '.$application->id.': '.$voteCount); $this->info('Calculating criteria...'); $negativeVotePercent = floor(($negativeVotes / $voteCount) * 100); $positiveVotePercent = floor(($positiveVotes / $voteCount) * 100); @@ -83,54 +97,43 @@ class CountVotes extends Command $this->table([ '% of approval votes', - '% of denial votes' + '% of denial votes', ], [ // array of arrays, e.g. rows [ - $positiveVotePercent . "%", - $negativeVotePercent . "%" - ] + $positiveVotePercent.'%', + $negativeVotePercent.'%', + ], ]); - if ($pollResult) - { - $this->info('✓ Dispatched promotion event for applicant ' . $application->user->name); - if (!$this->option('dryrun')) - { + if ($pollResult) { + $this->info('✓ Dispatched promotion event for applicant '.$application->user->name); + if (! $this->option('dryrun')) { $application->response->vacancy->vacancyCount -= 1; $application->response->vacancy->save(); event(new ApplicationApprovedEvent(Application::find($application->id))); - } - else - { + } else { $this->warn('Dry run: Event won\'t be dispatched'); } $pbar->advance(); - - } - else { - - if (!$this->option('dryrun')) - { + } else { + if (! $this->option('dryrun')) { event(new ApplicationDeniedEvent(Application::find($application->id))); - } - else { + } else { $this->warn('Dry run: Event won\'t be dispatched'); } $pbar->advance(); - $this->error('𐄂 Applicant ' . $application->user->name . ' does not meet vote criteria (Majority)'); + $this->error('𐄂 Applicant '.$application->user->name.' does not meet vote criteria (Majority)'); } + } else { + $this->warn('Application ID'.$application->id.' did not have enough votes for processing (min 5)'); } - else - { - $this->warn("Application ID" . $application->id . " did not have enough votes for processing (min 5)"); - } - } $pbar->finish(); + return true; } } diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index d7f81ae..18fb9a6 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -1,5 +1,24 @@ . + */ + namespace App\Console\Commands; use Illuminate\Console\Command; @@ -39,103 +58,89 @@ class Install extends Command public function handle() { $basePath = base_path(); - if (Storage::disk('local')->missing('INSTALLED')) - { + if (Storage::disk('local')->missing('INSTALLED')) { + $this->info('[!! Welcome to Rasberry Teams !!]'); + $this->info('>> Installing...'); + $this->call('down', [ + '--message' => 'Down for maintenance. We\'ll be right back!', + ]); + copy($basePath.'/.env.example', $basePath.'/.env'); + $this->call('key:generate'); - $this->info('[!! Welcome to Rasberry Teams !!]'); - $this->info('>> Installing...'); - $this->call('down', [ - '--message' => 'Down for maintenance. We\'ll be right back!' - ]); + $this->info('>> Installing and preparing dependencies. This may take a while, depending on your computer.'); - copy($basePath . '/.env.example', $basePath . '/.env'); - $this->call('key:generate'); + $npmOut = 0; + $npmMessages = []; - $this->info('>> Installing and preparing dependencies. This may take a while, depending on your computer.'); + $npmBuildOut = 0; + $npmBuildMessages = []; - $npmOut = 0; - $npmMessages = []; + exec('cd '.$basePath.' && npm install --silent', $npmBuildOut, $npmOut); + exec('cd '.$basePath.'&& npm run dev --silent', $npmBuildMessages, $npmBuildOut); - $npmBuildOut = 0; - $npmBuildMessages = []; + if ($npmOut !== 0 && $npmBuildOut !== 0) { + $this->error('[!] One or more errors have ocurred whilst attempting to install dependencies.'); + $this->error('[!] It is recommended to run this command again, and report a bug if it keeps happening.'); - exec('cd ' . $basePath . ' && npm install --silent', $npmBuildOut, $npmOut); - exec('cd ' . $basePath . '&& npm run dev --silent', $npmBuildMessages, $npmBuildOut); + return false; + } + $settings = []; - if($npmOut !== 0 && $npmBuildOut !== 0) - { - $this->error('[!] One or more errors have ocurred whilst attempting to install dependencies.'); - $this->error('[!] It is recommended to run this command again, and report a bug if it keeps happening.'); + $this->info('>> Configuring application - We\'re going to ask a few questions here!'); + do { + $this->info('== Database Settings (1/6) =='); - return false; - } + $settings['DB_USERNAME'] = $this->ask('Database username'); + $settings['DB_PASSWORD'] = $this->secret('Database password (Input won\'t be seen)'); + $settings['DB_DATABASE'] = $this->ask('Database name'); + $settings['DB_PORT'] = $this->ask('Database port'); + $settings['DB_HOST'] = $this->ask('Database hostname'); + $this->info('== Antispam Settings (2/6) (Recaptcha v2) =='); + $settings['RECAPTCHA_SITE_KEY'] = $this->ask('Site key'); + $settings['RECAPTCHA_PRIVATE_KEY'] = $this->ask('Private site key'); + $this->info('== IP Geolocation Settings (3/6) (refer to README.md) =='); + $settings['IPGEO_API_KEY'] = $this->ask('API Key'); - $settings = []; + $this->info('== Notification Settings (4/6) (Email) =='); + $settings['MAIL_USERNAME'] = $this->ask('SMTP Username'); + $settings['MAIL_PASSWORD'] = $this->secret('SMTP Password (Input won\'t be seen)'); + $settings['MAIL_PORT'] = $this->ask('SMTP Server Port'); + $settings['MAIL_HOST'] = $this->ask('SMTP Server Hostname'); + $settings['MAIL_FROM'] = $this->ask('E-mail address to send from: '); - $this->info('>> Configuring application - We\'re going to ask a few questions here!'); - do - { - $this->info('== Database Settings (1/6) =='); + $this->info('== Notification Settings (5/6) (Slack) =='); + $settings['SLACK_INTEGRATION_WEBHOOK'] = $this->ask('Integration webhook URL'); - $settings['DB_USERNAME'] = $this->ask('Database username'); - $settings['DB_PASSWORD'] = $this->secret('Database password (Input won\'t be seen)'); - $settings['DB_DATABASE'] = $this->ask('Database name'); - $settings['DB_PORT'] = $this->ask('Database port'); - $settings['DB_HOST'] = $this->ask('Database hostname'); + $this->info('== Web Settings (6/6) =='); + $settings['APP_URL'] = $this->ask('Application\'s URL (ex. https://where.you.installed.theapp.com): '); + $settings['APP_LOGO'] = $this->ask('App logo (Link to an image): '); + $settings['APP_SITEHOMEPAGE'] = $this->ask('Site homepage (appears in the main header): '); + } while (! $this->confirm('Are you sure you want to save these settings? You can always go back and try again.')); - $this->info('== Antispam Settings (2/6) (Recaptcha v2) =='); - $settings['RECAPTCHA_SITE_KEY'] = $this->ask('Site key'); - $settings['RECAPTCHA_PRIVATE_KEY'] = $this->ask('Private site key'); + foreach ($settings as $keyname => $value) { + $this->call('environment:modify', [ + 'key' => $keyname, + 'value' => $value, + ]); + } - $this->info('== IP Geolocation Settings (3/6) (refer to README.md) =='); - $settings['IPGEO_API_KEY'] = $this->ask('API Key'); + $this->info('>> Saved configuration settings!'); + $this->info('>> Preparing database...'); - $this->info('== Notification Settings (4/6) (Email) =='); - $settings['MAIL_USERNAME'] = $this->ask('SMTP Username'); - $settings['MAIL_PASSWORD'] = $this->secret('SMTP Password (Input won\'t be seen)'); - $settings['MAIL_PORT'] = $this->ask('SMTP Server Port'); - $settings['MAIL_HOST'] = $this->ask('SMTP Server Hostname'); - $settings['MAIL_FROM'] = $this->ask('E-mail address to send from: '); + $this->callSilent('config:cache'); + $this->call('migrate'); + $this->call('db:seed'); - $this->info('== Notification Settings (5/6) (Slack) =='); - $settings['SLACK_INTEGRATION_WEBHOOK'] = $this->ask('Integration webhook URL'); + touch($basePath.'/INSTALLED'); - $this->info('== Web Settings (6/6) =='); - $settings['APP_URL'] = $this->ask('Application\'s URL (ex. https://where.you.installed.theapp.com): '); - $settings['APP_LOGO'] = $this->ask('App logo (Link to an image): '); - $settings['APP_SITEHOMEPAGE'] = $this->ask('Site homepage (appears in the main header): '); - - - } while(!$this->confirm('Are you sure you want to save these settings? You can always go back and try again.')); - - foreach($settings as $keyname => $value) - { - $this->call('environment:modify', [ - 'key' => $keyname, - 'value' => $value - ]); - } - - $this->info('>> Saved configuration settings!'); - $this->info('>> Preparing database...'); - - $this->callSilent('config:cache'); - $this->call('migrate'); - $this->call('db:seed'); - - touch($basePath . '/INSTALLED'); - - $this->call('up'); - $this->info('>> All done! Visit ' . $basePath . ' to start using your brand new installation of Raspberry Teams!'); - - } - else - { - $this->error('[!] The application is already installed!'); + $this->call('up'); + $this->info('>> All done! Visit '.$basePath.' to start using your brand new installation of Raspberry Teams!'); + } else { + $this->error('[!] The application is already installed!'); } } } diff --git a/app/Console/Commands/SetEnv.php b/app/Console/Commands/SetEnv.php index 9125ffa..3c49403 100644 --- a/app/Console/Commands/SetEnv.php +++ b/app/Console/Commands/SetEnv.php @@ -1,9 +1,28 @@ . + */ + namespace App\Console\Commands; -use Illuminate\Console\Command; use GeoSot\EnvEditor\Facades\EnvEditor; +use Illuminate\Console\Command; class SetEnv extends Command { @@ -37,20 +56,16 @@ class SetEnv extends Command */ public function handle() { - $path = base_path('/.env'); - $key = $this->argument('key'); - $value = $this->argument('value'); + $path = base_path('/.env'); + $key = $this->argument('key'); + $value = $this->argument('value'); + if (file_exists($path)) { + EnvEditor::editKey($key, $value); + } else { + $this->error('Cannot update a file that doesn\'t exist! Please create .env first.'); - - if (file_exists($path)) - { - EnvEditor::editKey($key, $value); - } - else - { - $this->error('Cannot update a file that doesn\'t exist! Please create .env first.'); - return false; - } + return false; + } } } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index fdf4d00..28273ca 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -1,10 +1,29 @@ . + */ + namespace App\Console; +use App\Jobs\CleanBans; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; -use App\Jobs\CleanBans; class Kernel extends ConsoleKernel { diff --git a/app/CustomFacades/IP.php b/app/CustomFacades/IP.php index 2b04064..230ec83 100644 --- a/app/CustomFacades/IP.php +++ b/app/CustomFacades/IP.php @@ -1,5 +1,24 @@ . + */ + namespace App\CustomFacades; use Illuminate\Support\Facades\Cache; @@ -7,7 +26,6 @@ use Illuminate\Support\Facades\Http; class IP { - /** * Looks up information on a specified IP address. Caches results automatically. * @param string $IP IP address to lookup @@ -15,23 +33,18 @@ class IP */ public function lookup(string $IP): object { - - $params = [ - 'apiKey' => config('general.keys.ipapi.apikey'), - 'ip' => $IP - ]; - - // TODO: Maybe unwrap this? Methods are chained here - - return json_decode(Cache::remember($IP, 3600, function() use ($IP) - { - return Http::get(config('general.urls.ipapi.ipcheck'), [ + $params = [ 'apiKey' => config('general.keys.ipapi.apikey'), - 'ip' => $IP - ])->body(); - })); + 'ip' => $IP, + ]; + // TODO: Maybe unwrap this? Methods are chained here + return json_decode(Cache::remember($IP, 3600, function () use ($IP) { + return Http::get(config('general.urls.ipapi.ipcheck'), [ + 'apiKey' => config('general.keys.ipapi.apikey'), + 'ip' => $IP, + ])->body(); + })); } - } diff --git a/app/Events/ApplicationApprovedEvent.php b/app/Events/ApplicationApprovedEvent.php index 4bb005c..066d83c 100644 --- a/app/Events/ApplicationApprovedEvent.php +++ b/app/Events/ApplicationApprovedEvent.php @@ -1,13 +1,28 @@ . + */ + namespace App\Events; use App\Application; -use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PresenceChannel; -use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; @@ -26,6 +41,4 @@ class ApplicationApprovedEvent { $this->application = $application; } - - } diff --git a/app/Events/ApplicationDeniedEvent.php b/app/Events/ApplicationDeniedEvent.php index fb84a57..48951a3 100644 --- a/app/Events/ApplicationDeniedEvent.php +++ b/app/Events/ApplicationDeniedEvent.php @@ -1,13 +1,28 @@ . + */ + namespace App\Events; use App\Application; -use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PresenceChannel; -use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; @@ -26,5 +41,4 @@ class ApplicationDeniedEvent { $this->application = $application; } - } diff --git a/app/Events/NewApplicationEvent.php b/app/Events/NewApplicationEvent.php index bb67787..867ab50 100644 --- a/app/Events/NewApplicationEvent.php +++ b/app/Events/NewApplicationEvent.php @@ -1,12 +1,28 @@ . + */ + namespace App\Events; -use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; diff --git a/app/Events/UserBannedEvent.php b/app/Events/UserBannedEvent.php index 92addbf..05902ad 100644 --- a/app/Events/UserBannedEvent.php +++ b/app/Events/UserBannedEvent.php @@ -1,23 +1,36 @@ . + */ + namespace App\Events; -use Illuminate\Broadcasting\Channel; +use App\Ban; +use App\User; use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PresenceChannel; -use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -use App\User; -use App\Ban; - class UserBannedEvent { use Dispatchable, InteractsWithSockets, SerializesModels; - public $user; public $ban; @@ -32,5 +45,4 @@ class UserBannedEvent $this->user = $user; $this->ban = $ban; } - } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index ff35bfd..37c0edb 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -1,5 +1,24 @@ . + */ + namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; diff --git a/app/Facades/ContextAwareValidation.php b/app/Facades/ContextAwareValidation.php index 2771c77..41a6de8 100644 --- a/app/Facades/ContextAwareValidation.php +++ b/app/Facades/ContextAwareValidation.php @@ -1,14 +1,32 @@ . + */ + namespace App\Facades; use Illuminate\Support\Facades\Facade; class ContextAwareValidation extends Facade { - - protected static function getFacadeAccessor() - { - return 'contextAwareValidator'; - } - + protected static function getFacadeAccessor() + { + return 'contextAwareValidator'; + } } diff --git a/app/Facades/IP.php b/app/Facades/IP.php index b7301b8..0e438fb 100644 --- a/app/Facades/IP.php +++ b/app/Facades/IP.php @@ -1,5 +1,24 @@ . + */ + namespace App\Facades; use Illuminate\Support\Facades\Facade; diff --git a/app/Facades/Options.php b/app/Facades/Options.php index 6fbd4c0..71e9bfa 100644 --- a/app/Facades/Options.php +++ b/app/Facades/Options.php @@ -1,8 +1,27 @@ . + */ namespace App\Facades; -use \Illuminate\Support\Facades\Facade; + +use Illuminate\Support\Facades\Facade; class Options extends Facade { diff --git a/app/Facades/UUID.php b/app/Facades/UUID.php index 18699ee..b26e3a3 100644 --- a/app/Facades/UUID.php +++ b/app/Facades/UUID.php @@ -1,13 +1,32 @@ . + */ + namespace App\Facades; use Illuminate\Support\Facades\Facade; -class UUID extends Facade +class UUID extends Facade { protected static function getFacadeAccessor() { return 'uuidConversionFacade'; } -} \ No newline at end of file +} diff --git a/app/Form.php b/app/Form.php index dc64af2..80220fc 100644 --- a/app/Form.php +++ b/app/Form.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -10,7 +29,7 @@ class Form extends Model 'formName', 'formStructure', - 'formStatus' + 'formStatus', ]; diff --git a/app/Helpers/ContextAwareValidator.php b/app/Helpers/ContextAwareValidator.php index f2ffb55..6f59cb5 100644 --- a/app/Helpers/ContextAwareValidator.php +++ b/app/Helpers/ContextAwareValidator.php @@ -1,138 +1,141 @@ . + */ + namespace App\Helpers; -use Illuminate\Support\Facades\Validator; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\Validator; class ContextAwareValidator { - /** - * The excludedNames array will make the validator ignore any of these names when including names into the rules. - * @var array - */ + * The excludedNames array will make the validator ignore any of these names when including names into the rules. + * @var array + */ private $excludedNames = [ - '_token', - '_method', - 'formName' + '_token', + '_method', + 'formName', ]; - /** - * Utility wrapper for json_encode. - * - * @param array $value The array to be converted. - * @return string The JSON representation of $value - */ - private function encode(array $value) : string + * Utility wrapper for json_encode. + * + * @param array $value The array to be converted. + * @return string The JSON representation of $value + */ + private function encode(array $value): string { - return json_encode($value); + return json_encode($value); } /** - * The getValidator() method will take an array of fields from the request body, iterates through them, - * and dynamically adds validation rules for them. Depending on parameters, it may or may not generate - * a form structure for rendering purposes. - * - * This method is mostly meant by internal use by means of static proxies (Facades), in order to reduce code repetition; - * Using it outside it's directed scope may cause unexpected results; For instance, the method expects inputs to be in array format, e.g. myFieldNameID1[], - * myFieldNameID2[], and so on and so forth. - * - * This isn't checked by the code yet, but if you're implementing it this way in the HTML markup, make sure it's consistent (e.g. use a loop). - * - * P.S This method automatically ignores the CSRF token for validation. - * - * @param array $fields The request form fields - * @param bool $generateStructure Whether to incldue a JSON-ready form structure for rendering - * @param bool $includeFormName Whether to include formName in the list of validation rules - * @return Validator|Collection A validator instance you can use to check for validity, or a Collection with a validator and structure (validator, structure) - */ + * The getValidator() method will take an array of fields from the request body, iterates through them, + * and dynamically adds validation rules for them. Depending on parameters, it may or may not generate + * a form structure for rendering purposes. + * + * This method is mostly meant by internal use by means of static proxies (Facades), in order to reduce code repetition; + * Using it outside it's directed scope may cause unexpected results; For instance, the method expects inputs to be in array format, e.g. myFieldNameID1[], + * myFieldNameID2[], and so on and so forth. + * + * This isn't checked by the code yet, but if you're implementing it this way in the HTML markup, make sure it's consistent (e.g. use a loop). + * + * P.S This method automatically ignores the CSRF token for validation. + * + * @param array $fields The request form fields + * @param bool $generateStructure Whether to incldue a JSON-ready form structure for rendering + * @param bool $includeFormName Whether to include formName in the list of validation rules + * @return Validator|Collection A validator instance you can use to check for validity, or a Collection with a validator and structure (validator, structure) + */ public function getValidator(array $fields, bool $generateStructure = false, bool $includeFormName = false) { $formStructure = []; $validator = []; - if ($includeFormName) - { + if ($includeFormName) { $validator['formName'] = 'required|string|max:100'; - } + } - foreach ($fields as $fieldName => $field) - { - if(!in_array($fieldName, $this->excludedNames)) - { - $validator[$fieldName . ".0"] = 'required|string'; - $validator[$fieldName . ".1"] = 'required|string'; + foreach ($fields as $fieldName => $field) { + if (! in_array($fieldName, $this->excludedNames)) { + $validator[$fieldName.'.0'] = 'required|string'; + $validator[$fieldName.'.1'] = 'required|string'; - if ($generateStructure) - { + if ($generateStructure) { $formStructure['fields'][$fieldName]['title'] = $field[0]; $formStructure['fields'][$fieldName]['type'] = $field[1]; - } + } + } + } - } - } + $validatorInstance = Validator::make($fields, $validator); - $validatorInstance = Validator::make($fields, $validator); - - return ($generateStructure) ? + return ($generateStructure) ? collect([ - 'validator' => $validatorInstance, - 'structure' => $this->encode($formStructure) + 'validator' => $validatorInstance, + 'structure' => $this->encode($formStructure), ]) : $validatorInstance; - - } /** - * The getResponseValidator method is similar to the getValidator method; It basically takes - * an array of fields from a previous form (that probably went through the other method) and adds validation - * to the field names. - * - * Also generates the storable response structure if you tell it to. - * - * @param array $fields The received fields - * @param array $formStructure The form structure - You must supply this if you want the response structure - * @param bool $generateResponseStructure Whether to generate the response structure - * @return Validator|Collection A collection or a validator, depending on the args. Will return validatior if only fields are supplied. - */ + * The getResponseValidator method is similar to the getValidator method; It basically takes + * an array of fields from a previous form (that probably went through the other method) and adds validation + * to the field names. + * + * Also generates the storable response structure if you tell it to. + * + * @param array $fields The received fields + * @param array $formStructure The form structure - You must supply this if you want the response structure + * @param bool $generateResponseStructure Whether to generate the response structure + * @return Validator|Collection A collection or a validator, depending on the args. Will return validatior if only fields are supplied. + */ public function getResponseValidator(array $fields, array $formStructure = [], bool $generateResponseStructure = true) { + $responseStructure = []; + $validator = []; - $responseStructure = []; - $validator = []; + if (empty($formStructure) && $generateResponseStructure) { + throw new \InvalidArgumentException('Illegal combination of arguments supplied! Please check the method\'s documentation.'); + } - if (empty($formStructure) && $generateResponseStructure) - { - throw new \InvalidArgumentException('Illegal combination of arguments supplied! Please check the method\'s documentation.'); - } + foreach ($fields as $fieldName => $value) { + if (! in_array($fieldName, $this->excludedNames)) { + $validator[$fieldName] = 'required|string'; - foreach($fields as $fieldName => $value) - { - if(!in_array($fieldName, $this->excludedNames)) - { - $validator[$fieldName] = 'required|string'; + if ($generateResponseStructure) { + $responseStructure['responses'][$fieldName]['type'] = $formStructure['fields'][$fieldName]['type'] ?? 'Unavailable'; + $responseStructure['responses'][$fieldName]['title'] = $formStructure['fields'][$fieldName]['title']; + $responseStructure['responses'][$fieldName]['response'] = $value; + } + } + } - if ($generateResponseStructure) - { - $responseStructure['responses'][$fieldName]['type'] = $formStructure['fields'][$fieldName]['type'] ?? 'Unavailable'; - $responseStructure['responses'][$fieldName]['title'] = $formStructure['fields'][$fieldName]['title']; - $responseStructure['responses'][$fieldName]['response'] = $value; - } - } - } + $validatorInstance = Validator::make($fields, $validator); - $validatorInstance = Validator::make($fields, $validator); - - return ($generateResponseStructure) ? + return ($generateResponseStructure) ? collect([ - 'validator' => $validatorInstance, - 'responseStructure' => $this->encode($responseStructure) + 'validator' => $validatorInstance, + 'responseStructure' => $this->encode($responseStructure), ]) : $validatorInstance; - } - } diff --git a/app/Helpers/Options.php b/app/Helpers/Options.php index 13c416d..925d910 100644 --- a/app/Helpers/Options.php +++ b/app/Helpers/Options.php @@ -1,5 +1,23 @@ . + */ namespace App\Helpers; @@ -9,20 +27,18 @@ use Illuminate\Support\Facades\Log; class Options { - public function getOption(string $option): string { $value = Cache::get($option); - if (is_null($value)) - { - Log::debug('Option ' . $option . 'not found in cache, refreshing from database'); + if (is_null($value)) { + Log::debug('Option '.$option.'not found in cache, refreshing from database'); $value = Option::where('option_name', $option)->first(); - if (is_null($value)) + if (is_null($value)) { throw new \Exception('This option does not exist.'); - + } Cache::put($option, $value); - Cache::put($option . '_desc', 'Undefined description'); + Cache::put($option.'_desc', 'Undefined description'); } return $value->option_value; @@ -30,14 +46,14 @@ class Options public function setOption(string $option, string $value, string $description) { - Option::create([ - 'option_name' => $option, - 'option_value' => $value, - 'friendly_name' => $description - ]); + Option::create([ + 'option_name' => $option, + 'option_value' => $value, + 'friendly_name' => $description, + ]); - Cache::put($option, $value, now()->addDay()); - Cache::put($option . '_desc', $description, now()->addDay()); + Cache::put($option, $value, now()->addDay()); + Cache::put($option.'_desc', $description, now()->addDay()); } public function pullOption($option): array @@ -48,7 +64,7 @@ class Options // putMany is overkill here return [ Cache::pull($option), - Cache::pull($option . '_desc') + Cache::pull($option.'_desc'), ]; } @@ -56,14 +72,13 @@ class Options { $dbOption = Option::where('option_name', $option); - if ($dbOption->first()) - { + if ($dbOption->first()) { $dbOptionInstance = Option::find($dbOption->first()->id); Cache::forget($option); Log::debug('Changing db configuration option', [ 'old_value' => $dbOptionInstance->option_value, - 'new_value' => $newValue + 'new_value' => $newValue, ]); $dbOptionInstance->option_value = $newValue; @@ -71,24 +86,20 @@ class Options Log::debug('New db configuration option saved', [ - 'option' => $dbOptionInstance->option_value + 'option' => $dbOptionInstance->option_value, ]); Cache::put('option_name', $newValue, now()->addDay()); - } - else - { + } else { throw new \Exception('This option does not exist.'); } } - public function optionExists(string $option): bool { $dbOption = Option::where('option_name', $option)->first(); $locallyCachedOption = Cache::get($option); - return !is_null($dbOption) || !is_null($locallyCachedOption); + return ! is_null($dbOption) || ! is_null($locallyCachedOption); } - } diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index bcedc0a..2102759 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -1,36 +1,46 @@ . + */ + namespace App\Http\Controllers; use App\Application; - -use App\Response; -use App\Vacancy; -use App\User; - use App\Events\ApplicationDeniedEvent; -use App\Notifications\NewApplicant; use App\Notifications\ApplicationMoved; - +use App\Notifications\NewApplicant; +use App\Response; +use App\User; +use App\Vacancy; +use ContextAwareValidator; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Validator; -use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; -use ContextAwareValidator; - class ApplicationController extends Controller { - private function canVote($votes) { $allvotes = collect([]); - foreach ($votes as $vote) - { - if ($vote->userID == Auth::user()->id) - { + foreach ($votes as $vote) { + if ($vote->userID == Auth::user()->id) { $allvotes->push($vote); } } @@ -38,22 +48,17 @@ class ApplicationController extends Controller return ($allvotes->count() == 1) ? false : true; } - - public function showUserApps() { - return view('dashboard.user.applications') ->with('applications', Auth::user()->applications); } - public function showUserApp(Request $request, Application $application) { $this->authorize('view', $application); - if (!is_null($application)) - { + if (! is_null($application)) { return view('dashboard.user.viewapp') ->with( [ @@ -62,20 +67,16 @@ class ApplicationController extends Controller 'structuredResponses' => json_decode($application->response->responseData, true), 'formStructure' => $application->response->form, 'vacancy' => $application->response->vacancy, - 'canVote' => $this->canVote($application->votes) + 'canVote' => $this->canVote($application->votes), ] ); - } - else - { + } else { $request->session()->flash('error', 'The application you requested could not be found.'); } return redirect()->back(); } - - public function showAllApps() { $this->authorize('viewAny', Application::class); @@ -84,7 +85,6 @@ class ApplicationController extends Controller ->with('applications', Application::paginate(6)); } - public function showAllPendingApps() { $this->authorize('viewAny', Application::class); @@ -93,7 +93,6 @@ class ApplicationController extends Controller ->with('applications', Application::where('applicationStatus', 'STAGE_SUBMITTED')->get()); } - public function showPendingInterview() { $this->authorize('viewAny', Application::class); @@ -103,16 +102,12 @@ class ApplicationController extends Controller $pendingInterviews = collect([]); $upcomingInterviews = collect([]); - - foreach ($applications as $application) - { - if (!is_null($application->appointment) && $application->appointment->appointmentStatus == 'CONCLUDED') - { - $count =+ 1; + foreach ($applications as $application) { + if (! is_null($application->appointment) && $application->appointment->appointmentStatus == 'CONCLUDED') { + $count = +1; } - switch ($application->applicationStatus) - { + switch ($application->applicationStatus) { case 'STAGE_INTERVIEW': $upcomingInterviews->push($application); @@ -123,29 +118,24 @@ class ApplicationController extends Controller break; } - } return view('dashboard.appmanagement.interview') ->with([ 'finishedCount' => $count, 'applications' => $pendingInterviews, - 'upcomingApplications' => $upcomingInterviews + 'upcomingApplications' => $upcomingInterviews, ]); } - - public function showPeerReview() { $this->authorize('viewAny', Application::class); + return view('dashboard.appmanagement.peerreview') ->with('applications', Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()); - } - - public function renderApplicationForm(Request $request, $vacancySlug) { // FIXME: Get rid of references to first(), this is a wonky query @@ -153,36 +143,27 @@ class ApplicationController extends Controller $firstVacancy = $vacancyWithForm->first(); - if (!$vacancyWithForm->isEmpty() && $firstVacancy->vacancyCount !== 0 && $firstVacancy->vacancyStatus == 'OPEN') - { - + if (! $vacancyWithForm->isEmpty() && $firstVacancy->vacancyCount !== 0 && $firstVacancy->vacancyStatus == 'OPEN') { return view('dashboard.application-rendering.apply') ->with([ 'vacancy' => $vacancyWithForm->first(), - 'preprocessedForm' => json_decode($vacancyWithForm->first()->forms->formStructure, true) + 'preprocessedForm' => json_decode($vacancyWithForm->first()->forms->formStructure, true), ]); - } - else - { + } else { abort(404, 'The application you\'re looking for could not be found or it is currently unavailable.'); } - } - - public function saveApplicationAnswers(Request $request, $vacancySlug) { $vacancy = Vacancy::with('forms')->where('vacancySlug', $vacancySlug)->get(); - if ($vacancy->first()->vacancyCount == 0 || $vacancy->first()->vacancyStatus !== 'OPEN') - { - - $request->session()->flash('error', 'This application is unavailable.'); - return redirect()->back(); + if ($vacancy->first()->vacancyCount == 0 || $vacancy->first()->vacancyStatus !== 'OPEN') { + $request->session()->flash('error', 'This application is unavailable.'); + return redirect()->back(); } Log::info('Processing new application!'); @@ -192,15 +173,14 @@ class ApplicationController extends Controller Log::info('Built response & validator structure!'); - if (!$responseValidation->get('validator')->fails()) - { + if (! $responseValidation->get('validator')->fails()) { $response = Response::create([ 'responseFormID' => $vacancy->first()->forms->id, 'associatedVacancyID' => $vacancy->first()->id, // Since a form can be used by multiple vacancies, we can only know which specific vacancy this response ties to by using a vacancy ID - 'responseData' => $responseValidation->get('responseStructure') + 'responseData' => $responseValidation->get('responseStructure'), ]); - Log::info('Registered form response for user ' . Auth::user()->name . ' for vacancy ' . $vacancy->first()->vacancyName); + Log::info('Registered form response for user '.Auth::user()->name.' for vacancy '.$vacancy->first()->vacancyName); $application = Application::create([ 'applicantUserID' => Auth::user()->id, @@ -208,24 +188,20 @@ class ApplicationController extends Controller 'applicationStatus' => 'STAGE_SUBMITTED', ]); - Log::info('Submitted application for user ' . Auth::user()->name . ' with response ID' . $response->id); + Log::info('Submitted application for user '.Auth::user()->name.' with response ID'.$response->id); - foreach(User::all() as $user) - { - if ($user->hasRole('admin')) - { - $user->notify((new NewApplicant($application, $vacancy->first()))->delay(now()->addSeconds(10))); - } + foreach (User::all() as $user) { + if ($user->hasRole('admin')) { + $user->notify((new NewApplicant($application, $vacancy->first()))->delay(now()->addSeconds(10))); + } } $request->session()->flash('success', 'Thank you for your application! It will be reviewed as soon as possible.'); - return redirect()->to(route('showUserApps')); - } - else - { - Log::warning('Application form for ' . Auth::user()->name . ' contained errors, resetting!'); - $request->session()->flash('error', 'There are one or more errors in your application. Please make sure none of your fields are empty, since they are all required.'); + return redirect()->to(route('showUserApps')); + } else { + Log::warning('Application form for '.Auth::user()->name.' contained errors, resetting!'); + $request->session()->flash('error', 'There are one or more errors in your application. Please make sure none of your fields are empty, since they are all required.'); } return redirect()->back(); @@ -235,15 +211,14 @@ class ApplicationController extends Controller { $this->authorize('update', Application::class); - switch ($newStatus) - { + switch ($newStatus) { case 'deny': event(new ApplicationDeniedEvent($application)); break; case 'interview': - Log::info('User ' . Auth::user()->name . ' has moved application ID ' . $application->id . 'to interview stage'); + Log::info('User '.Auth::user()->name.' has moved application ID '.$application->id.'to interview stage'); $request->session()->flash('success', 'Application moved to interview stage! (:'); $application->setStatus('STAGE_INTERVIEW'); @@ -259,13 +234,11 @@ class ApplicationController extends Controller public function delete(Request $request, Application $application) { + $this->authorize('delete', $application); + $application->delete(); // observers will run, cleaning it up - $this->authorize('delete', $application); - $application->delete(); // observers will run, cleaning it up - - $request->session()->flash('success', 'Application deleted. Comments, appointments and responses have also been deleted.'); - return redirect()->back(); + $request->session()->flash('success', 'Application deleted. Comments, appointments and responses have also been deleted.'); + return redirect()->back(); } - } diff --git a/app/Http/Controllers/AppointmentController.php b/app/Http/Controllers/AppointmentController.php index 8ed2722..3931995 100644 --- a/app/Http/Controllers/AppointmentController.php +++ b/app/Http/Controllers/AppointmentController.php @@ -1,14 +1,33 @@ . + */ + namespace App\Http\Controllers; use App\Application; -use App\Http\Requests\SaveNotesRequest; -use Carbon\Carbon; -use Illuminate\Http\Request; use App\Appointment; +use App\Http\Requests\SaveNotesRequest; use App\Notifications\ApplicationMoved; use App\Notifications\AppointmentScheduled; +use Carbon\Carbon; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; @@ -20,7 +39,7 @@ class AppointmentController extends Controller 'DISCORD', 'SKYPE', 'MEET', - 'TEAMSPEAK' + 'TEAMSPEAK', ]; @@ -37,26 +56,24 @@ class AppointmentController extends Controller ]); $application->setStatus('STAGE_INTERVIEW_SCHEDULED'); - - Log::info('User ' . Auth::user()->name . ' has scheduled an appointment with ' . $application->user->name . ' for application ID' . $application->id, [ + Log::info('User '.Auth::user()->name.' has scheduled an appointment with '.$application->user->name.' for application ID'.$application->id, [ 'datetime' => $appointmentDate->toDateTimeString(), - 'scheduled' => now() + 'scheduled' => now(), ]); $application->user->notify(new AppointmentScheduled($appointment)); - $request->session()->flash('success', 'Appointment successfully scheduled @ ' . $appointmentDate->toDateTimeString()); - + $request->session()->flash('success', 'Appointment successfully scheduled @ '.$appointmentDate->toDateTimeString()); return redirect()->back(); } public function updateAppointment(Request $request, Application $application, $status) { - $this->authorize('update', $application->appointment); + $this->authorize('update', $application->appointment); $validStatuses = [ - 'SCHEDULED', - 'CONCLUDED' + 'SCHEDULED', + 'CONCLUDED', ]; // NOTE: This is a little confusing, refactor @@ -66,29 +83,25 @@ class AppointmentController extends Controller $application->setStatus('STAGE_PEERAPPROVAL'); $application->user->notify(new ApplicationMoved()); - $request->session()->flash('success', 'Interview finished! Staff members can now vote on it.'); + return redirect()->back(); } // also updates public function saveNotes(SaveNotesRequest $request, Application $application) { - if (!is_null($application)) - { + if (! is_null($application)) { $application->load('appointment'); $application->appointment->meetingNotes = $request->noteText; $application->appointment->save(); $request->session()->flash('success', 'Meeting notes have been saved.'); - } - else - { + } else { $request->session()->flash('error', 'There\'s no appointment to save notes to!'); } return redirect()->back(); } - } diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php index 71a9592..10760cc 100644 --- a/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -1,9 +1,27 @@ . + */ + namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\ConfirmsPasswords; class ConfirmPasswordController extends Controller diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 465c39c..2ddd570 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 47413e2..a762270 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -1,10 +1,28 @@ . + */ + namespace App\Http\Controllers\Auth; -use App\User; use App\Http\Controllers\Controller; -use App\Providers\RouteServiceProvider; +use App\User; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; @@ -48,22 +66,15 @@ class LoginController extends Controller { $user = User::where('email', $request->email)->first(); - if ($user) - { + if ($user) { $isBanned = $user->isBanned(); - if ($isBanned) - { + if ($isBanned) { return false; - } - else - { + } else { return $this->originalAttemptLogin($request); } } return $this->originalAttemptLogin($request); - } - - } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index c6b3364..2b9d69f 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -1,15 +1,32 @@ . + */ + namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\Profile; -use App\Providers\RouteServiceProvider; use App\User; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; -use function GuzzleHttp\Psr7\str; class RegisterController extends Controller { @@ -47,10 +64,8 @@ class RegisterController extends Controller { $users = User::where('originalIP', \request()->ip())->get(); - foreach($users as $user) - { - if ($user && $user->isBanned()) - { + foreach ($users as $user) { + if ($user && $user->isBanned()) { abort(403, 'You do not have permission to access this page.'); } } @@ -72,7 +87,7 @@ class RegisterController extends Controller 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required', 'string', 'min:10', 'confirmed', 'regex:/^.*(?=.{3,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\x])(?=.*[!$#%]).*$/'], ], [ - 'uuid.required' => 'Please enter a valid (and Premium) Minecraft username! We do not support cracked users.' + 'uuid.required' => 'Please enter a valid (and Premium) Minecraft username! We do not support cracked users.', ]); } @@ -84,19 +99,19 @@ class RegisterController extends Controller */ protected function create(array $data) { - $user = User::create([ 'uuid' => $data['uuid'], 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), - 'originalIP' => request()->ip() + 'originalIP' => request()->ip(), ]); // It's not the registration controller's concern to create a profile for the user, // so this code has been moved to it's respective observer, following the separation of concerns pattern. $user->assignRole('user'); + return $user; } } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 6c0c13a..bbf75a7 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -1,9 +1,27 @@ . + */ + namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\ResetsPasswords; class ResetPasswordController extends Controller diff --git a/app/Http/Controllers/Auth/TwofaController.php b/app/Http/Controllers/Auth/TwofaController.php index a3ecac9..d8bad0e 100644 --- a/app/Http/Controllers/Auth/TwofaController.php +++ b/app/Http/Controllers/Auth/TwofaController.php @@ -1,16 +1,32 @@ . + */ + namespace App\Http\Controllers\Auth; -use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Traits\AuthenticatesTwoFactor; class TwofaController extends Controller { - use AuthenticatesTwoFactor; - - - protected $redirectTo = '/dashboard'; + use AuthenticatesTwoFactor; + protected $redirectTo = '/dashboard'; } diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 482a167..74be54b 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -1,9 +1,27 @@ . + */ + namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\VerifiesEmails; class VerificationController extends Controller diff --git a/app/Http/Controllers/BanController.php b/app/Http/Controllers/BanController.php index 3ae2a42..f472910 100644 --- a/app/Http/Controllers/BanController.php +++ b/app/Http/Controllers/BanController.php @@ -1,35 +1,48 @@ . + */ + namespace App\Http\Controllers; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Auth; use App\Ban; -use App\User; use App\Events\UserBannedEvent; use App\Http\Requests\BanUserRequest; +use App\User; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; class BanController extends Controller { - public function insert(BanUserRequest $request, User $user) { - $this->authorize('create', [Ban::class, $user]); - if (is_null($user->bans)) - { - + if (is_null($user->bans)) { $reason = $request->reason; $duration = strtolower($request->durationOperator); $durationOperand = $request->durationOperand; $expiryDate = now(); - if (!empty($duration)) - { - switch($duration) - { + if (! empty($duration)) { + switch ($duration) { case 'days': $expiryDate->addDays($durationOperand); break; @@ -46,9 +59,7 @@ class BanController extends Controller $expiryDate->addYears($durationOperand); break; } - } - else - { + } else { // Essentially permanent $expiryDate->addYears(5); } @@ -57,35 +68,27 @@ class BanController extends Controller 'userID' => $user->id, 'reason' => $reason, 'bannedUntil' => $expiryDate->format('Y-m-d H:i:s'), - 'userAgent' => "Unknown", - 'authorUserID' => Auth::user()->id + 'userAgent' => 'Unknown', + 'authorUserID' => Auth::user()->id, ]); event(new UserBannedEvent($user, $ban)); - $request->session()->flash('success', 'User banned successfully! Ban ID: #' . $ban->id); - - } - else - { + $request->session()->flash('success', 'User banned successfully! Ban ID: #'.$ban->id); + } else { $request->session()->flash('error', 'User already banned!'); } return redirect()->back(); } - public function delete(Request $request, User $user) { - $this->authorize('delete', $user->bans); - if (!is_null($user->bans)) - { + if (! is_null($user->bans)) { $user->bans->delete(); $request->session()->flash('success', 'User unbanned successfully!'); - } - else - { + } else { $request->session()->flash('error', 'This user isn\'t banned!'); } diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 09d2aa2..3f7fc11 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -1,19 +1,34 @@ . + */ + namespace App\Http\Controllers; +use App\Application; +use App\Comment; +use App\Http\Requests\NewCommentRequest; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use App\Http\Requests\NewCommentRequest; - -use App\Comment; -use App\Application; -use App\Notifications\NewComment; -use App\User; class CommentController extends Controller { - public function index() { // @@ -26,21 +41,16 @@ class CommentController extends Controller $comment = Comment::create([ 'authorID' => Auth::user()->id, 'applicationID' => $application->id, - 'text' => $request->comment + 'text' => $request->comment, ]); - if ($comment) - { - + if ($comment) { $request->session()->flash('success', 'Comment posted! (:'); - } - else - { + } else { $request->session()->flash('error', 'Something went wrong while posting your comment!'); } return redirect()->back(); - } public function delete(Request $request, Comment $comment) @@ -51,7 +61,5 @@ class CommentController extends Controller $request->session()->flash('success', 'Comment deleted!'); return redirect()->back(); - } - } diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 7a2923f..c2cb2ef 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -1,26 +1,40 @@ . + */ + namespace App\Http\Controllers; -use Illuminate\Http\Request; -use GuzzleHttp; use App\Notifications\NewContact; -use Illuminate\Support\Facades\Http; - use App\User; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Http; class ContactController extends Controller { - protected $users; - public function __construct(User $users) { $this->users = $users; } - public function create(Request $request) { $name = $request->name; @@ -34,32 +48,29 @@ class ContactController extends Controller $verifyrequest = Http::asForm()->post(config('recaptcha.verify.apiurl'), [ 'secret' => config('recaptcha.keys.secret'), 'response' => $challenge, - 'remoteip' => $request->ip() + 'remoteip' => $request->ip(), ]); - $response = json_decode($verifyrequest->getBody(), true); - if (!$response['success']) - { + if (! $response['success']) { $request->session()->flash('error', 'Beep beep boop... Robot? Submission failed.'); + return redirect()->back(); } - - foreach(User::all() as $user) - { - if ($user->hasRole('admin')) - { - $user->notify(new NewContact(collect([ - 'message' => $msg, - 'ip' => $request->ip(), - 'email' => $email - ]))); - } + foreach (User::all() as $user) { + if ($user->hasRole('admin')) { + $user->notify(new NewContact(collect([ + 'message' => $msg, + 'ip' => $request->ip(), + 'email' => $email, + ]))); + } } $request->session()->flash('success', 'Message sent successfully! We usually respond within 48 hours.'); + return redirect()->back(); } } diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a0a2a8a..5f92f69 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Controllers; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index d397d89..573ae61 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -1,16 +1,32 @@ . + */ + namespace App\Http\Controllers; -use Illuminate\Http\Request; -use App\Vacancy; -use App\User; -use App\Ban; use App\Application; +use App\User; +use App\Vacancy; class DashboardController extends Controller { - public function index() { $totalPeerReview = Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()->count(); @@ -19,13 +35,11 @@ class DashboardController extends Controller return view('dashboard.dashboard') ->with([ - 'vacancies' => Vacancy::all(), - 'totalUserCount' => User::all()->count(), - 'totalDenied' => $totalDenied, - 'totalPeerReview' => $totalPeerReview, - 'totalNewApplications' => $totalNewApplications + 'vacancies' => Vacancy::all(), + 'totalUserCount' => User::all()->count(), + 'totalDenied' => $totalDenied, + 'totalPeerReview' => $totalPeerReview, + 'totalNewApplications' => $totalNewApplications, ]); - } - } diff --git a/app/Http/Controllers/DevToolsController.php b/app/Http/Controllers/DevToolsController.php index 5c82d26..1749ed5 100644 --- a/app/Http/Controllers/DevToolsController.php +++ b/app/Http/Controllers/DevToolsController.php @@ -1,28 +1,45 @@ . + */ + namespace App\Http\Controllers; use App\Application; use App\Events\ApplicationApprovedEvent; use Illuminate\Http\Request; - use Illuminate\Support\Facades\Auth; class DevToolsController extends Controller { - // The use case for Laravel's gate and/or validation Requests is so tiny here that a full-blown policy would be overkill. protected function isolatedAuthorise() { - if (!Auth::user()->can('admin.developertools.use')) - { - abort(403, 'You\'re not authorized to access this page.'); - } + if (! Auth::user()->can('admin.developertools.use')) { + abort(403, 'You\'re not authorized to access this page.'); + } } public function index() { $this->isolatedAuthorise(); + return view('dashboard.administration.devtools') ->with('applications', Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()); } @@ -32,14 +49,11 @@ class DevToolsController extends Controller $this->isolatedAuthorise(); $application = Application::find($request->application); - if (!is_null($application)) - { + if (! is_null($application)) { event(new ApplicationApprovedEvent($application)); $request->session()->flash('success', 'Event dispatched! Please check the debug logs for more info'); - } - else - { + } else { $request->session()->flash('error', 'Application doesn\'t exist!'); } diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php index 27d40dd..dbd09f6 100644 --- a/app/Http/Controllers/FormController.php +++ b/app/Http/Controllers/FormController.php @@ -1,17 +1,32 @@ . + */ + namespace App\Http\Controllers; use App\Form; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Validator; -use Illuminate\Support\Facades\Auth; - use ContextAwareValidator; +use Illuminate\Http\Request; class FormController extends Controller { - public function index() { $forms = Form::all(); @@ -24,34 +39,35 @@ class FormController extends Controller public function showFormBuilder() { $this->authorize('viewFormbuilder', Form::class); + return view('dashboard.administration.formbuilder'); } public function saveForm(Request $request) { - $this->authorize('create', Form::class); $fields = $request->all(); $contextValidation = ContextAwareValidator::getValidator($fields, true, true); - if (!$contextValidation->get('validator')->fails()) - { + if (! $contextValidation->get('validator')->fails()) { $storableFormStructure = $contextValidation->get('structure'); Form::create( [ 'formName' => $fields['formName'], 'formStructure' => $storableFormStructure, - 'formStatus' => 'ACTIVE' + 'formStatus' => 'ACTIVE', ] ); $request->session()->flash('success', 'Form created! You can now link this form to a vacancy.'); + return redirect()->to(route('showForms')); } $request->session()->flash('errors', $contextValidation->get('validator')->errors()->getMessages()); + return redirect()->back(); } @@ -60,25 +76,19 @@ class FormController extends Controller $this->authorize('delete', $form); $deletable = true; - - if (!is_null($form) && !is_null($form->vacancies) && $form->vacancies->count() !== 0 || !is_null($form->responses)) - { - $deletable = false; + if (! is_null($form) && ! is_null($form->vacancies) && $form->vacancies->count() !== 0 || ! is_null($form->responses)) { + $deletable = false; } - if ($deletable) - { - $form->delete(); + if ($deletable) { + $form->delete(); - $request->session()->flash('success', 'Form deleted successfully.'); - } - else - { - $request->session()->flash('error', 'You cannot delete this form because it\'s tied to one or more applications and ranks, or because it doesn\'t exist.'); + $request->session()->flash('success', 'Form deleted successfully.'); + } else { + $request->session()->flash('error', 'You cannot delete this form because it\'s tied to one or more applications and ranks, or because it doesn\'t exist.'); } return redirect()->back(); - } public function preview(Request $request, Form $form) @@ -93,9 +103,9 @@ class FormController extends Controller public function edit(Request $request, Form $form) { - $this->authorize('update', $form); + $this->authorize('update', $form); - return view('dashboard.administration.editform') + return view('dashboard.administration.editform') ->with('formStructure', json_decode($form->formStructure, true)) ->with('title', $form->formName) ->with('formID', $form->id); @@ -103,29 +113,23 @@ class FormController extends Controller public function update(Request $request, Form $form) { - $this->authorize('update', $form); + $this->authorize('update', $form); - $contextValidation = ContextAwareValidator::getValidator($request->all(), true); - $this->authorize('update', $form); + $contextValidation = ContextAwareValidator::getValidator($request->all(), true); + $this->authorize('update', $form); + if (! $contextValidation->get('validator')->fails()) { + // Add the new structure into the form. New, subsquent fields will be identified by the "new" prefix + // This prefix doesn't actually change the app's behavior when it receives applications. + // Additionally, old applications won't of course display new and updated fields, because we can't travel into the past and get data for them + $form->formStructure = $contextValidation->get('structure'); + $form->save(); - if (!$contextValidation->get('validator')->fails()) - { - // Add the new structure into the form. New, subsquent fields will be identified by the "new" prefix - // This prefix doesn't actually change the app's behavior when it receives applications. - // Additionally, old applications won't of course display new and updated fields, because we can't travel into the past and get data for them - $form->formStructure = $contextValidation->get('structure'); - $form->save(); - - $request->session()->flash('success', 'Hooray! Your form was updated. New applications for it\'s vacancy will use it.'); - } - else - { - $request->session()->flash('errors', $contextValidation->get('validator')->errors()->getMessages()); - } - - return redirect()->to(route('previewForm', ['form' => $form->id])); + $request->session()->flash('success', 'Hooray! Your form was updated. New applications for it\'s vacancy will use it.'); + } else { + $request->session()->flash('errors', $contextValidation->get('validator')->errors()->getMessages()); + } + return redirect()->to(route('previewForm', ['form' => $form->id])); } - } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 1afc222..2696b59 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,10 +1,27 @@ . + */ + namespace App\Http\Controllers; use App\Vacancy; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\DB; class HomeController extends Controller { @@ -15,12 +32,10 @@ class HomeController extends Controller */ public function index() { - $positions = Vacancy::where('vacancyStatus', 'OPEN') ->where('vacancyCount', '<>', 0) ->get(); - return view('home') ->with('positions', $positions); } diff --git a/app/Http/Controllers/OptionsController.php b/app/Http/Controllers/OptionsController.php index c76a57c..2bba992 100644 --- a/app/Http/Controllers/OptionsController.php +++ b/app/Http/Controllers/OptionsController.php @@ -1,10 +1,28 @@ . + */ + namespace App\Http\Controllers; use App\Facades\Options; use App\Options as Option; - use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; @@ -21,57 +39,47 @@ class OptionsController extends Controller // TODO: Obtain this from the facade $options = Option::all(); - return view('dashboard.administration.settings') ->with('options', $options); } - public function saveSettings(Request $request) - { - if (Auth::user()->can('admin.settings.edit')) - { - Log::debug('Updating application options', [ - 'ip' => $request->ip(), - 'ua' => $request->userAgent(), - 'username' => Auth::user()->username - ]); - foreach($request->all() as $optionName => $option) - { - try - { - Log::debug('Going through option ' . $optionName); - if (Options::optionExists($optionName)) - { - Log::debug('Option exists, updating to new values', [ - 'opt' => $optionName, - 'new_value' => $option - ]); - Options::changeOption($optionName, $option); - } - } - catch(\Exception $ex) - { - Log::error('Unable to update options!', [ - 'msg' => $ex->getMessage(), - 'trace' => $ex->getTraceAsString() - ]); - report($ex); + public function saveSettings(Request $request) + { + if (Auth::user()->can('admin.settings.edit')) { + Log::debug('Updating application options', [ + 'ip' => $request->ip(), + 'ua' => $request->userAgent(), + 'username' => Auth::user()->username, + ]); + foreach ($request->all() as $optionName => $option) { + try { + Log::debug('Going through option '.$optionName); + if (Options::optionExists($optionName)) { + Log::debug('Option exists, updating to new values', [ + 'opt' => $optionName, + 'new_value' => $option, + ]); + Options::changeOption($optionName, $option); + } + } catch (\Exception $ex) { + Log::error('Unable to update options!', [ + 'msg' => $ex->getMessage(), + 'trace' => $ex->getTraceAsString(), + ]); + report($ex); - $errorCond = true; - $request->session()->flash('error', 'An error occurred while trying to save settings: ' . $ex->getMessage()); - } - } + $errorCond = true; + $request->session()->flash('error', 'An error occurred while trying to save settings: '.$ex->getMessage()); + } + } - if (!isset($errorCond)) - { - $request->session()->flash('success', 'Settings saved successfully!'); - } - } - else - { - $request->session()->flash('error', 'You do not have permission to update this resource.'); - } + if (! isset($errorCond)) { + $request->session()->flash('success', 'Settings saved successfully!'); + } + } else { + $request->session()->flash('error', 'You do not have permission to update this resource.'); + } - return redirect()->back(); - } + return redirect()->back(); + } } diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 0fc063d..0f63b2d 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -1,12 +1,29 @@ . + */ + namespace App\Http\Controllers; -use App\Http\Requests\ProfileSave; -use Illuminate\Support\Facades\Log; -use App\Profile; -use App\User; use App\Facades\IP; +use App\Http\Requests\ProfileSave; +use App\User; use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -14,18 +31,15 @@ use Spatie\Permission\Models\Role; class ProfileController extends Controller { - - public function index() - { - - return view('dashboard.user.directory') + public function index() + { + return view('dashboard.user.directory') ->with('users', User::with('profile', 'bans')->paginate(9)); - } + } public function showProfile() { - - $socialLinks = Auth::user()->profile->socialLinks ?? "[]"; + $socialLinks = Auth::user()->profile->socialLinks ?? '[]'; $socialMediaProfiles = json_decode($socialLinks, true); return view('dashboard.user.profile.userprofile') @@ -36,13 +50,11 @@ class ProfileController extends Controller 'insta' => $socialMediaProfiles['links']['insta'] ?? 'UpdateMe', 'discord' => $socialMediaProfiles['links']['discord'] ?? 'UpdateMe#12345', ]); - } // Route model binding public function showSingleProfile(Request $request, User $user) { - $socialMediaProfiles = json_decode($user->profile->socialLinks, true); $createdDate = Carbon::parse($user->created_at); @@ -51,21 +63,15 @@ class ProfileController extends Controller $roleList = []; - - foreach($systemRoles as $role) - { - if (in_array($role, $userRoles)) - { - $roleList[$role] = true; - } - else - { - $roleList[$role] = false; - } + foreach ($systemRoles as $role) { + if (in_array($role, $userRoles)) { + $roleList[$role] = true; + } else { + $roleList[$role] = false; + } } - if (Auth::user()->is($user) || Auth::user()->can('profiles.view.others')) - { + if (Auth::user()->is($user) || Auth::user()->can('profiles.view.others')) { return view('dashboard.user.profile.displayprofile') ->with([ 'profile' => $user->profile, @@ -73,16 +79,13 @@ class ProfileController extends Controller 'twitter' => $socialMediaProfiles['links']['twitter'] ?? 'UpdateMe', 'insta' => $socialMediaProfiles['links']['insta'] ?? 'UpdateMe', 'discord' => $socialMediaProfiles['links']['discord'] ?? 'UpdateMe#12345', - 'since' => $createdDate->englishMonth . " " . $createdDate->year, + 'since' => $createdDate->englishMonth.' '.$createdDate->year, 'ipInfo' => IP::lookup($user->originalIP), - 'roles' => $roleList + 'roles' => $roleList, ]); - } - else - { + } else { abort(403, 'You cannot view someone else\'s profile.'); } - } public function saveProfile(ProfileSave $request) @@ -90,10 +93,8 @@ class ProfileController extends Controller $profile = User::find(Auth::user()->id)->profile; $social = []; - if (!is_null($profile)) - { - switch ($request->avatarPref) - { + if (! is_null($profile)) { + switch ($request->avatarPref) { case 'MOJANG': $avatarPref = 'crafatar'; @@ -117,11 +118,8 @@ class ProfileController extends Controller $newProfile = $profile->save(); $request->session()->flash('success', 'Profile settings saved successfully.'); - } return redirect()->back(); - } - } diff --git a/app/Http/Controllers/ResponseController.php b/app/Http/Controllers/ResponseController.php index 64037c9..bcb5070 100644 --- a/app/Http/Controllers/ResponseController.php +++ b/app/Http/Controllers/ResponseController.php @@ -1,8 +1,25 @@ . + */ -use Illuminate\Http\Request; +namespace App\Http\Controllers; class ResponseController extends Controller { diff --git a/app/Http/Controllers/StaffProfileController.php b/app/Http/Controllers/StaffProfileController.php index b20d4d1..1f6b569 100644 --- a/app/Http/Controllers/StaffProfileController.php +++ b/app/Http/Controllers/StaffProfileController.php @@ -1,8 +1,25 @@ . + */ -use Illuminate\Http\Request; +namespace App\Http\Controllers; class StaffProfileController extends Controller { diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index cb494b6..3ee74ff 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -1,34 +1,47 @@ . + */ + namespace App\Http\Controllers; +use App\Ban; +use App\Http\Requests\Add2FASecretRequest; use App\Http\Requests\ChangeEmailRequest; use App\Http\Requests\ChangePasswordRequest; -use App\Http\Requests\FlushSessionsRequest; use App\Http\Requests\DeleteUserRequest; +use App\Http\Requests\FlushSessionsRequest; +use App\Http\Requests\Remove2FASecretRequest; use App\Http\Requests\SearchPlayerRequest; use App\Http\Requests\UpdateUserRequest; -use App\Http\Requests\Add2FASecretRequest; -use App\Http\Requests\Remove2FASecretRequest; - +use App\Notifications\ChangedPassword; +use App\Notifications\EmailChanged; use App\User; -use App\Ban; - +use Google2FA; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Log; -use App\Facades\UUID; -use App\Notifications\EmailChanged; -use App\Notifications\ChangedPassword; use Spatie\Permission\Models\Role; -use Google2FA; - class UserController extends Controller { - - public function showStaffMembers() { $this->authorize('viewStaff', User::class); @@ -36,24 +49,20 @@ class UserController extends Controller $staffRoles = [ 'reviewer', 'hiringManager', - 'admin' + 'admin', ]; // TODO: Un-hardcode this, move to config/roles.php $users = User::with('roles')->get(); $staffMembers = collect([]); - foreach($users as $user) - { - if (empty($user->roles)) - { + foreach ($users as $user) { + if (empty($user->roles)) { Log::debug($user->role->name); Log::debug('Staff list: User without role detected; Ignoring'); continue; } - foreach($user->roles as $role) - { - if (in_array($role->name, $staffRoles)) - { + foreach ($user->roles as $role) { + if (in_array($role->name, $staffRoles)) { $staffMembers->push($user); continue 2; // Skip directly to the next user instead of comparing more roles for the current user } @@ -62,7 +71,7 @@ class UserController extends Controller return view('dashboard.administration.staff-members') ->with([ - 'users' => $staffMembers + 'users' => $staffMembers, ]); } @@ -73,11 +82,9 @@ class UserController extends Controller $users = User::with('roles')->get(); $players = collect([]); - foreach($users as $user) - { + foreach ($users as $user) { // TODO: Might be problematic if we don't check if the role is user - if (count($user->roles) == 1) - { + if (count($user->roles) == 1) { $players->push($user); } } @@ -85,11 +92,10 @@ class UserController extends Controller return view('dashboard.administration.players') ->with([ 'users' => $players, - 'bannedUserCount' => Ban::all()->count() + 'bannedUserCount' => Ban::all()->count(), ]); } - public function showPlayersLike(SearchPlayerRequest $request) { $this->authorize('viewPlayers', User::class); @@ -100,18 +106,17 @@ class UserController extends Controller ->orWhere('email', 'LIKE', "%{$searchTerm}%") ->get(); - if (!$matchingUsers->isEmpty()) - { $request->session()->flash('success', 'There were ' . $matchingUsers->count() . ' user(s) matching your search.'); + if (! $matchingUsers->isEmpty()) { + $request->session()->flash('success', 'There were '.$matchingUsers->count().' user(s) matching your search.'); return view('dashboard.administration.players') ->with([ 'users' => $matchingUsers, - 'bannedUserCount' => Ban::all()->count() + 'bannedUserCount' => Ban::all()->count(), ]); - } - else - { + } else { $request->session()->flash('error', 'Your search term did not return any results.'); + return redirect(route('registeredPlayerList')); } } @@ -120,14 +125,10 @@ class UserController extends Controller { $QRCode = null; - if (!$request->user()->has2FA()) - { - if ($request->session()->has('twofaAttemptFailed')) - { + if (! $request->user()->has2FA()) { + if ($request->session()->has('twofaAttemptFailed')) { $twoFactorSecret = $request->session()->get('current2FA'); - } - else - { + } else { $twoFactorSecret = Google2FA::generateSecretKey(32, ''); $request->session()->put('current2FA', $twoFactorSecret); } @@ -144,21 +145,21 @@ class UserController extends Controller ->with('twofaQRCode', $QRCode); } - public function flushSessions(FlushSessionsRequest $request) { // TODO: Move all log calls to a listener, which binds to an event fired by each significant event, such as this one // This will allow for other actions to be performed on certain events (like login failed event) Auth::logoutOtherDevices($request->currentPasswordFlush); - Log::notice('User ' . Auth::user()->name . ' has logged out other devices in their account', + Log::notice('User '.Auth::user()->name.' has logged out other devices in their account', [ 'originIPAddress' => $request->ip(), 'userID' => Auth::user()->id, - 'timestamp' => now() + 'timestamp' => now(), ]); $request->session()->flash('success', 'Successfully logged out other devices. Remember to change your password if you think you\'ve been compromised.'); + return redirect()->back(); } @@ -166,111 +167,92 @@ class UserController extends Controller { $user = User::find(Auth::user()->id); - if (!is_null($user)) - { + if (! is_null($user)) { $user->password = Hash::make($request->newPassword); $user->save(); - Log::info('User ' . $user->name . ' has changed their password', [ + Log::info('User '.$user->name.' has changed their password', [ 'originIPAddress' => $request->ip(), 'userID' => $user->id, - 'timestamp' => now() + 'timestamp' => now(), ]); $user->notify(new ChangedPassword()); Auth::logout(); + return redirect()->back(); } - } public function changeEmail(ChangeEmailRequest $request) { $user = User::find(Auth::user()->id); - if (!is_null($user)) - { + if (! is_null($user)) { $user->email = $request->newEmail; $user->save(); - Log::notice('User ' . $user->name . ' has just changed their contact email address', [ + Log::notice('User '.$user->name.' has just changed their contact email address', [ 'originIPAddress' => $request->ip(), 'userID' => $user->id, - 'timestamp' => now() + 'timestamp' => now(), ]); $user->notify(new EmailChanged()); $request->session()->flash('success', 'Your email address has been changed!'); - } - else - { + } else { $request->session()->flash('error', 'There has been an error whilst trying to update your account. Please contact administrators.'); } return redirect()->back(); - } - - public function delete(DeleteUserRequest $request, User $user) { - $this->authorize('delete', $user); - if ($request->confirmPrompt == 'DELETE ACCOUNT') - { + if ($request->confirmPrompt == 'DELETE ACCOUNT') { $user->delete(); - $request->session()->flash('success','User deleted successfully. PII has been erased.'); - } - else - { + $request->session()->flash('success', 'User deleted successfully. PII has been erased.'); + } else { $request->session()->flash('error', 'Wrong confirmation text! Try again.'); } - return redirect()->route('registeredPlayerList'); } public function update(UpdateUserRequest $request, User $user) { + $this->authorize('adminEdit', $user); - $this->authorize('adminEdit', $user); + // Mass update would not be possible here without extra code, making route model binding useless + $user->email = $request->email; + $user->name = $request->name; + $user->uuid = $request->uuid; - // Mass update would not be possible here without extra code, making route model binding useless - $user->email = $request->email; - $user->name = $request->name; - $user->uuid = $request->uuid; - - $existingRoles = Role::all() + $existingRoles = Role::all() ->pluck('name') ->all(); - $roleDiff = array_diff($existingRoles, $request->roles); + $roleDiff = array_diff($existingRoles, $request->roles); - // Adds roles that were selected. Removes roles that aren't selected if the user has them. - foreach($roleDiff as $deselectedRole) - { - if ($user->hasRole($deselectedRole) && $deselectedRole !== 'user') - { - $user->removeRole($deselectedRole); - } - } - - foreach($request->roles as $role) - { - if (!$user->hasRole($role)) - { - $user->assignRole($role); + // Adds roles that were selected. Removes roles that aren't selected if the user has them. + foreach ($roleDiff as $deselectedRole) { + if ($user->hasRole($deselectedRole) && $deselectedRole !== 'user') { + $user->removeRole($deselectedRole); + } } - } + foreach ($request->roles as $role) { + if (! $user->hasRole($role)) { + $user->assignRole($role); + } + } - $user->save(); - $request->session()->flash('success', 'User updated successfully!'); - - return redirect()->back(); + $user->save(); + $request->session()->flash('success', 'User updated successfully!'); + return redirect()->back(); } public function add2FASecret(Add2FASecretRequest $request) @@ -278,35 +260,32 @@ class UserController extends Controller $currentSecret = $request->session()->get('current2FA'); $isValid = Google2FA::verifyKey($currentSecret, $request->otp); - if ($isValid) - { - $request->user()->twofa_secret = $currentSecret; - $request->user()->save(); + if ($isValid) { + $request->user()->twofa_secret = $currentSecret; + $request->user()->save(); - Log::warning('SECURITY: User activated two-factor authentication', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip() - ]); + Log::warning('SECURITY: User activated two-factor authentication', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip(), + ]); - Google2FA::login(); + Google2FA::login(); - Log::warning('SECURITY: Started two factor session automatically', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip() - ]); + Log::warning('SECURITY: Started two factor session automatically', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip(), + ]); - $request->session()->forget('current2FA'); + $request->session()->forget('current2FA'); - if ($request->session()->has('twofaAttemptFailed')) - $request->session()->forget('twofaAttemptFailed'); + if ($request->session()->has('twofaAttemptFailed')) { + $request->session()->forget('twofaAttemptFailed'); + } - - $request->session()->flash('success', '2FA succesfully enabled! You\'ll now be prompted for an OTP each time you log in.'); - } - else - { - $request->session()->flash('error', 'Incorrect code. Please reopen the 2FA settings panel and try again.'); - $request->session()->put('twofaAttemptFailed', true); + $request->session()->flash('success', '2FA succesfully enabled! You\'ll now be prompted for an OTP each time you log in.'); + } else { + $request->session()->flash('error', 'Incorrect code. Please reopen the 2FA settings panel and try again.'); + $request->session()->put('twofaAttemptFailed', true); } return redirect()->back(); @@ -315,42 +294,38 @@ class UserController extends Controller public function remove2FASecret(Remove2FASecretRequest $request) { Log::warning('SECURITY: Disabling two factor authentication (user initiated)', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip() + 'initiator' => $request->user()->email, + 'ip' => $request->ip(), ]); $request->user()->twofa_secret = null; $request->user()->save(); $request->session()->flash('success', 'Two-factor authentication disabled.'); + return redirect()->back(); } - - - public function terminate(Request $request, User $user) { $this->authorize('terminate', User::class); // TODO: move logic to policy - if (!$user->isStaffMember() || $user->is(Auth::user())) - { + if (! $user->isStaffMember() || $user->is(Auth::user())) { $request->session()->flash('error', 'You cannot terminate this user.'); + return redirect()->back(); } - foreach ($user->roles as $role) - { - if ($role->name == 'user') - { - continue; - } + foreach ($user->roles as $role) { + if ($role->name == 'user') { + continue; + } - $user->removeRole($role->name); + $user->removeRole($role->name); } - Log::info('User ' . $user->name . ' has just been demoted.'); + Log::info('User '.$user->name.' has just been demoted.'); $request->session()->flash('success', 'User terminated successfully.'); //TODO: Dispatch event diff --git a/app/Http/Controllers/VacancyController.php b/app/Http/Controllers/VacancyController.php index fdb5ce0..5316d3b 100644 --- a/app/Http/Controllers/VacancyController.php +++ b/app/Http/Controllers/VacancyController.php @@ -1,30 +1,45 @@ . + */ + namespace App\Http\Controllers; -use App\Http\Requests\VacancyRequest; -use App\Http\Requests\VacancyEditRequest; - -use App\Vacancy; -use App\User; use App\Form; - +use App\Http\Requests\VacancyEditRequest; +use App\Http\Requests\VacancyRequest; use App\Notifications\VacancyClosed; - +use App\User; +use App\Vacancy; use Illuminate\Http\Request; use Illuminate\Support\Str; -use Illuminate\Support\Facades\Auth; - class VacancyController extends Controller { public function index() { - $this->authorize('viewAny', Vacancy::class); + $this->authorize('viewAny', Vacancy::class); + return view('dashboard.administration.positions') ->with([ 'forms' => Form::all(), - 'vacancies' => Vacancy::all() + 'vacancies' => Vacancy::all(), ]); } @@ -33,13 +48,12 @@ class VacancyController extends Controller $this->authorize('create', Vacancy::class); $form = Form::find($request->vacancyFormID); - if (!is_null($form)) - { - /* note: since we can't convert HTML back to Markdown, we'll have to do the converting when the user requests a page, - * and leave the database with Markdown only so it can be used and edited everywhere. - * for several vacancies, this would require looping through all of them and replacing MD with HTML, which is obviously not the most clean solution; - * however, the Model can be configured to return MD instead of HTML on that specific field saving us from looping. - */ + if (! is_null($form)) { + /* note: since we can't convert HTML back to Markdown, we'll have to do the converting when the user requests a page, + * and leave the database with Markdown only so it can be used and edited everywhere. + * for several vacancies, this would require looping through all of them and replacing MD with HTML, which is obviously not the most clean solution; + * however, the Model can be configured to return MD instead of HTML on that specific field saving us from looping. + */ Vacancy::create([ 'vacancyName' => $request->vacancyName, @@ -49,48 +63,40 @@ class VacancyController extends Controller 'permissionGroupName' => $request->permissionGroup, 'discordRoleID' => $request->discordRole, 'vacancyFormID' => $request->vacancyFormID, - 'vacancyCount' => $request->vacancyCount + 'vacancyCount' => $request->vacancyCount, ]); $request->session()->flash('success', 'Vacancy successfully opened. It will now show in the home page.'); - } - else - { + } else { $request->session()->flash('error', 'You cannot create a vacancy without a valid form.'); } return redirect()->back(); - } public function updatePositionAvailability(Request $request, $status, Vacancy $vacancy) { - $this->authorize('update', $vacancy); - if (!is_null($vacancy)) - { + if (! is_null($vacancy)) { $type = 'success'; - switch ($status) - { + switch ($status) { case 'open': $vacancy->open(); - $message = "Position successfully opened!"; + $message = 'Position successfully opened!'; break; case 'close': $vacancy->close(); - $message = "Position successfully closed!"; + $message = 'Position successfully closed!'; - foreach(User::all() as $user) - { - if ($user->isStaffMember()) - { - $user->notify(new VacancyClosed($vacancy)); - } + foreach (User::all() as $user) { + if ($user->isStaffMember()) { + $user->notify(new VacancyClosed($vacancy)); + } } break; @@ -99,40 +105,36 @@ class VacancyController extends Controller $type = 'error'; } - } - else - { + } else { $message = "The position you're trying to update doesn't exist!"; - $type = "error"; + $type = 'error'; } $request->session()->flash($type, $message); + return redirect()->back(); } - public function edit(Request $request, Vacancy $vacancy) { - $this->authorize('update', $vacancy); + $this->authorize('update', $vacancy); + return view('dashboard.administration.editposition') ->with('vacancy', $vacancy); } - - public function update(VacancyEditRequest $request, Vacancy $vacancy) { - $this->authorize('update', $vacancy); + $this->authorize('update', $vacancy); - $vacancy->vacancyFullDescription = $request->vacancyFullDescription; - $vacancy->vacancyDescription = $request->vacancyDescription; - $vacancy->vacancyCount = $request->vacancyCount; + $vacancy->vacancyFullDescription = $request->vacancyFullDescription; + $vacancy->vacancyDescription = $request->vacancyDescription; + $vacancy->vacancyCount = $request->vacancyCount; - $vacancy->save(); + $vacancy->save(); - $request->session()->flash('success', 'Vacancy successfully updated.'); - return redirect()->back(); + $request->session()->flash('success', 'Vacancy successfully updated.'); + return redirect()->back(); } - } diff --git a/app/Http/Controllers/VoteController.php b/app/Http/Controllers/VoteController.php index eba3ae1..30eb2ea 100644 --- a/app/Http/Controllers/VoteController.php +++ b/app/Http/Controllers/VoteController.php @@ -1,18 +1,34 @@ . + */ + namespace App\Http\Controllers; use App\Application; use App\Http\Requests\VoteRequest; -use App\Jobs\ProcessVoteList; use App\Vote; -use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; class VoteController extends Controller { - public function vote(VoteRequest $voteRequest, Application $application) { $this->authorize('create', Vote::class); @@ -23,9 +39,8 @@ class VoteController extends Controller ]); $vote->application()->attach($application->id); - - Log::info('User ' . Auth::user()->name . ' has voted in applicant ' . $application->user->name . '\'s application', [ - 'voteType' => $voteRequest->voteType + Log::info('User '.Auth::user()->name.' has voted in applicant '.$application->user->name.'\'s application', [ + 'voteType' => $voteRequest->voteType, ]); $voteRequest->session()->flash('success', 'Your vote has been registered!'); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 9a2a7f5..f0d3604 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; @@ -70,6 +89,6 @@ class Kernel extends HttpKernel 'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class, 'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class, 'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class, - 'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class + 'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class, ]; } diff --git a/app/Http/Middleware/ApplicationEligibility.php b/app/Http/Middleware/ApplicationEligibility.php index f091d8e..13cb1da 100644 --- a/app/Http/Middleware/ApplicationEligibility.php +++ b/app/Http/Middleware/ApplicationEligibility.php @@ -1,12 +1,31 @@ . + */ + namespace App\Http\Middleware; use App\Application; -use Illuminate\Support\Facades\Log; use Carbon\Carbon; use Closure; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\View; class ApplicationEligibility @@ -23,37 +42,29 @@ class ApplicationEligibility { $curtime = new Carbon(now()); - - if (Auth::check()) - { + if (Auth::check()) { $applications = Application::where('applicantUserID', Auth::user()->id)->get(); $eligible = true; $daysRemaining = 0; - if (!$applications->isEmpty()) - { - foreach ($applications as $application) - { + if (! $applications->isEmpty()) { + foreach ($applications as $application) { $appTime = Carbon::parse($application->created_at); - if ($appTime->isSameMonth($curtime)) - { - - Log::warning('Notice: Application ID ' . $application->id . ' was found to be in the same month as today\'s time, making the user ' . Auth::user()->name . ' ineligible for application'); + if ($appTime->isSameMonth($curtime)) { + Log::warning('Notice: Application ID '.$application->id.' was found to be in the same month as today\'s time, making the user '.Auth::user()->name.' ineligible for application'); $eligible = false; } } $allowedTime = Carbon::parse($applications->last()->created_at)->addMonth(); $daysRemaining = $allowedTime->diffInDays(now()); - } View::share('isEligibleForApplication', $eligible); View::share('eligibilityDaysRemaining', $daysRemaining); } - return $next($request); } } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 704089a..af34268 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; diff --git a/app/Http/Middleware/Bancheck.php b/app/Http/Middleware/Bancheck.php index 0eca7f7..6c8a8ef 100644 --- a/app/Http/Middleware/Bancheck.php +++ b/app/Http/Middleware/Bancheck.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Closure; @@ -20,17 +39,11 @@ class Bancheck $userIP = $request->ip(); $anonymousUser = User::where('ipAddress', $userIP)->get(); - - if (Auth::check() && Auth::user()->isBanned()) - { + if (Auth::check() && Auth::user()->isBanned()) { View::share('isBanned', true); - } - elseif(!$anonymousUser->isEmpty() && User::find($anonymousUser->id)->isBanned()) - { + } elseif (! $anonymousUser->isEmpty() && User::find($anonymousUser->id)->isBanned()) { View::share('isBanned', true); - } - else - { + } else { View::share('isBanned', false); } diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php index 35b9824..c58ffff 100644 --- a/app/Http/Middleware/CheckForMaintenanceMode.php +++ b/app/Http/Middleware/CheckForMaintenanceMode.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 033136a..140dd8d 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; diff --git a/app/Http/Middleware/ForceLogoutMiddleware.php b/app/Http/Middleware/ForceLogoutMiddleware.php index 551c287..7501cdd 100644 --- a/app/Http/Middleware/ForceLogoutMiddleware.php +++ b/app/Http/Middleware/ForceLogoutMiddleware.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Closure; @@ -16,11 +35,11 @@ class ForceLogoutMiddleware */ public function handle($request, Closure $next) { - if (Auth::user()->isBanned()) - { + if (Auth::user()->isBanned()) { Auth::logout(); $request->session()->flash('error', 'Error: Your session has been forcefully terminated. Please try again in a few days.'); + return redirect('/'); } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 2395ddc..674a32b 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use App\Providers\RouteServiceProvider; diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index 5a50e7b..1698610 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 085cdb5..785351e 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Fideloper\Proxy\TrustProxies as Middleware; @@ -12,7 +31,7 @@ class TrustProxies extends Middleware * * @var array|string */ - protected $proxies = "*"; + protected $proxies = '*'; /** * The headers that should be used to detect proxies. diff --git a/app/Http/Middleware/UsernameUUID.php b/app/Http/Middleware/UsernameUUID.php index 29a93cf..32c8a8e 100644 --- a/app/Http/Middleware/UsernameUUID.php +++ b/app/Http/Middleware/UsernameUUID.php @@ -1,15 +1,33 @@ . + */ + namespace App\Http\Middleware; -use Closure; use App\Facades\UUID; -use Illuminate\Support\Facades\Http; +use Closure; class UsernameUUID { /** - * Converts a Minecraft username found in the request body to a UUID + * Converts a Minecraft username found in the request body to a UUID. * * @param \Illuminate\Http\Request $request * @param \Closure $next @@ -18,23 +36,21 @@ class UsernameUUID public function handle($request, Closure $next) { $input = $request->all(); - if (isset($input['uuid'])) - { - try - { - $username = $input['uuid']; - $input['uuid'] = UUID::toUUID($username); - } - catch(\InvalidArgumentException $iae) - { + if (isset($input['uuid'])) { + try { + $username = $input['uuid']; + $input['uuid'] = UUID::toUUID($username); + } catch (\InvalidArgumentException $iae) { report($iae); $request->session()->flash('error', $iae->getMessage()); + return redirect(route('register')); } $request->replace($input); } + return $next($request); } } diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 0c13b85..0b6761a 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; diff --git a/app/Http/Requests/Add2FASecretRequest.php b/app/Http/Requests/Add2FASecretRequest.php index 13fa9dd..f1b2ca4 100644 --- a/app/Http/Requests/Add2FASecretRequest.php +++ b/app/Http/Requests/Add2FASecretRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -13,7 +32,7 @@ class Add2FASecretRequest extends FormRequest */ public function authorize() { - // current logic only updates currently authenticated user + // current logic only updates currently authenticated user return true; } @@ -25,7 +44,7 @@ class Add2FASecretRequest extends FormRequest public function rules() { return [ - 'otp' => 'required|string|min:6|max:6' + 'otp' => 'required|string|min:6|max:6', ]; } } diff --git a/app/Http/Requests/BanUserRequest.php b/app/Http/Requests/BanUserRequest.php index ba25c34..6c0469b 100644 --- a/app/Http/Requests/BanUserRequest.php +++ b/app/Http/Requests/BanUserRequest.php @@ -1,11 +1,29 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; - class BanUserRequest extends FormRequest { /** @@ -28,7 +46,7 @@ class BanUserRequest extends FormRequest return [ 'reason' => 'required|string', 'durationOperand' => 'nullable|string', - 'durationOperator' => 'nullable|string' + 'durationOperator' => 'nullable|string', ]; } } diff --git a/app/Http/Requests/ChangeEmailRequest.php b/app/Http/Requests/ChangeEmailRequest.php index 128a3eb..c591f2b 100644 --- a/app/Http/Requests/ChangeEmailRequest.php +++ b/app/Http/Requests/ChangeEmailRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -25,7 +44,7 @@ class ChangeEmailRequest extends FormRequest { return [ 'currentPassword' => 'required|password', - 'newEmail' => 'required|email|unique:users,email' + 'newEmail' => 'required|email|unique:users,email', ]; } } diff --git a/app/Http/Requests/ChangePasswordRequest.php b/app/Http/Requests/ChangePasswordRequest.php index 3feb69b..f82dae3 100644 --- a/app/Http/Requests/ChangePasswordRequest.php +++ b/app/Http/Requests/ChangePasswordRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -25,7 +44,7 @@ class ChangePasswordRequest extends FormRequest { return [ 'newPassword' => 'required|string|confirmed', - 'oldPassword' => 'required|string|password' + 'oldPassword' => 'required|string|password', ]; } } diff --git a/app/Http/Requests/DeleteUserRequest.php b/app/Http/Requests/DeleteUserRequest.php index 924635c..bdaaada 100644 --- a/app/Http/Requests/DeleteUserRequest.php +++ b/app/Http/Requests/DeleteUserRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -25,7 +44,7 @@ class DeleteUserRequest extends FormRequest public function rules() { return [ - 'confirmPrompt' => 'required|string' + 'confirmPrompt' => 'required|string', ]; } } diff --git a/app/Http/Requests/FlushSessionsRequest.php b/app/Http/Requests/FlushSessionsRequest.php index f274ebd..6f4c78e 100644 --- a/app/Http/Requests/FlushSessionsRequest.php +++ b/app/Http/Requests/FlushSessionsRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -24,7 +43,7 @@ class FlushSessionsRequest extends FormRequest public function rules() { return [ - 'currentPasswordFlush' => 'required|password' + 'currentPasswordFlush' => 'required|password', ]; } } diff --git a/app/Http/Requests/NewCommentRequest.php b/app/Http/Requests/NewCommentRequest.php index e1470bc..9d05a95 100644 --- a/app/Http/Requests/NewCommentRequest.php +++ b/app/Http/Requests/NewCommentRequest.php @@ -1,11 +1,29 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; - class NewCommentRequest extends FormRequest { /** @@ -27,7 +45,7 @@ class NewCommentRequest extends FormRequest public function rules() { return [ - 'comment' => 'required|string|max:600|min:20' + 'comment' => 'required|string|max:600|min:20', ]; } } diff --git a/app/Http/Requests/ProfileSave.php b/app/Http/Requests/ProfileSave.php index 75278be..7d79846 100644 --- a/app/Http/Requests/ProfileSave.php +++ b/app/Http/Requests/ProfileSave.php @@ -1,10 +1,28 @@ . + */ + namespace App\Http\Requests; use App\Profile; use Illuminate\Foundation\Http\FormRequest; -use Illuminate\Support\Facades\Auth; class ProfileSave extends FormRequest { @@ -33,7 +51,7 @@ class ProfileSave extends FormRequest 'socialInsta' => 'nullable|string', 'socialTwitter' => 'nullable|string', 'socialDiscord' => 'nullable|string', - 'socialGithub' => 'nullable|string' + 'socialGithub' => 'nullable|string', ]; } } diff --git a/app/Http/Requests/Remove2FASecretRequest.php b/app/Http/Requests/Remove2FASecretRequest.php index 6583b93..4cd69bb 100644 --- a/app/Http/Requests/Remove2FASecretRequest.php +++ b/app/Http/Requests/Remove2FASecretRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -25,7 +44,7 @@ class Remove2FASecretRequest extends FormRequest { return [ 'currentPassword' => 'required|password', - 'consent' => 'required|accepted' + 'consent' => 'required|accepted', ]; } } diff --git a/app/Http/Requests/SaveNotesRequest.php b/app/Http/Requests/SaveNotesRequest.php index b6dd782..7b89a98 100644 --- a/app/Http/Requests/SaveNotesRequest.php +++ b/app/Http/Requests/SaveNotesRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -24,7 +43,7 @@ class SaveNotesRequest extends FormRequest public function rules() { return [ - 'noteText' => 'required|string' + 'noteText' => 'required|string', ]; } } diff --git a/app/Http/Requests/SearchPlayerRequest.php b/app/Http/Requests/SearchPlayerRequest.php index 4689a49..23c7e78 100644 --- a/app/Http/Requests/SearchPlayerRequest.php +++ b/app/Http/Requests/SearchPlayerRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -25,7 +44,7 @@ class SearchPlayerRequest extends FormRequest public function rules() { return [ - 'searchTerm' => 'required|string|max:17' // max user char limit set by Mojang + 'searchTerm' => 'required|string|max:17', // max user char limit set by Mojang ]; } } diff --git a/app/Http/Requests/UpdateUserRequest.php b/app/Http/Requests/UpdateUserRequest.php index 99403b4..709f013 100644 --- a/app/Http/Requests/UpdateUserRequest.php +++ b/app/Http/Requests/UpdateUserRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -28,7 +47,7 @@ class UpdateUserRequest extends FormRequest 'email' => 'required|email', 'name' => 'required|string', 'uuid' => 'required|max:32|min:32', - 'roles' => 'required_without_all' + 'roles' => 'required_without_all', ]; } } diff --git a/app/Http/Requests/VacancyEditRequest.php b/app/Http/Requests/VacancyEditRequest.php index c7ba958..b9c4c3e 100644 --- a/app/Http/Requests/VacancyEditRequest.php +++ b/app/Http/Requests/VacancyEditRequest.php @@ -1,11 +1,29 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; - class VacancyEditRequest extends FormRequest { /** @@ -28,7 +46,7 @@ class VacancyEditRequest extends FormRequest return [ 'vacancyDescription' => 'required|string', 'vacancyFullDescription' => 'nullable|string', - 'vacancyCount' => 'required|integer|min:1' + 'vacancyCount' => 'required|integer|min:1', ]; } } diff --git a/app/Http/Requests/VacancyRequest.php b/app/Http/Requests/VacancyRequest.php index 176610d..07e333c 100644 --- a/app/Http/Requests/VacancyRequest.php +++ b/app/Http/Requests/VacancyRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -30,7 +49,7 @@ class VacancyRequest extends FormRequest 'permissionGroup' => 'required|string', 'discordRole' => 'required|string', 'vacancyCount' => 'required|integer', - 'vacancyFormID' => 'required|integer' + 'vacancyFormID' => 'required|integer', ]; } } diff --git a/app/Http/Requests/VoteRequest.php b/app/Http/Requests/VoteRequest.php index fdcf8c9..67e30a9 100644 --- a/app/Http/Requests/VoteRequest.php +++ b/app/Http/Requests/VoteRequest.php @@ -1,5 +1,24 @@ . + */ + namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -24,7 +43,7 @@ class VoteRequest extends FormRequest public function rules() { return [ - 'voteType' => 'required|string|in:VOTE_DENY,VOTE_APPROVE' + 'voteType' => 'required|string|in:VOTE_DENY,VOTE_APPROVE', ]; } } diff --git a/app/Jobs/CleanBans.php b/app/Jobs/CleanBans.php index a5a6862..5a25994 100644 --- a/app/Jobs/CleanBans.php +++ b/app/Jobs/CleanBans.php @@ -1,7 +1,28 @@ . + */ + namespace App\Jobs; +use App\Ban; +use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -9,15 +30,12 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Log; -use App\Ban; -use Carbon\Carbon; - class CleanBans implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public $bans; + /** * Create a new job instance. * @@ -34,23 +52,18 @@ class CleanBans implements ShouldQueue */ public function handle() { - Log::debug('Running automatic ban cleaner...'); $bans = Ban::all(); - if (!is_null($bans)) - { - foreach($this->bans as $ban) - { - $bannedUntil = Carbon::parse($ban->bannedUntil); + if (! is_null($bans)) { + foreach ($this->bans as $ban) { + $bannedUntil = Carbon::parse($ban->bannedUntil); - if ($bannedUntil->equalTo(now())) - { - Log::debug('Deleted ban ' . $ban->id . ' belonging to ' . $ban->user->name); - $ban->delete(); - } - } + if ($bannedUntil->equalTo(now())) { + Log::debug('Deleted ban '.$ban->id.' belonging to '.$ban->user->name); + $ban->delete(); + } + } } - } } diff --git a/app/Listeners/DenyUser.php b/app/Listeners/DenyUser.php index 0670cc3..34095ca 100644 --- a/app/Listeners/DenyUser.php +++ b/app/Listeners/DenyUser.php @@ -1,11 +1,28 @@ . + */ + namespace App\Listeners; use App\Events\ApplicationDeniedEvent; use App\Notifications\ApplicationDenied; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class DenyUser @@ -29,9 +46,8 @@ class DenyUser public function handle(ApplicationDeniedEvent $event) { $event->application->setStatus('DENIED'); - Log::info('User ' . $event->application->user->name . ' just had their application denied.'); + Log::info('User '.$event->application->user->name.' just had their application denied.'); $event->application->user->notify(new ApplicationDenied($event->application)); - } } diff --git a/app/Listeners/LogAuthenticationFailure.php b/app/Listeners/LogAuthenticationFailure.php index afe1fee..15ce404 100644 --- a/app/Listeners/LogAuthenticationFailure.php +++ b/app/Listeners/LogAuthenticationFailure.php @@ -1,9 +1,26 @@ . + */ + namespace App\Listeners; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class LogAuthenticationFailure @@ -27,10 +44,9 @@ class LogAuthenticationFailure public function handle($event) { $targetAccountID = 0; - $originalIP = "0.0.0.0"; + $originalIP = '0.0.0.0'; - if (isset($event->user->id)) - { + if (isset($event->user->id)) { $targetAccountID = $event->user->id; } diff --git a/app/Listeners/LogAuthenticationSuccess.php b/app/Listeners/LogAuthenticationSuccess.php index 40781d9..7dd3ef3 100644 --- a/app/Listeners/LogAuthenticationSuccess.php +++ b/app/Listeners/LogAuthenticationSuccess.php @@ -1,9 +1,26 @@ . + */ + namespace App\Listeners; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class LogAuthenticationSuccess diff --git a/app/Listeners/OnUserBanned.php b/app/Listeners/OnUserBanned.php index 897a280..804aac5 100644 --- a/app/Listeners/OnUserBanned.php +++ b/app/Listeners/OnUserBanned.php @@ -1,15 +1,30 @@ . + */ + namespace App\Listeners; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; use App\Events\UserBannedEvent; use App\Notifications\UserBanned; - -use Illuminate\Support\Facades\Log; - use App\User; +use Illuminate\Support\Facades\Log; class OnUserBanned { @@ -31,16 +46,12 @@ class OnUserBanned */ public function handle(UserBannedEvent $event) { + Log::warning('User '.$event->user->name.' has just been banned from the site!'); - Log::warning("User " . $event->user->name . " has just been banned from the site!"); - - foreach(User::all() as $user) - { - if ($user->isStaffMember()) - { - $user->notify((new UserBanned($event->user, $event->ban))->delay(now()->addSeconds(10))); - } + foreach (User::all() as $user) { + if ($user->isStaffMember()) { + $user->notify((new UserBanned($event->user, $event->ban))->delay(now()->addSeconds(10))); + } } - } } diff --git a/app/Listeners/OnUserRegistration.php b/app/Listeners/OnUserRegistration.php index 7ab08f9..f2fa814 100644 --- a/app/Listeners/OnUserRegistration.php +++ b/app/Listeners/OnUserRegistration.php @@ -1,14 +1,30 @@ . + */ + namespace App\Listeners; -use Illuminate\Support\Facades\Log; -use Illuminate\Auth\Events\Registered; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; - -use App\User; use App\Notifications\NewUser; +use App\User; +use Illuminate\Auth\Events\Registered; +use Illuminate\Support\Facades\Log; class OnUserRegistration { @@ -31,12 +47,10 @@ class OnUserRegistration public function handle(Registered $event) { // TODO: Send push notification to online admins via browser (w/ pusher) - Log::info('User ' . $event->user->name . ' has just registered for an account.'); + Log::info('User '.$event->user->name.' has just registered for an account.'); - foreach(User::all() as $user) - { - if ($user->hasRole('admin')) - { + foreach (User::all() as $user) { + if ($user->hasRole('admin')) { $user->notify(new NewUser($event->user)); } } diff --git a/app/Listeners/PromoteUser.php b/app/Listeners/PromoteUser.php index 62760b0..a3ca047 100644 --- a/app/Listeners/PromoteUser.php +++ b/app/Listeners/PromoteUser.php @@ -1,13 +1,29 @@ . + */ + namespace App\Listeners; use App\Events\ApplicationApprovedEvent; -use App\StaffProfile; use App\Notifications\ApplicationApproved; -use Carbon\Carbon; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; +use App\StaffProfile; use Illuminate\Support\Facades\Log; class PromoteUser @@ -35,19 +51,18 @@ class PromoteUser $staffProfile = StaffProfile::create([ 'userID' => $event->application->user->id, 'approvalDate' => now()->toDateTimeString(), - 'memberNotes' => 'Approved by staff members. Welcome them to the team!' + 'memberNotes' => 'Approved by staff members. Welcome them to the team!', ]); $event->application->user->assignRole('reviewer'); - Log::info('User ' . $event->application->user->name . ' has just been promoted!', [ + Log::info('User '.$event->application->user->name.' has just been promoted!', [ 'newRank' => $event->application->response->vacancy->permissionGroupName, - 'staffProfileID' => $staffProfile->id + 'staffProfileID' => $staffProfile->id, ]); $event->application->user->notify(new ApplicationApproved($event->application)); // note: Also notify staff // TODO: Also assign new app role based on the permission group name - } } diff --git a/app/Mail/NewContactSubmission.php b/app/Mail/NewContactSubmission.php index 24373f8..15e2cdf 100644 --- a/app/Mail/NewContactSubmission.php +++ b/app/Mail/NewContactSubmission.php @@ -1,9 +1,27 @@ . + */ + namespace App\Mail; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; diff --git a/app/Notifications/ApplicationApproved.php b/app/Notifications/ApplicationApproved.php index bfde408..9c20eae 100644 --- a/app/Notifications/ApplicationApproved.php +++ b/app/Notifications/ApplicationApproved.php @@ -1,7 +1,27 @@ . + */ + namespace App\Notifications; +use App\Application; use App\Facades\Options; use App\Traits\Cancellable; use Illuminate\Bus\Queueable; @@ -9,7 +29,6 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; -use App\Application; class ApplicationApproved extends Notification implements ShouldQueue { @@ -45,10 +64,9 @@ class ApplicationApproved extends Notification implements ShouldQueue */ public function toMail($notifiable) { - return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - ' . $this->application->response->vacancy->vacancyName . ' application approved') + ->subject(config('app.name').' - '.$this->application->response->vacancy->vacancyName.' application approved') ->line('
') ->line('Congratulations! Our Staff team has reviewed your application today, and your application has been approved.') ->line('You have just received the Reviewer role, which allows you to view and vote on other applications.') @@ -62,19 +80,18 @@ class ApplicationApproved extends Notification implements ShouldQueue public function toSlack($notifiable) { - $url = route('showSingleProfile', ['user' => $notifiable->id]); $roles = implode(', ', $notifiable->roles->pluck('name')->all()); return (new SlackMessage) ->success() ->content('A user has been approved on the team. Welcome aboard!') - ->attachment(function($attachment) use ($notifiable, $url, $roles){ + ->attachment(function ($attachment) use ($notifiable, $url, $roles) { $attachment->title('New staff member') ->fields([ 'Name' => $notifiable->name, 'Email' => $notifiable->email, - 'Roles' => $roles + 'Roles' => $roles, ]) ->action('View profile', $url); }); diff --git a/app/Notifications/ApplicationDenied.php b/app/Notifications/ApplicationDenied.php index 03a4382..09233ad 100644 --- a/app/Notifications/ApplicationDenied.php +++ b/app/Notifications/ApplicationDenied.php @@ -1,19 +1,37 @@ . + */ + namespace App\Notifications; +use App\Application; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; -use App\Application; class ApplicationDenied extends Notification implements ShouldQueue { use Queueable; - public $application; /** @@ -45,10 +63,9 @@ class ApplicationDenied extends Notification implements ShouldQueue */ public function toMail($notifiable) { - return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - ' . $this->application->response->vacancy->vacancyName . ' application denied') + ->subject(config('app.name').' - '.$this->application->response->vacancy->vacancyName.' application denied') ->line('Your most recent application has been denied.') ->line('Our review team denies applications for several reasons, including poor answers.') ->line('Please review your application and try again in 30 days.') @@ -56,20 +73,19 @@ class ApplicationDenied extends Notification implements ShouldQueue ->line('Better luck next time!'); } - public function toSlack($notifiable) { - $notifiableName = $notifiable->name; + $notifiableName = $notifiable->name; - return (new SlackMessage) + return (new SlackMessage) ->error() ->content('An application has just been denied.') - ->attachment(function($attachment) use ($notifiableName){ + ->attachment(function ($attachment) use ($notifiableName) { $attachment->title('Application denied!') - ->content($notifiableName . '\'s application has just been denied. They can try again in 30 days.'); + ->content($notifiableName.'\'s application has just been denied. They can try again in 30 days.'); }); - } + /** * Get the array representation of the notification. * diff --git a/app/Notifications/ApplicationMoved.php b/app/Notifications/ApplicationMoved.php index 9598258..59c1c63 100644 --- a/app/Notifications/ApplicationMoved.php +++ b/app/Notifications/ApplicationMoved.php @@ -1,13 +1,32 @@ . + */ + namespace App\Notifications; +use App\Facades\Options; +use App\Traits\Cancellable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; -use App\Traits\Cancellable; -use App\Facades\Options; class ApplicationMoved extends Notification implements ShouldQueue { @@ -38,7 +57,7 @@ class ApplicationMoved extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - Application Updated') + ->subject(config('app.name').' - Application Updated') ->line('Your most recent application has been moved up a stage.') ->line('This means our team has reviewed it and an interview will be scheduled ASAP.') ->action('Sign in', url(route('login'))) diff --git a/app/Notifications/AppointmentFinished.php b/app/Notifications/AppointmentFinished.php index c1e879a..76a54c8 100644 --- a/app/Notifications/AppointmentFinished.php +++ b/app/Notifications/AppointmentFinished.php @@ -1,5 +1,24 @@ . + */ + namespace App\Notifications; use Illuminate\Bus\Queueable; @@ -42,7 +61,7 @@ class AppointmentFinished extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - Appointment completed') + ->subject(config('app.name').' - Appointment completed') ->line('Your appointment has been marked as completed!') ->line('Please allow an additional day for your application to be fully processed.') ->action('View applications', url(route('showUserApps'))) diff --git a/app/Notifications/AppointmentScheduled.php b/app/Notifications/AppointmentScheduled.php index 3ad3f60..e77cd5d 100644 --- a/app/Notifications/AppointmentScheduled.php +++ b/app/Notifications/AppointmentScheduled.php @@ -1,19 +1,36 @@ . + */ + namespace App\Notifications; +use App\Appointment; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; -use App\Appointment; - class AppointmentScheduled extends Notification implements ShouldQueue { use Queueable; - protected $appointment; /** @@ -47,10 +64,10 @@ class AppointmentScheduled extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - Interview scheduled') - ->line('A voice interview has been scheduled for you @ ' . $this->appointment->appointmentDate . '.') - ->line('With the following details: ' . $this->appointment->appointmentDescription) - ->line('This meeting will take place @ ' . $this->appointment->appointmentLocation . '. You will receive an email soon with details on how to join this meeting.') + ->subject(config('app.name').' - Interview scheduled') + ->line('A voice interview has been scheduled for you @ '.$this->appointment->appointmentDate.'.') + ->line('With the following details: '.$this->appointment->appointmentDescription) + ->line('This meeting will take place @ '.$this->appointment->appointmentLocation.'. You will receive an email soon with details on how to join this meeting.') ->line('You are expected to show up at least 5 minutes before the scheduled date.') ->action('Sign in', url(route('login'))) ->line('Thank you!'); diff --git a/app/Notifications/ChangedPassword.php b/app/Notifications/ChangedPassword.php index bc4cca5..6c9bd54 100644 --- a/app/Notifications/ChangedPassword.php +++ b/app/Notifications/ChangedPassword.php @@ -1,5 +1,24 @@ . + */ + namespace App\Notifications; use Illuminate\Bus\Queueable; @@ -42,7 +61,7 @@ class ChangedPassword extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - Account password changed') + ->subject(config('app.name').' - Account password changed') ->line('The password for the account registered to this email address has just been changed.') ->line('If this was not you, please contact an administrator immediately.') ->action('Sign in', url(route('login'))) diff --git a/app/Notifications/EmailChanged.php b/app/Notifications/EmailChanged.php index e946102..6003cf6 100644 --- a/app/Notifications/EmailChanged.php +++ b/app/Notifications/EmailChanged.php @@ -1,5 +1,24 @@ . + */ + namespace App\Notifications; use Illuminate\Bus\Queueable; @@ -42,7 +61,7 @@ class EmailChanged extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - Email address changed') + ->subject(config('app.name').' - Email address changed') ->line('The email address for your account has just been updated, either by you or an administrator.') ->action('Sign in', url(route('login'))) ->line('Thank you!'); diff --git a/app/Notifications/NewApplicant.php b/app/Notifications/NewApplicant.php index 0fdbac9..a0aab57 100644 --- a/app/Notifications/NewApplicant.php +++ b/app/Notifications/NewApplicant.php @@ -1,26 +1,42 @@ . + */ + namespace App\Notifications; +use App\Application; +use App\Facades\Options; +use App\Traits\Cancellable; +use App\Vacancy; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; -use App\Application; -use App\Vacancy; - -use App\Traits\Cancellable; -use App\Facades\Options; class NewApplicant extends Notification implements ShouldQueue { use Queueable, Cancellable; - protected $application; - protected $vacancy; /** @@ -36,8 +52,7 @@ class NewApplicant extends Notification implements ShouldQueue public function channels() { - if (Options::getOption('enable_slack_notifications') == 1) - { + if (Options::getOption('enable_slack_notifications') == 1) { return ['slack']; } @@ -59,17 +74,15 @@ class NewApplicant extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - New application') + ->subject(config('app.name').' - New application') ->line('Someone has just applied for a position. Check it out!') - ->line('You are receiving this because you\'re a staff member at ' . config('app.name') . '.') + ->line('You are receiving this because you\'re a staff member at '.config('app.name').'.') ->action('View Application', url(route('showUserApp', ['application' => $this->application->id]))) ->line('Thank you!'); } - public function toSlack($notifiable) { - $vacancyDetails = []; $vacancyDetails['name'] = $this->vacancy->vacancyName; $vacancyDetails['slots'] = $this->vacancy->vacancyCount; @@ -80,16 +93,17 @@ class NewApplicant extends Notification implements ShouldQueue return (new SlackMessage) ->success() ->content('Notice: New application coming through. Please review as soon as possible.') - ->attachment(function($attachment) use ($vacancyDetails, $url, $applicant){ + ->attachment(function ($attachment) use ($vacancyDetails, $url, $applicant) { $attachment->title('Application details') ->fields([ - 'Applied for' => $vacancyDetails['name'], - 'Avaiable positions' => $vacancyDetails['slots'], - 'Applicant' => $applicant + 'Applied for' => $vacancyDetails['name'], + 'Avaiable positions' => $vacancyDetails['slots'], + 'Applicant' => $applicant, ]) ->action('Review application', $url); }); } + /** * Get the array representation of the notification. * diff --git a/app/Notifications/NewComment.php b/app/Notifications/NewComment.php index 10c7bfc..48e55f9 100644 --- a/app/Notifications/NewComment.php +++ b/app/Notifications/NewComment.php @@ -1,21 +1,39 @@ . + */ + namespace App\Notifications; +use App\Application; +use App\Comment; +use App\Facades\Options; +use App\Traits\Cancellable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; -use App\Comment; -use App\Application; -use App\Traits\Cancellable; -use App\Facades\Options; class NewComment extends Notification implements ShouldQueue { use Queueable, Cancellable; - protected $application; /** @@ -43,7 +61,7 @@ class NewComment extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - New comment') + ->subject(config('app.name').' - New comment') ->line('Someone has just posted a new comment on an application you follow.') ->line('You\'re receiving this email because you\'ve voted/commented on this application.') ->action('Check it out', url(route('showUserApp', ['application' => $this->application->id]))) diff --git a/app/Notifications/NewContact.php b/app/Notifications/NewContact.php index 761f27c..9526327 100644 --- a/app/Notifications/NewContact.php +++ b/app/Notifications/NewContact.php @@ -1,9 +1,27 @@ . + */ + namespace App\Notifications; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Illuminate\Support\Collection; @@ -44,23 +62,22 @@ class NewContact extends Notification public function toMail($notifiable) { if ($this->message->has([ - 'message', - 'ip', - 'email' - ])) - { - return (new MailMessage) + 'message', + 'ip', + 'email', + ])) { + return (new MailMessage) ->line('We\'ve received a new contact form submission in the StaffManagement app center.') ->line('This is what they sent: ') ->line('') ->line($this->message->get('message')) ->line('') - ->line('This message was received from ' . $this->message->get('ip') . ' and submitted by ' . $this->message->get('email') . '.') + ->line('This message was received from '.$this->message->get('ip').' and submitted by '.$this->message->get('email').'.') ->action('Sign in', url(route('login'))) ->line('Thank you!'); } - throw new \InvalidArgumentException("Invalid arguments supplied to NewContact!"); + throw new \InvalidArgumentException('Invalid arguments supplied to NewContact!'); } /** diff --git a/app/Notifications/NewUser.php b/app/Notifications/NewUser.php index ec31cd6..1d0db11 100644 --- a/app/Notifications/NewUser.php +++ b/app/Notifications/NewUser.php @@ -1,17 +1,35 @@ . + */ + namespace App\Notifications; +use App\Facades\Options; +use App\Facades\UUID; +use App\Traits\Cancellable; +use App\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; -use Illuminate\Notifications\Notification; use Illuminate\Notifications\Messages\SlackMessage; - -use App\User; -use App\Facades\UUID; -use App\Traits\Cancellable; -use App\Facades\Options; +use Illuminate\Notifications\Notification; class NewUser extends Notification implements ShouldQueue { @@ -49,8 +67,8 @@ class NewUser extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - New user') - ->line($this->user->name . ' has just registered to our site.') + ->subject(config('app.name').' - New user') + ->line($this->user->name.' has just registered to our site.') ->line('You are receiving this email because you opted to receive new user notifications.') ->action('View profile', url(route('showSingleProfile', ['user' => $this->user->id]))) ->line('Thank you!'); @@ -58,28 +76,26 @@ class NewUser extends Notification implements ShouldQueue public function toSlack($notifiable) { - $user = []; + $user = []; - $user['name'] = $this->user->name; - $user['email'] = $this->user->email; - $user['username'] = UUID::toUsername($this->user->uuid); + $user['name'] = $this->user->name; + $user['email'] = $this->user->email; + $user['username'] = UUID::toUsername($this->user->uuid); - $date = \Carbon\Carbon::parse($this->user->created_at); - $user['created_at'] = $date->englishMonth . ' ' . $date->day . ' ' . $date->year; + $date = \Carbon\Carbon::parse($this->user->created_at); + $user['created_at'] = $date->englishMonth.' '.$date->day.' '.$date->year; return (new SlackMessage) ->success() ->content('A new user has signed up!') - ->attachment(function($attachment) use ($user){ - + ->attachment(function ($attachment) use ($user) { $attachment->title('User details') ->fields([ - 'Email address' => $user['email'], - 'Name' => $user['name'], - 'Minecraft Username' => $user['username'], - 'Registration date' => $user['created_at'] + 'Email address' => $user['email'], + 'Name' => $user['name'], + 'Minecraft Username' => $user['username'], + 'Registration date' => $user['created_at'], ]); - }); } diff --git a/app/Notifications/UserBanned.php b/app/Notifications/UserBanned.php index f5d5c4e..c230580 100644 --- a/app/Notifications/UserBanned.php +++ b/app/Notifications/UserBanned.php @@ -1,15 +1,33 @@ . + */ + namespace App\Notifications; +use App\Ban; +use App\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; -use App\User; -use App\Ban; - class UserBanned extends Notification implements ShouldQueue { use Queueable; @@ -17,6 +35,7 @@ class UserBanned extends Notification implements ShouldQueue protected $user; protected $ban; + /** * Create a new notification instance. * @@ -50,8 +69,8 @@ class UserBanned extends Notification implements ShouldQueue return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) ->line('Hello, ') - ->line('Moderators have just banned user ' . $this->user->name . ' for ' . $this->ban->reason) - ->line('This ban will remain in effect until ' . $this->ban->bannedUntil . '.') + ->line('Moderators have just banned user '.$this->user->name.' for '.$this->ban->reason) + ->line('This ban will remain in effect until '.$this->ban->bannedUntil.'.') ->action('View profile', url(route('showSingleProfile', ['user' => $this->user->id]))) ->line('Thank you!'); } diff --git a/app/Notifications/VacancyClosed.php b/app/Notifications/VacancyClosed.php index 8ae85e4..4016273 100644 --- a/app/Notifications/VacancyClosed.php +++ b/app/Notifications/VacancyClosed.php @@ -1,17 +1,35 @@ . + */ + namespace App\Notifications; +use App\Facades\Options; +use App\Traits\Cancellable; +use App\Vacancy; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Illuminate\Queue\SerializesModels; -use App\Vacancy; -use App\Facades\Options; -use App\Traits\Cancellable; - class VacancyClosed extends Notification implements ShouldQueue { use Queueable, SerializesModels, Cancellable; @@ -25,7 +43,7 @@ class VacancyClosed extends Notification implements ShouldQueue */ public function __construct(Vacancy $vacancy) { - $this->vacancy = $vacancy; + $this->vacancy = $vacancy; } public function optOut($notifiable) @@ -43,8 +61,8 @@ class VacancyClosed extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name') . ' - Vacancy Closed') - ->line('The vacancy ' . $this->vacancy->vacancyName . ', with ' . $this->vacancy->vacancyCount . ' remaining slots, has just been closed.') + ->subject(config('app.name').' - Vacancy Closed') + ->line('The vacancy '.$this->vacancy->vacancyName.', with '.$this->vacancy->vacancyCount.' remaining slots, has just been closed.') ->line('Please be aware that this position may be deleted/reopened any time.') ->action('View positions', url(route('showPositions'))) ->line('Thank you!'); diff --git a/app/Observers/ApplicationObserver.php b/app/Observers/ApplicationObserver.php index 8821414..16b6615 100644 --- a/app/Observers/ApplicationObserver.php +++ b/app/Observers/ApplicationObserver.php @@ -1,5 +1,24 @@ . + */ + namespace App\Observers; use App\Application; @@ -34,24 +53,20 @@ class ApplicationObserver $application->response()->delete(); $votes = $application->votes; - foreach ($votes as $vote) - { - Log::debug('Referential integrity cleanup: Deleting and detaching vote ' . $vote->id); + foreach ($votes as $vote) { + Log::debug('Referential integrity cleanup: Deleting and detaching vote '.$vote->id); $vote->application()->detach($application->id); $vote->delete(); } - if (!is_null($application->appointment)) - { + if (! is_null($application->appointment)) { Log::debug('RIC: Deleting appointment!'); $application->appointment()->delete(); } - if (!$application->comments->isEmpty()) - { + if (! $application->comments->isEmpty()) { Log::debug('RIC: Deleting comments!'); - foreach($application->comments as $comment) - { + foreach ($application->comments as $comment) { $comment->delete(); } } diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index 38f7660..6639504 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -1,5 +1,24 @@ . + */ + namespace App\Observers; use App\Profile; @@ -21,7 +40,7 @@ class UserObserver 'profileShortBio' => 'Write a one-liner about you here!', 'profileAboutMe' => 'Tell us a bit about you.', 'socialLinks' => '{}', - 'userID' => $user->id + 'userID' => $user->id, ]); } @@ -43,15 +62,12 @@ class UserObserver Log::debug('Referential integrity cleanup: Deleted profile!'); $applications = $user->applications; - if (!$applications->isEmpty()) - { + if (! $applications->isEmpty()) { Log::debug('RIC: Now trying to delete applications and responses...'); - foreach($applications as $application) - { + foreach ($applications as $application) { // code moved to Application observer, where it gets rid of attached elements individually - Log::debug('RIC: Deleting application ' . $application->id); + Log::debug('RIC: Deleting application '.$application->id); $application->delete(); - } } diff --git a/app/Observers/VacancyObserver.php b/app/Observers/VacancyObserver.php index decf1f7..c363e15 100644 --- a/app/Observers/VacancyObserver.php +++ b/app/Observers/VacancyObserver.php @@ -1,10 +1,28 @@ . + */ + namespace App\Observers; use App\Vacancy; - class VacancyObserver { /** diff --git a/app/Options.php b/app/Options.php index e650bbc..895fe88 100644 --- a/app/Options.php +++ b/app/Options.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -8,6 +27,6 @@ class Options extends Model { public $fillable = [ 'option_name', - 'option_value' + 'option_value', ]; } diff --git a/app/Policies/ApplicationPolicy.php b/app/Policies/ApplicationPolicy.php index 07edbca..6c7c2b9 100644 --- a/app/Policies/ApplicationPolicy.php +++ b/app/Policies/ApplicationPolicy.php @@ -1,11 +1,30 @@ . + */ + namespace App\Policies; use App\Application; -use Illuminate\Auth\Access\Response; use App\User; use Illuminate\Auth\Access\HandlesAuthorization; +use Illuminate\Auth\Access\Response; class ApplicationPolicy { @@ -23,22 +42,20 @@ class ApplicationPolicy public function viewAny(User $user) { - if ($user->can('applications.view.all')) - { - return Response::allow(); - } + if ($user->can('applications.view.all')) { + return Response::allow(); + } - return Response::deny('Forbidden'); + return Response::deny('Forbidden'); } public function view(User $user, Application $application) { - if ($user->is($application->user) && $user->can('applications.view.own') || $user->can('applications.view.all')) - { - return Response::allow(); - } + if ($user->is($application->user) && $user->can('applications.view.own') || $user->can('applications.view.all')) { + return Response::allow(); + } - return Response::deny('You are not authorised to view this application'); + return Response::deny('You are not authorised to view this application'); } public function update(User $user) @@ -48,8 +65,6 @@ class ApplicationPolicy public function delete(User $user, Application $application) { - - return $user->hasRole('admin'); - + return $user->hasRole('admin'); } } diff --git a/app/Policies/AppointmentPolicy.php b/app/Policies/AppointmentPolicy.php index e541e4c..29a5b50 100644 --- a/app/Policies/AppointmentPolicy.php +++ b/app/Policies/AppointmentPolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\Appointment; diff --git a/app/Policies/BanPolicy.php b/app/Policies/BanPolicy.php index 754458e..0eaa62e 100644 --- a/app/Policies/BanPolicy.php +++ b/app/Policies/BanPolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\Ban; @@ -44,12 +63,13 @@ class BanPolicy */ public function create(User $user, User $targetUser) { - Log::debug("Authorization check started", [ + Log::debug('Authorization check started', [ 'requiredRoles' => 'admin', 'hasRequiredRole' => $user->hasRole('admin'), 'targetUser' => $targetUser->username, - 'isCurrentUser' => Auth::user()->is($user) + 'isCurrentUser' => Auth::user()->is($user), ]); + return $user->hasRole('admin') && $user->isNot($targetUser); } diff --git a/app/Policies/CommentPolicy.php b/app/Policies/CommentPolicy.php index 477b445..b9ce668 100644 --- a/app/Policies/CommentPolicy.php +++ b/app/Policies/CommentPolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\Comment; @@ -65,8 +84,7 @@ class CommentPolicy */ public function delete(User $user, Comment $comment) { - if ($user->is($comment->user) || $user->hasRole('admin')) - { + if ($user->is($comment->user) || $user->hasRole('admin')) { return true; } diff --git a/app/Policies/FormPolicy.php b/app/Policies/FormPolicy.php index c382190..ca6e808 100644 --- a/app/Policies/FormPolicy.php +++ b/app/Policies/FormPolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\Form; @@ -35,8 +54,9 @@ class FormPolicy public function viewFormbuilder(User $user) { - return $user->can('admin.hiring.formbuilder'); + return $user->can('admin.hiring.formbuilder'); } + /** * Determine whether the user can create models. * diff --git a/app/Policies/ProfilePolicy.php b/app/Policies/ProfilePolicy.php index bd3bc01..d19801f 100644 --- a/app/Policies/ProfilePolicy.php +++ b/app/Policies/ProfilePolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\Profile; @@ -17,7 +36,6 @@ class ProfilePolicy */ public function __construct() { - } public function edit(User $user, Profile $profile) diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index b98f105..f87838a 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\User; @@ -16,7 +35,6 @@ class UserPolicy */ public function __construct() { - } public function edit(User $authUser, User $user) @@ -27,7 +45,7 @@ class UserPolicy // This refers to the admin tools that let staff update more information than users themselves can public function adminEdit(User $authUser, User $user) { - return $authUser->hasRole('admin') && $authUser->isNot($user); + return $authUser->hasRole('admin') && $authUser->isNot($user); } public function viewStaff(User $user) @@ -42,11 +60,11 @@ class UserPolicy public function terminate(User $authUser) { - return $authUser->hasRole('admin'); + return $authUser->hasRole('admin'); } public function delete(User $authUser, User $subject) { - return $authUser->hasRole('admin') && $authUser->isNot($subject); + return $authUser->hasRole('admin') && $authUser->isNot($subject); } } diff --git a/app/Policies/VacancyPolicy.php b/app/Policies/VacancyPolicy.php index 7e547f2..3ff57ad 100644 --- a/app/Policies/VacancyPolicy.php +++ b/app/Policies/VacancyPolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\User; @@ -10,6 +29,7 @@ class VacancyPolicy { use HandlesAuthorization; // TODO: Switch to permissions (there are no specific permissions yet) + /** * Determine whether the user can view any models. * diff --git a/app/Policies/VotePolicy.php b/app/Policies/VotePolicy.php index 9337aa4..570e145 100644 --- a/app/Policies/VotePolicy.php +++ b/app/Policies/VotePolicy.php @@ -1,5 +1,24 @@ . + */ + namespace App\Policies; use App\User; diff --git a/app/Profile.php b/app/Profile.php index 9a64243..0367189 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -1,19 +1,37 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; class Profile extends Model { - public $fillable = [ 'profileShortBio', 'profileAboutMe', 'avatarPreference', 'socialLinks', - 'userID' + 'userID', ]; @@ -21,5 +39,4 @@ class Profile extends Model { return $this->belongsTo('App\User', 'userID', 'id'); } - } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 8d8144e..cef8e40 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -1,5 +1,24 @@ . + */ + namespace App\Providers; use App\Application; @@ -30,7 +49,7 @@ class AppServiceProvider extends ServiceProvider public function boot() { Sentry\init([ - 'release' => env('RELEASE') + 'release' => env('RELEASE'), ]); Schema::defaultStringLength(191); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 52563b4..ee9ecfd 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -1,27 +1,42 @@ . + */ + namespace App\Providers; -use App\Policies\ProfilePolicy; -use App\Policies\VacancyPolicy; -use App\Policies\UserPolicy; -use App\Policies\BanPolicy; -use App\Policies\FormPolicy; -use App\Policies\VotePolicy; -use App\Policies\ApplicationPolicy; -use App\Policies\AppointmentPolicy; - -use App\User; -use App\Form; -use App\Vote; -use App\Vacancy; use App\Application; use App\Appointment; use App\Ban; - - +use App\Form; +use App\Policies\ApplicationPolicy; +use App\Policies\AppointmentPolicy; +use App\Policies\BanPolicy; +use App\Policies\FormPolicy; +use App\Policies\ProfilePolicy; +use App\Policies\UserPolicy; +use App\Policies\VacancyPolicy; +use App\Policies\VotePolicy; +use App\User; +use App\Vacancy; +use App\Vote; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { @@ -40,7 +55,7 @@ class AuthServiceProvider extends ServiceProvider 'App\Form' => 'App\Policies\FormPolicy', Vote::class => VotePolicy::class, Ban::class => BanPolicy::class, - Appointment::class => AppointmentPolicy::class + Appointment::class => AppointmentPolicy::class, ]; /** diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 395c518..f3d62bd 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -1,5 +1,24 @@ . + */ + namespace App\Providers; use Illuminate\Support\Facades\Broadcast; diff --git a/app/Providers/ContextAwareValidatorProvider.php b/app/Providers/ContextAwareValidatorProvider.php index 749de88..bc4f309 100644 --- a/app/Providers/ContextAwareValidatorProvider.php +++ b/app/Providers/ContextAwareValidatorProvider.php @@ -1,10 +1,28 @@ . + */ + namespace App\Providers; -use Illuminate\Support\ServiceProvider; - use App; +use Illuminate\Support\ServiceProvider; class ContextAwareValidatorProvider extends ServiceProvider { @@ -25,10 +43,8 @@ class ContextAwareValidatorProvider extends ServiceProvider */ public function boot() { - App::bind('contextAwareValidator', function(){ - - return new App\Helpers\ContextAwareValidator(); - - }); + App::bind('contextAwareValidator', function () { + return new App\Helpers\ContextAwareValidator(); + }); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 6ea787f..11b6295 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -1,5 +1,24 @@ . + */ + namespace App\Providers; use App\Listeners\LogAuthenticationFailure; @@ -22,23 +41,23 @@ class EventServiceProvider extends ServiceProvider protected $listen = [ Registered::class => [ SendEmailVerificationNotification::class, - OnUserRegistration::class + OnUserRegistration::class, ], Failed::class => [ - LogAuthenticationFailure::class + LogAuthenticationFailure::class, ], Login::class => [ - LogAuthenticationSuccess::class + LogAuthenticationSuccess::class, ], 'App\Events\ApplicationApprovedEvent' => [ - 'App\Listeners\PromoteUser' + 'App\Listeners\PromoteUser', ], 'App\Events\ApplicationDeniedEvent' => [ - 'App\Listeners\DenyUser' + 'App\Listeners\DenyUser', ], 'App\Events\UserBannedEvent' => [ - 'App\Listeners\OnUserBanned' - ] + 'App\Listeners\OnUserBanned', + ], ]; /** @@ -48,7 +67,6 @@ class EventServiceProvider extends ServiceProvider */ public function boot() { - parent::boot(); // diff --git a/app/Providers/IPInfoProvider.php b/app/Providers/IPInfoProvider.php index 3b7150a..5ebe6f8 100644 --- a/app/Providers/IPInfoProvider.php +++ b/app/Providers/IPInfoProvider.php @@ -1,9 +1,28 @@ . + */ + namespace App\Providers; -use Illuminate\Support\ServiceProvider; use App; +use Illuminate\Support\ServiceProvider; class IPInfoProvider extends ServiceProvider { @@ -24,10 +43,8 @@ class IPInfoProvider extends ServiceProvider */ public function boot() { - App::bind('ipInformationFacade', function(){ - + App::bind('ipInformationFacade', function () { return new App\CustomFacades\IP(); - }); } } diff --git a/app/Providers/MojangStatusProvider.php b/app/Providers/MojangStatusProvider.php index 3fe4dc1..84bb47d 100644 --- a/app/Providers/MojangStatusProvider.php +++ b/app/Providers/MojangStatusProvider.php @@ -1,13 +1,32 @@ . + */ + namespace App\Providers; use GuzzleHttp\Exception\ConnectException; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; -use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\View; +use Illuminate\Support\ServiceProvider; class MojangStatusProvider extends ServiceProvider { @@ -29,19 +48,15 @@ class MojangStatusProvider extends ServiceProvider public function boot() { // TODO: (IMPORTANT) Switch this to Middleware - if (!Cache::has('mojang_status')) - { - Log::info("Mojang Status Provider: Mojang Status not found in the cache; Sending new request."); + if (! Cache::has('mojang_status')) { + Log::info('Mojang Status Provider: Mojang Status not found in the cache; Sending new request.'); - try - { + try { $mcstatus = Http::get(config('general.urls.mojang.statuscheck')); Cache::put('mojang_status', base64_encode($mcstatus->body()), now()->addDays(3)); - } - catch(ConnectException $connectException) - { + } catch (ConnectException $connectException) { Log::critical('Could not connect to Mojang servers: Cannot check/refresh status', [ - 'message' => $connectException->getMessage() + 'message' => $connectException->getMessage(), ]); } } diff --git a/app/Providers/OptionsProvider.php b/app/Providers/OptionsProvider.php index 3bc98db..7c70e8e 100644 --- a/app/Providers/OptionsProvider.php +++ b/app/Providers/OptionsProvider.php @@ -1,9 +1,28 @@ . + */ + namespace App\Providers; -use Illuminate\Support\ServiceProvider; use App; +use Illuminate\Support\ServiceProvider; class OptionsProvider extends ServiceProvider { @@ -24,7 +43,7 @@ class OptionsProvider extends ServiceProvider */ public function boot() { - App::bind('smOptions', function (){ + App::bind('smOptions', function () { return new App\Helpers\Options(); }); } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 1235909..eab8bbb 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,5 +1,24 @@ . + */ + namespace App\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; diff --git a/app/Providers/UUIDConversionProvider.php b/app/Providers/UUIDConversionProvider.php index 6ce7fad..7f26d6b 100644 --- a/app/Providers/UUIDConversionProvider.php +++ b/app/Providers/UUIDConversionProvider.php @@ -1,9 +1,28 @@ . + */ + namespace App\Providers; -use Illuminate\Support\ServiceProvider; use App; +use Illuminate\Support\ServiceProvider; class UUIDConversionProvider extends ServiceProvider { @@ -24,10 +43,8 @@ class UUIDConversionProvider extends ServiceProvider */ public function boot() { - App::bind('uuidConversionFacade', function(){ - + App::bind('uuidConversionFacade', function () { return new App\UUID\UUID(); - }); } } diff --git a/app/Response.php b/app/Response.php index 08312ea..dfa96d0 100644 --- a/app/Response.php +++ b/app/Response.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -9,10 +28,9 @@ class Response extends Model public $fillable = [ 'responseFormID', 'associatedVacancyID', - 'responseData' + 'responseData', ]; - public function form() { return $this->hasOne('App\Form', 'id', 'responseFormID'); diff --git a/app/StaffProfile.php b/app/StaffProfile.php index 8d6cfba..87d131b 100644 --- a/app/StaffProfile.php +++ b/app/StaffProfile.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -12,7 +31,7 @@ class StaffProfile extends Model 'approvalDate', 'terminationDate', 'resignationDate', - 'memberNotes' + 'memberNotes', ]; } diff --git a/app/Traits/AuthenticatesTwoFactor.php b/app/Traits/AuthenticatesTwoFactor.php index 4b6ab31..9a36d51 100644 --- a/app/Traits/AuthenticatesTwoFactor.php +++ b/app/Traits/AuthenticatesTwoFactor.php @@ -1,40 +1,54 @@ . + */ + namespace App\Traits; -use Google2FA; use App\Http\Requests\Add2FASecretRequest; +use Google2FA; use Illuminate\Support\Facades\Log; - trait AuthenticatesTwoFactor { - public function verify2FA(Add2FASecretRequest $request) { $isValid = Google2FA::verifyKey($request->user()->twofa_secret, $request->otp); - if ($isValid) - { - Google2FA::login(); + if ($isValid) { + Google2FA::login(); - Log::info('SECURITY (postauth): One-time password verification succeeded', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip() - ]); + Log::info('SECURITY (postauth): One-time password verification succeeded', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip(), + ]); - return redirect()->to($this->redirectTo); - } - else - { - Log::warning('SECURITY (preauth): One-time password verification failed', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip() - ]); + return redirect()->to($this->redirectTo); + } else { + Log::warning('SECURITY (preauth): One-time password verification failed', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip(), + ]); - $request->session()->flash('error', 'Your one time password is invalid.'); - return redirect()->back(); + $request->session()->flash('error', 'Your one time password is invalid.'); + + return redirect()->back(); } } - } diff --git a/app/Traits/Cancellable.php b/app/Traits/Cancellable.php index cbccb67..53a9e37 100644 --- a/app/Traits/Cancellable.php +++ b/app/Traits/Cancellable.php @@ -1,24 +1,37 @@ . + */ namespace App\Traits; - use App\Facades\Options; trait Cancellable { - public function chooseChannelsViaOptions() { $channels = []; - if (Options::getOption('enable_slack_notifications') == 1) - { + if (Options::getOption('enable_slack_notifications') == 1) { array_push($channels, 'slack'); - } - elseif(Options::getOption('enable_email_notifications') == 1) - { + } elseif (Options::getOption('enable_email_notifications') == 1) { array_push($channels, 'email'); } @@ -32,18 +45,15 @@ trait Cancellable public function via($notifiable) { - if ($this->optOut($notifiable)) - { + if ($this->optOut($notifiable)) { return []; } return $this->channels(); } - public function optOut($notifiable) { return false; } - } diff --git a/app/UUID/UUID.php b/app/UUID/UUID.php index cee10d1..2a4de20 100644 --- a/app/UUID/UUID.php +++ b/app/UUID/UUID.php @@ -1,59 +1,66 @@ . + */ namespace App\UUID; -use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; class UUID { - // Caching would not be needed here since this method won't be used in pages that loop over a collection of usernames. public function toUUID($username) { - if (is_null($username)) - { - throw new \LogicException('Argument username for ' . __METHOD__ . ' cannot be null!'); + if (is_null($username)) { + throw new \LogicException('Argument username for '.__METHOD__.' cannot be null!'); } - $response = json_decode(Http::post(trim(config('general.urls.mojang.api')) . '/profiles/minecraft', [ - $username + $response = json_decode(Http::post(trim(config('general.urls.mojang.api')).'/profiles/minecraft', [ + $username, ])->body(), true); - if (isset($response[0])) - { - return $response[0]['id']; - + if (isset($response[0])) { + return $response[0]['id']; } - throw new \InvalidArgumentException("You must supply a valid, premium Minecraft account to sign up."); + throw new \InvalidArgumentException('You must supply a valid, premium Minecraft account to sign up.'); } // Note: Caching could simply be assigning the username to it's UUID, however, to make this work, we'd need to loop over all cache items, which would be slighly ineffective public function toUsername($uuid) { - - if (is_null($uuid)) - { - throw new \LogicException('Argument uuid for ' . __METHOD__ . ' cannot be null!'); + if (is_null($uuid)) { + throw new \LogicException('Argument uuid for '.__METHOD__.' cannot be null!'); } - $shortUUID = substr($uuid, 0, 8); - $username = Cache::remember('uuid_' . $shortUUID, now()->addDays(30), function() use ($shortUUID, $uuid) { + $shortUUID = substr($uuid, 0, 8); + $username = Cache::remember('uuid_'.$shortUUID, now()->addDays(30), function () use ($shortUUID, $uuid) { + $response = json_decode(Http::get(trim(config('general.urls.mojang.session')).'/session/minecraft/profile/'.$uuid)->body(), true); - $response = json_decode(Http::get(trim(config('general.urls.mojang.session')) . '/session/minecraft/profile/' . $uuid)->body(), true); + Log::debug('Caching '.$shortUUID.'for thirty days'); - Log::debug('Caching ' . $shortUUID . 'for thirty days'); return $response['name']; + }); - }); - - return $username; - + return $username; } - - } diff --git a/app/User.php b/app/User.php index 06f555f..fc55a40 100644 --- a/app/User.php +++ b/app/User.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Contracts\Auth\MustVerifyEmail; @@ -18,7 +37,7 @@ class User extends Authenticatable implements MustVerifyEmail * @var array */ protected $fillable = [ - 'name', 'email', 'password', 'originalIP', 'username', 'uuid', 'dob' + 'name', 'email', 'password', 'originalIP', 'username', 'uuid', 'dob', ]; /** @@ -39,7 +58,6 @@ class User extends Authenticatable implements MustVerifyEmail 'email_verified_at' => 'datetime', ]; - // public function applications() { @@ -66,15 +84,11 @@ class User extends Authenticatable implements MustVerifyEmail return $this->hasMany('App\Comment', 'authorID', 'id'); } - public function isBanned() { - return !$this->bans()->get()->isEmpty(); + return ! $this->bans()->get()->isEmpty(); } - - - public function isStaffMember() { return $this->hasAnyRole('reviewer', 'admin', 'hiringManager'); @@ -82,13 +96,11 @@ class User extends Authenticatable implements MustVerifyEmail public function has2FA() { - return !is_null($this->twofa_secret); + return ! is_null($this->twofa_secret); } - - public function routeNotificationForSlack($notification) { - return config('slack.webhook.integrationURL'); + return config('slack.webhook.integrationURL'); } } diff --git a/app/Vacancy.php b/app/Vacancy.php index 1a84996..476e14e 100644 --- a/app/Vacancy.php +++ b/app/Vacancy.php @@ -1,14 +1,31 @@ . + */ + namespace App; +use GrahamCampbell\Markdown\Facades\Markdown; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; -use GrahamCampbell\Markdown\Facades\Markdown; - - class Vacancy extends Model { public $fillable = [ @@ -21,30 +38,25 @@ class Vacancy extends Model 'vacancyFormID', 'vacancyCount', 'vacancyStatus', - 'vacancySlug' + 'vacancySlug', ]; - /** - * Get the HTML variant of the vacancyFullDescription attribute. - * - * @param string $value The original value - * @return string - */ + * Get the HTML variant of the vacancyFullDescription attribute. + * + * @param string $value The original value + * @return string + */ public function getVacancyFullDescriptionAttribute($value) { - if (!is_null($value)) - { - return Markdown::convertToHTML($value); - } - else - { - return null; + if (! is_null($value)) { + return Markdown::convertToHTML($value); + } else { + return null; } } - public function forms() { return $this->belongsTo('App\Form', 'vacancyFormID', 'id'); @@ -53,20 +65,18 @@ class Vacancy extends Model public function open() { $this->update([ - 'vacancyStatus' => 'OPEN' + 'vacancyStatus' => 'OPEN', ]); - Log::info("Vacancies: Vacancy " . $this->id . " (" . $this->vacancyName . ") opened by " . Auth::user()->name); + Log::info('Vacancies: Vacancy '.$this->id.' ('.$this->vacancyName.') opened by '.Auth::user()->name); } public function close() { $this->update([ - 'vacancyStatus' => 'CLOSED' + 'vacancyStatus' => 'CLOSED', ]); - Log::warning("Vacancies: Vacancy " . $this->id . " (" . $this->vacancyName . ") closed by " . Auth::user()->name); - + Log::warning('Vacancies: Vacancy '.$this->id.' ('.$this->vacancyName.') closed by '.Auth::user()->name); } - } diff --git a/app/View/Components/Alert.php b/app/View/Components/Alert.php index 04b5f3c..be497b4 100644 --- a/app/View/Components/Alert.php +++ b/app/View/Components/Alert.php @@ -1,12 +1,30 @@ . + */ + namespace App\View\Components; use Illuminate\View\Component; class Alert extends Component { - public $alertType; public $extraStyling; diff --git a/app/View/Components/Card.php b/app/View/Components/Card.php index 6a5a953..ee20d0d 100644 --- a/app/View/Components/Card.php +++ b/app/View/Components/Card.php @@ -1,5 +1,24 @@ . + */ + namespace App\View\Components; use Illuminate\View\Component; @@ -8,14 +27,10 @@ class Card extends Component { public $id; - public $cardTitle; - - public $footerStyle; - /** * Create a new component instance. * diff --git a/app/View/Components/Form.php b/app/View/Components/Form.php index 06e868d..821ea5d 100644 --- a/app/View/Components/Form.php +++ b/app/View/Components/Form.php @@ -1,16 +1,34 @@ . + */ + namespace App\View\Components; use Illuminate\View\Component; class Form extends Component { - public $formFields; - public $disableFields = false; + /** * Create a new component instance. * @@ -18,7 +36,7 @@ class Form extends Component */ public function __construct($disableFields = false) { - $this->disableFields = $disableFields; + $this->disableFields = $disableFields; } /** diff --git a/app/View/Components/GlobalErrors.php b/app/View/Components/GlobalErrors.php index ab130be..5360e13 100644 --- a/app/View/Components/GlobalErrors.php +++ b/app/View/Components/GlobalErrors.php @@ -1,5 +1,24 @@ . + */ + namespace App\View\Components; use Illuminate\View\Component; diff --git a/app/View/Components/Modal.php b/app/View/Components/Modal.php index 4ab43d3..fd23b3f 100644 --- a/app/View/Components/Modal.php +++ b/app/View/Components/Modal.php @@ -1,5 +1,24 @@ . + */ + namespace App\View\Components; use Illuminate\View\Component; @@ -8,13 +27,10 @@ class Modal extends Component { public $id; - public $modalLabel; - public $modalTitle; - public $includeCloseButton; /** diff --git a/app/View/Components/NoPermission.php b/app/View/Components/NoPermission.php index 6da51a1..f55f30a 100644 --- a/app/View/Components/NoPermission.php +++ b/app/View/Components/NoPermission.php @@ -1,5 +1,24 @@ . + */ + namespace App\View\Components; use Illuminate\View\Component; @@ -9,6 +28,7 @@ class NoPermission extends Component public $type; public $inDashboard; + /** * Create a new component instance. * @@ -16,9 +36,9 @@ class NoPermission extends Component */ public function __construct($type, $inDashboard = true) { - $this->type = $type; + $this->type = $type; - $this->inDashboard = $inDashboard; + $this->inDashboard = $inDashboard; } /** diff --git a/app/Vote.php b/app/Vote.php index 6a89b21..74a5aa0 100644 --- a/app/Vote.php +++ b/app/Vote.php @@ -1,5 +1,24 @@ . + */ + namespace App; use Illuminate\Database\Eloquent\Model; @@ -14,7 +33,7 @@ class Vote extends Model ]; public $touches = [ - 'application' + 'application', ]; public function user() diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17d..c89db0b 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,15 +1,23 @@ . + */ $app = new Illuminate\Foundation\Application( $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) diff --git a/config/adminlte.php b/config/adminlte.php index 9c71a48..867c604 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -1,5 +1,24 @@ . + */ + return [ /* @@ -50,7 +69,7 @@ return [ 'logo_img_class' => 'brand-image img-circle elevation-3', 'logo_img_xl' => null, 'logo_img_xl_class' => 'brand-image-xs', - 'logo_img_alt' => env('APP_NAME') . '\'s Temporary Logo', + 'logo_img_alt' => env('APP_NAME').'\'s Temporary Logo', /* |-------------------------------------------------------------------------- @@ -211,17 +230,17 @@ return [ [ 'text' => 'm_home', 'icon' => 'fas fa-home', - 'url' => 'dashboard' + 'url' => 'dashboard', ], [ 'text' => 'm_directory', 'icon' => 'fas fa-users', 'url' => 'users/directory', - 'can' => 'profiles.view.others' + 'can' => 'profiles.view.others', ], [ 'header' => 'h_applications', - 'can' => 'applications.view.own' + 'can' => 'applications.view.own', ], [ 'text' => 'm_my_applications', @@ -231,8 +250,8 @@ return [ [ 'text' => 'm_curr_applications', 'icon' => 'fas fa-fw fa-check-double', - 'url' => '/applications/my-applications' - ] + 'url' => '/applications/my-applications', + ], ], ], @@ -242,40 +261,40 @@ return [ [ 'text' => 'm_profile_settings', 'url' => '/profile/settings', - 'icon' => 'fas fa-fw fa-cog' + 'icon' => 'fas fa-fw fa-cog', ], [ 'text' => 'm_account_settings', 'icon' => 'fas fa-user-circle', - 'url' => '/profile/settings/account' + 'url' => '/profile/settings/account', ], [ 'header' => 'h_app_management', - 'can' => ['applications.view.all', 'applications.vote'] + 'can' => ['applications.view.all', 'applications.vote'], ], [ 'text' => 'm_all_apps', 'url' => 'applications/staff/all', 'icon' => 'fas fa-list-ol', - 'can' => 'applications.view.all' + 'can' => 'applications.view.all', ], [ 'text' => 'm_outstanding_apps', 'url' => '/applications/staff/outstanding', 'icon' => 'far fa-folder-open', - 'can' => 'applications.view.all' + 'can' => 'applications.view.all', ], [ 'text' => 'm_interview_queue', 'url' => '/applications/staff/pending-interview', 'icon' => 'fas fa-fw fa-microphone-alt', - 'can' => 'applications.view.all' + 'can' => 'applications.view.all', ], [ 'text' => 'm_peer_approval', 'url' => '/applications/staff/peer-review', 'icon' => 'fas fa-fw fa-search', - 'can' => 'applications.view.all' + 'can' => 'applications.view.all', ], [ 'header' => 'h_admin', @@ -284,20 +303,20 @@ return [ 'admin.userlist', 'admin.stafflist', 'admin.hiring.*', - 'admin.notificationsettings.*' - ] + 'admin.notificationsettings.*', + ], ], [ 'text' => 'm_staff_m', 'icon' => 'fas fa-fw fa-users', 'url' => '/hr/staff-members', - 'can' => 'admin.stafflist' + 'can' => 'admin.stafflist', ], [ // players who haven't been promoted yet 'text' => 'm_reg_players', 'icon' => 'fas fa-fw fa-user-friends', 'url' => '/hr/players', - 'can' => 'admin.userlist' + 'can' => 'admin.userlist', ], [ 'text' => 'sm_hiring_man', @@ -307,7 +326,7 @@ return [ [ 'text' => 'm_open_pos', 'icon' => 'fas fa-box-open', - 'url' => '/admin/positions' + 'url' => '/admin/positions', ], [ 'text' => 'sm_forms', @@ -316,16 +335,16 @@ return [ [ 'text' => 'sm_all_forms', 'icon' => 'far fa-list-alt', - 'url' => '/admin/forms' + 'url' => '/admin/forms', ], [ 'text' => 'm_form_builder', 'icon' => 'fas fa-fw fa-hammer', - 'url' => '/admin/forms/builder' - ] - ] - ] - ] + 'url' => '/admin/forms/builder', + ], + ], + ], + ], ], [ 'text' => 'sm_app_settings', @@ -336,22 +355,22 @@ return [ 'text' => 'm_global_app_s', 'icon' => 'fas fa-cogs', 'url' => '/admin/settings', - 'can' => 'admin.settings.view' + 'can' => 'admin.settings.view', ], [ 'text' => 'm_devtools', 'icon' => 'fas fa-code', 'url' => '/admin/devtools', - 'can' => 'admin.developertools.use' - ] - ] + 'can' => 'admin.developertools.use', + ], + ], ], [ 'text' => 'm_s_logs', 'url' => '/admin/maintenance/system-logs', 'icon' => 'fas fa-clipboard-list', - 'can' => 'admin.maintenance.logs.view' - ] + 'can' => 'admin.maintenance.logs.view', + ], ], /* @@ -417,9 +436,9 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => '/js/formbuilder.js' - ] - ] + 'location' => '/js/formbuilder.js', + ], + ], ], [ 'name' => 'Select2', @@ -482,14 +501,14 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => 'https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js' + 'location' => 'https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js', ], [ 'type' => 'css', 'asset' => false, - 'location' => 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css' - ] - ] + 'location' => 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css', + ], + ], ], [ 'name' => 'GlobalTooltip', @@ -498,9 +517,9 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => '/js/globaltooltip.js' - ] - ] + 'location' => '/js/globaltooltip.js', + ], + ], ], [ 'name' => 'DatePickApp', @@ -509,36 +528,36 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => '/js/datepick.js' - ] - ] - ], - [ - 'name' => 'Fullcalendar', - 'active' => true, - 'files' => [ - [ - 'type' => 'js', - 'asset' => false, - 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.js', + 'location' => '/js/datepick.js', + ], ], - [ - 'type' => 'css', - 'asset' => false, - 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css' - ] - ] ], [ - 'name' => 'AuthCustomisations', - 'active' => true, - 'files' => [ - [ - 'type' => 'css', - 'asset' => false, - 'location' => '/css/authpages.css' - ] - ] - ] + 'name' => 'Fullcalendar', + 'active' => true, + 'files' => [ + [ + 'type' => 'js', + 'asset' => false, + 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.js', + ], + [ + 'type' => 'css', + 'asset' => false, + 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css', + ], + ], + ], + [ + 'name' => 'AuthCustomisations', + 'active' => true, + 'files' => [ + [ + 'type' => 'css', + 'asset' => false, + 'location' => '/css/authpages.css', + ], + ], + ], ], ]; diff --git a/config/app.php b/config/app.php index 96e5484..188a5ba 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,24 @@ . + */ + return [ /* @@ -15,7 +34,6 @@ return [ 'name' => env('APP_NAME', 'Laravel'), - /* |-------------------------------------------------------------------------- | Application Homepage @@ -193,7 +211,7 @@ return [ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, \App\Providers\MojangStatusProvider::class, - \App\Providers\OptionsProvider::class + \App\Providers\OptionsProvider::class, ], @@ -250,7 +268,7 @@ return [ 'IP' => App\Facades\IP::class, 'Markdown' => GrahamCampbell\Markdown\Facades\Markdown::class, 'ContextAwareValidator' => App\Facades\ContextAwareValidation::class, - 'Settings' => App\Facades\Options::class + 'Settings' => App\Facades\Options::class, ], diff --git a/config/auth.php b/config/auth.php index aaf982b..071543c 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/broadcasting.php b/config/broadcasting.php index 3bba110..2fa0dee 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/cache.php b/config/cache.php index 4f41fdf..475421a 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Support\Str; return [ diff --git a/config/cors.php b/config/cors.php index 558369d..c06d99f 100644 --- a/config/cors.php +++ b/config/cors.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/database.php b/config/database.php index b42d9b3..493e1af 100644 --- a/config/database.php +++ b/config/database.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Support\Str; return [ diff --git a/config/filesystems.php b/config/filesystems.php index 94c8112..7ae4a84 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/general.php b/config/general.php index 7749c97..bdc5e90 100644 --- a/config/general.php +++ b/config/general.php @@ -1,27 +1,45 @@ . + */ + return [ - 'urls' => - [ + 'urls' => [ 'mojang' => [ 'statuscheck' => env('MOJANG_STATUS_URL') ?? 'https://status.mojang.com/check', 'api' => env('MOJANG_API_URL') ?? ' https://api.mojang.com', - 'session' => env('MOJANG_SESSIONAPI_URL') ?? 'https://sessionserver.mojang.com' + 'session' => env('MOJANG_SESSIONAPI_URL') ?? 'https://sessionserver.mojang.com', ], 'ipapi' => [ - 'ipcheck' => env('IPGEO_API_URL') ?? 'https://api.ipgeolocation.io/ipgeo' - ] + 'ipcheck' => env('IPGEO_API_URL') ?? 'https://api.ipgeolocation.io/ipgeo', + ], ], 'keys' => [ 'ipapi' => [ - 'apikey' => env('IPGEO_API_KEY') - ] + 'apikey' => env('IPGEO_API_KEY'), + ], - ] + ], ]; diff --git a/config/google2fa.php b/config/google2fa.php index 4dd5824..42eab82 100644 --- a/config/google2fa.php +++ b/config/google2fa.php @@ -1,5 +1,24 @@ . + */ + return [ /* @@ -59,7 +78,7 @@ return [ * One Time Password error message. */ 'error_messages' => [ - 'wrong_otp' => "Your one time code was incorrect.", + 'wrong_otp' => 'Your one time code was incorrect.', 'cannot_be_empty' => 'The one time code cannot be empty.', 'unknown' => 'An unknown error has occurred. Please try again.', ], diff --git a/config/hashing.php b/config/hashing.php index 8425770..e7a93bf 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/laravellocalization.php b/config/laravellocalization.php index 37578d7..8055da2 100644 --- a/config/laravellocalization.php +++ b/config/laravellocalization.php @@ -1,5 +1,24 @@ . + */ + return [ // Uncomment the languages that your site supports - or add new ones. @@ -64,7 +83,7 @@ return [ '/app.css', '/robots.txt', '/slides/*', - '/auth/logout' + '/auth/logout', ], ]; diff --git a/config/log-viewer.php b/config/log-viewer.php index b0532ba..c733cb7 100644 --- a/config/log-viewer.php +++ b/config/log-viewer.php @@ -1,5 +1,24 @@ . + */ + use Arcanedev\LogViewer\Contracts\Utilities\Filesystem; return [ @@ -95,7 +114,7 @@ return [ 'icons' => [ /** * Font awesome >= 4.3 - * http://fontawesome.io/icons/ + * http://fontawesome.io/icons/. */ 'all' => 'fa fa-fw fa-list', // http://fontawesome.io/icon/list/ 'emergency' => 'fa fa-fw fa-bug', // http://fontawesome.io/icon/bug/ diff --git a/config/logging.php b/config/logging.php index 088c204..283cdeb 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,5 +1,24 @@ . + */ + use Monolog\Handler\NullHandler; use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; diff --git a/config/mail.php b/config/mail.php index 5201bb7..bf9953d 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/markdown.php b/config/markdown.php index 6408d6f..a206312 100644 --- a/config/markdown.php +++ b/config/markdown.php @@ -3,12 +3,22 @@ declare(strict_types=1); /* - * This file is part of Laravel Markdown. + * Copyright © 2020 Miguel Nogueira * - * (c) Graham Campbell + * This file is part of Raspberry Staff Manager. * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ return [ diff --git a/config/notification.php b/config/notification.php index 8f3da66..4abedc4 100644 --- a/config/notification.php +++ b/config/notification.php @@ -1,12 +1,31 @@ . + */ + return [ - 'sender' => [ + 'sender' => [ - 'address' => 'teams@spacejewel-hosting.com', - 'name' => 'RaspberryNet Teams' + 'address' => 'teams@spacejewel-hosting.com', + 'name' => 'RaspberryNet Teams', - ] + ], ]; diff --git a/config/permission.php b/config/permission.php index d4a7764..23d28d1 100644 --- a/config/permission.php +++ b/config/permission.php @@ -1,5 +1,24 @@ . + */ + return [ 'models' => [ diff --git a/config/queue.php b/config/queue.php index 00b76d6..1ca3b3a 100644 --- a/config/queue.php +++ b/config/queue.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/recaptcha.php b/config/recaptcha.php index 82e0813..3487b17 100644 --- a/config/recaptcha.php +++ b/config/recaptcha.php @@ -1,14 +1,33 @@ . + */ + return [ 'keys' => [ 'sitekey' => env('RECAPTCHA_SITE_KEY'), - 'secret' => env('RECAPTCHA_PRIVATE_KEY') + 'secret' => env('RECAPTCHA_PRIVATE_KEY'), ], 'verify' => [ - 'apiurl' => env('RECAPTCHA_VERIFY_URL') - ] + 'apiurl' => env('RECAPTCHA_VERIFY_URL'), + ], ]; diff --git a/config/sentry.php b/config/sentry.php index 4d9ef4d..f8e2b20 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -1,5 +1,24 @@ . + */ + return [ 'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')), diff --git a/config/services.php b/config/services.php index 2a1d616..cbda757 100644 --- a/config/services.php +++ b/config/services.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/config/session.php b/config/session.php index 37ae384..a5b0c90 100644 --- a/config/session.php +++ b/config/session.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Support\Str; return [ diff --git a/config/slack.php b/config/slack.php index 2651cc4..02627e7 100644 --- a/config/slack.php +++ b/config/slack.php @@ -1,12 +1,30 @@ . + */ + return [ - 'webhook' => [ + 'webhook' => [ - 'integrationURL' => env('SLACK_INTEGRATION_WEBHOOK') - - ] + 'integrationURL' => env('SLACK_INTEGRATION_WEBHOOK'), + ], ]; diff --git a/config/view.php b/config/view.php index 22b8a18..44a66b9 100644 --- a/config/view.php +++ b/config/view.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 741edea..451aae6 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,6 +1,23 @@ . + */ use App\User; use Faker\Generator as Faker; diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 4ee8c3e..2596a64 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 0ee0a36..7715044 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 9bddee3..b348447 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_04_29_022245_create_profiles_table.php b/database/migrations/2020_04_29_022245_create_profiles_table.php index b3ac735..bc21b71 100644 --- a/database/migrations/2020_04_29_022245_create_profiles_table.php +++ b/database/migrations/2020_04_29_022245_create_profiles_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -19,7 +38,7 @@ class CreateProfilesTable extends Migration $table->text('profileAboutMe')->nullable(); $table->enum('avatarPreference', [ 'crafatar', // Mojang Profile - 'gravatar' // Email profile + 'gravatar', // Email profile ])->default('gravatar'); $table->text('socialLinks')->nullable(); $table->bigInteger('userID')->unsigned(); diff --git a/database/migrations/2020_04_29_022402_create_applications_table.php b/database/migrations/2020_04_29_022402_create_applications_table.php index 3074f8e..529e046 100644 --- a/database/migrations/2020_04_29_022402_create_applications_table.php +++ b/database/migrations/2020_04_29_022402_create_applications_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -28,7 +47,7 @@ class CreateApplicationsTable extends Migration 'STAGE_INTERVIEW', 'STAGE_INTERVIEW_SCHEDULED', 'APPROVED', - 'DENIED' + 'DENIED', ])->default('STAGE_SUBMITTED'); $table->timestamps(); diff --git a/database/migrations/2020_04_29_022421_create_votes_table.php b/database/migrations/2020_04_29_022421_create_votes_table.php index 9062e22..6164f56 100644 --- a/database/migrations/2020_04_29_022421_create_votes_table.php +++ b/database/migrations/2020_04_29_022421_create_votes_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -18,7 +37,7 @@ class CreateVotesTable extends Migration $table->bigInteger('userID')->unsigned(); $table->enum('allowedVoteType', [ 'VOTE_DENY', - 'VOTE_APPROVE' + 'VOTE_APPROVE', ]); $table->timestamps(); diff --git a/database/migrations/2020_04_29_022442_create_appointments_table.php b/database/migrations/2020_04_29_022442_create_appointments_table.php index 77cce6e..08d60f2 100644 --- a/database/migrations/2020_04_29_022442_create_appointments_table.php +++ b/database/migrations/2020_04_29_022442_create_appointments_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -23,11 +42,11 @@ class CreateAppointmentsTable extends Migration 'DISCORD', 'SKYPE', 'MEET', - 'TEAMSPEAK' + 'TEAMSPEAK', ]); $table->enum('appointmentStatus', [ - 'SCHEDULED', - 'CONCLUDED' // TODO: Review whether this status is necessary + 'SCHEDULED', + 'CONCLUDED', // TODO: Review whether this status is necessary ])->default('SCHEDULED'); $table->boolean('userAccepted')->default(false); $table->longText('meetingNotes')->nullable(); diff --git a/database/migrations/2020_04_29_022541_create_forms_table.php b/database/migrations/2020_04_29_022541_create_forms_table.php index 610a6d7..32fbc27 100644 --- a/database/migrations/2020_04_29_022541_create_forms_table.php +++ b/database/migrations/2020_04_29_022541_create_forms_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -19,7 +38,7 @@ class CreateFormsTable extends Migration $table->string('formStructure'); $table->enum('formStatus', [ 'ACTIVE', - 'SUSPENDED' + 'SUSPENDED', ]); $table->timestamps(); }); diff --git a/database/migrations/2020_04_29_022542_create_vacancies_table.php b/database/migrations/2020_04_29_022542_create_vacancies_table.php index dfa3aa0..7f17357 100644 --- a/database/migrations/2020_04_29_022542_create_vacancies_table.php +++ b/database/migrations/2020_04_29_022542_create_vacancies_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -26,7 +45,6 @@ class CreateVacanciesTable extends Migration $table->foreign('vacancyFormID') ->references('id') ->on('forms'); - }); } diff --git a/database/migrations/2020_04_29_023647_create_staff_profiles_table.php b/database/migrations/2020_04_29_023647_create_staff_profiles_table.php index 352dbca..be2ba85 100644 --- a/database/migrations/2020_04_29_023647_create_staff_profiles_table.php +++ b/database/migrations/2020_04_29_023647_create_staff_profiles_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_04_29_030107_create_responses_table.php b/database/migrations/2020_04_29_030107_create_responses_table.php index 35ea926..02acc46 100644 --- a/database/migrations/2020_04_29_030107_create_responses_table.php +++ b/database/migrations/2020_04_29_030107_create_responses_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -23,7 +42,6 @@ class CreateResponsesTable extends Migration $table->foreign('responseFormID') ->references('id') ->on('forms'); - }); } diff --git a/database/migrations/2020_04_29_195848_votes_has_application.php b/database/migrations/2020_04_29_195848_votes_has_application.php index 4464737..8ccf13f 100644 --- a/database/migrations/2020_04_29_195848_votes_has_application.php +++ b/database/migrations/2020_04_29_195848_votes_has_application.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -13,8 +32,7 @@ class VotesHasApplication extends Migration */ public function up() { - Schema::create('votes_has_application', function (Blueprint $table){ - + Schema::create('votes_has_application', function (Blueprint $table) { $table->id('id'); $table->bigInteger('vote_id')->unsigned(); $table->bigInteger('application_id')->unsigned(); @@ -22,7 +40,6 @@ class VotesHasApplication extends Migration $table->foreign('vote_id')->references('id')->on('votes'); $table->foreign('application_id')->references('id')->on('applications'); - }); } diff --git a/database/migrations/2020_05_02_223355_create_cache_table.php b/database/migrations/2020_05_02_223355_create_cache_table.php index 7b73e5f..f50d132 100644 --- a/database/migrations/2020_05_02_223355_create_cache_table.php +++ b/database/migrations/2020_05_02_223355_create_cache_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_05_07_021604_add_status_to_vacancies.php b/database/migrations/2020_05_07_021604_add_status_to_vacancies.php index 1d40c92..830bec4 100644 --- a/database/migrations/2020_05_07_021604_add_status_to_vacancies.php +++ b/database/migrations/2020_05_07_021604_add_status_to_vacancies.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -16,7 +35,7 @@ class AddStatusToVacancies extends Migration Schema::table('vacancies', function (Blueprint $table) { $table->enum('vacancyStatus', [ 'OPEN', - 'CLOSED' + 'CLOSED', ])->after('vacancyCount'); }); } diff --git a/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php b/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php index 5daa2c6..e14f42e 100644 --- a/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php +++ b/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php b/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php index e8b8591..f2a3ea4 100644 --- a/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php +++ b/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_05_14_004542_change_form_structure_length.php b/database/migrations/2020_05_14_004542_change_form_structure_length.php index 9ba0006..eb699ca 100644 --- a/database/migrations/2020_05_14_004542_change_form_structure_length.php +++ b/database/migrations/2020_05_14_004542_change_form_structure_length.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -13,8 +32,8 @@ class ChangeFormStructureLength extends Migration */ public function up() { - Schema::table('forms', function (Blueprint $schema){ - $schema->longText('formStructure')->change(); + Schema::table('forms', function (Blueprint $schema) { + $schema->longText('formStructure')->change(); }); } diff --git a/database/migrations/2020_05_29_234431_create_permission_tables.php b/database/migrations/2020_05_29_234431_create_permission_tables.php index 3f9448d..e790941 100644 --- a/database/migrations/2020_05_29_234431_create_permission_tables.php +++ b/database/migrations/2020_05_29_234431_create_permission_tables.php @@ -1,8 +1,27 @@ . + */ + use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; class CreatePermissionTables extends Migration { diff --git a/database/migrations/2020_06_08_153602_create_bans_table.php b/database/migrations/2020_06_08_153602_create_bans_table.php index 7674c17..dd18593 100644 --- a/database/migrations/2020_06_08_153602_create_bans_table.php +++ b/database/migrations/2020_06_08_153602_create_bans_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -25,7 +44,6 @@ class CreateBansTable extends Migration $table->foreign('userID') ->references('id') ->on('users'); - }); } diff --git a/database/migrations/2020_06_20_210255_create_comments_table.php b/database/migrations/2020_06_20_210255_create_comments_table.php index 501254f..fc9c1d2 100644 --- a/database/migrations/2020_06_20_210255_create_comments_table.php +++ b/database/migrations/2020_06_20_210255_create_comments_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -28,8 +47,6 @@ class CreateCommentsTable extends Migration ->references('id') ->on('applications'); }); - - } /** diff --git a/database/migrations/2020_06_25_093708_create_jobs_table.php b/database/migrations/2020_06_25_093708_create_jobs_table.php index 1be9e8a..55d71dd 100644 --- a/database/migrations/2020_06_25_093708_create_jobs_table.php +++ b/database/migrations/2020_06_25_093708_create_jobs_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php b/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php index d049d3f..e443101 100644 --- a/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php +++ b/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php b/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php index b4dd0a9..5ebf83d 100644 --- a/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php +++ b/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_08_30_152900_create_options_table.php b/database/migrations/2020_08_30_152900_create_options_table.php index 2c0537c..570a08f 100644 --- a/database/migrations/2020_08_30_152900_create_options_table.php +++ b/database/migrations/2020_08_30_152900_create_options_table.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 0db89f7..2c6e2f1 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder diff --git a/database/seeds/DefaultOptionsSeeder.php b/database/seeds/DefaultOptionsSeeder.php index 90e73c5..34811fc 100644 --- a/database/seeds/DefaultOptionsSeeder.php +++ b/database/seeds/DefaultOptionsSeeder.php @@ -1,5 +1,24 @@ . + */ + use App\Facades\Options; use Illuminate\Database\Seeder; @@ -19,9 +38,7 @@ class DefaultOptionsSeeder extends Seeder Options::setOption('notify_applicant_approved', true, 'Notify when an applicant is approved'); // done Options::setOption('notify_vacancystatus_change', false, 'Notify when a vacancy\'s status changes'); // done - Options::setOption('enable_slack_notifications', true, 'Enable slack notifications'); Options::setOption('enable_email_notifications', true, 'Enable e-mail notifications'); - } } diff --git a/database/seeds/NewPermissions.php b/database/seeds/NewPermissions.php index cc8b484..8d3dc85 100644 --- a/database/seeds/NewPermissions.php +++ b/database/seeds/NewPermissions.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Role; @@ -14,7 +33,7 @@ class NewPermissions extends Seeder public function run() { $developer = Role::create([ - 'name' => 'developer' + 'name' => 'developer', ]); $admin = Role::where('name', 'admin')->first(); @@ -25,7 +44,5 @@ class NewPermissions extends Seeder $developer->givePermissionTo('admin.developertools.use'); $admin->givePermissionTo('admin.settings.view'); $admin->givePermissionTo('admin.settings.edit'); - - } } diff --git a/database/seeds/PermissionSeeder.php b/database/seeds/PermissionSeeder.php index 2fde5f4..66694a1 100644 --- a/database/seeds/PermissionSeeder.php +++ b/database/seeds/PermissionSeeder.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Role; @@ -18,24 +37,24 @@ class PermissionSeeder extends Seeder // $user = Role::create( [ - 'name' => 'user' + 'name' => 'user', ] ); $reviewer = Role::create( [ - 'name' => 'reviewer' + 'name' => 'reviewer', ] ); $hiringManager = Role::create( [ - 'name' => 'hiringManager' + 'name' => 'hiringManager', ] ); $admin = Role::create([ - 'name' => 'admin' + 'name' => 'admin', ]); // Spatie wildcard permissions (same concept of MC permissions) @@ -67,19 +86,18 @@ class PermissionSeeder extends Seeder Permission::create(['name' => 'admin.notificationsettings.*']); Permission::create(['name' => 'admin.maintenance.logs.view']); - Permission::create(['name' => 'admin.developertools.use']); $user->givePermissionTo([ 'applications.submit', 'applications.view.own', - 'profiles.view.others' + 'profiles.view.others', ]); // Able to view applications and vote on them once they reach the right stage, but not approve applications up to said stage $reviewer->givePermissionTo([ 'applications.view.all', - 'applications.vote' + 'applications.vote', ]); $hiringManager->givePermissionTo('appointments.*', 'applications.*', 'admin.hiring.*'); @@ -92,7 +110,7 @@ class PermissionSeeder extends Seeder 'admin.notificationsettings.*', 'profiles.view.others', 'profiles.edit.others', - 'admin.maintenance.logs.view' + 'admin.maintenance.logs.view', ]); } } diff --git a/database/seeds/UserSeeder.php b/database/seeds/UserSeeder.php index 8ba2603..0f2f838 100644 --- a/database/seeds/UserSeeder.php +++ b/database/seeds/UserSeeder.php @@ -1,5 +1,24 @@ . + */ + use App\Profile; use App\User; use Illuminate\Database\Seeder; @@ -22,7 +41,7 @@ class UserSeeder extends Seeder 'email' => 'tester1@example.com', 'username' => 'tester1', 'originalIP' => '99.18.146.235', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => 'ab22b5da02644953ace969fce85c0819', @@ -30,7 +49,7 @@ class UserSeeder extends Seeder 'email' => 'tester2@example.com', 'username' => 'tester2', 'originalIP' => '141.239.229.53', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => 'df38e6bf762944d3a600ded59a693ad1', @@ -38,7 +57,7 @@ class UserSeeder extends Seeder 'email' => 'tester3@example.com', 'username' => 'tester3', 'originalIP' => '25.63.20.97', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => '689e446484824f6bad5064e3df0aaa96', @@ -46,7 +65,7 @@ class UserSeeder extends Seeder 'email' => 'tester4@example.com', 'username' => 'tester4', 'originalIP' => '220.105.223.142', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => '172391f917bf418ab1c40ebc041ed5ba', @@ -54,7 +73,7 @@ class UserSeeder extends Seeder 'email' => 'tester5@example.com', 'username' => 'tester5', 'originalIP' => '224.66.76.60', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => '371f34dcce2a4457bf385ab9417a2345', @@ -62,7 +81,7 @@ class UserSeeder extends Seeder 'email' => 'tester6@example.com', 'username' => 'tester6', 'originalIP' => '97.113.131.0', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => '89aa5222855542bebe7a7780248ef5f9', @@ -70,7 +89,7 @@ class UserSeeder extends Seeder 'email' => 'tester7@example.com', 'username' => 'tester7', 'originalIP' => '15.160.137.222', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], ]; @@ -83,7 +102,7 @@ class UserSeeder extends Seeder 'email' => 'user1@example.com', 'username' => 'user1', 'originalIP' => '253.25.237.78', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => '5f900018241e4aaba7883f2d5c5c2357', @@ -91,7 +110,7 @@ class UserSeeder extends Seeder 'email' => 'user2@example.com', 'username' => 'user2', 'originalIP' => '82.92.156.176', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ], [ 'uuid' => 'ba9780c3270745c6840eaabe1bf8aa14', @@ -99,34 +118,31 @@ class UserSeeder extends Seeder 'email' => 'user3@example.com', 'username' => 'user3', 'originalIP' => '224.123.129.17', - 'password' => Hash::make('password') - ] + 'password' => Hash::make('password'), + ], ]; - foreach ($regularUsers as $regularUser) - { + foreach ($regularUsers as $regularUser) { $user = User::create($regularUser); Profile::create([ - 'profileShortBio' => 'Random data ' . rand(0,1000), - 'profileAboutMe' => 'Random data ' . rand(0, 1000), - 'socialLinks' => "[]", // empty json set, not an array + 'profileShortBio' => 'Random data '.rand(0, 1000), + 'profileAboutMe' => 'Random data '.rand(0, 1000), + 'socialLinks' => '[]', // empty json set, not an array 'avatarPreference' => 'gravatar', - 'userID' => $user->id + 'userID' => $user->id, ]); } - foreach($staffUsers as $staffUser) - { + foreach ($staffUsers as $staffUser) { $user = User::create($staffUser); Profile::create([ - 'profileShortBio' => 'Random data ' . rand(0,1000), - 'profileAboutMe' => 'Random data ' . rand(0, 1000), - 'socialLinks' => "[]", + 'profileShortBio' => 'Random data '.rand(0, 1000), + 'profileAboutMe' => 'Random data '.rand(0, 1000), + 'socialLinks' => '[]', 'avatarPreference' => 'gravatar', - 'userID' => $user->id + 'userID' => $user->id, ]); - } User::create([ @@ -135,11 +151,10 @@ class UserSeeder extends Seeder 'email' => 'admin@example.com', 'username' => 'admin', 'originalIP' => '192.168.1.2', - 'password' => Hash::make('password') + 'password' => Hash::make('password'), ]); - foreach (User::all() as $user) - { + foreach (User::all() as $user) { $user->assignRole('reviewer', 'user'); } } diff --git a/public/index.php b/public/index.php index 4584cbc..e71fcb9 100644 --- a/public/index.php +++ b/public/index.php @@ -1,10 +1,22 @@ + * This file is part of Raspberry Staff Manager. + * + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ define('LARAVEL_START', microtime(true)); diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index e5506df..f7c5c88 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index 9be7687..cb43ba7 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -1,24 +1,28 @@ 'translate-me' - * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. - * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: - * auth.php, pagination.php, passwords.php, and validation.php. - * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote + * Copyright © 2020 Miguel Nogueira * - * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. - * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. + * This file is part of Raspberry Staff Manager. * - * Thank you for translating! + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ return [ // ============== MENU TRANSLATIONS ====================== - 'menu' => [ 'my_apps' => 'My Applications', @@ -28,11 +32,9 @@ return [ 'all_forms' => 'All Forms', 'app_settings' => 'App Settings', 'global_app_settings' => 'Global App Settings', - 'system_logs' => 'System Logs' + 'system_logs' => 'System Logs', ], - - // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -79,10 +81,9 @@ return [ 'platform' => 'Platform', 'notepad' => 'Shared Notepad', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Appointment Information', - 'ip_info' => 'IP Address Information for' + 'ip_info' => 'IP Address Information for', ], - // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -125,8 +126,6 @@ return [ 'contactlabel_subject' => 'Subject (ex. Site Suggestion)', 'contactlabel_send' => 'Send', - - // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Two-Factor Authentication', @@ -151,7 +150,7 @@ return [ 'line4' => 'A minimum of 10 characters;', 'line5' => 'At least 3 uppercase characters;', 'line6' => 'At least 3 numbers;', - 'line7' => 'Any number of special characters.' + 'line7' => 'Any number of special characters.', ], 'sronly_confirmpassword' => 'Confirm Password', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Minecraft Username (Premium)', @@ -180,7 +179,6 @@ return [ 'upcoming' => 'Your upcoming interviews', 'soon' => 'Coming soon', - //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administration', @@ -198,7 +196,6 @@ return [ 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', - 'forms' => 'Forms', 'positions' => 'Positions', // Context: Positions as in job opening 'edit_form' => 'Edit Form', @@ -234,7 +231,7 @@ return [ 'cancel' => 'Cancel', 'close_vacancy' => 'Close Position', 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', - '' + '', ], @@ -252,7 +249,7 @@ return [ 'title' => 'Application Form Preview', 'looks' => 'This is how your form looks like to applicants', 'f_info' => 'You may edit it and add more fields later.', - '' + '', ], 'forms_p' => [ @@ -260,7 +257,7 @@ return [ 'available_forms' => 'Available forms', 'form_title' => 'Form title', 'empty_noforms' => 'Nothing to see here! Please add some forms first.', - 'new_form' => 'NEW FORM' + 'new_form' => 'NEW FORM', ], 'players' => [ @@ -281,7 +278,7 @@ return [ Registered players are those without a staff role in the team management application. There may be other users registered in the platform, but they won't be displayed here. ", - 'see_staff' => 'See Staff Members' + 'see_staff' => 'See Staff Members', ], @@ -305,7 +302,7 @@ return [ 'settings' => 'Settings', 'settings_header' => 'Notification Settings', 'settings_p' => 'Change which notifications are sent here.', - 'back_btn' => 'Back to Dashboard' + 'back_btn' => 'Back to Dashboard', ], @@ -331,19 +328,17 @@ return [ 'yrs_old' => 'Years old', // Context: "years old" as in: Tom is 24 years old 'line1' => 'We\'re glad you\'ve decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.', 'line2' => 'Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :agerqr.', - 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.' + 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.', ], - 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.' + 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.', ], - 'application_m' => [ 'title' => 'Application Management', 'all_apps' => 'All Applications', 'modal_confirm' => 'Are you sure?', 'really_delete' => 'Really delete this?', - 'outstanding_sm' => 'Outstanding', 'outstanding_apps' => 'Outstanding Applications', 'outstanding_subm' => 'Outstanding (Submitted)', @@ -400,7 +395,7 @@ return [ 'title' => 'Voting Reminder', 'line1' => 'Applications which gain more than 50% of positive votes are automatically approved after one day.', 'line2' => 'Conversely, applications that do not reach this number are automatically denied.', - 'line3' => 'Please note that the vote system can be overridden' + 'line3' => 'Please note that the vote system can be overridden', ], @@ -521,7 +516,7 @@ return [ 'insta_user' => 'Instagram Username', 'discord_user' => 'Discord Handle', - 'update_prfl' => 'Update Profile' + 'update_prfl' => 'Update Profile', ], @@ -532,7 +527,7 @@ return [ 'app_process' => [ 'title' => 'Application Process', 'line1' => 'Please allow up to three days for your application to be processed. Your application will be reviewed by every team member, and will move up in stages.', - 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.' + 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.', ], 'account_standing' => 'Account Standing', @@ -551,9 +546,9 @@ return [ 'itsyou' => 'It\'s you!', 'title' => 'User Directory', - 'directory' => 'Directory' + 'directory' => 'Directory', - ] + ], ], @@ -590,7 +585,7 @@ return [ 'line1' => 'If you weren\'t present during this meeting, you can view the shared meeting notepad to help you make a decision.', 'line2' => 'You may vote on as many applications as needed; However, you can only vote once per application.', - 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' + 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.', ], @@ -605,7 +600,7 @@ return [ 'max_chars' => 'max characters', // Context: A number is added before max characters 'post' => 'Post', // Context: Post as in post comment - ] + ], // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php index d481411..59d8a5d 100644 --- a/resources/lang/en/pagination.php +++ b/resources/lang/en/pagination.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index 2345a56..8957598 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index a65914f..b5f1b29 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/es/auth.php b/resources/lang/es/auth.php index e5506df..f7c5c88 100644 --- a/resources/lang/es/auth.php +++ b/resources/lang/es/auth.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/es/messages.php b/resources/lang/es/messages.php index 9be7687..cb43ba7 100644 --- a/resources/lang/es/messages.php +++ b/resources/lang/es/messages.php @@ -1,24 +1,28 @@ 'translate-me' - * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. - * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: - * auth.php, pagination.php, passwords.php, and validation.php. - * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote + * Copyright © 2020 Miguel Nogueira * - * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. - * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. + * This file is part of Raspberry Staff Manager. * - * Thank you for translating! + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ return [ // ============== MENU TRANSLATIONS ====================== - 'menu' => [ 'my_apps' => 'My Applications', @@ -28,11 +32,9 @@ return [ 'all_forms' => 'All Forms', 'app_settings' => 'App Settings', 'global_app_settings' => 'Global App Settings', - 'system_logs' => 'System Logs' + 'system_logs' => 'System Logs', ], - - // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -79,10 +81,9 @@ return [ 'platform' => 'Platform', 'notepad' => 'Shared Notepad', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Appointment Information', - 'ip_info' => 'IP Address Information for' + 'ip_info' => 'IP Address Information for', ], - // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -125,8 +126,6 @@ return [ 'contactlabel_subject' => 'Subject (ex. Site Suggestion)', 'contactlabel_send' => 'Send', - - // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Two-Factor Authentication', @@ -151,7 +150,7 @@ return [ 'line4' => 'A minimum of 10 characters;', 'line5' => 'At least 3 uppercase characters;', 'line6' => 'At least 3 numbers;', - 'line7' => 'Any number of special characters.' + 'line7' => 'Any number of special characters.', ], 'sronly_confirmpassword' => 'Confirm Password', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Minecraft Username (Premium)', @@ -180,7 +179,6 @@ return [ 'upcoming' => 'Your upcoming interviews', 'soon' => 'Coming soon', - //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administration', @@ -198,7 +196,6 @@ return [ 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', - 'forms' => 'Forms', 'positions' => 'Positions', // Context: Positions as in job opening 'edit_form' => 'Edit Form', @@ -234,7 +231,7 @@ return [ 'cancel' => 'Cancel', 'close_vacancy' => 'Close Position', 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', - '' + '', ], @@ -252,7 +249,7 @@ return [ 'title' => 'Application Form Preview', 'looks' => 'This is how your form looks like to applicants', 'f_info' => 'You may edit it and add more fields later.', - '' + '', ], 'forms_p' => [ @@ -260,7 +257,7 @@ return [ 'available_forms' => 'Available forms', 'form_title' => 'Form title', 'empty_noforms' => 'Nothing to see here! Please add some forms first.', - 'new_form' => 'NEW FORM' + 'new_form' => 'NEW FORM', ], 'players' => [ @@ -281,7 +278,7 @@ return [ Registered players are those without a staff role in the team management application. There may be other users registered in the platform, but they won't be displayed here. ", - 'see_staff' => 'See Staff Members' + 'see_staff' => 'See Staff Members', ], @@ -305,7 +302,7 @@ return [ 'settings' => 'Settings', 'settings_header' => 'Notification Settings', 'settings_p' => 'Change which notifications are sent here.', - 'back_btn' => 'Back to Dashboard' + 'back_btn' => 'Back to Dashboard', ], @@ -331,19 +328,17 @@ return [ 'yrs_old' => 'Years old', // Context: "years old" as in: Tom is 24 years old 'line1' => 'We\'re glad you\'ve decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.', 'line2' => 'Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :agerqr.', - 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.' + 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.', ], - 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.' + 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.', ], - 'application_m' => [ 'title' => 'Application Management', 'all_apps' => 'All Applications', 'modal_confirm' => 'Are you sure?', 'really_delete' => 'Really delete this?', - 'outstanding_sm' => 'Outstanding', 'outstanding_apps' => 'Outstanding Applications', 'outstanding_subm' => 'Outstanding (Submitted)', @@ -400,7 +395,7 @@ return [ 'title' => 'Voting Reminder', 'line1' => 'Applications which gain more than 50% of positive votes are automatically approved after one day.', 'line2' => 'Conversely, applications that do not reach this number are automatically denied.', - 'line3' => 'Please note that the vote system can be overridden' + 'line3' => 'Please note that the vote system can be overridden', ], @@ -521,7 +516,7 @@ return [ 'insta_user' => 'Instagram Username', 'discord_user' => 'Discord Handle', - 'update_prfl' => 'Update Profile' + 'update_prfl' => 'Update Profile', ], @@ -532,7 +527,7 @@ return [ 'app_process' => [ 'title' => 'Application Process', 'line1' => 'Please allow up to three days for your application to be processed. Your application will be reviewed by every team member, and will move up in stages.', - 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.' + 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.', ], 'account_standing' => 'Account Standing', @@ -551,9 +546,9 @@ return [ 'itsyou' => 'It\'s you!', 'title' => 'User Directory', - 'directory' => 'Directory' + 'directory' => 'Directory', - ] + ], ], @@ -590,7 +585,7 @@ return [ 'line1' => 'If you weren\'t present during this meeting, you can view the shared meeting notepad to help you make a decision.', 'line2' => 'You may vote on as many applications as needed; However, you can only vote once per application.', - 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' + 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.', ], @@ -605,7 +600,7 @@ return [ 'max_chars' => 'max characters', // Context: A number is added before max characters 'post' => 'Post', // Context: Post as in post comment - ] + ], // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/es/pagination.php b/resources/lang/es/pagination.php index d481411..59d8a5d 100644 --- a/resources/lang/es/pagination.php +++ b/resources/lang/es/pagination.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php index 2345a56..8957598 100644 --- a/resources/lang/es/passwords.php +++ b/resources/lang/es/passwords.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php index a65914f..b5f1b29 100644 --- a/resources/lang/es/validation.php +++ b/resources/lang/es/validation.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php index e5506df..f7c5c88 100644 --- a/resources/lang/fr/auth.php +++ b/resources/lang/fr/auth.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/fr/messages.php b/resources/lang/fr/messages.php index 9be7687..cb43ba7 100644 --- a/resources/lang/fr/messages.php +++ b/resources/lang/fr/messages.php @@ -1,24 +1,28 @@ 'translate-me' - * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. - * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: - * auth.php, pagination.php, passwords.php, and validation.php. - * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote + * Copyright © 2020 Miguel Nogueira * - * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. - * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. + * This file is part of Raspberry Staff Manager. * - * Thank you for translating! + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ return [ // ============== MENU TRANSLATIONS ====================== - 'menu' => [ 'my_apps' => 'My Applications', @@ -28,11 +32,9 @@ return [ 'all_forms' => 'All Forms', 'app_settings' => 'App Settings', 'global_app_settings' => 'Global App Settings', - 'system_logs' => 'System Logs' + 'system_logs' => 'System Logs', ], - - // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -79,10 +81,9 @@ return [ 'platform' => 'Platform', 'notepad' => 'Shared Notepad', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Appointment Information', - 'ip_info' => 'IP Address Information for' + 'ip_info' => 'IP Address Information for', ], - // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -125,8 +126,6 @@ return [ 'contactlabel_subject' => 'Subject (ex. Site Suggestion)', 'contactlabel_send' => 'Send', - - // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Two-Factor Authentication', @@ -151,7 +150,7 @@ return [ 'line4' => 'A minimum of 10 characters;', 'line5' => 'At least 3 uppercase characters;', 'line6' => 'At least 3 numbers;', - 'line7' => 'Any number of special characters.' + 'line7' => 'Any number of special characters.', ], 'sronly_confirmpassword' => 'Confirm Password', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Minecraft Username (Premium)', @@ -180,7 +179,6 @@ return [ 'upcoming' => 'Your upcoming interviews', 'soon' => 'Coming soon', - //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administration', @@ -198,7 +196,6 @@ return [ 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', - 'forms' => 'Forms', 'positions' => 'Positions', // Context: Positions as in job opening 'edit_form' => 'Edit Form', @@ -234,7 +231,7 @@ return [ 'cancel' => 'Cancel', 'close_vacancy' => 'Close Position', 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', - '' + '', ], @@ -252,7 +249,7 @@ return [ 'title' => 'Application Form Preview', 'looks' => 'This is how your form looks like to applicants', 'f_info' => 'You may edit it and add more fields later.', - '' + '', ], 'forms_p' => [ @@ -260,7 +257,7 @@ return [ 'available_forms' => 'Available forms', 'form_title' => 'Form title', 'empty_noforms' => 'Nothing to see here! Please add some forms first.', - 'new_form' => 'NEW FORM' + 'new_form' => 'NEW FORM', ], 'players' => [ @@ -281,7 +278,7 @@ return [ Registered players are those without a staff role in the team management application. There may be other users registered in the platform, but they won't be displayed here. ", - 'see_staff' => 'See Staff Members' + 'see_staff' => 'See Staff Members', ], @@ -305,7 +302,7 @@ return [ 'settings' => 'Settings', 'settings_header' => 'Notification Settings', 'settings_p' => 'Change which notifications are sent here.', - 'back_btn' => 'Back to Dashboard' + 'back_btn' => 'Back to Dashboard', ], @@ -331,19 +328,17 @@ return [ 'yrs_old' => 'Years old', // Context: "years old" as in: Tom is 24 years old 'line1' => 'We\'re glad you\'ve decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.', 'line2' => 'Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :agerqr.', - 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.' + 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.', ], - 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.' + 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.', ], - 'application_m' => [ 'title' => 'Application Management', 'all_apps' => 'All Applications', 'modal_confirm' => 'Are you sure?', 'really_delete' => 'Really delete this?', - 'outstanding_sm' => 'Outstanding', 'outstanding_apps' => 'Outstanding Applications', 'outstanding_subm' => 'Outstanding (Submitted)', @@ -400,7 +395,7 @@ return [ 'title' => 'Voting Reminder', 'line1' => 'Applications which gain more than 50% of positive votes are automatically approved after one day.', 'line2' => 'Conversely, applications that do not reach this number are automatically denied.', - 'line3' => 'Please note that the vote system can be overridden' + 'line3' => 'Please note that the vote system can be overridden', ], @@ -521,7 +516,7 @@ return [ 'insta_user' => 'Instagram Username', 'discord_user' => 'Discord Handle', - 'update_prfl' => 'Update Profile' + 'update_prfl' => 'Update Profile', ], @@ -532,7 +527,7 @@ return [ 'app_process' => [ 'title' => 'Application Process', 'line1' => 'Please allow up to three days for your application to be processed. Your application will be reviewed by every team member, and will move up in stages.', - 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.' + 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.', ], 'account_standing' => 'Account Standing', @@ -551,9 +546,9 @@ return [ 'itsyou' => 'It\'s you!', 'title' => 'User Directory', - 'directory' => 'Directory' + 'directory' => 'Directory', - ] + ], ], @@ -590,7 +585,7 @@ return [ 'line1' => 'If you weren\'t present during this meeting, you can view the shared meeting notepad to help you make a decision.', 'line2' => 'You may vote on as many applications as needed; However, you can only vote once per application.', - 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' + 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.', ], @@ -605,7 +600,7 @@ return [ 'max_chars' => 'max characters', // Context: A number is added before max characters 'post' => 'Post', // Context: Post as in post comment - ] + ], // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/fr/pagination.php b/resources/lang/fr/pagination.php index d481411..59d8a5d 100644 --- a/resources/lang/fr/pagination.php +++ b/resources/lang/fr/pagination.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php index 2345a56..8957598 100644 --- a/resources/lang/fr/passwords.php +++ b/resources/lang/fr/passwords.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php index a65914f..b5f1b29 100644 --- a/resources/lang/fr/validation.php +++ b/resources/lang/fr/validation.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/pt/auth.php b/resources/lang/pt/auth.php index fffd887..bb63a28 100644 --- a/resources/lang/pt/auth.php +++ b/resources/lang/pt/auth.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/pt/messages.php b/resources/lang/pt/messages.php index bc83c18..78123b1 100644 --- a/resources/lang/pt/messages.php +++ b/resources/lang/pt/messages.php @@ -1,24 +1,28 @@ 'translate-me' - * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. - * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: - * auth.php, pagination.php, passwords.php, and validation.php. - * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote + * Copyright © 2020 Miguel Nogueira * - * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. - * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. + * This file is part of Raspberry Staff Manager. * - * Thank you for translating! + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ return [ // ============== MENU TRANSLATIONS ====================== - 'menu' => [ 'my_apps' => 'As minhas Candidaturas', @@ -28,11 +32,9 @@ return [ 'all_forms' => 'Todos os Formulários', 'app_settings' => 'Configurações da App', 'global_app_settings' => 'Configurações globais do aplicativo', - 'system_logs' => 'Registos do Sistema' + 'system_logs' => 'Registos do Sistema', ], - - // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -79,10 +81,9 @@ return [ 'platform' => 'Plataforma', 'notepad' => 'Bloco Notas Partilhado', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Informação da Marcação', - 'ip_info' => 'Informação de Endereço IP para' + 'ip_info' => 'Informação de Endereço IP para', ], - // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Início', @@ -125,8 +126,6 @@ return [ 'contactlabel_subject' => 'Assunto (ex. sugestão do site)', 'contactlabel_send' => 'Enviar', - - // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Autenticação de dois Fatores', @@ -151,7 +150,7 @@ return [ 'line4' => 'Um mínimo de 10 caracteres;', 'line5' => 'Pelo menos 3 caracteres maiúsculos;', 'line6' => 'Pelo menos 3 números;', - 'line7' => 'Números e caracteres especiais.' + 'line7' => 'Números e caracteres especiais.', ], 'sronly_confirmpassword' => 'Confirmar palavra-passe', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Utilizador do Minecraft (Premium)', @@ -180,7 +179,6 @@ return [ 'upcoming' => 'As suas próximas entrevistas', 'soon' => 'Disponível em breve', - //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administração', @@ -198,7 +196,6 @@ return [ 'artisan_evaluate' => 'Artisan: Avaliar Votos Agora', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'Este painel também pode ser usado para substituir completamente o sistema de votação em cenários de impasse', - 'forms' => 'Formulários', 'positions' => 'Vagas', // Context: Positions as in job opening 'edit_form' => 'Editar Formulário', @@ -234,7 +231,7 @@ return [ 'cancel' => 'Cancelar', 'close_vacancy' => 'Fechar vaga', 'description_tooltip' => 'Adicione coisas como requisitos de admissão, responsabilidades e funções, e qualquer outra coisa que você ache necessária', - '' + '', ], @@ -252,7 +249,7 @@ return [ 'title' => 'Pré-visualização do Formulário de Candidatura', 'looks' => 'É assim que o seu formulário aparece para os candidatos', 'f_info' => 'Você pode editá-lo e adicionar mais campos posteriormente.', - '' + '', ], 'forms_p' => [ @@ -260,7 +257,7 @@ return [ 'available_forms' => 'Formulários disponíveis', 'form_title' => 'Título do Formulário', 'empty_noforms' => 'Nada para ver aqui! Por favor, crie alguns formulários primeiro.', - 'new_form' => 'NOVO FORMULÁRIO' + 'new_form' => 'NOVO FORMULÁRIO', ], 'players' => [ @@ -277,11 +274,11 @@ return [ 'banned' => 'Banido', 'active' => 'Ativo', 'no_reg' => 'Não há jogadores inscritos!', - 'no_reg_exp' => " + 'no_reg_exp' => ' Jogadores registados são aqueles que não possuem uma função administrativa no aplicativo de gestão de equipa. Pode haver outros utilizadores registados na plataforma, mas eles não serão exibidos aqui. -", - 'see_staff' => 'Ver Membros da Equipa' +', + 'see_staff' => 'Ver Membros da Equipa', ], @@ -289,11 +286,11 @@ return [ 'application_form' => 'Formulário de Candidatura', 'select_form' => 'Selecione um formulário...', - 'no_form_error' => " + 'no_form_error' => ' Não pode criar uma vaga sem qualquer formulário cujos quais as pessoas se poderiam candidatar. Crie um formulário primeiro, e depois crie uma vaga. Um único formulário pode ter várias vagas, para que possa anexar futuras vagas ao mesmo formulário, se quiser. -", +', 'new_pos' => 'NOVA VAGA', 'empty_pos_warning' => 'Nada para ver aqui! Abra algumas vagas primeiro. Isso fará os candidatos aparecerem! (esperançoso)', 'manage_forms' => 'GERIR FORMULÁRIOS DE CANDIDATURA', @@ -305,7 +302,7 @@ return [ 'settings' => 'Definições', 'settings_header' => 'Configuração das notificações', 'settings_p' => 'Altere quais notificações são enviadas aqui.', - 'back_btn' => 'Voltar ao painel' + 'back_btn' => 'Voltar ao painel', ], @@ -331,19 +328,17 @@ return [ 'yrs_old' => 'Anos de idade', // Context: "years old" as in: Tom is 24 years old 'line1' => 'Estamos felizes que você decidiu se candidatar. Geralmente, as candidaturas levam 48 horas para serem processadas e revisadas. Dependendo das circunstâncias e do volume de candidaturas, você poderá receber uma resposta em um período mais curto de tempo.', 'line2' => 'Por favor, preencha o formulário abaixo. Mantenha todas as respostas concisas e completas. Lembre-se de que o requisito de idade é de pelo menos :agerqr.', - 'line3' => 'Perguntar sobre a sua candidatura resultará em ser negado instantaneamente. Tudo o que você precisa saber está aqui.' + 'line3' => 'Perguntar sobre a sua candidatura resultará em ser negado instantaneamente. Tudo o que você precisa saber está aqui.', ], - 'app_timeout' => 'A sua conta não pode enviar outra candidatura. Por favor, espere :days mais dias antes de tentar enviar uma candidatura.' + 'app_timeout' => 'A sua conta não pode enviar outra candidatura. Por favor, espere :days mais dias antes de tentar enviar uma candidatura.', ], - 'application_m' => [ 'title' => 'Gestão de Candidaturas', 'all_apps' => 'Todas as Candidaturas', 'modal_confirm' => 'Tem a certeza?', 'really_delete' => 'Deseja realmente excluir isto?', - 'outstanding_sm' => 'Pendente', 'outstanding_apps' => 'Candidaturas Pendendes', 'outstanding_subm' => 'Pendente (Enviado)', @@ -400,7 +395,7 @@ return [ 'title' => 'Lembrete de votação', 'line1' => 'Candidaturas que obtêm mais de 50% dos votos positivos são automaticamente aprovadas após um dia.', 'line2' => 'Inversamente, candidaturas que não atingem esse número são automaticamente negadas.', - 'line3' => 'Por favor, lembre-se que o sistema de votação pode ser substituído' + 'line3' => 'Por favor, lembre-se que o sistema de votação pode ser substituído', ], @@ -521,7 +516,7 @@ return [ 'insta_user' => 'Nome de Utilizador do Instagram', 'discord_user' => '"Handle" do Discord', - 'update_prfl' => 'Atualizar Perfil' + 'update_prfl' => 'Atualizar Perfil', ], @@ -532,7 +527,7 @@ return [ 'app_process' => [ 'title' => 'Processo de Candidatura', 'line1' => 'Por favor, aguarde pelo menos três dias para que sua candidatura seja processada. A inscrição será revisada por todos os membros da equipa, e será promovida em fases.', - 'line2' => 'Se uma entrevista estiver programada, você precisará abrir o aplicativo aqui e confirmar a hora, data e local atribuídos para você.' + 'line2' => 'Se uma entrevista estiver programada, você precisará abrir o aplicativo aqui e confirmar a hora, data e local atribuídos para você.', ], 'account_standing' => 'Estado da Conta', @@ -551,9 +546,9 @@ return [ 'itsyou' => 'É você!', 'title' => 'Diretório de Utilizadores', - 'directory' => 'Diretório' + 'directory' => 'Diretório', - ] + ], ], @@ -590,7 +585,7 @@ return [ 'line1' => 'Se você não estava presente durante esta reunião, pode visualizar o bloco de notas da reunião partilhado para ajudá-lo a tomar uma decisão.', 'line2' => 'Você pode votar em quantas candidaturas forem necessárias; no entanto, só pode votar uma vez por candidatura.', - 'line3' => 'Os votos não têm peso baseado no cargo. Esse sistema foi projetado com justiça e facilidade de uso em mente.' + 'line3' => 'Os votos não têm peso baseado no cargo. Esse sistema foi projetado com justiça e facilidade de uso em mente.', ], @@ -605,7 +600,7 @@ return [ 'max_chars' => 'caracteres no máximo', // Context: A number is added before max characters 'post' => 'Publicar', // Context: Post as in post comment - ] + ], // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/pt/pagination.php b/resources/lang/pt/pagination.php index afe7439..bed9cc9 100644 --- a/resources/lang/pt/pagination.php +++ b/resources/lang/pt/pagination.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/resources/lang/pt/passwords.php b/resources/lang/pt/passwords.php index 178ca4f..0f19f79 100644 --- a/resources/lang/pt/passwords.php +++ b/resources/lang/pt/passwords.php @@ -1,5 +1,24 @@ . + */ + return [ /* @@ -17,6 +36,6 @@ return [ 'sent' => 'Enviamos um e-mail com um link para redefinir a sua password!', 'throttled' => 'Por favor, aguarde antes de tentar novamente.', 'token' => 'Token para recuperação de senha inválido.', - 'user' => "Não foi possível encontrar um utilizador com este e-mail.", + 'user' => 'Não foi possível encontrar um utilizador com este e-mail.', ]; diff --git a/resources/lang/pt/validation.php b/resources/lang/pt/validation.php index c167208..6e69bb1 100644 --- a/resources/lang/pt/validation.php +++ b/resources/lang/pt/validation.php @@ -1,5 +1,24 @@ . + */ + return [ /* diff --git a/routes/api.php b/routes/api.php index bcb8b18..b473196 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; diff --git a/routes/channels.php b/routes/channels.php index 963b0d2..a5399ff 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Support\Facades\Broadcast; /* diff --git a/routes/console.php b/routes/console.php index da55196..8a11008 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Foundation\Inspiring; use Illuminate\Support\Facades\Artisan; diff --git a/routes/web.php b/routes/web.php index 87a50da..201154e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,5 +1,24 @@ . + */ + use Illuminate\Support\Facades\Route; use Mcamara\LaravelLocalization\Facades\LaravelLocalization; @@ -13,26 +32,21 @@ use Mcamara\LaravelLocalization\Facades\LaravelLocalization; | contains the "web" middleware group. Now create something great! | */ -Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath' ]], function (){ - - Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function (){ - +Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function () { + Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function () { Auth::routes(['verify' => true]); Route::post('/twofa/authenticate', 'Auth\TwofaController@verify2FA') ->name('verify2FA'); - }); - Route::get('/','HomeController@index') + Route::get('/', 'HomeController@index') ->middleware('eligibility'); Route::post('/form/contact', 'ContactController@create') ->name('sendSubmission'); - - Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function(){ - + Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function () { Route::get('/dashboard', 'DashboardController@index') ->name('dashboard') ->middleware('eligibility'); @@ -40,8 +54,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::get('users/directory', 'ProfileController@index') ->name('directory'); - Route::group(['prefix' => '/applications'], function (){ - + Route::group(['prefix' => '/applications'], function () { Route::get('/my-applications', 'ApplicationController@showUserApps') ->name('showUserApps') ->middleware('eligibility'); @@ -55,63 +68,48 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::delete('/comments/{comment}/delete', 'CommentController@delete') ->name('deleteApplicationComment'); - Route::patch('/notes/save/{application}', 'AppointmentController@saveNotes') ->name('saveNotes'); - Route::patch('/update/{application}/{newStatus}', 'ApplicationController@updateApplicationStatus') ->name('updateApplicationStatus'); Route::delete('{application}/delete', 'ApplicationController@delete') ->name('deleteApplication'); - Route::get('/staff/all', 'ApplicationController@showAllApps') ->name('allApplications'); - Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps') ->name('staffPendingApps'); - Route::get('/staff/peer-review', 'ApplicationController@showPeerReview') ->name('peerReview'); - Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview') ->name('pendingInterview'); - - Route::post('{application}/staff/vote', 'VoteController@vote') ->name('voteApplication'); - - }); - Route::group(['prefix' => 'appointments'], function (){ - + Route::group(['prefix' => 'appointments'], function () { Route::post('schedule/appointments/{application}', 'AppointmentController@saveAppointment') ->name('scheduleAppointment'); Route::patch('update/appointments/{application}/{status}', 'AppointmentController@updateAppointment') ->name('updateAppointment'); - }); - Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function (){ - + Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function () { Route::get('positions/{vacancySlug}', 'ApplicationController@renderApplicationForm') ->name('renderApplicationForm'); Route::post('positions/{vacancySlug}/submit', 'ApplicationController@saveApplicationAnswers') ->name('saveApplicationForm'); - }); - Route::group(['prefix' => '/profile'], function (){ - + Route::group(['prefix' => '/profile'], function () { Route::get('/settings', 'ProfileController@showProfile') ->name('showProfileSettings'); @@ -121,11 +119,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::get('user/{user}', 'ProfileController@showSingleProfile') ->name('showSingleProfile'); - Route::get('/settings/account', 'UserController@showAccount') ->name('showAccountSettings'); - Route::patch('/settings/account/change-password', 'UserController@changePassword') ->name('changePassword'); @@ -140,12 +136,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::patch('/settings/account/twofa/disable', 'UserController@remove2FASecret') ->name('disable2FA'); - }); - - Route::group(['prefix' => '/hr'], function (){ - + Route::group(['prefix' => '/hr'], function () { Route::get('staff-members', 'UserController@showStaffMembers') ->name('staffMemberList'); @@ -157,11 +150,9 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::patch('staff-members/terminate/{user}', 'UserController@terminate') ->name('terminateStaffMember'); - }); - Route::group(['prefix' => 'admin'], function (){ - + Route::group(['prefix' => 'admin'], function () { Route::get('settings', 'OptionsController@index') ->name('showSettings'); @@ -174,34 +165,27 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::delete('players/unban/{user}', 'BanController@delete') ->name('unbanUser'); - - Route::delete('players/delete/{user}', 'UserController@delete') ->name('deleteUser'); Route::patch('players/update/{user}', 'UserController@update') ->name('updateUser'); - - Route::get('positions', 'VacancyController@index') ->name('showPositions'); Route::post('positions/save', 'VacancyController@store') ->name('savePosition'); - Route::get('positions/edit/{vacancy}', 'VacancyController@edit') ->name('editPosition'); Route::patch('positions/update/{vacancy}', 'VacancyController@update') ->name('updatePosition'); - Route::patch('positions/availability/{status}/{vacancy}', 'VacancyController@updatePositionAvailability') ->name('updatePositionAvailability'); - Route::get('forms/builder', 'FormController@showFormBuilder') ->name('showFormBuilder'); @@ -223,17 +207,12 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'l Route::patch('forms/update/{form}', 'FormController@update') ->name('updateForm'); - Route::get('devtools', 'DevToolsController@index') ->name('devTools'); // we could use route model binding Route::post('devtools/vote-evaluation/force', 'DevToolsController@forceVoteCount') ->name('devToolsForceVoteCount'); - }); - }); }); - - diff --git a/server.php b/server.php index 5fb6379..8fef71b 100644 --- a/server.php +++ b/server.php @@ -1,10 +1,22 @@ + * This file is part of Raspberry Staff Manager. + * + * Raspberry Staff Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Raspberry Staff Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Raspberry Staff Manager. If not, see . */ $uri = urldecode( diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 547152f..0320f1f 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -1,5 +1,24 @@ . + */ + namespace Tests; use Illuminate\Contracts\Console\Kernel; diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index cdb5111..0ad542e 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -1,8 +1,26 @@ . + */ + namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class ExampleTest extends TestCase diff --git a/tests/Feature/OptionsTest.php b/tests/Feature/OptionsTest.php index 08a68f5..d06358e 100644 --- a/tests/Feature/OptionsTest.php +++ b/tests/Feature/OptionsTest.php @@ -1,9 +1,26 @@ . + */ + namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; -use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; class OptionsTest extends TestCase diff --git a/tests/TestCase.php b/tests/TestCase.php index 2932d4a..3997b9e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,24 @@ . + */ + namespace Tests; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 358cfc8..2d151d7 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -1,5 +1,24 @@ . + */ + namespace Tests\Unit; use PHPUnit\Framework\TestCase; From 4eb115d165e35ee4e5909b5ce86d3155708f87a9 Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Wed, 21 Oct 2020 00:29:50 +0000 Subject: [PATCH 3/8] Revert "Apply fixes from StyleCI (pull request #6)" This reverts pull request #6. > This pull request applies code style fixes from an analysis carried out by [StyleCI](https://bitbucket.styleci.io). > > For more information, click [here](https://bitbucket.styleci.io/analyses/a2Jl7D). --- app/Application.php | 28 +- app/Appointment.php | 25 +- app/Ban.php | 25 +- app/Comment.php | 23 +- app/Console/Commands/CountVotes.php | 87 +++---- app/Console/Commands/Install.php | 159 ++++++------ app/Console/Commands/SetEnv.php | 43 +--- app/Console/Kernel.php | 21 +- app/CustomFacades/IP.php | 45 ++-- app/Events/ApplicationApprovedEvent.php | 25 +- app/Events/ApplicationDeniedEvent.php | 24 +- app/Events/NewApplicationEvent.php | 22 +- app/Events/UserBannedEvent.php | 30 +-- app/Exceptions/Handler.php | 19 -- app/Facades/ContextAwareValidation.php | 30 +-- app/Facades/IP.php | 19 -- app/Facades/Options.php | 21 +- app/Facades/UUID.php | 23 +- app/Form.php | 21 +- app/Helpers/ContextAwareValidator.php | 191 +++++++------- app/Helpers/Options.php | 61 ++--- .../Controllers/ApplicationController.php | 143 ++++++----- .../Controllers/AppointmentController.php | 51 ++-- .../Auth/ConfirmPasswordController.php | 20 +- .../Auth/ForgotPasswordController.php | 19 -- app/Http/Controllers/Auth/LoginController.php | 35 +-- .../Controllers/Auth/RegisterController.php | 33 +-- .../Auth/ResetPasswordController.php | 20 +- app/Http/Controllers/Auth/TwofaController.php | 26 +- .../Auth/VerificationController.php | 20 +- app/Http/Controllers/BanController.php | 63 +++-- app/Http/Controllers/CommentController.php | 42 ++- app/Http/Controllers/ContactController.php | 55 ++-- app/Http/Controllers/Controller.php | 19 -- app/Http/Controllers/DashboardController.php | 38 +-- app/Http/Controllers/DevToolsController.php | 36 +-- app/Http/Controllers/FormController.php | 92 ++++--- app/Http/Controllers/HomeController.php | 23 +- app/Http/Controllers/OptionsController.php | 102 ++++---- app/Http/Controllers/ProfileController.php | 76 +++--- app/Http/Controllers/ResponseController.php | 21 +- .../Controllers/StaffProfileController.php | 21 +- app/Http/Controllers/UserController.php | 241 ++++++++++-------- app/Http/Controllers/VacancyController.php | 106 ++++---- app/Http/Controllers/VoteController.php | 27 +- app/Http/Kernel.php | 21 +- .../Middleware/ApplicationEligibility.php | 39 +-- app/Http/Middleware/Authenticate.php | 19 -- app/Http/Middleware/Bancheck.php | 31 +-- .../Middleware/CheckForMaintenanceMode.php | 19 -- app/Http/Middleware/EncryptCookies.php | 19 -- app/Http/Middleware/ForceLogoutMiddleware.php | 23 +- .../Middleware/RedirectIfAuthenticated.php | 19 -- app/Http/Middleware/TrimStrings.php | 19 -- app/Http/Middleware/TrustProxies.php | 21 +- app/Http/Middleware/UsernameUUID.php | 40 +-- app/Http/Middleware/VerifyCsrfToken.php | 19 -- app/Http/Requests/Add2FASecretRequest.php | 23 +- app/Http/Requests/BanUserRequest.php | 22 +- app/Http/Requests/ChangeEmailRequest.php | 21 +- app/Http/Requests/ChangePasswordRequest.php | 21 +- app/Http/Requests/DeleteUserRequest.php | 21 +- app/Http/Requests/FlushSessionsRequest.php | 21 +- app/Http/Requests/NewCommentRequest.php | 22 +- app/Http/Requests/ProfileSave.php | 22 +- app/Http/Requests/Remove2FASecretRequest.php | 21 +- app/Http/Requests/SaveNotesRequest.php | 21 +- app/Http/Requests/SearchPlayerRequest.php | 21 +- app/Http/Requests/UpdateUserRequest.php | 21 +- app/Http/Requests/VacancyEditRequest.php | 22 +- app/Http/Requests/VacancyRequest.php | 21 +- app/Http/Requests/VoteRequest.php | 21 +- app/Jobs/CleanBans.php | 47 ++-- app/Listeners/DenyUser.php | 24 +- app/Listeners/LogAuthenticationFailure.php | 26 +- app/Listeners/LogAuthenticationSuccess.php | 21 +- app/Listeners/OnUserBanned.php | 39 +-- app/Listeners/OnUserRegistration.php | 36 +-- app/Listeners/PromoteUser.php | 31 +-- app/Mail/NewContactSubmission.php | 20 +- app/Notifications/ApplicationApproved.php | 29 +-- app/Notifications/ApplicationDenied.php | 36 +-- app/Notifications/ApplicationMoved.php | 25 +- app/Notifications/AppointmentFinished.php | 21 +- app/Notifications/AppointmentScheduled.php | 31 +-- app/Notifications/ChangedPassword.php | 21 +- app/Notifications/EmailChanged.php | 21 +- app/Notifications/NewApplicant.php | 48 ++-- app/Notifications/NewComment.php | 30 +-- app/Notifications/NewContact.php | 35 +-- app/Notifications/NewUser.php | 58 ++--- app/Notifications/UserBanned.php | 29 +-- app/Notifications/VacancyClosed.php | 32 +-- app/Observers/ApplicationObserver.php | 33 +-- app/Observers/UserObserver.php | 30 +-- app/Observers/VacancyObserver.php | 20 +- app/Options.php | 21 +- app/Policies/ApplicationPolicy.php | 43 +--- app/Policies/AppointmentPolicy.php | 19 -- app/Policies/BanPolicy.php | 24 +- app/Policies/CommentPolicy.php | 22 +- app/Policies/FormPolicy.php | 22 +- app/Policies/ProfilePolicy.php | 20 +- app/Policies/UserPolicy.php | 26 +- app/Policies/VacancyPolicy.php | 20 -- app/Policies/VotePolicy.php | 19 -- app/Profile.php | 23 +- app/Providers/AppServiceProvider.php | 21 +- app/Providers/AuthServiceProvider.php | 49 ++-- app/Providers/BroadcastServiceProvider.php | 19 -- .../ContextAwareValidatorProvider.php | 30 +-- app/Providers/EventServiceProvider.php | 34 +-- app/Providers/IPInfoProvider.php | 25 +- app/Providers/MojangStatusProvider.php | 35 +-- app/Providers/OptionsProvider.php | 23 +- app/Providers/RouteServiceProvider.php | 19 -- app/Providers/UUIDConversionProvider.php | 25 +- app/Response.php | 22 +- app/StaffProfile.php | 21 +- app/Traits/AuthenticatesTwoFactor.php | 56 ++-- app/Traits/Cancellable.php | 32 +-- app/UUID/UUID.php | 61 ++--- app/User.php | 34 +-- app/Vacancy.php | 58 ++--- app/View/Components/Alert.php | 20 +- app/View/Components/Card.php | 23 +- app/View/Components/Form.php | 24 +- app/View/Components/GlobalErrors.php | 19 -- app/View/Components/Modal.php | 22 +- app/View/Components/NoPermission.php | 24 +- app/Vote.php | 21 +- bootstrap/app.php | 26 +- config/adminlte.php | 151 +++++------ config/app.php | 24 +- config/auth.php | 19 -- config/broadcasting.php | 19 -- config/cache.php | 19 -- config/cors.php | 19 -- config/database.php | 19 -- config/filesystems.php | 19 -- config/general.php | 34 +-- config/google2fa.php | 21 +- config/hashing.php | 19 -- config/laravellocalization.php | 21 +- config/log-viewer.php | 21 +- config/logging.php | 19 -- config/mail.php | 19 -- config/markdown.php | 18 +- config/notification.php | 27 +- config/permission.php | 19 -- config/queue.php | 19 -- config/recaptcha.php | 25 +- config/sentry.php | 19 -- config/services.php | 19 -- config/session.php | 19 -- config/slack.php | 26 +- config/view.php | 19 -- database/factories/UserFactory.php | 19 +- .../2014_10_12_000000_create_users_table.php | 19 -- ...12_100000_create_password_resets_table.php | 19 -- ..._08_19_000000_create_failed_jobs_table.php | 19 -- ...020_04_29_022245_create_profiles_table.php | 21 +- ...04_29_022402_create_applications_table.php | 21 +- .../2020_04_29_022421_create_votes_table.php | 21 +- ...04_29_022442_create_appointments_table.php | 25 +- .../2020_04_29_022541_create_forms_table.php | 21 +- ...20_04_29_022542_create_vacancies_table.php | 20 +- ..._29_023647_create_staff_profiles_table.php | 19 -- ...20_04_29_030107_create_responses_table.php | 20 +- ...020_04_29_195848_votes_has_application.php | 23 +- .../2020_05_02_223355_create_cache_table.php | 19 -- ...0_05_07_021604_add_status_to_vacancies.php | 21 +- .../2020_05_08_024654_add_slug_to_vacancy.php | 19 -- ...08_063141_add_vacancy_i_d_to_responses.php | 19 -- ...14_004542_change_form_structure_length.php | 23 +- ..._05_29_234431_create_permission_tables.php | 23 +- .../2020_06_08_153602_create_bans_table.php | 20 +- ...020_06_20_210255_create_comments_table.php | 21 +- .../2020_06_25_093708_create_jobs_table.php | 19 -- ...43_add_detailed_description_to_vacancy.php | 19 -- ...07_17_053247_add_twofa_secret_to_users.php | 19 -- ...2020_08_30_152900_create_options_table.php | 19 -- database/seeds/DatabaseSeeder.php | 19 -- database/seeds/DefaultOptionsSeeder.php | 21 +- database/seeds/NewPermissions.php | 23 +- database/seeds/PermissionSeeder.php | 34 +-- database/seeds/UserSeeder.php | 69 ++--- public/index.php | 20 +- resources/lang/en/auth.php | 19 -- resources/lang/en/messages.php | 69 ++--- resources/lang/en/pagination.php | 19 -- resources/lang/en/passwords.php | 19 -- resources/lang/en/validation.php | 19 -- resources/lang/es/auth.php | 19 -- resources/lang/es/messages.php | 69 ++--- resources/lang/es/pagination.php | 19 -- resources/lang/es/passwords.php | 19 -- resources/lang/es/validation.php | 19 -- resources/lang/fr/auth.php | 19 -- resources/lang/fr/messages.php | 69 ++--- resources/lang/fr/pagination.php | 19 -- resources/lang/fr/passwords.php | 19 -- resources/lang/fr/validation.php | 19 -- resources/lang/pt/auth.php | 19 -- resources/lang/pt/messages.php | 77 +++--- resources/lang/pt/pagination.php | 19 -- resources/lang/pt/passwords.php | 21 +- resources/lang/pt/validation.php | 19 -- routes/api.php | 19 -- routes/channels.php | 19 -- routes/console.php | 19 -- routes/web.php | 79 +++--- server.php | 20 +- tests/CreatesApplication.php | 19 -- tests/Feature/ExampleTest.php | 20 +- tests/Feature/OptionsTest.php | 21 +- tests/TestCase.php | 19 -- tests/Unit/ExampleTest.php | 19 -- 218 files changed, 1676 insertions(+), 5141 deletions(-) diff --git a/app/Application.php b/app/Application.php index eae5c83..f1066d8 100644 --- a/app/Application.php +++ b/app/Application.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -29,10 +10,13 @@ class Application extends Model 'applicantUserID', 'applicantFormResponseID', - 'applicationStatus', + 'applicationStatus' ]; + + + public function user() { return $this->belongsTo('App\User', 'applicantUserID', 'id'); @@ -53,6 +37,7 @@ class Application extends Model return $this->belongsToMany('App\Vote', 'votes_has_application'); } + public function comments() { return $this->hasMany('App\Comment', 'applicationID', 'id'); @@ -61,7 +46,8 @@ class Application extends Model public function setStatus($status) { return $this->update([ - 'applicationStatus' => $status, + 'applicationStatus' => $status ]); + } } diff --git a/app/Appointment.php b/app/Appointment.php index a87c02f..d62e39a 100644 --- a/app/Appointment.php +++ b/app/Appointment.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -32,19 +13,19 @@ class Appointment extends Model 'appointmentStatus', 'appointmentLocation', 'meetingNotes', - 'userAccepted', + 'userAccepted' ]; public function application() { - // FIXME: Possible bug here, where laravel looks for the wrong column in the applications table. + // FIXME: Possible bug here, where laravel looks for the wrong column in the applications table. return $this->belongsTo('App\Application', 'id', 'applicationID'); } public function setStatus($status) { $this->update([ - 'appointmentStatus' => $status, + 'appointmentStatus' => $status ]); } } diff --git a/app/Ban.php b/app/Ban.php index e08b336..c1a6e90 100644 --- a/app/Ban.php +++ b/app/Ban.php @@ -1,46 +1,29 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; class Ban extends Model { + public $fillable = [ 'userID', 'reason', 'bannedUntil', 'userAgent', - 'authorUserID', + 'authorUserID' ]; public $dates = [ - 'bannedUntil', + 'bannedUntil' ]; public function user() { return $this->belongsTo('App\User', 'userID', 'id'); } + } diff --git a/app/Comment.php b/app/Comment.php index ea4092b..c8dc8cc 100644 --- a/app/Comment.php +++ b/app/Comment.php @@ -1,34 +1,16 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; class Comment extends Model { + protected $fillable = [ 'authorID', 'applicationID', - 'text', + 'text' ]; public function application() @@ -40,4 +22,5 @@ class Comment extends Model { return $this->belongsTo('App\User', 'authorID', 'id'); } + } diff --git a/app/Console/Commands/CountVotes.php b/app/Console/Commands/CountVotes.php index c15ce68..a2a7c6d 100644 --- a/app/Console/Commands/CountVotes.php +++ b/app/Console/Commands/CountVotes.php @@ -1,24 +1,5 @@ . - */ - namespace App\Console\Commands; use App\Application; @@ -62,23 +43,28 @@ class CountVotes extends Command $eligibleApps = Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get(); $pbar = $this->output->createProgressBar($eligibleApps->count()); - if ($eligibleApps->isEmpty()) { + if($eligibleApps->isEmpty()) + { $this->error('𐄂 There are no applications that need to be processed.'); return false; } - foreach ($eligibleApps as $application) { + foreach ($eligibleApps as $application) + { $votes = $application->votes; $voteCount = $application->votes->count(); $positiveVotes = 0; $negativeVotes = 0; - if ($voteCount > 5) { - $this->info('Counting votes for application ID '.$application->id); - foreach ($votes as $vote) { - switch ($vote->allowedVoteType) { + if ($voteCount > 5) + { + $this->info('Counting votes for application ID ' . $application->id); + foreach ($votes as $vote) + { + switch ($vote->allowedVoteType) + { case 'VOTE_APPROVE': $positiveVotes++; break; @@ -88,7 +74,7 @@ class CountVotes extends Command } } - $this->info('Total votes for application ID '.$application->id.': '.$voteCount); + $this->info('Total votes for application ID ' . $application->id . ': ' . $voteCount); $this->info('Calculating criteria...'); $negativeVotePercent = floor(($negativeVotes / $voteCount) * 100); $positiveVotePercent = floor(($positiveVotes / $voteCount) * 100); @@ -97,43 +83,54 @@ class CountVotes extends Command $this->table([ '% of approval votes', - '% of denial votes', + '% of denial votes' ], [ // array of arrays, e.g. rows [ - $positiveVotePercent.'%', - $negativeVotePercent.'%', - ], + $positiveVotePercent . "%", + $negativeVotePercent . "%" + ] ]); - if ($pollResult) { - $this->info('✓ Dispatched promotion event for applicant '.$application->user->name); - if (! $this->option('dryrun')) { + if ($pollResult) + { + $this->info('✓ Dispatched promotion event for applicant ' . $application->user->name); + if (!$this->option('dryrun')) + { $application->response->vacancy->vacancyCount -= 1; $application->response->vacancy->save(); event(new ApplicationApprovedEvent(Application::find($application->id))); - } else { + } + else + { $this->warn('Dry run: Event won\'t be dispatched'); } $pbar->advance(); - } else { - if (! $this->option('dryrun')) { - event(new ApplicationDeniedEvent(Application::find($application->id))); - } else { - $this->warn('Dry run: Event won\'t be dispatched'); - } - $pbar->advance(); - $this->error('𐄂 Applicant '.$application->user->name.' does not meet vote criteria (Majority)'); } - } else { - $this->warn('Application ID'.$application->id.' did not have enough votes for processing (min 5)'); + else { + + if (!$this->option('dryrun')) + { + event(new ApplicationDeniedEvent(Application::find($application->id))); + } + else { + $this->warn('Dry run: Event won\'t be dispatched'); + } + + $pbar->advance(); + $this->error('𐄂 Applicant ' . $application->user->name . ' does not meet vote criteria (Majority)'); + } } + else + { + $this->warn("Application ID" . $application->id . " did not have enough votes for processing (min 5)"); + } + } $pbar->finish(); - return true; } } diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index 18fb9a6..d7f81ae 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -1,24 +1,5 @@ . - */ - namespace App\Console\Commands; use Illuminate\Console\Command; @@ -58,89 +39,103 @@ class Install extends Command public function handle() { $basePath = base_path(); - if (Storage::disk('local')->missing('INSTALLED')) { - $this->info('[!! Welcome to Rasberry Teams !!]'); - $this->info('>> Installing...'); - $this->call('down', [ - '--message' => 'Down for maintenance. We\'ll be right back!', - ]); + if (Storage::disk('local')->missing('INSTALLED')) + { - copy($basePath.'/.env.example', $basePath.'/.env'); - $this->call('key:generate'); - $this->info('>> Installing and preparing dependencies. This may take a while, depending on your computer.'); + $this->info('[!! Welcome to Rasberry Teams !!]'); + $this->info('>> Installing...'); + $this->call('down', [ + '--message' => 'Down for maintenance. We\'ll be right back!' + ]); - $npmOut = 0; - $npmMessages = []; + copy($basePath . '/.env.example', $basePath . '/.env'); + $this->call('key:generate'); - $npmBuildOut = 0; - $npmBuildMessages = []; + $this->info('>> Installing and preparing dependencies. This may take a while, depending on your computer.'); - exec('cd '.$basePath.' && npm install --silent', $npmBuildOut, $npmOut); - exec('cd '.$basePath.'&& npm run dev --silent', $npmBuildMessages, $npmBuildOut); + $npmOut = 0; + $npmMessages = []; - if ($npmOut !== 0 && $npmBuildOut !== 0) { - $this->error('[!] One or more errors have ocurred whilst attempting to install dependencies.'); - $this->error('[!] It is recommended to run this command again, and report a bug if it keeps happening.'); + $npmBuildOut = 0; + $npmBuildMessages = []; - return false; - } + exec('cd ' . $basePath . ' && npm install --silent', $npmBuildOut, $npmOut); + exec('cd ' . $basePath . '&& npm run dev --silent', $npmBuildMessages, $npmBuildOut); - $settings = []; - $this->info('>> Configuring application - We\'re going to ask a few questions here!'); - do { - $this->info('== Database Settings (1/6) =='); + if($npmOut !== 0 && $npmBuildOut !== 0) + { + $this->error('[!] One or more errors have ocurred whilst attempting to install dependencies.'); + $this->error('[!] It is recommended to run this command again, and report a bug if it keeps happening.'); - $settings['DB_USERNAME'] = $this->ask('Database username'); - $settings['DB_PASSWORD'] = $this->secret('Database password (Input won\'t be seen)'); - $settings['DB_DATABASE'] = $this->ask('Database name'); - $settings['DB_PORT'] = $this->ask('Database port'); - $settings['DB_HOST'] = $this->ask('Database hostname'); + return false; + } - $this->info('== Antispam Settings (2/6) (Recaptcha v2) =='); - $settings['RECAPTCHA_SITE_KEY'] = $this->ask('Site key'); - $settings['RECAPTCHA_PRIVATE_KEY'] = $this->ask('Private site key'); - $this->info('== IP Geolocation Settings (3/6) (refer to README.md) =='); - $settings['IPGEO_API_KEY'] = $this->ask('API Key'); - $this->info('== Notification Settings (4/6) (Email) =='); - $settings['MAIL_USERNAME'] = $this->ask('SMTP Username'); - $settings['MAIL_PASSWORD'] = $this->secret('SMTP Password (Input won\'t be seen)'); - $settings['MAIL_PORT'] = $this->ask('SMTP Server Port'); - $settings['MAIL_HOST'] = $this->ask('SMTP Server Hostname'); - $settings['MAIL_FROM'] = $this->ask('E-mail address to send from: '); + $settings = []; - $this->info('== Notification Settings (5/6) (Slack) =='); - $settings['SLACK_INTEGRATION_WEBHOOK'] = $this->ask('Integration webhook URL'); + $this->info('>> Configuring application - We\'re going to ask a few questions here!'); + do + { + $this->info('== Database Settings (1/6) =='); - $this->info('== Web Settings (6/6) =='); - $settings['APP_URL'] = $this->ask('Application\'s URL (ex. https://where.you.installed.theapp.com): '); - $settings['APP_LOGO'] = $this->ask('App logo (Link to an image): '); - $settings['APP_SITEHOMEPAGE'] = $this->ask('Site homepage (appears in the main header): '); - } while (! $this->confirm('Are you sure you want to save these settings? You can always go back and try again.')); + $settings['DB_USERNAME'] = $this->ask('Database username'); + $settings['DB_PASSWORD'] = $this->secret('Database password (Input won\'t be seen)'); + $settings['DB_DATABASE'] = $this->ask('Database name'); + $settings['DB_PORT'] = $this->ask('Database port'); + $settings['DB_HOST'] = $this->ask('Database hostname'); - foreach ($settings as $keyname => $value) { - $this->call('environment:modify', [ - 'key' => $keyname, - 'value' => $value, - ]); - } + $this->info('== Antispam Settings (2/6) (Recaptcha v2) =='); + $settings['RECAPTCHA_SITE_KEY'] = $this->ask('Site key'); + $settings['RECAPTCHA_PRIVATE_KEY'] = $this->ask('Private site key'); - $this->info('>> Saved configuration settings!'); - $this->info('>> Preparing database...'); + $this->info('== IP Geolocation Settings (3/6) (refer to README.md) =='); + $settings['IPGEO_API_KEY'] = $this->ask('API Key'); - $this->callSilent('config:cache'); - $this->call('migrate'); - $this->call('db:seed'); + $this->info('== Notification Settings (4/6) (Email) =='); + $settings['MAIL_USERNAME'] = $this->ask('SMTP Username'); + $settings['MAIL_PASSWORD'] = $this->secret('SMTP Password (Input won\'t be seen)'); + $settings['MAIL_PORT'] = $this->ask('SMTP Server Port'); + $settings['MAIL_HOST'] = $this->ask('SMTP Server Hostname'); + $settings['MAIL_FROM'] = $this->ask('E-mail address to send from: '); - touch($basePath.'/INSTALLED'); + $this->info('== Notification Settings (5/6) (Slack) =='); + $settings['SLACK_INTEGRATION_WEBHOOK'] = $this->ask('Integration webhook URL'); - $this->call('up'); - $this->info('>> All done! Visit '.$basePath.' to start using your brand new installation of Raspberry Teams!'); - } else { - $this->error('[!] The application is already installed!'); + $this->info('== Web Settings (6/6) =='); + $settings['APP_URL'] = $this->ask('Application\'s URL (ex. https://where.you.installed.theapp.com): '); + $settings['APP_LOGO'] = $this->ask('App logo (Link to an image): '); + $settings['APP_SITEHOMEPAGE'] = $this->ask('Site homepage (appears in the main header): '); + + + } while(!$this->confirm('Are you sure you want to save these settings? You can always go back and try again.')); + + foreach($settings as $keyname => $value) + { + $this->call('environment:modify', [ + 'key' => $keyname, + 'value' => $value + ]); + } + + $this->info('>> Saved configuration settings!'); + $this->info('>> Preparing database...'); + + $this->callSilent('config:cache'); + $this->call('migrate'); + $this->call('db:seed'); + + touch($basePath . '/INSTALLED'); + + $this->call('up'); + $this->info('>> All done! Visit ' . $basePath . ' to start using your brand new installation of Raspberry Teams!'); + + } + else + { + $this->error('[!] The application is already installed!'); } } } diff --git a/app/Console/Commands/SetEnv.php b/app/Console/Commands/SetEnv.php index 3c49403..9125ffa 100644 --- a/app/Console/Commands/SetEnv.php +++ b/app/Console/Commands/SetEnv.php @@ -1,28 +1,9 @@ . - */ - namespace App\Console\Commands; -use GeoSot\EnvEditor\Facades\EnvEditor; use Illuminate\Console\Command; +use GeoSot\EnvEditor\Facades\EnvEditor; class SetEnv extends Command { @@ -56,16 +37,20 @@ class SetEnv extends Command */ public function handle() { - $path = base_path('/.env'); - $key = $this->argument('key'); - $value = $this->argument('value'); + $path = base_path('/.env'); + $key = $this->argument('key'); + $value = $this->argument('value'); - if (file_exists($path)) { - EnvEditor::editKey($key, $value); - } else { - $this->error('Cannot update a file that doesn\'t exist! Please create .env first.'); - return false; - } + + if (file_exists($path)) + { + EnvEditor::editKey($key, $value); + } + else + { + $this->error('Cannot update a file that doesn\'t exist! Please create .env first.'); + return false; + } } } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 28273ca..fdf4d00 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -1,29 +1,10 @@ . - */ - namespace App\Console; -use App\Jobs\CleanBans; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use App\Jobs\CleanBans; class Kernel extends ConsoleKernel { diff --git a/app/CustomFacades/IP.php b/app/CustomFacades/IP.php index 230ec83..2b04064 100644 --- a/app/CustomFacades/IP.php +++ b/app/CustomFacades/IP.php @@ -1,24 +1,5 @@ . - */ - namespace App\CustomFacades; use Illuminate\Support\Facades\Cache; @@ -26,6 +7,7 @@ use Illuminate\Support\Facades\Http; class IP { + /** * Looks up information on a specified IP address. Caches results automatically. * @param string $IP IP address to lookup @@ -33,18 +15,23 @@ class IP */ public function lookup(string $IP): object { - $params = [ + + $params = [ + 'apiKey' => config('general.keys.ipapi.apikey'), + 'ip' => $IP + ]; + + // TODO: Maybe unwrap this? Methods are chained here + + return json_decode(Cache::remember($IP, 3600, function() use ($IP) + { + return Http::get(config('general.urls.ipapi.ipcheck'), [ 'apiKey' => config('general.keys.ipapi.apikey'), - 'ip' => $IP, - ]; + 'ip' => $IP + ])->body(); + })); - // TODO: Maybe unwrap this? Methods are chained here - return json_decode(Cache::remember($IP, 3600, function () use ($IP) { - return Http::get(config('general.urls.ipapi.ipcheck'), [ - 'apiKey' => config('general.keys.ipapi.apikey'), - 'ip' => $IP, - ])->body(); - })); } + } diff --git a/app/Events/ApplicationApprovedEvent.php b/app/Events/ApplicationApprovedEvent.php index 066d83c..4bb005c 100644 --- a/app/Events/ApplicationApprovedEvent.php +++ b/app/Events/ApplicationApprovedEvent.php @@ -1,28 +1,13 @@ . - */ - namespace App\Events; use App\Application; +use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; +use Illuminate\Broadcasting\PresenceChannel; +use Illuminate\Broadcasting\PrivateChannel; +use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; @@ -41,4 +26,6 @@ class ApplicationApprovedEvent { $this->application = $application; } + + } diff --git a/app/Events/ApplicationDeniedEvent.php b/app/Events/ApplicationDeniedEvent.php index 48951a3..fb84a57 100644 --- a/app/Events/ApplicationDeniedEvent.php +++ b/app/Events/ApplicationDeniedEvent.php @@ -1,28 +1,13 @@ . - */ - namespace App\Events; use App\Application; +use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; +use Illuminate\Broadcasting\PresenceChannel; +use Illuminate\Broadcasting\PrivateChannel; +use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; @@ -41,4 +26,5 @@ class ApplicationDeniedEvent { $this->application = $application; } + } diff --git a/app/Events/NewApplicationEvent.php b/app/Events/NewApplicationEvent.php index 867ab50..bb67787 100644 --- a/app/Events/NewApplicationEvent.php +++ b/app/Events/NewApplicationEvent.php @@ -1,28 +1,12 @@ . - */ - namespace App\Events; +use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; +use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Broadcasting\PrivateChannel; +use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; diff --git a/app/Events/UserBannedEvent.php b/app/Events/UserBannedEvent.php index 05902ad..92addbf 100644 --- a/app/Events/UserBannedEvent.php +++ b/app/Events/UserBannedEvent.php @@ -1,36 +1,23 @@ . - */ - namespace App\Events; -use App\Ban; -use App\User; +use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; +use Illuminate\Broadcasting\PresenceChannel; +use Illuminate\Broadcasting\PrivateChannel; +use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; +use App\User; +use App\Ban; + class UserBannedEvent { use Dispatchable, InteractsWithSockets, SerializesModels; + public $user; public $ban; @@ -45,4 +32,5 @@ class UserBannedEvent $this->user = $user; $this->ban = $ban; } + } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 37c0edb..ff35bfd 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -1,24 +1,5 @@ . - */ - namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; diff --git a/app/Facades/ContextAwareValidation.php b/app/Facades/ContextAwareValidation.php index 41a6de8..2771c77 100644 --- a/app/Facades/ContextAwareValidation.php +++ b/app/Facades/ContextAwareValidation.php @@ -1,32 +1,14 @@ . - */ - namespace App\Facades; use Illuminate\Support\Facades\Facade; class ContextAwareValidation extends Facade { - protected static function getFacadeAccessor() - { - return 'contextAwareValidator'; - } + + protected static function getFacadeAccessor() + { + return 'contextAwareValidator'; + } + } diff --git a/app/Facades/IP.php b/app/Facades/IP.php index 0e438fb..b7301b8 100644 --- a/app/Facades/IP.php +++ b/app/Facades/IP.php @@ -1,24 +1,5 @@ . - */ - namespace App\Facades; use Illuminate\Support\Facades\Facade; diff --git a/app/Facades/Options.php b/app/Facades/Options.php index 71e9bfa..6fbd4c0 100644 --- a/app/Facades/Options.php +++ b/app/Facades/Options.php @@ -1,27 +1,8 @@ . - */ namespace App\Facades; - -use Illuminate\Support\Facades\Facade; +use \Illuminate\Support\Facades\Facade; class Options extends Facade { diff --git a/app/Facades/UUID.php b/app/Facades/UUID.php index b26e3a3..18699ee 100644 --- a/app/Facades/UUID.php +++ b/app/Facades/UUID.php @@ -1,32 +1,13 @@ . - */ - namespace App\Facades; use Illuminate\Support\Facades\Facade; -class UUID extends Facade +class UUID extends Facade { protected static function getFacadeAccessor() { return 'uuidConversionFacade'; } -} +} \ No newline at end of file diff --git a/app/Form.php b/app/Form.php index 80220fc..dc64af2 100644 --- a/app/Form.php +++ b/app/Form.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -29,7 +10,7 @@ class Form extends Model 'formName', 'formStructure', - 'formStatus', + 'formStatus' ]; diff --git a/app/Helpers/ContextAwareValidator.php b/app/Helpers/ContextAwareValidator.php index 6f59cb5..f2ffb55 100644 --- a/app/Helpers/ContextAwareValidator.php +++ b/app/Helpers/ContextAwareValidator.php @@ -1,141 +1,138 @@ . - */ - namespace App\Helpers; -use Illuminate\Support\Collection; use Illuminate\Support\Facades\Validator; +use Illuminate\Support\Collection; class ContextAwareValidator { - /** - * The excludedNames array will make the validator ignore any of these names when including names into the rules. - * @var array - */ - private $excludedNames = [ - '_token', - '_method', - 'formName', - ]; /** - * Utility wrapper for json_encode. - * - * @param array $value The array to be converted. - * @return string The JSON representation of $value - */ - private function encode(array $value): string + * The excludedNames array will make the validator ignore any of these names when including names into the rules. + * @var array + */ + private $excludedNames = [ + '_token', + '_method', + 'formName' + ]; + + + /** + * Utility wrapper for json_encode. + * + * @param array $value The array to be converted. + * @return string The JSON representation of $value + */ + private function encode(array $value) : string { - return json_encode($value); + return json_encode($value); } /** - * The getValidator() method will take an array of fields from the request body, iterates through them, - * and dynamically adds validation rules for them. Depending on parameters, it may or may not generate - * a form structure for rendering purposes. - * - * This method is mostly meant by internal use by means of static proxies (Facades), in order to reduce code repetition; - * Using it outside it's directed scope may cause unexpected results; For instance, the method expects inputs to be in array format, e.g. myFieldNameID1[], - * myFieldNameID2[], and so on and so forth. - * - * This isn't checked by the code yet, but if you're implementing it this way in the HTML markup, make sure it's consistent (e.g. use a loop). - * - * P.S This method automatically ignores the CSRF token for validation. - * - * @param array $fields The request form fields - * @param bool $generateStructure Whether to incldue a JSON-ready form structure for rendering - * @param bool $includeFormName Whether to include formName in the list of validation rules - * @return Validator|Collection A validator instance you can use to check for validity, or a Collection with a validator and structure (validator, structure) - */ + * The getValidator() method will take an array of fields from the request body, iterates through them, + * and dynamically adds validation rules for them. Depending on parameters, it may or may not generate + * a form structure for rendering purposes. + * + * This method is mostly meant by internal use by means of static proxies (Facades), in order to reduce code repetition; + * Using it outside it's directed scope may cause unexpected results; For instance, the method expects inputs to be in array format, e.g. myFieldNameID1[], + * myFieldNameID2[], and so on and so forth. + * + * This isn't checked by the code yet, but if you're implementing it this way in the HTML markup, make sure it's consistent (e.g. use a loop). + * + * P.S This method automatically ignores the CSRF token for validation. + * + * @param array $fields The request form fields + * @param bool $generateStructure Whether to incldue a JSON-ready form structure for rendering + * @param bool $includeFormName Whether to include formName in the list of validation rules + * @return Validator|Collection A validator instance you can use to check for validity, or a Collection with a validator and structure (validator, structure) + */ public function getValidator(array $fields, bool $generateStructure = false, bool $includeFormName = false) { $formStructure = []; $validator = []; - if ($includeFormName) { + if ($includeFormName) + { $validator['formName'] = 'required|string|max:100'; - } + } - foreach ($fields as $fieldName => $field) { - if (! in_array($fieldName, $this->excludedNames)) { - $validator[$fieldName.'.0'] = 'required|string'; - $validator[$fieldName.'.1'] = 'required|string'; + foreach ($fields as $fieldName => $field) + { + if(!in_array($fieldName, $this->excludedNames)) + { + $validator[$fieldName . ".0"] = 'required|string'; + $validator[$fieldName . ".1"] = 'required|string'; - if ($generateStructure) { + if ($generateStructure) + { $formStructure['fields'][$fieldName]['title'] = $field[0]; $formStructure['fields'][$fieldName]['type'] = $field[1]; - } - } - } + } - $validatorInstance = Validator::make($fields, $validator); + } + } - return ($generateStructure) ? + $validatorInstance = Validator::make($fields, $validator); + + return ($generateStructure) ? collect([ - 'validator' => $validatorInstance, - 'structure' => $this->encode($formStructure), + 'validator' => $validatorInstance, + 'structure' => $this->encode($formStructure) ]) : $validatorInstance; + + } /** - * The getResponseValidator method is similar to the getValidator method; It basically takes - * an array of fields from a previous form (that probably went through the other method) and adds validation - * to the field names. - * - * Also generates the storable response structure if you tell it to. - * - * @param array $fields The received fields - * @param array $formStructure The form structure - You must supply this if you want the response structure - * @param bool $generateResponseStructure Whether to generate the response structure - * @return Validator|Collection A collection or a validator, depending on the args. Will return validatior if only fields are supplied. - */ + * The getResponseValidator method is similar to the getValidator method; It basically takes + * an array of fields from a previous form (that probably went through the other method) and adds validation + * to the field names. + * + * Also generates the storable response structure if you tell it to. + * + * @param array $fields The received fields + * @param array $formStructure The form structure - You must supply this if you want the response structure + * @param bool $generateResponseStructure Whether to generate the response structure + * @return Validator|Collection A collection or a validator, depending on the args. Will return validatior if only fields are supplied. + */ public function getResponseValidator(array $fields, array $formStructure = [], bool $generateResponseStructure = true) { - $responseStructure = []; - $validator = []; - if (empty($formStructure) && $generateResponseStructure) { - throw new \InvalidArgumentException('Illegal combination of arguments supplied! Please check the method\'s documentation.'); - } + $responseStructure = []; + $validator = []; - foreach ($fields as $fieldName => $value) { - if (! in_array($fieldName, $this->excludedNames)) { - $validator[$fieldName] = 'required|string'; + if (empty($formStructure) && $generateResponseStructure) + { + throw new \InvalidArgumentException('Illegal combination of arguments supplied! Please check the method\'s documentation.'); + } - if ($generateResponseStructure) { - $responseStructure['responses'][$fieldName]['type'] = $formStructure['fields'][$fieldName]['type'] ?? 'Unavailable'; - $responseStructure['responses'][$fieldName]['title'] = $formStructure['fields'][$fieldName]['title']; - $responseStructure['responses'][$fieldName]['response'] = $value; - } - } - } + foreach($fields as $fieldName => $value) + { + if(!in_array($fieldName, $this->excludedNames)) + { + $validator[$fieldName] = 'required|string'; - $validatorInstance = Validator::make($fields, $validator); + if ($generateResponseStructure) + { + $responseStructure['responses'][$fieldName]['type'] = $formStructure['fields'][$fieldName]['type'] ?? 'Unavailable'; + $responseStructure['responses'][$fieldName]['title'] = $formStructure['fields'][$fieldName]['title']; + $responseStructure['responses'][$fieldName]['response'] = $value; + } + } + } - return ($generateResponseStructure) ? + $validatorInstance = Validator::make($fields, $validator); + + return ($generateResponseStructure) ? collect([ - 'validator' => $validatorInstance, - 'responseStructure' => $this->encode($responseStructure), + 'validator' => $validatorInstance, + 'responseStructure' => $this->encode($responseStructure) ]) : $validatorInstance; + } + } diff --git a/app/Helpers/Options.php b/app/Helpers/Options.php index 925d910..13c416d 100644 --- a/app/Helpers/Options.php +++ b/app/Helpers/Options.php @@ -1,23 +1,5 @@ . - */ namespace App\Helpers; @@ -27,18 +9,20 @@ use Illuminate\Support\Facades\Log; class Options { + public function getOption(string $option): string { $value = Cache::get($option); - if (is_null($value)) { - Log::debug('Option '.$option.'not found in cache, refreshing from database'); + if (is_null($value)) + { + Log::debug('Option ' . $option . 'not found in cache, refreshing from database'); $value = Option::where('option_name', $option)->first(); - if (is_null($value)) { + if (is_null($value)) throw new \Exception('This option does not exist.'); - } + Cache::put($option, $value); - Cache::put($option.'_desc', 'Undefined description'); + Cache::put($option . '_desc', 'Undefined description'); } return $value->option_value; @@ -46,14 +30,14 @@ class Options public function setOption(string $option, string $value, string $description) { - Option::create([ - 'option_name' => $option, - 'option_value' => $value, - 'friendly_name' => $description, - ]); + Option::create([ + 'option_name' => $option, + 'option_value' => $value, + 'friendly_name' => $description + ]); - Cache::put($option, $value, now()->addDay()); - Cache::put($option.'_desc', $description, now()->addDay()); + Cache::put($option, $value, now()->addDay()); + Cache::put($option . '_desc', $description, now()->addDay()); } public function pullOption($option): array @@ -64,7 +48,7 @@ class Options // putMany is overkill here return [ Cache::pull($option), - Cache::pull($option.'_desc'), + Cache::pull($option . '_desc') ]; } @@ -72,13 +56,14 @@ class Options { $dbOption = Option::where('option_name', $option); - if ($dbOption->first()) { + if ($dbOption->first()) + { $dbOptionInstance = Option::find($dbOption->first()->id); Cache::forget($option); Log::debug('Changing db configuration option', [ 'old_value' => $dbOptionInstance->option_value, - 'new_value' => $newValue, + 'new_value' => $newValue ]); $dbOptionInstance->option_value = $newValue; @@ -86,20 +71,24 @@ class Options Log::debug('New db configuration option saved', [ - 'option' => $dbOptionInstance->option_value, + 'option' => $dbOptionInstance->option_value ]); Cache::put('option_name', $newValue, now()->addDay()); - } else { + } + else + { throw new \Exception('This option does not exist.'); } } + public function optionExists(string $option): bool { $dbOption = Option::where('option_name', $option)->first(); $locallyCachedOption = Cache::get($option); - return ! is_null($dbOption) || ! is_null($locallyCachedOption); + return !is_null($dbOption) || !is_null($locallyCachedOption); } + } diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index 2102759..bcedc0a 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -1,46 +1,36 @@ . - */ - namespace App\Http\Controllers; use App\Application; -use App\Events\ApplicationDeniedEvent; -use App\Notifications\ApplicationMoved; -use App\Notifications\NewApplicant; + use App\Response; -use App\User; use App\Vacancy; -use ContextAwareValidator; +use App\User; + +use App\Events\ApplicationDeniedEvent; +use App\Notifications\NewApplicant; +use App\Notifications\ApplicationMoved; + use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Validator; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; +use ContextAwareValidator; + class ApplicationController extends Controller { + private function canVote($votes) { $allvotes = collect([]); - foreach ($votes as $vote) { - if ($vote->userID == Auth::user()->id) { + foreach ($votes as $vote) + { + if ($vote->userID == Auth::user()->id) + { $allvotes->push($vote); } } @@ -48,17 +38,22 @@ class ApplicationController extends Controller return ($allvotes->count() == 1) ? false : true; } + + public function showUserApps() { + return view('dashboard.user.applications') ->with('applications', Auth::user()->applications); } + public function showUserApp(Request $request, Application $application) { $this->authorize('view', $application); - if (! is_null($application)) { + if (!is_null($application)) + { return view('dashboard.user.viewapp') ->with( [ @@ -67,16 +62,20 @@ class ApplicationController extends Controller 'structuredResponses' => json_decode($application->response->responseData, true), 'formStructure' => $application->response->form, 'vacancy' => $application->response->vacancy, - 'canVote' => $this->canVote($application->votes), + 'canVote' => $this->canVote($application->votes) ] ); - } else { + } + else + { $request->session()->flash('error', 'The application you requested could not be found.'); } return redirect()->back(); } + + public function showAllApps() { $this->authorize('viewAny', Application::class); @@ -85,6 +84,7 @@ class ApplicationController extends Controller ->with('applications', Application::paginate(6)); } + public function showAllPendingApps() { $this->authorize('viewAny', Application::class); @@ -93,6 +93,7 @@ class ApplicationController extends Controller ->with('applications', Application::where('applicationStatus', 'STAGE_SUBMITTED')->get()); } + public function showPendingInterview() { $this->authorize('viewAny', Application::class); @@ -102,12 +103,16 @@ class ApplicationController extends Controller $pendingInterviews = collect([]); $upcomingInterviews = collect([]); - foreach ($applications as $application) { - if (! is_null($application->appointment) && $application->appointment->appointmentStatus == 'CONCLUDED') { - $count = +1; + + foreach ($applications as $application) + { + if (!is_null($application->appointment) && $application->appointment->appointmentStatus == 'CONCLUDED') + { + $count =+ 1; } - switch ($application->applicationStatus) { + switch ($application->applicationStatus) + { case 'STAGE_INTERVIEW': $upcomingInterviews->push($application); @@ -118,24 +123,29 @@ class ApplicationController extends Controller break; } + } return view('dashboard.appmanagement.interview') ->with([ 'finishedCount' => $count, 'applications' => $pendingInterviews, - 'upcomingApplications' => $upcomingInterviews, + 'upcomingApplications' => $upcomingInterviews ]); } + + public function showPeerReview() { $this->authorize('viewAny', Application::class); - return view('dashboard.appmanagement.peerreview') ->with('applications', Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()); + } + + public function renderApplicationForm(Request $request, $vacancySlug) { // FIXME: Get rid of references to first(), this is a wonky query @@ -143,27 +153,36 @@ class ApplicationController extends Controller $firstVacancy = $vacancyWithForm->first(); - if (! $vacancyWithForm->isEmpty() && $firstVacancy->vacancyCount !== 0 && $firstVacancy->vacancyStatus == 'OPEN') { + if (!$vacancyWithForm->isEmpty() && $firstVacancy->vacancyCount !== 0 && $firstVacancy->vacancyStatus == 'OPEN') + { + return view('dashboard.application-rendering.apply') ->with([ 'vacancy' => $vacancyWithForm->first(), - 'preprocessedForm' => json_decode($vacancyWithForm->first()->forms->formStructure, true), + 'preprocessedForm' => json_decode($vacancyWithForm->first()->forms->formStructure, true) ]); - } else { + } + else + { abort(404, 'The application you\'re looking for could not be found or it is currently unavailable.'); } + } + + public function saveApplicationAnswers(Request $request, $vacancySlug) { $vacancy = Vacancy::with('forms')->where('vacancySlug', $vacancySlug)->get(); - if ($vacancy->first()->vacancyCount == 0 || $vacancy->first()->vacancyStatus !== 'OPEN') { - $request->session()->flash('error', 'This application is unavailable.'); + if ($vacancy->first()->vacancyCount == 0 || $vacancy->first()->vacancyStatus !== 'OPEN') + { + + $request->session()->flash('error', 'This application is unavailable.'); + return redirect()->back(); - return redirect()->back(); } Log::info('Processing new application!'); @@ -173,14 +192,15 @@ class ApplicationController extends Controller Log::info('Built response & validator structure!'); - if (! $responseValidation->get('validator')->fails()) { + if (!$responseValidation->get('validator')->fails()) + { $response = Response::create([ 'responseFormID' => $vacancy->first()->forms->id, 'associatedVacancyID' => $vacancy->first()->id, // Since a form can be used by multiple vacancies, we can only know which specific vacancy this response ties to by using a vacancy ID - 'responseData' => $responseValidation->get('responseStructure'), + 'responseData' => $responseValidation->get('responseStructure') ]); - Log::info('Registered form response for user '.Auth::user()->name.' for vacancy '.$vacancy->first()->vacancyName); + Log::info('Registered form response for user ' . Auth::user()->name . ' for vacancy ' . $vacancy->first()->vacancyName); $application = Application::create([ 'applicantUserID' => Auth::user()->id, @@ -188,20 +208,24 @@ class ApplicationController extends Controller 'applicationStatus' => 'STAGE_SUBMITTED', ]); - Log::info('Submitted application for user '.Auth::user()->name.' with response ID'.$response->id); + Log::info('Submitted application for user ' . Auth::user()->name . ' with response ID' . $response->id); - foreach (User::all() as $user) { - if ($user->hasRole('admin')) { - $user->notify((new NewApplicant($application, $vacancy->first()))->delay(now()->addSeconds(10))); - } + foreach(User::all() as $user) + { + if ($user->hasRole('admin')) + { + $user->notify((new NewApplicant($application, $vacancy->first()))->delay(now()->addSeconds(10))); + } } $request->session()->flash('success', 'Thank you for your application! It will be reviewed as soon as possible.'); - return redirect()->to(route('showUserApps')); - } else { - Log::warning('Application form for '.Auth::user()->name.' contained errors, resetting!'); + } + else + { + Log::warning('Application form for ' . Auth::user()->name . ' contained errors, resetting!'); $request->session()->flash('error', 'There are one or more errors in your application. Please make sure none of your fields are empty, since they are all required.'); + } return redirect()->back(); @@ -211,14 +235,15 @@ class ApplicationController extends Controller { $this->authorize('update', Application::class); - switch ($newStatus) { + switch ($newStatus) + { case 'deny': event(new ApplicationDeniedEvent($application)); break; case 'interview': - Log::info('User '.Auth::user()->name.' has moved application ID '.$application->id.'to interview stage'); + Log::info('User ' . Auth::user()->name . ' has moved application ID ' . $application->id . 'to interview stage'); $request->session()->flash('success', 'Application moved to interview stage! (:'); $application->setStatus('STAGE_INTERVIEW'); @@ -234,11 +259,13 @@ class ApplicationController extends Controller public function delete(Request $request, Application $application) { - $this->authorize('delete', $application); - $application->delete(); // observers will run, cleaning it up - $request->session()->flash('success', 'Application deleted. Comments, appointments and responses have also been deleted.'); + $this->authorize('delete', $application); + $application->delete(); // observers will run, cleaning it up + + $request->session()->flash('success', 'Application deleted. Comments, appointments and responses have also been deleted.'); + return redirect()->back(); - return redirect()->back(); } + } diff --git a/app/Http/Controllers/AppointmentController.php b/app/Http/Controllers/AppointmentController.php index 3931995..8ed2722 100644 --- a/app/Http/Controllers/AppointmentController.php +++ b/app/Http/Controllers/AppointmentController.php @@ -1,33 +1,14 @@ . - */ - namespace App\Http\Controllers; use App\Application; -use App\Appointment; use App\Http\Requests\SaveNotesRequest; -use App\Notifications\ApplicationMoved; -use App\Notifications\AppointmentScheduled; use Carbon\Carbon; use Illuminate\Http\Request; +use App\Appointment; +use App\Notifications\ApplicationMoved; +use App\Notifications\AppointmentScheduled; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; @@ -39,7 +20,7 @@ class AppointmentController extends Controller 'DISCORD', 'SKYPE', 'MEET', - 'TEAMSPEAK', + 'TEAMSPEAK' ]; @@ -56,24 +37,26 @@ class AppointmentController extends Controller ]); $application->setStatus('STAGE_INTERVIEW_SCHEDULED'); - Log::info('User '.Auth::user()->name.' has scheduled an appointment with '.$application->user->name.' for application ID'.$application->id, [ + + Log::info('User ' . Auth::user()->name . ' has scheduled an appointment with ' . $application->user->name . ' for application ID' . $application->id, [ 'datetime' => $appointmentDate->toDateTimeString(), - 'scheduled' => now(), + 'scheduled' => now() ]); $application->user->notify(new AppointmentScheduled($appointment)); - $request->session()->flash('success', 'Appointment successfully scheduled @ '.$appointmentDate->toDateTimeString()); + $request->session()->flash('success', 'Appointment successfully scheduled @ ' . $appointmentDate->toDateTimeString()); + return redirect()->back(); } public function updateAppointment(Request $request, Application $application, $status) { - $this->authorize('update', $application->appointment); + $this->authorize('update', $application->appointment); $validStatuses = [ - 'SCHEDULED', - 'CONCLUDED', + 'SCHEDULED', + 'CONCLUDED' ]; // NOTE: This is a little confusing, refactor @@ -83,25 +66,29 @@ class AppointmentController extends Controller $application->setStatus('STAGE_PEERAPPROVAL'); $application->user->notify(new ApplicationMoved()); - $request->session()->flash('success', 'Interview finished! Staff members can now vote on it.'); + $request->session()->flash('success', 'Interview finished! Staff members can now vote on it.'); return redirect()->back(); } // also updates public function saveNotes(SaveNotesRequest $request, Application $application) { - if (! is_null($application)) { + if (!is_null($application)) + { $application->load('appointment'); $application->appointment->meetingNotes = $request->noteText; $application->appointment->save(); $request->session()->flash('success', 'Meeting notes have been saved.'); - } else { + } + else + { $request->session()->flash('error', 'There\'s no appointment to save notes to!'); } return redirect()->back(); } + } diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php index 10760cc..71a9592 100644 --- a/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -1,27 +1,9 @@ . - */ - namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\ConfirmsPasswords; class ConfirmPasswordController extends Controller diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 2ddd570..465c39c 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index a762270..47413e2 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -1,28 +1,10 @@ . - */ - namespace App\Http\Controllers\Auth; -use App\Http\Controllers\Controller; use App\User; +use App\Http\Controllers\Controller; +use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; @@ -66,15 +48,22 @@ class LoginController extends Controller { $user = User::where('email', $request->email)->first(); - if ($user) { + if ($user) + { $isBanned = $user->isBanned(); - if ($isBanned) { + if ($isBanned) + { return false; - } else { + } + else + { return $this->originalAttemptLogin($request); } } return $this->originalAttemptLogin($request); + } + + } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 2b9d69f..c6b3364 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -1,32 +1,15 @@ . - */ - namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\Profile; +use App\Providers\RouteServiceProvider; use App\User; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; +use function GuzzleHttp\Psr7\str; class RegisterController extends Controller { @@ -64,8 +47,10 @@ class RegisterController extends Controller { $users = User::where('originalIP', \request()->ip())->get(); - foreach ($users as $user) { - if ($user && $user->isBanned()) { + foreach($users as $user) + { + if ($user && $user->isBanned()) + { abort(403, 'You do not have permission to access this page.'); } } @@ -87,7 +72,7 @@ class RegisterController extends Controller 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required', 'string', 'min:10', 'confirmed', 'regex:/^.*(?=.{3,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\x])(?=.*[!$#%]).*$/'], ], [ - 'uuid.required' => 'Please enter a valid (and Premium) Minecraft username! We do not support cracked users.', + 'uuid.required' => 'Please enter a valid (and Premium) Minecraft username! We do not support cracked users.' ]); } @@ -99,19 +84,19 @@ class RegisterController extends Controller */ protected function create(array $data) { + $user = User::create([ 'uuid' => $data['uuid'], 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), - 'originalIP' => request()->ip(), + 'originalIP' => request()->ip() ]); // It's not the registration controller's concern to create a profile for the user, // so this code has been moved to it's respective observer, following the separation of concerns pattern. $user->assignRole('user'); - return $user; } } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index bbf75a7..6c0c13a 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -1,27 +1,9 @@ . - */ - namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\ResetsPasswords; class ResetPasswordController extends Controller diff --git a/app/Http/Controllers/Auth/TwofaController.php b/app/Http/Controllers/Auth/TwofaController.php index d8bad0e..a3ecac9 100644 --- a/app/Http/Controllers/Auth/TwofaController.php +++ b/app/Http/Controllers/Auth/TwofaController.php @@ -1,32 +1,16 @@ . - */ - namespace App\Http\Controllers\Auth; +use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Traits\AuthenticatesTwoFactor; class TwofaController extends Controller { - use AuthenticatesTwoFactor; + use AuthenticatesTwoFactor; + + + protected $redirectTo = '/dashboard'; - protected $redirectTo = '/dashboard'; } diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 74be54b..482a167 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -1,27 +1,9 @@ . - */ - namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\VerifiesEmails; class VerificationController extends Controller diff --git a/app/Http/Controllers/BanController.php b/app/Http/Controllers/BanController.php index f472910..3ae2a42 100644 --- a/app/Http/Controllers/BanController.php +++ b/app/Http/Controllers/BanController.php @@ -1,48 +1,35 @@ . - */ - namespace App\Http\Controllers; -use App\Ban; -use App\Events\UserBannedEvent; -use App\Http\Requests\BanUserRequest; -use App\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use App\Ban; +use App\User; +use App\Events\UserBannedEvent; +use App\Http\Requests\BanUserRequest; class BanController extends Controller { + public function insert(BanUserRequest $request, User $user) { + $this->authorize('create', [Ban::class, $user]); - if (is_null($user->bans)) { + if (is_null($user->bans)) + { + $reason = $request->reason; $duration = strtolower($request->durationOperator); $durationOperand = $request->durationOperand; $expiryDate = now(); - if (! empty($duration)) { - switch ($duration) { + if (!empty($duration)) + { + switch($duration) + { case 'days': $expiryDate->addDays($durationOperand); break; @@ -59,7 +46,9 @@ class BanController extends Controller $expiryDate->addYears($durationOperand); break; } - } else { + } + else + { // Essentially permanent $expiryDate->addYears(5); } @@ -68,27 +57,35 @@ class BanController extends Controller 'userID' => $user->id, 'reason' => $reason, 'bannedUntil' => $expiryDate->format('Y-m-d H:i:s'), - 'userAgent' => 'Unknown', - 'authorUserID' => Auth::user()->id, + 'userAgent' => "Unknown", + 'authorUserID' => Auth::user()->id ]); event(new UserBannedEvent($user, $ban)); - $request->session()->flash('success', 'User banned successfully! Ban ID: #'.$ban->id); - } else { + $request->session()->flash('success', 'User banned successfully! Ban ID: #' . $ban->id); + + } + else + { $request->session()->flash('error', 'User already banned!'); } return redirect()->back(); } + public function delete(Request $request, User $user) { + $this->authorize('delete', $user->bans); - if (! is_null($user->bans)) { + if (!is_null($user->bans)) + { $user->bans->delete(); $request->session()->flash('success', 'User unbanned successfully!'); - } else { + } + else + { $request->session()->flash('error', 'This user isn\'t banned!'); } diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 3f7fc11..09d2aa2 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -1,34 +1,19 @@ . - */ - namespace App\Http\Controllers; -use App\Application; -use App\Comment; -use App\Http\Requests\NewCommentRequest; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use App\Http\Requests\NewCommentRequest; + +use App\Comment; +use App\Application; +use App\Notifications\NewComment; +use App\User; class CommentController extends Controller { + public function index() { // @@ -41,16 +26,21 @@ class CommentController extends Controller $comment = Comment::create([ 'authorID' => Auth::user()->id, 'applicationID' => $application->id, - 'text' => $request->comment, + 'text' => $request->comment ]); - if ($comment) { + if ($comment) + { + $request->session()->flash('success', 'Comment posted! (:'); - } else { + } + else + { $request->session()->flash('error', 'Something went wrong while posting your comment!'); } return redirect()->back(); + } public function delete(Request $request, Comment $comment) @@ -61,5 +51,7 @@ class CommentController extends Controller $request->session()->flash('success', 'Comment deleted!'); return redirect()->back(); + } + } diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index c2cb2ef..7a2923f 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -1,40 +1,26 @@ . - */ - namespace App\Http\Controllers; -use App\Notifications\NewContact; -use App\User; use Illuminate\Http\Request; +use GuzzleHttp; +use App\Notifications\NewContact; use Illuminate\Support\Facades\Http; +use App\User; + class ContactController extends Controller { + protected $users; + public function __construct(User $users) { $this->users = $users; } + public function create(Request $request) { $name = $request->name; @@ -48,29 +34,32 @@ class ContactController extends Controller $verifyrequest = Http::asForm()->post(config('recaptcha.verify.apiurl'), [ 'secret' => config('recaptcha.keys.secret'), 'response' => $challenge, - 'remoteip' => $request->ip(), + 'remoteip' => $request->ip() ]); + $response = json_decode($verifyrequest->getBody(), true); - if (! $response['success']) { + if (!$response['success']) + { $request->session()->flash('error', 'Beep beep boop... Robot? Submission failed.'); - return redirect()->back(); } - foreach (User::all() as $user) { - if ($user->hasRole('admin')) { - $user->notify(new NewContact(collect([ - 'message' => $msg, - 'ip' => $request->ip(), - 'email' => $email, - ]))); - } + + foreach(User::all() as $user) + { + if ($user->hasRole('admin')) + { + $user->notify(new NewContact(collect([ + 'message' => $msg, + 'ip' => $request->ip(), + 'email' => $email + ]))); + } } $request->session()->flash('success', 'Message sent successfully! We usually respond within 48 hours.'); - return redirect()->back(); } } diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 5f92f69..a0a2a8a 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Controllers; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 573ae61..d397d89 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -1,32 +1,16 @@ . - */ - namespace App\Http\Controllers; -use App\Application; -use App\User; +use Illuminate\Http\Request; use App\Vacancy; +use App\User; +use App\Ban; +use App\Application; class DashboardController extends Controller { + public function index() { $totalPeerReview = Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()->count(); @@ -35,11 +19,13 @@ class DashboardController extends Controller return view('dashboard.dashboard') ->with([ - 'vacancies' => Vacancy::all(), - 'totalUserCount' => User::all()->count(), - 'totalDenied' => $totalDenied, - 'totalPeerReview' => $totalPeerReview, - 'totalNewApplications' => $totalNewApplications, + 'vacancies' => Vacancy::all(), + 'totalUserCount' => User::all()->count(), + 'totalDenied' => $totalDenied, + 'totalPeerReview' => $totalPeerReview, + 'totalNewApplications' => $totalNewApplications ]); + } + } diff --git a/app/Http/Controllers/DevToolsController.php b/app/Http/Controllers/DevToolsController.php index 1749ed5..5c82d26 100644 --- a/app/Http/Controllers/DevToolsController.php +++ b/app/Http/Controllers/DevToolsController.php @@ -1,45 +1,28 @@ . - */ - namespace App\Http\Controllers; use App\Application; use App\Events\ApplicationApprovedEvent; use Illuminate\Http\Request; + use Illuminate\Support\Facades\Auth; class DevToolsController extends Controller { + // The use case for Laravel's gate and/or validation Requests is so tiny here that a full-blown policy would be overkill. protected function isolatedAuthorise() { - if (! Auth::user()->can('admin.developertools.use')) { - abort(403, 'You\'re not authorized to access this page.'); - } + if (!Auth::user()->can('admin.developertools.use')) + { + abort(403, 'You\'re not authorized to access this page.'); + } } public function index() { $this->isolatedAuthorise(); - return view('dashboard.administration.devtools') ->with('applications', Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()); } @@ -49,11 +32,14 @@ class DevToolsController extends Controller $this->isolatedAuthorise(); $application = Application::find($request->application); - if (! is_null($application)) { + if (!is_null($application)) + { event(new ApplicationApprovedEvent($application)); $request->session()->flash('success', 'Event dispatched! Please check the debug logs for more info'); - } else { + } + else + { $request->session()->flash('error', 'Application doesn\'t exist!'); } diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php index dbd09f6..27d40dd 100644 --- a/app/Http/Controllers/FormController.php +++ b/app/Http/Controllers/FormController.php @@ -1,32 +1,17 @@ . - */ - namespace App\Http\Controllers; use App\Form; -use ContextAwareValidator; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Validator; +use Illuminate\Support\Facades\Auth; + +use ContextAwareValidator; class FormController extends Controller { + public function index() { $forms = Form::all(); @@ -39,35 +24,34 @@ class FormController extends Controller public function showFormBuilder() { $this->authorize('viewFormbuilder', Form::class); - return view('dashboard.administration.formbuilder'); } public function saveForm(Request $request) { + $this->authorize('create', Form::class); $fields = $request->all(); $contextValidation = ContextAwareValidator::getValidator($fields, true, true); - if (! $contextValidation->get('validator')->fails()) { + if (!$contextValidation->get('validator')->fails()) + { $storableFormStructure = $contextValidation->get('structure'); Form::create( [ 'formName' => $fields['formName'], 'formStructure' => $storableFormStructure, - 'formStatus' => 'ACTIVE', + 'formStatus' => 'ACTIVE' ] ); $request->session()->flash('success', 'Form created! You can now link this form to a vacancy.'); - return redirect()->to(route('showForms')); } $request->session()->flash('errors', $contextValidation->get('validator')->errors()->getMessages()); - return redirect()->back(); } @@ -76,19 +60,25 @@ class FormController extends Controller $this->authorize('delete', $form); $deletable = true; - if (! is_null($form) && ! is_null($form->vacancies) && $form->vacancies->count() !== 0 || ! is_null($form->responses)) { - $deletable = false; + + if (!is_null($form) && !is_null($form->vacancies) && $form->vacancies->count() !== 0 || !is_null($form->responses)) + { + $deletable = false; } - if ($deletable) { - $form->delete(); + if ($deletable) + { + $form->delete(); - $request->session()->flash('success', 'Form deleted successfully.'); - } else { - $request->session()->flash('error', 'You cannot delete this form because it\'s tied to one or more applications and ranks, or because it doesn\'t exist.'); + $request->session()->flash('success', 'Form deleted successfully.'); + } + else + { + $request->session()->flash('error', 'You cannot delete this form because it\'s tied to one or more applications and ranks, or because it doesn\'t exist.'); } return redirect()->back(); + } public function preview(Request $request, Form $form) @@ -103,9 +93,9 @@ class FormController extends Controller public function edit(Request $request, Form $form) { - $this->authorize('update', $form); + $this->authorize('update', $form); - return view('dashboard.administration.editform') + return view('dashboard.administration.editform') ->with('formStructure', json_decode($form->formStructure, true)) ->with('title', $form->formName) ->with('formID', $form->id); @@ -113,23 +103,29 @@ class FormController extends Controller public function update(Request $request, Form $form) { - $this->authorize('update', $form); + $this->authorize('update', $form); - $contextValidation = ContextAwareValidator::getValidator($request->all(), true); - $this->authorize('update', $form); + $contextValidation = ContextAwareValidator::getValidator($request->all(), true); + $this->authorize('update', $form); - if (! $contextValidation->get('validator')->fails()) { - // Add the new structure into the form. New, subsquent fields will be identified by the "new" prefix - // This prefix doesn't actually change the app's behavior when it receives applications. - // Additionally, old applications won't of course display new and updated fields, because we can't travel into the past and get data for them - $form->formStructure = $contextValidation->get('structure'); - $form->save(); - $request->session()->flash('success', 'Hooray! Your form was updated. New applications for it\'s vacancy will use it.'); - } else { - $request->session()->flash('errors', $contextValidation->get('validator')->errors()->getMessages()); - } + if (!$contextValidation->get('validator')->fails()) + { + // Add the new structure into the form. New, subsquent fields will be identified by the "new" prefix + // This prefix doesn't actually change the app's behavior when it receives applications. + // Additionally, old applications won't of course display new and updated fields, because we can't travel into the past and get data for them + $form->formStructure = $contextValidation->get('structure'); + $form->save(); + + $request->session()->flash('success', 'Hooray! Your form was updated. New applications for it\'s vacancy will use it.'); + } + else + { + $request->session()->flash('errors', $contextValidation->get('validator')->errors()->getMessages()); + } + + return redirect()->to(route('previewForm', ['form' => $form->id])); - return redirect()->to(route('previewForm', ['form' => $form->id])); } + } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 2696b59..1afc222 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,27 +1,10 @@ . - */ - namespace App\Http\Controllers; use App\Vacancy; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; class HomeController extends Controller { @@ -32,10 +15,12 @@ class HomeController extends Controller */ public function index() { + $positions = Vacancy::where('vacancyStatus', 'OPEN') ->where('vacancyCount', '<>', 0) ->get(); + return view('home') ->with('positions', $positions); } diff --git a/app/Http/Controllers/OptionsController.php b/app/Http/Controllers/OptionsController.php index 2bba992..c76a57c 100644 --- a/app/Http/Controllers/OptionsController.php +++ b/app/Http/Controllers/OptionsController.php @@ -1,28 +1,10 @@ . - */ - namespace App\Http\Controllers; use App\Facades\Options; use App\Options as Option; + use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; @@ -39,47 +21,57 @@ class OptionsController extends Controller // TODO: Obtain this from the facade $options = Option::all(); + return view('dashboard.administration.settings') ->with('options', $options); } - public function saveSettings(Request $request) - { - if (Auth::user()->can('admin.settings.edit')) { - Log::debug('Updating application options', [ - 'ip' => $request->ip(), - 'ua' => $request->userAgent(), - 'username' => Auth::user()->username, - ]); - foreach ($request->all() as $optionName => $option) { - try { - Log::debug('Going through option '.$optionName); - if (Options::optionExists($optionName)) { - Log::debug('Option exists, updating to new values', [ - 'opt' => $optionName, - 'new_value' => $option, - ]); - Options::changeOption($optionName, $option); - } - } catch (\Exception $ex) { - Log::error('Unable to update options!', [ - 'msg' => $ex->getMessage(), - 'trace' => $ex->getTraceAsString(), - ]); - report($ex); + public function saveSettings(Request $request) + { + if (Auth::user()->can('admin.settings.edit')) + { + Log::debug('Updating application options', [ + 'ip' => $request->ip(), + 'ua' => $request->userAgent(), + 'username' => Auth::user()->username + ]); + foreach($request->all() as $optionName => $option) + { + try + { + Log::debug('Going through option ' . $optionName); + if (Options::optionExists($optionName)) + { + Log::debug('Option exists, updating to new values', [ + 'opt' => $optionName, + 'new_value' => $option + ]); + Options::changeOption($optionName, $option); + } + } + catch(\Exception $ex) + { + Log::error('Unable to update options!', [ + 'msg' => $ex->getMessage(), + 'trace' => $ex->getTraceAsString() + ]); + report($ex); - $errorCond = true; - $request->session()->flash('error', 'An error occurred while trying to save settings: '.$ex->getMessage()); - } - } + $errorCond = true; + $request->session()->flash('error', 'An error occurred while trying to save settings: ' . $ex->getMessage()); + } + } - if (! isset($errorCond)) { - $request->session()->flash('success', 'Settings saved successfully!'); - } - } else { - $request->session()->flash('error', 'You do not have permission to update this resource.'); - } + if (!isset($errorCond)) + { + $request->session()->flash('success', 'Settings saved successfully!'); + } + } + else + { + $request->session()->flash('error', 'You do not have permission to update this resource.'); + } - return redirect()->back(); - } + return redirect()->back(); + } } diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 0f63b2d..0fc063d 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -1,29 +1,12 @@ . - */ - namespace App\Http\Controllers; -use App\Facades\IP; use App\Http\Requests\ProfileSave; +use Illuminate\Support\Facades\Log; +use App\Profile; use App\User; +use App\Facades\IP; use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -31,15 +14,18 @@ use Spatie\Permission\Models\Role; class ProfileController extends Controller { - public function index() - { - return view('dashboard.user.directory') + + public function index() + { + + return view('dashboard.user.directory') ->with('users', User::with('profile', 'bans')->paginate(9)); - } + } public function showProfile() { - $socialLinks = Auth::user()->profile->socialLinks ?? '[]'; + + $socialLinks = Auth::user()->profile->socialLinks ?? "[]"; $socialMediaProfiles = json_decode($socialLinks, true); return view('dashboard.user.profile.userprofile') @@ -50,11 +36,13 @@ class ProfileController extends Controller 'insta' => $socialMediaProfiles['links']['insta'] ?? 'UpdateMe', 'discord' => $socialMediaProfiles['links']['discord'] ?? 'UpdateMe#12345', ]); + } // Route model binding public function showSingleProfile(Request $request, User $user) { + $socialMediaProfiles = json_decode($user->profile->socialLinks, true); $createdDate = Carbon::parse($user->created_at); @@ -63,15 +51,21 @@ class ProfileController extends Controller $roleList = []; - foreach ($systemRoles as $role) { - if (in_array($role, $userRoles)) { - $roleList[$role] = true; - } else { - $roleList[$role] = false; - } + + foreach($systemRoles as $role) + { + if (in_array($role, $userRoles)) + { + $roleList[$role] = true; + } + else + { + $roleList[$role] = false; + } } - if (Auth::user()->is($user) || Auth::user()->can('profiles.view.others')) { + if (Auth::user()->is($user) || Auth::user()->can('profiles.view.others')) + { return view('dashboard.user.profile.displayprofile') ->with([ 'profile' => $user->profile, @@ -79,13 +73,16 @@ class ProfileController extends Controller 'twitter' => $socialMediaProfiles['links']['twitter'] ?? 'UpdateMe', 'insta' => $socialMediaProfiles['links']['insta'] ?? 'UpdateMe', 'discord' => $socialMediaProfiles['links']['discord'] ?? 'UpdateMe#12345', - 'since' => $createdDate->englishMonth.' '.$createdDate->year, + 'since' => $createdDate->englishMonth . " " . $createdDate->year, 'ipInfo' => IP::lookup($user->originalIP), - 'roles' => $roleList, + 'roles' => $roleList ]); - } else { + } + else + { abort(403, 'You cannot view someone else\'s profile.'); } + } public function saveProfile(ProfileSave $request) @@ -93,8 +90,10 @@ class ProfileController extends Controller $profile = User::find(Auth::user()->id)->profile; $social = []; - if (! is_null($profile)) { - switch ($request->avatarPref) { + if (!is_null($profile)) + { + switch ($request->avatarPref) + { case 'MOJANG': $avatarPref = 'crafatar'; @@ -118,8 +117,11 @@ class ProfileController extends Controller $newProfile = $profile->save(); $request->session()->flash('success', 'Profile settings saved successfully.'); + } return redirect()->back(); + } + } diff --git a/app/Http/Controllers/ResponseController.php b/app/Http/Controllers/ResponseController.php index bcb5070..64037c9 100644 --- a/app/Http/Controllers/ResponseController.php +++ b/app/Http/Controllers/ResponseController.php @@ -1,26 +1,9 @@ . - */ - namespace App\Http\Controllers; +use Illuminate\Http\Request; + class ResponseController extends Controller { // diff --git a/app/Http/Controllers/StaffProfileController.php b/app/Http/Controllers/StaffProfileController.php index 1f6b569..b20d4d1 100644 --- a/app/Http/Controllers/StaffProfileController.php +++ b/app/Http/Controllers/StaffProfileController.php @@ -1,26 +1,9 @@ . - */ - namespace App\Http\Controllers; +use Illuminate\Http\Request; + class StaffProfileController extends Controller { // diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 3ee74ff..cb494b6 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -1,47 +1,34 @@ . - */ - namespace App\Http\Controllers; -use App\Ban; -use App\Http\Requests\Add2FASecretRequest; use App\Http\Requests\ChangeEmailRequest; use App\Http\Requests\ChangePasswordRequest; -use App\Http\Requests\DeleteUserRequest; use App\Http\Requests\FlushSessionsRequest; -use App\Http\Requests\Remove2FASecretRequest; +use App\Http\Requests\DeleteUserRequest; use App\Http\Requests\SearchPlayerRequest; use App\Http\Requests\UpdateUserRequest; -use App\Notifications\ChangedPassword; -use App\Notifications\EmailChanged; +use App\Http\Requests\Add2FASecretRequest; +use App\Http\Requests\Remove2FASecretRequest; + use App\User; -use Google2FA; +use App\Ban; + use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Log; +use App\Facades\UUID; +use App\Notifications\EmailChanged; +use App\Notifications\ChangedPassword; use Spatie\Permission\Models\Role; +use Google2FA; + class UserController extends Controller { + + public function showStaffMembers() { $this->authorize('viewStaff', User::class); @@ -49,20 +36,24 @@ class UserController extends Controller $staffRoles = [ 'reviewer', 'hiringManager', - 'admin', + 'admin' ]; // TODO: Un-hardcode this, move to config/roles.php $users = User::with('roles')->get(); $staffMembers = collect([]); - foreach ($users as $user) { - if (empty($user->roles)) { + foreach($users as $user) + { + if (empty($user->roles)) + { Log::debug($user->role->name); Log::debug('Staff list: User without role detected; Ignoring'); continue; } - foreach ($user->roles as $role) { - if (in_array($role->name, $staffRoles)) { + foreach($user->roles as $role) + { + if (in_array($role->name, $staffRoles)) + { $staffMembers->push($user); continue 2; // Skip directly to the next user instead of comparing more roles for the current user } @@ -71,7 +62,7 @@ class UserController extends Controller return view('dashboard.administration.staff-members') ->with([ - 'users' => $staffMembers, + 'users' => $staffMembers ]); } @@ -82,9 +73,11 @@ class UserController extends Controller $users = User::with('roles')->get(); $players = collect([]); - foreach ($users as $user) { + foreach($users as $user) + { // TODO: Might be problematic if we don't check if the role is user - if (count($user->roles) == 1) { + if (count($user->roles) == 1) + { $players->push($user); } } @@ -92,10 +85,11 @@ class UserController extends Controller return view('dashboard.administration.players') ->with([ 'users' => $players, - 'bannedUserCount' => Ban::all()->count(), + 'bannedUserCount' => Ban::all()->count() ]); } + public function showPlayersLike(SearchPlayerRequest $request) { $this->authorize('viewPlayers', User::class); @@ -106,17 +100,18 @@ class UserController extends Controller ->orWhere('email', 'LIKE', "%{$searchTerm}%") ->get(); - if (! $matchingUsers->isEmpty()) { - $request->session()->flash('success', 'There were '.$matchingUsers->count().' user(s) matching your search.'); + if (!$matchingUsers->isEmpty()) + { $request->session()->flash('success', 'There were ' . $matchingUsers->count() . ' user(s) matching your search.'); return view('dashboard.administration.players') ->with([ 'users' => $matchingUsers, - 'bannedUserCount' => Ban::all()->count(), + 'bannedUserCount' => Ban::all()->count() ]); - } else { + } + else + { $request->session()->flash('error', 'Your search term did not return any results.'); - return redirect(route('registeredPlayerList')); } } @@ -125,10 +120,14 @@ class UserController extends Controller { $QRCode = null; - if (! $request->user()->has2FA()) { - if ($request->session()->has('twofaAttemptFailed')) { + if (!$request->user()->has2FA()) + { + if ($request->session()->has('twofaAttemptFailed')) + { $twoFactorSecret = $request->session()->get('current2FA'); - } else { + } + else + { $twoFactorSecret = Google2FA::generateSecretKey(32, ''); $request->session()->put('current2FA', $twoFactorSecret); } @@ -145,21 +144,21 @@ class UserController extends Controller ->with('twofaQRCode', $QRCode); } + public function flushSessions(FlushSessionsRequest $request) { // TODO: Move all log calls to a listener, which binds to an event fired by each significant event, such as this one // This will allow for other actions to be performed on certain events (like login failed event) Auth::logoutOtherDevices($request->currentPasswordFlush); - Log::notice('User '.Auth::user()->name.' has logged out other devices in their account', + Log::notice('User ' . Auth::user()->name . ' has logged out other devices in their account', [ 'originIPAddress' => $request->ip(), 'userID' => Auth::user()->id, - 'timestamp' => now(), + 'timestamp' => now() ]); $request->session()->flash('success', 'Successfully logged out other devices. Remember to change your password if you think you\'ve been compromised.'); - return redirect()->back(); } @@ -167,92 +166,111 @@ class UserController extends Controller { $user = User::find(Auth::user()->id); - if (! is_null($user)) { + if (!is_null($user)) + { $user->password = Hash::make($request->newPassword); $user->save(); - Log::info('User '.$user->name.' has changed their password', [ + Log::info('User ' . $user->name . ' has changed their password', [ 'originIPAddress' => $request->ip(), 'userID' => $user->id, - 'timestamp' => now(), + 'timestamp' => now() ]); $user->notify(new ChangedPassword()); Auth::logout(); - return redirect()->back(); } + } public function changeEmail(ChangeEmailRequest $request) { $user = User::find(Auth::user()->id); - if (! is_null($user)) { + if (!is_null($user)) + { $user->email = $request->newEmail; $user->save(); - Log::notice('User '.$user->name.' has just changed their contact email address', [ + Log::notice('User ' . $user->name . ' has just changed their contact email address', [ 'originIPAddress' => $request->ip(), 'userID' => $user->id, - 'timestamp' => now(), + 'timestamp' => now() ]); $user->notify(new EmailChanged()); $request->session()->flash('success', 'Your email address has been changed!'); - } else { + } + else + { $request->session()->flash('error', 'There has been an error whilst trying to update your account. Please contact administrators.'); } return redirect()->back(); + } + + public function delete(DeleteUserRequest $request, User $user) { + $this->authorize('delete', $user); - if ($request->confirmPrompt == 'DELETE ACCOUNT') { + if ($request->confirmPrompt == 'DELETE ACCOUNT') + { $user->delete(); - $request->session()->flash('success', 'User deleted successfully. PII has been erased.'); - } else { + $request->session()->flash('success','User deleted successfully. PII has been erased.'); + } + else + { $request->session()->flash('error', 'Wrong confirmation text! Try again.'); } + return redirect()->route('registeredPlayerList'); } public function update(UpdateUserRequest $request, User $user) { - $this->authorize('adminEdit', $user); - // Mass update would not be possible here without extra code, making route model binding useless - $user->email = $request->email; - $user->name = $request->name; - $user->uuid = $request->uuid; + $this->authorize('adminEdit', $user); - $existingRoles = Role::all() + // Mass update would not be possible here without extra code, making route model binding useless + $user->email = $request->email; + $user->name = $request->name; + $user->uuid = $request->uuid; + + $existingRoles = Role::all() ->pluck('name') ->all(); - $roleDiff = array_diff($existingRoles, $request->roles); + $roleDiff = array_diff($existingRoles, $request->roles); - // Adds roles that were selected. Removes roles that aren't selected if the user has them. - foreach ($roleDiff as $deselectedRole) { - if ($user->hasRole($deselectedRole) && $deselectedRole !== 'user') { - $user->removeRole($deselectedRole); - } + // Adds roles that were selected. Removes roles that aren't selected if the user has them. + foreach($roleDiff as $deselectedRole) + { + if ($user->hasRole($deselectedRole) && $deselectedRole !== 'user') + { + $user->removeRole($deselectedRole); + } + } + + foreach($request->roles as $role) + { + if (!$user->hasRole($role)) + { + $user->assignRole($role); } - foreach ($request->roles as $role) { - if (! $user->hasRole($role)) { - $user->assignRole($role); - } - } + } - $user->save(); - $request->session()->flash('success', 'User updated successfully!'); + $user->save(); + $request->session()->flash('success', 'User updated successfully!'); + + return redirect()->back(); - return redirect()->back(); } public function add2FASecret(Add2FASecretRequest $request) @@ -260,32 +278,35 @@ class UserController extends Controller $currentSecret = $request->session()->get('current2FA'); $isValid = Google2FA::verifyKey($currentSecret, $request->otp); - if ($isValid) { - $request->user()->twofa_secret = $currentSecret; - $request->user()->save(); + if ($isValid) + { + $request->user()->twofa_secret = $currentSecret; + $request->user()->save(); - Log::warning('SECURITY: User activated two-factor authentication', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip(), - ]); + Log::warning('SECURITY: User activated two-factor authentication', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip() + ]); - Google2FA::login(); + Google2FA::login(); - Log::warning('SECURITY: Started two factor session automatically', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip(), - ]); + Log::warning('SECURITY: Started two factor session automatically', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip() + ]); - $request->session()->forget('current2FA'); + $request->session()->forget('current2FA'); - if ($request->session()->has('twofaAttemptFailed')) { - $request->session()->forget('twofaAttemptFailed'); - } + if ($request->session()->has('twofaAttemptFailed')) + $request->session()->forget('twofaAttemptFailed'); - $request->session()->flash('success', '2FA succesfully enabled! You\'ll now be prompted for an OTP each time you log in.'); - } else { - $request->session()->flash('error', 'Incorrect code. Please reopen the 2FA settings panel and try again.'); - $request->session()->put('twofaAttemptFailed', true); + + $request->session()->flash('success', '2FA succesfully enabled! You\'ll now be prompted for an OTP each time you log in.'); + } + else + { + $request->session()->flash('error', 'Incorrect code. Please reopen the 2FA settings panel and try again.'); + $request->session()->put('twofaAttemptFailed', true); } return redirect()->back(); @@ -294,38 +315,42 @@ class UserController extends Controller public function remove2FASecret(Remove2FASecretRequest $request) { Log::warning('SECURITY: Disabling two factor authentication (user initiated)', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip(), + 'initiator' => $request->user()->email, + 'ip' => $request->ip() ]); $request->user()->twofa_secret = null; $request->user()->save(); $request->session()->flash('success', 'Two-factor authentication disabled.'); - return redirect()->back(); } + + + public function terminate(Request $request, User $user) { $this->authorize('terminate', User::class); // TODO: move logic to policy - if (! $user->isStaffMember() || $user->is(Auth::user())) { + if (!$user->isStaffMember() || $user->is(Auth::user())) + { $request->session()->flash('error', 'You cannot terminate this user.'); - return redirect()->back(); } - foreach ($user->roles as $role) { - if ($role->name == 'user') { - continue; - } + foreach ($user->roles as $role) + { + if ($role->name == 'user') + { + continue; + } - $user->removeRole($role->name); + $user->removeRole($role->name); } - Log::info('User '.$user->name.' has just been demoted.'); + Log::info('User ' . $user->name . ' has just been demoted.'); $request->session()->flash('success', 'User terminated successfully.'); //TODO: Dispatch event diff --git a/app/Http/Controllers/VacancyController.php b/app/Http/Controllers/VacancyController.php index 5316d3b..fdb5ce0 100644 --- a/app/Http/Controllers/VacancyController.php +++ b/app/Http/Controllers/VacancyController.php @@ -1,45 +1,30 @@ . - */ - namespace App\Http\Controllers; -use App\Form; -use App\Http\Requests\VacancyEditRequest; use App\Http\Requests\VacancyRequest; -use App\Notifications\VacancyClosed; -use App\User; +use App\Http\Requests\VacancyEditRequest; + use App\Vacancy; +use App\User; +use App\Form; + +use App\Notifications\VacancyClosed; + use Illuminate\Http\Request; use Illuminate\Support\Str; +use Illuminate\Support\Facades\Auth; + class VacancyController extends Controller { public function index() { - $this->authorize('viewAny', Vacancy::class); - + $this->authorize('viewAny', Vacancy::class); return view('dashboard.administration.positions') ->with([ 'forms' => Form::all(), - 'vacancies' => Vacancy::all(), + 'vacancies' => Vacancy::all() ]); } @@ -48,12 +33,13 @@ class VacancyController extends Controller $this->authorize('create', Vacancy::class); $form = Form::find($request->vacancyFormID); - if (! is_null($form)) { - /* note: since we can't convert HTML back to Markdown, we'll have to do the converting when the user requests a page, - * and leave the database with Markdown only so it can be used and edited everywhere. - * for several vacancies, this would require looping through all of them and replacing MD with HTML, which is obviously not the most clean solution; - * however, the Model can be configured to return MD instead of HTML on that specific field saving us from looping. - */ + if (!is_null($form)) + { + /* note: since we can't convert HTML back to Markdown, we'll have to do the converting when the user requests a page, + * and leave the database with Markdown only so it can be used and edited everywhere. + * for several vacancies, this would require looping through all of them and replacing MD with HTML, which is obviously not the most clean solution; + * however, the Model can be configured to return MD instead of HTML on that specific field saving us from looping. + */ Vacancy::create([ 'vacancyName' => $request->vacancyName, @@ -63,40 +49,48 @@ class VacancyController extends Controller 'permissionGroupName' => $request->permissionGroup, 'discordRoleID' => $request->discordRole, 'vacancyFormID' => $request->vacancyFormID, - 'vacancyCount' => $request->vacancyCount, + 'vacancyCount' => $request->vacancyCount ]); $request->session()->flash('success', 'Vacancy successfully opened. It will now show in the home page.'); - } else { + } + else + { $request->session()->flash('error', 'You cannot create a vacancy without a valid form.'); } return redirect()->back(); + } public function updatePositionAvailability(Request $request, $status, Vacancy $vacancy) { + $this->authorize('update', $vacancy); - if (! is_null($vacancy)) { + if (!is_null($vacancy)) + { $type = 'success'; - switch ($status) { + switch ($status) + { case 'open': $vacancy->open(); - $message = 'Position successfully opened!'; + $message = "Position successfully opened!"; break; case 'close': $vacancy->close(); - $message = 'Position successfully closed!'; + $message = "Position successfully closed!"; - foreach (User::all() as $user) { - if ($user->isStaffMember()) { - $user->notify(new VacancyClosed($vacancy)); - } + foreach(User::all() as $user) + { + if ($user->isStaffMember()) + { + $user->notify(new VacancyClosed($vacancy)); + } } break; @@ -105,36 +99,40 @@ class VacancyController extends Controller $type = 'error'; } - } else { + } + else + { $message = "The position you're trying to update doesn't exist!"; - $type = 'error'; + $type = "error"; } $request->session()->flash($type, $message); - return redirect()->back(); } + public function edit(Request $request, Vacancy $vacancy) { - $this->authorize('update', $vacancy); - + $this->authorize('update', $vacancy); return view('dashboard.administration.editposition') ->with('vacancy', $vacancy); } + + public function update(VacancyEditRequest $request, Vacancy $vacancy) { - $this->authorize('update', $vacancy); + $this->authorize('update', $vacancy); - $vacancy->vacancyFullDescription = $request->vacancyFullDescription; - $vacancy->vacancyDescription = $request->vacancyDescription; - $vacancy->vacancyCount = $request->vacancyCount; + $vacancy->vacancyFullDescription = $request->vacancyFullDescription; + $vacancy->vacancyDescription = $request->vacancyDescription; + $vacancy->vacancyCount = $request->vacancyCount; - $vacancy->save(); + $vacancy->save(); - $request->session()->flash('success', 'Vacancy successfully updated.'); + $request->session()->flash('success', 'Vacancy successfully updated.'); + return redirect()->back(); - return redirect()->back(); } + } diff --git a/app/Http/Controllers/VoteController.php b/app/Http/Controllers/VoteController.php index 30eb2ea..eba3ae1 100644 --- a/app/Http/Controllers/VoteController.php +++ b/app/Http/Controllers/VoteController.php @@ -1,34 +1,18 @@ . - */ - namespace App\Http\Controllers; use App\Application; use App\Http\Requests\VoteRequest; +use App\Jobs\ProcessVoteList; use App\Vote; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; class VoteController extends Controller { + public function vote(VoteRequest $voteRequest, Application $application) { $this->authorize('create', Vote::class); @@ -39,8 +23,9 @@ class VoteController extends Controller ]); $vote->application()->attach($application->id); - Log::info('User '.Auth::user()->name.' has voted in applicant '.$application->user->name.'\'s application', [ - 'voteType' => $voteRequest->voteType, + + Log::info('User ' . Auth::user()->name . ' has voted in applicant ' . $application->user->name . '\'s application', [ + 'voteType' => $voteRequest->voteType ]); $voteRequest->session()->flash('success', 'Your vote has been registered!'); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index f0d3604..9a2a7f5 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; @@ -89,6 +70,6 @@ class Kernel extends HttpKernel 'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class, 'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class, 'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class, - 'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class, + 'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class ]; } diff --git a/app/Http/Middleware/ApplicationEligibility.php b/app/Http/Middleware/ApplicationEligibility.php index 13cb1da..f091d8e 100644 --- a/app/Http/Middleware/ApplicationEligibility.php +++ b/app/Http/Middleware/ApplicationEligibility.php @@ -1,31 +1,12 @@ . - */ - namespace App\Http\Middleware; use App\Application; +use Illuminate\Support\Facades\Log; use Carbon\Carbon; use Closure; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\View; class ApplicationEligibility @@ -42,29 +23,37 @@ class ApplicationEligibility { $curtime = new Carbon(now()); - if (Auth::check()) { + + if (Auth::check()) + { $applications = Application::where('applicantUserID', Auth::user()->id)->get(); $eligible = true; $daysRemaining = 0; - if (! $applications->isEmpty()) { - foreach ($applications as $application) { + if (!$applications->isEmpty()) + { + foreach ($applications as $application) + { $appTime = Carbon::parse($application->created_at); - if ($appTime->isSameMonth($curtime)) { - Log::warning('Notice: Application ID '.$application->id.' was found to be in the same month as today\'s time, making the user '.Auth::user()->name.' ineligible for application'); + if ($appTime->isSameMonth($curtime)) + { + + Log::warning('Notice: Application ID ' . $application->id . ' was found to be in the same month as today\'s time, making the user ' . Auth::user()->name . ' ineligible for application'); $eligible = false; } } $allowedTime = Carbon::parse($applications->last()->created_at)->addMonth(); $daysRemaining = $allowedTime->diffInDays(now()); + } View::share('isEligibleForApplication', $eligible); View::share('eligibilityDaysRemaining', $daysRemaining); } + return $next($request); } } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index af34268..704089a 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; diff --git a/app/Http/Middleware/Bancheck.php b/app/Http/Middleware/Bancheck.php index 6c8a8ef..0eca7f7 100644 --- a/app/Http/Middleware/Bancheck.php +++ b/app/Http/Middleware/Bancheck.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Closure; @@ -39,11 +20,17 @@ class Bancheck $userIP = $request->ip(); $anonymousUser = User::where('ipAddress', $userIP)->get(); - if (Auth::check() && Auth::user()->isBanned()) { + + if (Auth::check() && Auth::user()->isBanned()) + { View::share('isBanned', true); - } elseif (! $anonymousUser->isEmpty() && User::find($anonymousUser->id)->isBanned()) { + } + elseif(!$anonymousUser->isEmpty() && User::find($anonymousUser->id)->isBanned()) + { View::share('isBanned', true); - } else { + } + else + { View::share('isBanned', false); } diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php index c58ffff..35b9824 100644 --- a/app/Http/Middleware/CheckForMaintenanceMode.php +++ b/app/Http/Middleware/CheckForMaintenanceMode.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 140dd8d..033136a 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; diff --git a/app/Http/Middleware/ForceLogoutMiddleware.php b/app/Http/Middleware/ForceLogoutMiddleware.php index 7501cdd..551c287 100644 --- a/app/Http/Middleware/ForceLogoutMiddleware.php +++ b/app/Http/Middleware/ForceLogoutMiddleware.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Closure; @@ -35,11 +16,11 @@ class ForceLogoutMiddleware */ public function handle($request, Closure $next) { - if (Auth::user()->isBanned()) { + if (Auth::user()->isBanned()) + { Auth::logout(); $request->session()->flash('error', 'Error: Your session has been forcefully terminated. Please try again in a few days.'); - return redirect('/'); } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 674a32b..2395ddc 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use App\Providers\RouteServiceProvider; diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index 1698610..5a50e7b 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 785351e..085cdb5 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Fideloper\Proxy\TrustProxies as Middleware; @@ -31,7 +12,7 @@ class TrustProxies extends Middleware * * @var array|string */ - protected $proxies = '*'; + protected $proxies = "*"; /** * The headers that should be used to detect proxies. diff --git a/app/Http/Middleware/UsernameUUID.php b/app/Http/Middleware/UsernameUUID.php index 32c8a8e..29a93cf 100644 --- a/app/Http/Middleware/UsernameUUID.php +++ b/app/Http/Middleware/UsernameUUID.php @@ -1,33 +1,15 @@ . - */ - namespace App\Http\Middleware; -use App\Facades\UUID; use Closure; +use App\Facades\UUID; +use Illuminate\Support\Facades\Http; class UsernameUUID { /** - * Converts a Minecraft username found in the request body to a UUID. + * Converts a Minecraft username found in the request body to a UUID * * @param \Illuminate\Http\Request $request * @param \Closure $next @@ -36,21 +18,23 @@ class UsernameUUID public function handle($request, Closure $next) { $input = $request->all(); - if (isset($input['uuid'])) { - try { - $username = $input['uuid']; - $input['uuid'] = UUID::toUUID($username); - } catch (\InvalidArgumentException $iae) { + if (isset($input['uuid'])) + { + try + { + $username = $input['uuid']; + $input['uuid'] = UUID::toUUID($username); + } + catch(\InvalidArgumentException $iae) + { report($iae); $request->session()->flash('error', $iae->getMessage()); - return redirect(route('register')); } $request->replace($input); } - return $next($request); } } diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 0b6761a..0c13b85 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; diff --git a/app/Http/Requests/Add2FASecretRequest.php b/app/Http/Requests/Add2FASecretRequest.php index f1b2ca4..13fa9dd 100644 --- a/app/Http/Requests/Add2FASecretRequest.php +++ b/app/Http/Requests/Add2FASecretRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -32,7 +13,7 @@ class Add2FASecretRequest extends FormRequest */ public function authorize() { - // current logic only updates currently authenticated user + // current logic only updates currently authenticated user return true; } @@ -44,7 +25,7 @@ class Add2FASecretRequest extends FormRequest public function rules() { return [ - 'otp' => 'required|string|min:6|max:6', + 'otp' => 'required|string|min:6|max:6' ]; } } diff --git a/app/Http/Requests/BanUserRequest.php b/app/Http/Requests/BanUserRequest.php index 6c0469b..ba25c34 100644 --- a/app/Http/Requests/BanUserRequest.php +++ b/app/Http/Requests/BanUserRequest.php @@ -1,29 +1,11 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; + class BanUserRequest extends FormRequest { /** @@ -46,7 +28,7 @@ class BanUserRequest extends FormRequest return [ 'reason' => 'required|string', 'durationOperand' => 'nullable|string', - 'durationOperator' => 'nullable|string', + 'durationOperator' => 'nullable|string' ]; } } diff --git a/app/Http/Requests/ChangeEmailRequest.php b/app/Http/Requests/ChangeEmailRequest.php index c591f2b..128a3eb 100644 --- a/app/Http/Requests/ChangeEmailRequest.php +++ b/app/Http/Requests/ChangeEmailRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -44,7 +25,7 @@ class ChangeEmailRequest extends FormRequest { return [ 'currentPassword' => 'required|password', - 'newEmail' => 'required|email|unique:users,email', + 'newEmail' => 'required|email|unique:users,email' ]; } } diff --git a/app/Http/Requests/ChangePasswordRequest.php b/app/Http/Requests/ChangePasswordRequest.php index f82dae3..3feb69b 100644 --- a/app/Http/Requests/ChangePasswordRequest.php +++ b/app/Http/Requests/ChangePasswordRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -44,7 +25,7 @@ class ChangePasswordRequest extends FormRequest { return [ 'newPassword' => 'required|string|confirmed', - 'oldPassword' => 'required|string|password', + 'oldPassword' => 'required|string|password' ]; } } diff --git a/app/Http/Requests/DeleteUserRequest.php b/app/Http/Requests/DeleteUserRequest.php index bdaaada..924635c 100644 --- a/app/Http/Requests/DeleteUserRequest.php +++ b/app/Http/Requests/DeleteUserRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -44,7 +25,7 @@ class DeleteUserRequest extends FormRequest public function rules() { return [ - 'confirmPrompt' => 'required|string', + 'confirmPrompt' => 'required|string' ]; } } diff --git a/app/Http/Requests/FlushSessionsRequest.php b/app/Http/Requests/FlushSessionsRequest.php index 6f4c78e..f274ebd 100644 --- a/app/Http/Requests/FlushSessionsRequest.php +++ b/app/Http/Requests/FlushSessionsRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -43,7 +24,7 @@ class FlushSessionsRequest extends FormRequest public function rules() { return [ - 'currentPasswordFlush' => 'required|password', + 'currentPasswordFlush' => 'required|password' ]; } } diff --git a/app/Http/Requests/NewCommentRequest.php b/app/Http/Requests/NewCommentRequest.php index 9d05a95..e1470bc 100644 --- a/app/Http/Requests/NewCommentRequest.php +++ b/app/Http/Requests/NewCommentRequest.php @@ -1,29 +1,11 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; + class NewCommentRequest extends FormRequest { /** @@ -45,7 +27,7 @@ class NewCommentRequest extends FormRequest public function rules() { return [ - 'comment' => 'required|string|max:600|min:20', + 'comment' => 'required|string|max:600|min:20' ]; } } diff --git a/app/Http/Requests/ProfileSave.php b/app/Http/Requests/ProfileSave.php index 7d79846..75278be 100644 --- a/app/Http/Requests/ProfileSave.php +++ b/app/Http/Requests/ProfileSave.php @@ -1,28 +1,10 @@ . - */ - namespace App\Http\Requests; use App\Profile; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Support\Facades\Auth; class ProfileSave extends FormRequest { @@ -51,7 +33,7 @@ class ProfileSave extends FormRequest 'socialInsta' => 'nullable|string', 'socialTwitter' => 'nullable|string', 'socialDiscord' => 'nullable|string', - 'socialGithub' => 'nullable|string', + 'socialGithub' => 'nullable|string' ]; } } diff --git a/app/Http/Requests/Remove2FASecretRequest.php b/app/Http/Requests/Remove2FASecretRequest.php index 4cd69bb..6583b93 100644 --- a/app/Http/Requests/Remove2FASecretRequest.php +++ b/app/Http/Requests/Remove2FASecretRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -44,7 +25,7 @@ class Remove2FASecretRequest extends FormRequest { return [ 'currentPassword' => 'required|password', - 'consent' => 'required|accepted', + 'consent' => 'required|accepted' ]; } } diff --git a/app/Http/Requests/SaveNotesRequest.php b/app/Http/Requests/SaveNotesRequest.php index 7b89a98..b6dd782 100644 --- a/app/Http/Requests/SaveNotesRequest.php +++ b/app/Http/Requests/SaveNotesRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -43,7 +24,7 @@ class SaveNotesRequest extends FormRequest public function rules() { return [ - 'noteText' => 'required|string', + 'noteText' => 'required|string' ]; } } diff --git a/app/Http/Requests/SearchPlayerRequest.php b/app/Http/Requests/SearchPlayerRequest.php index 23c7e78..4689a49 100644 --- a/app/Http/Requests/SearchPlayerRequest.php +++ b/app/Http/Requests/SearchPlayerRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -44,7 +25,7 @@ class SearchPlayerRequest extends FormRequest public function rules() { return [ - 'searchTerm' => 'required|string|max:17', // max user char limit set by Mojang + 'searchTerm' => 'required|string|max:17' // max user char limit set by Mojang ]; } } diff --git a/app/Http/Requests/UpdateUserRequest.php b/app/Http/Requests/UpdateUserRequest.php index 709f013..99403b4 100644 --- a/app/Http/Requests/UpdateUserRequest.php +++ b/app/Http/Requests/UpdateUserRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -47,7 +28,7 @@ class UpdateUserRequest extends FormRequest 'email' => 'required|email', 'name' => 'required|string', 'uuid' => 'required|max:32|min:32', - 'roles' => 'required_without_all', + 'roles' => 'required_without_all' ]; } } diff --git a/app/Http/Requests/VacancyEditRequest.php b/app/Http/Requests/VacancyEditRequest.php index b9c4c3e..c7ba958 100644 --- a/app/Http/Requests/VacancyEditRequest.php +++ b/app/Http/Requests/VacancyEditRequest.php @@ -1,29 +1,11 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; + class VacancyEditRequest extends FormRequest { /** @@ -46,7 +28,7 @@ class VacancyEditRequest extends FormRequest return [ 'vacancyDescription' => 'required|string', 'vacancyFullDescription' => 'nullable|string', - 'vacancyCount' => 'required|integer|min:1', + 'vacancyCount' => 'required|integer|min:1' ]; } } diff --git a/app/Http/Requests/VacancyRequest.php b/app/Http/Requests/VacancyRequest.php index 07e333c..176610d 100644 --- a/app/Http/Requests/VacancyRequest.php +++ b/app/Http/Requests/VacancyRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -49,7 +30,7 @@ class VacancyRequest extends FormRequest 'permissionGroup' => 'required|string', 'discordRole' => 'required|string', 'vacancyCount' => 'required|integer', - 'vacancyFormID' => 'required|integer', + 'vacancyFormID' => 'required|integer' ]; } } diff --git a/app/Http/Requests/VoteRequest.php b/app/Http/Requests/VoteRequest.php index 67e30a9..fdcf8c9 100644 --- a/app/Http/Requests/VoteRequest.php +++ b/app/Http/Requests/VoteRequest.php @@ -1,24 +1,5 @@ . - */ - namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; @@ -43,7 +24,7 @@ class VoteRequest extends FormRequest public function rules() { return [ - 'voteType' => 'required|string|in:VOTE_DENY,VOTE_APPROVE', + 'voteType' => 'required|string|in:VOTE_DENY,VOTE_APPROVE' ]; } } diff --git a/app/Jobs/CleanBans.php b/app/Jobs/CleanBans.php index 5a25994..a5a6862 100644 --- a/app/Jobs/CleanBans.php +++ b/app/Jobs/CleanBans.php @@ -1,28 +1,7 @@ . - */ - namespace App\Jobs; -use App\Ban; -use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -30,12 +9,15 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Log; +use App\Ban; +use Carbon\Carbon; + class CleanBans implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public $bans; + public $bans; /** * Create a new job instance. * @@ -52,18 +34,23 @@ class CleanBans implements ShouldQueue */ public function handle() { + Log::debug('Running automatic ban cleaner...'); $bans = Ban::all(); - if (! is_null($bans)) { - foreach ($this->bans as $ban) { - $bannedUntil = Carbon::parse($ban->bannedUntil); + if (!is_null($bans)) + { + foreach($this->bans as $ban) + { + $bannedUntil = Carbon::parse($ban->bannedUntil); - if ($bannedUntil->equalTo(now())) { - Log::debug('Deleted ban '.$ban->id.' belonging to '.$ban->user->name); - $ban->delete(); - } - } + if ($bannedUntil->equalTo(now())) + { + Log::debug('Deleted ban ' . $ban->id . ' belonging to ' . $ban->user->name); + $ban->delete(); + } + } } + } } diff --git a/app/Listeners/DenyUser.php b/app/Listeners/DenyUser.php index 34095ca..0670cc3 100644 --- a/app/Listeners/DenyUser.php +++ b/app/Listeners/DenyUser.php @@ -1,28 +1,11 @@ . - */ - namespace App\Listeners; use App\Events\ApplicationDeniedEvent; use App\Notifications\ApplicationDenied; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class DenyUser @@ -46,8 +29,9 @@ class DenyUser public function handle(ApplicationDeniedEvent $event) { $event->application->setStatus('DENIED'); - Log::info('User '.$event->application->user->name.' just had their application denied.'); + Log::info('User ' . $event->application->user->name . ' just had their application denied.'); $event->application->user->notify(new ApplicationDenied($event->application)); + } } diff --git a/app/Listeners/LogAuthenticationFailure.php b/app/Listeners/LogAuthenticationFailure.php index 15ce404..afe1fee 100644 --- a/app/Listeners/LogAuthenticationFailure.php +++ b/app/Listeners/LogAuthenticationFailure.php @@ -1,26 +1,9 @@ . - */ - namespace App\Listeners; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class LogAuthenticationFailure @@ -44,9 +27,10 @@ class LogAuthenticationFailure public function handle($event) { $targetAccountID = 0; - $originalIP = '0.0.0.0'; + $originalIP = "0.0.0.0"; - if (isset($event->user->id)) { + if (isset($event->user->id)) + { $targetAccountID = $event->user->id; } diff --git a/app/Listeners/LogAuthenticationSuccess.php b/app/Listeners/LogAuthenticationSuccess.php index 7dd3ef3..40781d9 100644 --- a/app/Listeners/LogAuthenticationSuccess.php +++ b/app/Listeners/LogAuthenticationSuccess.php @@ -1,26 +1,9 @@ . - */ - namespace App\Listeners; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class LogAuthenticationSuccess diff --git a/app/Listeners/OnUserBanned.php b/app/Listeners/OnUserBanned.php index 804aac5..897a280 100644 --- a/app/Listeners/OnUserBanned.php +++ b/app/Listeners/OnUserBanned.php @@ -1,31 +1,16 @@ . - */ - namespace App\Listeners; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; use App\Events\UserBannedEvent; use App\Notifications\UserBanned; -use App\User; + use Illuminate\Support\Facades\Log; +use App\User; + class OnUserBanned { /** @@ -46,12 +31,16 @@ class OnUserBanned */ public function handle(UserBannedEvent $event) { - Log::warning('User '.$event->user->name.' has just been banned from the site!'); - foreach (User::all() as $user) { - if ($user->isStaffMember()) { - $user->notify((new UserBanned($event->user, $event->ban))->delay(now()->addSeconds(10))); - } + Log::warning("User " . $event->user->name . " has just been banned from the site!"); + + foreach(User::all() as $user) + { + if ($user->isStaffMember()) + { + $user->notify((new UserBanned($event->user, $event->ban))->delay(now()->addSeconds(10))); + } } + } } diff --git a/app/Listeners/OnUserRegistration.php b/app/Listeners/OnUserRegistration.php index f2fa814..7ab08f9 100644 --- a/app/Listeners/OnUserRegistration.php +++ b/app/Listeners/OnUserRegistration.php @@ -1,30 +1,14 @@ . - */ - namespace App\Listeners; -use App\Notifications\NewUser; -use App\User; -use Illuminate\Auth\Events\Registered; use Illuminate\Support\Facades\Log; +use Illuminate\Auth\Events\Registered; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; + +use App\User; +use App\Notifications\NewUser; class OnUserRegistration { @@ -47,10 +31,12 @@ class OnUserRegistration public function handle(Registered $event) { // TODO: Send push notification to online admins via browser (w/ pusher) - Log::info('User '.$event->user->name.' has just registered for an account.'); + Log::info('User ' . $event->user->name . ' has just registered for an account.'); - foreach (User::all() as $user) { - if ($user->hasRole('admin')) { + foreach(User::all() as $user) + { + if ($user->hasRole('admin')) + { $user->notify(new NewUser($event->user)); } } diff --git a/app/Listeners/PromoteUser.php b/app/Listeners/PromoteUser.php index a3ca047..62760b0 100644 --- a/app/Listeners/PromoteUser.php +++ b/app/Listeners/PromoteUser.php @@ -1,29 +1,13 @@ . - */ - namespace App\Listeners; use App\Events\ApplicationApprovedEvent; -use App\Notifications\ApplicationApproved; use App\StaffProfile; +use App\Notifications\ApplicationApproved; +use Carbon\Carbon; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Log; class PromoteUser @@ -51,18 +35,19 @@ class PromoteUser $staffProfile = StaffProfile::create([ 'userID' => $event->application->user->id, 'approvalDate' => now()->toDateTimeString(), - 'memberNotes' => 'Approved by staff members. Welcome them to the team!', + 'memberNotes' => 'Approved by staff members. Welcome them to the team!' ]); $event->application->user->assignRole('reviewer'); - Log::info('User '.$event->application->user->name.' has just been promoted!', [ + Log::info('User ' . $event->application->user->name . ' has just been promoted!', [ 'newRank' => $event->application->response->vacancy->permissionGroupName, - 'staffProfileID' => $staffProfile->id, + 'staffProfileID' => $staffProfile->id ]); $event->application->user->notify(new ApplicationApproved($event->application)); // note: Also notify staff // TODO: Also assign new app role based on the permission group name + } } diff --git a/app/Mail/NewContactSubmission.php b/app/Mail/NewContactSubmission.php index 15e2cdf..24373f8 100644 --- a/app/Mail/NewContactSubmission.php +++ b/app/Mail/NewContactSubmission.php @@ -1,27 +1,9 @@ . - */ - namespace App\Mail; use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; diff --git a/app/Notifications/ApplicationApproved.php b/app/Notifications/ApplicationApproved.php index 9c20eae..bfde408 100644 --- a/app/Notifications/ApplicationApproved.php +++ b/app/Notifications/ApplicationApproved.php @@ -1,27 +1,7 @@ . - */ - namespace App\Notifications; -use App\Application; use App\Facades\Options; use App\Traits\Cancellable; use Illuminate\Bus\Queueable; @@ -29,6 +9,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; +use App\Application; class ApplicationApproved extends Notification implements ShouldQueue { @@ -64,9 +45,10 @@ class ApplicationApproved extends Notification implements ShouldQueue */ public function toMail($notifiable) { + return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - '.$this->application->response->vacancy->vacancyName.' application approved') + ->subject(config('app.name') . ' - ' . $this->application->response->vacancy->vacancyName . ' application approved') ->line('
') ->line('Congratulations! Our Staff team has reviewed your application today, and your application has been approved.') ->line('You have just received the Reviewer role, which allows you to view and vote on other applications.') @@ -80,18 +62,19 @@ class ApplicationApproved extends Notification implements ShouldQueue public function toSlack($notifiable) { + $url = route('showSingleProfile', ['user' => $notifiable->id]); $roles = implode(', ', $notifiable->roles->pluck('name')->all()); return (new SlackMessage) ->success() ->content('A user has been approved on the team. Welcome aboard!') - ->attachment(function ($attachment) use ($notifiable, $url, $roles) { + ->attachment(function($attachment) use ($notifiable, $url, $roles){ $attachment->title('New staff member') ->fields([ 'Name' => $notifiable->name, 'Email' => $notifiable->email, - 'Roles' => $roles, + 'Roles' => $roles ]) ->action('View profile', $url); }); diff --git a/app/Notifications/ApplicationDenied.php b/app/Notifications/ApplicationDenied.php index 09233ad..03a4382 100644 --- a/app/Notifications/ApplicationDenied.php +++ b/app/Notifications/ApplicationDenied.php @@ -1,37 +1,19 @@ . - */ - namespace App\Notifications; -use App\Application; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; +use App\Application; class ApplicationDenied extends Notification implements ShouldQueue { use Queueable; + public $application; /** @@ -63,9 +45,10 @@ class ApplicationDenied extends Notification implements ShouldQueue */ public function toMail($notifiable) { + return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - '.$this->application->response->vacancy->vacancyName.' application denied') + ->subject(config('app.name') . ' - ' . $this->application->response->vacancy->vacancyName . ' application denied') ->line('Your most recent application has been denied.') ->line('Our review team denies applications for several reasons, including poor answers.') ->line('Please review your application and try again in 30 days.') @@ -73,19 +56,20 @@ class ApplicationDenied extends Notification implements ShouldQueue ->line('Better luck next time!'); } + public function toSlack($notifiable) { - $notifiableName = $notifiable->name; + $notifiableName = $notifiable->name; - return (new SlackMessage) + return (new SlackMessage) ->error() ->content('An application has just been denied.') - ->attachment(function ($attachment) use ($notifiableName) { + ->attachment(function($attachment) use ($notifiableName){ $attachment->title('Application denied!') - ->content($notifiableName.'\'s application has just been denied. They can try again in 30 days.'); + ->content($notifiableName . '\'s application has just been denied. They can try again in 30 days.'); }); - } + } /** * Get the array representation of the notification. * diff --git a/app/Notifications/ApplicationMoved.php b/app/Notifications/ApplicationMoved.php index 59c1c63..9598258 100644 --- a/app/Notifications/ApplicationMoved.php +++ b/app/Notifications/ApplicationMoved.php @@ -1,32 +1,13 @@ . - */ - namespace App\Notifications; -use App\Facades\Options; -use App\Traits\Cancellable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +use App\Traits\Cancellable; +use App\Facades\Options; class ApplicationMoved extends Notification implements ShouldQueue { @@ -57,7 +38,7 @@ class ApplicationMoved extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - Application Updated') + ->subject(config('app.name') . ' - Application Updated') ->line('Your most recent application has been moved up a stage.') ->line('This means our team has reviewed it and an interview will be scheduled ASAP.') ->action('Sign in', url(route('login'))) diff --git a/app/Notifications/AppointmentFinished.php b/app/Notifications/AppointmentFinished.php index 76a54c8..c1e879a 100644 --- a/app/Notifications/AppointmentFinished.php +++ b/app/Notifications/AppointmentFinished.php @@ -1,24 +1,5 @@ . - */ - namespace App\Notifications; use Illuminate\Bus\Queueable; @@ -61,7 +42,7 @@ class AppointmentFinished extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - Appointment completed') + ->subject(config('app.name') . ' - Appointment completed') ->line('Your appointment has been marked as completed!') ->line('Please allow an additional day for your application to be fully processed.') ->action('View applications', url(route('showUserApps'))) diff --git a/app/Notifications/AppointmentScheduled.php b/app/Notifications/AppointmentScheduled.php index e77cd5d..3ad3f60 100644 --- a/app/Notifications/AppointmentScheduled.php +++ b/app/Notifications/AppointmentScheduled.php @@ -1,36 +1,19 @@ . - */ - namespace App\Notifications; -use App\Appointment; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +use App\Appointment; + class AppointmentScheduled extends Notification implements ShouldQueue { use Queueable; + protected $appointment; /** @@ -64,10 +47,10 @@ class AppointmentScheduled extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - Interview scheduled') - ->line('A voice interview has been scheduled for you @ '.$this->appointment->appointmentDate.'.') - ->line('With the following details: '.$this->appointment->appointmentDescription) - ->line('This meeting will take place @ '.$this->appointment->appointmentLocation.'. You will receive an email soon with details on how to join this meeting.') + ->subject(config('app.name') . ' - Interview scheduled') + ->line('A voice interview has been scheduled for you @ ' . $this->appointment->appointmentDate . '.') + ->line('With the following details: ' . $this->appointment->appointmentDescription) + ->line('This meeting will take place @ ' . $this->appointment->appointmentLocation . '. You will receive an email soon with details on how to join this meeting.') ->line('You are expected to show up at least 5 minutes before the scheduled date.') ->action('Sign in', url(route('login'))) ->line('Thank you!'); diff --git a/app/Notifications/ChangedPassword.php b/app/Notifications/ChangedPassword.php index 6c9bd54..bc4cca5 100644 --- a/app/Notifications/ChangedPassword.php +++ b/app/Notifications/ChangedPassword.php @@ -1,24 +1,5 @@ . - */ - namespace App\Notifications; use Illuminate\Bus\Queueable; @@ -61,7 +42,7 @@ class ChangedPassword extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - Account password changed') + ->subject(config('app.name') . ' - Account password changed') ->line('The password for the account registered to this email address has just been changed.') ->line('If this was not you, please contact an administrator immediately.') ->action('Sign in', url(route('login'))) diff --git a/app/Notifications/EmailChanged.php b/app/Notifications/EmailChanged.php index 6003cf6..e946102 100644 --- a/app/Notifications/EmailChanged.php +++ b/app/Notifications/EmailChanged.php @@ -1,24 +1,5 @@ . - */ - namespace App\Notifications; use Illuminate\Bus\Queueable; @@ -61,7 +42,7 @@ class EmailChanged extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - Email address changed') + ->subject(config('app.name') . ' - Email address changed') ->line('The email address for your account has just been updated, either by you or an administrator.') ->action('Sign in', url(route('login'))) ->line('Thank you!'); diff --git a/app/Notifications/NewApplicant.php b/app/Notifications/NewApplicant.php index a0aab57..0fdbac9 100644 --- a/app/Notifications/NewApplicant.php +++ b/app/Notifications/NewApplicant.php @@ -1,42 +1,26 @@ . - */ - namespace App\Notifications; -use App\Application; -use App\Facades\Options; -use App\Traits\Cancellable; -use App\Vacancy; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; +use App\Application; +use App\Vacancy; + +use App\Traits\Cancellable; +use App\Facades\Options; class NewApplicant extends Notification implements ShouldQueue { use Queueable, Cancellable; + protected $application; + protected $vacancy; /** @@ -52,7 +36,8 @@ class NewApplicant extends Notification implements ShouldQueue public function channels() { - if (Options::getOption('enable_slack_notifications') == 1) { + if (Options::getOption('enable_slack_notifications') == 1) + { return ['slack']; } @@ -74,15 +59,17 @@ class NewApplicant extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - New application') + ->subject(config('app.name') . ' - New application') ->line('Someone has just applied for a position. Check it out!') - ->line('You are receiving this because you\'re a staff member at '.config('app.name').'.') + ->line('You are receiving this because you\'re a staff member at ' . config('app.name') . '.') ->action('View Application', url(route('showUserApp', ['application' => $this->application->id]))) ->line('Thank you!'); } + public function toSlack($notifiable) { + $vacancyDetails = []; $vacancyDetails['name'] = $this->vacancy->vacancyName; $vacancyDetails['slots'] = $this->vacancy->vacancyCount; @@ -93,17 +80,16 @@ class NewApplicant extends Notification implements ShouldQueue return (new SlackMessage) ->success() ->content('Notice: New application coming through. Please review as soon as possible.') - ->attachment(function ($attachment) use ($vacancyDetails, $url, $applicant) { + ->attachment(function($attachment) use ($vacancyDetails, $url, $applicant){ $attachment->title('Application details') ->fields([ - 'Applied for' => $vacancyDetails['name'], - 'Avaiable positions' => $vacancyDetails['slots'], - 'Applicant' => $applicant, + 'Applied for' => $vacancyDetails['name'], + 'Avaiable positions' => $vacancyDetails['slots'], + 'Applicant' => $applicant ]) ->action('Review application', $url); }); } - /** * Get the array representation of the notification. * diff --git a/app/Notifications/NewComment.php b/app/Notifications/NewComment.php index 48e55f9..10c7bfc 100644 --- a/app/Notifications/NewComment.php +++ b/app/Notifications/NewComment.php @@ -1,39 +1,21 @@ . - */ - namespace App\Notifications; -use App\Application; -use App\Comment; -use App\Facades\Options; -use App\Traits\Cancellable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +use App\Comment; +use App\Application; +use App\Traits\Cancellable; +use App\Facades\Options; class NewComment extends Notification implements ShouldQueue { use Queueable, Cancellable; + protected $application; /** @@ -61,7 +43,7 @@ class NewComment extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - New comment') + ->subject(config('app.name') . ' - New comment') ->line('Someone has just posted a new comment on an application you follow.') ->line('You\'re receiving this email because you\'ve voted/commented on this application.') ->action('Check it out', url(route('showUserApp', ['application' => $this->application->id]))) diff --git a/app/Notifications/NewContact.php b/app/Notifications/NewContact.php index 9526327..761f27c 100644 --- a/app/Notifications/NewContact.php +++ b/app/Notifications/NewContact.php @@ -1,27 +1,9 @@ . - */ - namespace App\Notifications; use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Illuminate\Support\Collection; @@ -62,22 +44,23 @@ class NewContact extends Notification public function toMail($notifiable) { if ($this->message->has([ - 'message', - 'ip', - 'email', - ])) { - return (new MailMessage) + 'message', + 'ip', + 'email' + ])) + { + return (new MailMessage) ->line('We\'ve received a new contact form submission in the StaffManagement app center.') ->line('This is what they sent: ') ->line('') ->line($this->message->get('message')) ->line('') - ->line('This message was received from '.$this->message->get('ip').' and submitted by '.$this->message->get('email').'.') + ->line('This message was received from ' . $this->message->get('ip') . ' and submitted by ' . $this->message->get('email') . '.') ->action('Sign in', url(route('login'))) ->line('Thank you!'); } - throw new \InvalidArgumentException('Invalid arguments supplied to NewContact!'); + throw new \InvalidArgumentException("Invalid arguments supplied to NewContact!"); } /** diff --git a/app/Notifications/NewUser.php b/app/Notifications/NewUser.php index 1d0db11..ec31cd6 100644 --- a/app/Notifications/NewUser.php +++ b/app/Notifications/NewUser.php @@ -1,35 +1,17 @@ . - */ - namespace App\Notifications; -use App\Facades\Options; -use App\Facades\UUID; -use App\Traits\Cancellable; -use App\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; -use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; +use Illuminate\Notifications\Messages\SlackMessage; + +use App\User; +use App\Facades\UUID; +use App\Traits\Cancellable; +use App\Facades\Options; class NewUser extends Notification implements ShouldQueue { @@ -67,8 +49,8 @@ class NewUser extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - New user') - ->line($this->user->name.' has just registered to our site.') + ->subject(config('app.name') . ' - New user') + ->line($this->user->name . ' has just registered to our site.') ->line('You are receiving this email because you opted to receive new user notifications.') ->action('View profile', url(route('showSingleProfile', ['user' => $this->user->id]))) ->line('Thank you!'); @@ -76,26 +58,28 @@ class NewUser extends Notification implements ShouldQueue public function toSlack($notifiable) { - $user = []; + $user = []; - $user['name'] = $this->user->name; - $user['email'] = $this->user->email; - $user['username'] = UUID::toUsername($this->user->uuid); + $user['name'] = $this->user->name; + $user['email'] = $this->user->email; + $user['username'] = UUID::toUsername($this->user->uuid); - $date = \Carbon\Carbon::parse($this->user->created_at); - $user['created_at'] = $date->englishMonth.' '.$date->day.' '.$date->year; + $date = \Carbon\Carbon::parse($this->user->created_at); + $user['created_at'] = $date->englishMonth . ' ' . $date->day . ' ' . $date->year; return (new SlackMessage) ->success() ->content('A new user has signed up!') - ->attachment(function ($attachment) use ($user) { + ->attachment(function($attachment) use ($user){ + $attachment->title('User details') ->fields([ - 'Email address' => $user['email'], - 'Name' => $user['name'], - 'Minecraft Username' => $user['username'], - 'Registration date' => $user['created_at'], + 'Email address' => $user['email'], + 'Name' => $user['name'], + 'Minecraft Username' => $user['username'], + 'Registration date' => $user['created_at'] ]); + }); } diff --git a/app/Notifications/UserBanned.php b/app/Notifications/UserBanned.php index c230580..f5d5c4e 100644 --- a/app/Notifications/UserBanned.php +++ b/app/Notifications/UserBanned.php @@ -1,33 +1,15 @@ . - */ - namespace App\Notifications; -use App\Ban; -use App\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +use App\User; +use App\Ban; + class UserBanned extends Notification implements ShouldQueue { use Queueable; @@ -35,7 +17,6 @@ class UserBanned extends Notification implements ShouldQueue protected $user; protected $ban; - /** * Create a new notification instance. * @@ -69,8 +50,8 @@ class UserBanned extends Notification implements ShouldQueue return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) ->line('Hello, ') - ->line('Moderators have just banned user '.$this->user->name.' for '.$this->ban->reason) - ->line('This ban will remain in effect until '.$this->ban->bannedUntil.'.') + ->line('Moderators have just banned user ' . $this->user->name . ' for ' . $this->ban->reason) + ->line('This ban will remain in effect until ' . $this->ban->bannedUntil . '.') ->action('View profile', url(route('showSingleProfile', ['user' => $this->user->id]))) ->line('Thank you!'); } diff --git a/app/Notifications/VacancyClosed.php b/app/Notifications/VacancyClosed.php index 4016273..8ae85e4 100644 --- a/app/Notifications/VacancyClosed.php +++ b/app/Notifications/VacancyClosed.php @@ -1,35 +1,17 @@ . - */ - namespace App\Notifications; -use App\Facades\Options; -use App\Traits\Cancellable; -use App\Vacancy; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use Illuminate\Queue\SerializesModels; +use App\Vacancy; +use App\Facades\Options; +use App\Traits\Cancellable; + class VacancyClosed extends Notification implements ShouldQueue { use Queueable, SerializesModels, Cancellable; @@ -43,7 +25,7 @@ class VacancyClosed extends Notification implements ShouldQueue */ public function __construct(Vacancy $vacancy) { - $this->vacancy = $vacancy; + $this->vacancy = $vacancy; } public function optOut($notifiable) @@ -61,8 +43,8 @@ class VacancyClosed extends Notification implements ShouldQueue { return (new MailMessage) ->from(config('notification.sender.address'), config('notification.sender.name')) - ->subject(config('app.name').' - Vacancy Closed') - ->line('The vacancy '.$this->vacancy->vacancyName.', with '.$this->vacancy->vacancyCount.' remaining slots, has just been closed.') + ->subject(config('app.name') . ' - Vacancy Closed') + ->line('The vacancy ' . $this->vacancy->vacancyName . ', with ' . $this->vacancy->vacancyCount . ' remaining slots, has just been closed.') ->line('Please be aware that this position may be deleted/reopened any time.') ->action('View positions', url(route('showPositions'))) ->line('Thank you!'); diff --git a/app/Observers/ApplicationObserver.php b/app/Observers/ApplicationObserver.php index 16b6615..8821414 100644 --- a/app/Observers/ApplicationObserver.php +++ b/app/Observers/ApplicationObserver.php @@ -1,24 +1,5 @@ . - */ - namespace App\Observers; use App\Application; @@ -53,20 +34,24 @@ class ApplicationObserver $application->response()->delete(); $votes = $application->votes; - foreach ($votes as $vote) { - Log::debug('Referential integrity cleanup: Deleting and detaching vote '.$vote->id); + foreach ($votes as $vote) + { + Log::debug('Referential integrity cleanup: Deleting and detaching vote ' . $vote->id); $vote->application()->detach($application->id); $vote->delete(); } - if (! is_null($application->appointment)) { + if (!is_null($application->appointment)) + { Log::debug('RIC: Deleting appointment!'); $application->appointment()->delete(); } - if (! $application->comments->isEmpty()) { + if (!$application->comments->isEmpty()) + { Log::debug('RIC: Deleting comments!'); - foreach ($application->comments as $comment) { + foreach($application->comments as $comment) + { $comment->delete(); } } diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index 6639504..38f7660 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -1,24 +1,5 @@ . - */ - namespace App\Observers; use App\Profile; @@ -40,7 +21,7 @@ class UserObserver 'profileShortBio' => 'Write a one-liner about you here!', 'profileAboutMe' => 'Tell us a bit about you.', 'socialLinks' => '{}', - 'userID' => $user->id, + 'userID' => $user->id ]); } @@ -62,12 +43,15 @@ class UserObserver Log::debug('Referential integrity cleanup: Deleted profile!'); $applications = $user->applications; - if (! $applications->isEmpty()) { + if (!$applications->isEmpty()) + { Log::debug('RIC: Now trying to delete applications and responses...'); - foreach ($applications as $application) { + foreach($applications as $application) + { // code moved to Application observer, where it gets rid of attached elements individually - Log::debug('RIC: Deleting application '.$application->id); + Log::debug('RIC: Deleting application ' . $application->id); $application->delete(); + } } diff --git a/app/Observers/VacancyObserver.php b/app/Observers/VacancyObserver.php index c363e15..decf1f7 100644 --- a/app/Observers/VacancyObserver.php +++ b/app/Observers/VacancyObserver.php @@ -1,28 +1,10 @@ . - */ - namespace App\Observers; use App\Vacancy; + class VacancyObserver { /** diff --git a/app/Options.php b/app/Options.php index 895fe88..e650bbc 100644 --- a/app/Options.php +++ b/app/Options.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -27,6 +8,6 @@ class Options extends Model { public $fillable = [ 'option_name', - 'option_value', + 'option_value' ]; } diff --git a/app/Policies/ApplicationPolicy.php b/app/Policies/ApplicationPolicy.php index 6c7c2b9..07edbca 100644 --- a/app/Policies/ApplicationPolicy.php +++ b/app/Policies/ApplicationPolicy.php @@ -1,30 +1,11 @@ . - */ - namespace App\Policies; use App\Application; +use Illuminate\Auth\Access\Response; use App\User; use Illuminate\Auth\Access\HandlesAuthorization; -use Illuminate\Auth\Access\Response; class ApplicationPolicy { @@ -42,20 +23,22 @@ class ApplicationPolicy public function viewAny(User $user) { - if ($user->can('applications.view.all')) { - return Response::allow(); - } + if ($user->can('applications.view.all')) + { + return Response::allow(); + } - return Response::deny('Forbidden'); + return Response::deny('Forbidden'); } public function view(User $user, Application $application) { - if ($user->is($application->user) && $user->can('applications.view.own') || $user->can('applications.view.all')) { - return Response::allow(); - } + if ($user->is($application->user) && $user->can('applications.view.own') || $user->can('applications.view.all')) + { + return Response::allow(); + } - return Response::deny('You are not authorised to view this application'); + return Response::deny('You are not authorised to view this application'); } public function update(User $user) @@ -65,6 +48,8 @@ class ApplicationPolicy public function delete(User $user, Application $application) { - return $user->hasRole('admin'); + + return $user->hasRole('admin'); + } } diff --git a/app/Policies/AppointmentPolicy.php b/app/Policies/AppointmentPolicy.php index 29a5b50..e541e4c 100644 --- a/app/Policies/AppointmentPolicy.php +++ b/app/Policies/AppointmentPolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\Appointment; diff --git a/app/Policies/BanPolicy.php b/app/Policies/BanPolicy.php index 0eaa62e..754458e 100644 --- a/app/Policies/BanPolicy.php +++ b/app/Policies/BanPolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\Ban; @@ -63,13 +44,12 @@ class BanPolicy */ public function create(User $user, User $targetUser) { - Log::debug('Authorization check started', [ + Log::debug("Authorization check started", [ 'requiredRoles' => 'admin', 'hasRequiredRole' => $user->hasRole('admin'), 'targetUser' => $targetUser->username, - 'isCurrentUser' => Auth::user()->is($user), + 'isCurrentUser' => Auth::user()->is($user) ]); - return $user->hasRole('admin') && $user->isNot($targetUser); } diff --git a/app/Policies/CommentPolicy.php b/app/Policies/CommentPolicy.php index b9ce668..477b445 100644 --- a/app/Policies/CommentPolicy.php +++ b/app/Policies/CommentPolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\Comment; @@ -84,7 +65,8 @@ class CommentPolicy */ public function delete(User $user, Comment $comment) { - if ($user->is($comment->user) || $user->hasRole('admin')) { + if ($user->is($comment->user) || $user->hasRole('admin')) + { return true; } diff --git a/app/Policies/FormPolicy.php b/app/Policies/FormPolicy.php index ca6e808..c382190 100644 --- a/app/Policies/FormPolicy.php +++ b/app/Policies/FormPolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\Form; @@ -54,9 +35,8 @@ class FormPolicy public function viewFormbuilder(User $user) { - return $user->can('admin.hiring.formbuilder'); + return $user->can('admin.hiring.formbuilder'); } - /** * Determine whether the user can create models. * diff --git a/app/Policies/ProfilePolicy.php b/app/Policies/ProfilePolicy.php index d19801f..bd3bc01 100644 --- a/app/Policies/ProfilePolicy.php +++ b/app/Policies/ProfilePolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\Profile; @@ -36,6 +17,7 @@ class ProfilePolicy */ public function __construct() { + } public function edit(User $user, Profile $profile) diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index f87838a..b98f105 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\User; @@ -35,6 +16,7 @@ class UserPolicy */ public function __construct() { + } public function edit(User $authUser, User $user) @@ -45,7 +27,7 @@ class UserPolicy // This refers to the admin tools that let staff update more information than users themselves can public function adminEdit(User $authUser, User $user) { - return $authUser->hasRole('admin') && $authUser->isNot($user); + return $authUser->hasRole('admin') && $authUser->isNot($user); } public function viewStaff(User $user) @@ -60,11 +42,11 @@ class UserPolicy public function terminate(User $authUser) { - return $authUser->hasRole('admin'); + return $authUser->hasRole('admin'); } public function delete(User $authUser, User $subject) { - return $authUser->hasRole('admin') && $authUser->isNot($subject); + return $authUser->hasRole('admin') && $authUser->isNot($subject); } } diff --git a/app/Policies/VacancyPolicy.php b/app/Policies/VacancyPolicy.php index 3ff57ad..7e547f2 100644 --- a/app/Policies/VacancyPolicy.php +++ b/app/Policies/VacancyPolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\User; @@ -29,7 +10,6 @@ class VacancyPolicy { use HandlesAuthorization; // TODO: Switch to permissions (there are no specific permissions yet) - /** * Determine whether the user can view any models. * diff --git a/app/Policies/VotePolicy.php b/app/Policies/VotePolicy.php index 570e145..9337aa4 100644 --- a/app/Policies/VotePolicy.php +++ b/app/Policies/VotePolicy.php @@ -1,24 +1,5 @@ . - */ - namespace App\Policies; use App\User; diff --git a/app/Profile.php b/app/Profile.php index 0367189..9a64243 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -1,37 +1,19 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; class Profile extends Model { + public $fillable = [ 'profileShortBio', 'profileAboutMe', 'avatarPreference', 'socialLinks', - 'userID', + 'userID' ]; @@ -39,4 +21,5 @@ class Profile extends Model { return $this->belongsTo('App\User', 'userID', 'id'); } + } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index cef8e40..8d8144e 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -1,24 +1,5 @@ . - */ - namespace App\Providers; use App\Application; @@ -49,7 +30,7 @@ class AppServiceProvider extends ServiceProvider public function boot() { Sentry\init([ - 'release' => env('RELEASE'), + 'release' => env('RELEASE') ]); Schema::defaultStringLength(191); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index ee9ecfd..52563b4 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -1,42 +1,27 @@ . - */ - namespace App\Providers; +use App\Policies\ProfilePolicy; +use App\Policies\VacancyPolicy; +use App\Policies\UserPolicy; +use App\Policies\BanPolicy; +use App\Policies\FormPolicy; +use App\Policies\VotePolicy; +use App\Policies\ApplicationPolicy; +use App\Policies\AppointmentPolicy; + +use App\User; +use App\Form; +use App\Vote; +use App\Vacancy; use App\Application; use App\Appointment; use App\Ban; -use App\Form; -use App\Policies\ApplicationPolicy; -use App\Policies\AppointmentPolicy; -use App\Policies\BanPolicy; -use App\Policies\FormPolicy; -use App\Policies\ProfilePolicy; -use App\Policies\UserPolicy; -use App\Policies\VacancyPolicy; -use App\Policies\VotePolicy; -use App\User; -use App\Vacancy; -use App\Vote; + + use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; +use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { @@ -55,7 +40,7 @@ class AuthServiceProvider extends ServiceProvider 'App\Form' => 'App\Policies\FormPolicy', Vote::class => VotePolicy::class, Ban::class => BanPolicy::class, - Appointment::class => AppointmentPolicy::class, + Appointment::class => AppointmentPolicy::class ]; /** diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index f3d62bd..395c518 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -1,24 +1,5 @@ . - */ - namespace App\Providers; use Illuminate\Support\Facades\Broadcast; diff --git a/app/Providers/ContextAwareValidatorProvider.php b/app/Providers/ContextAwareValidatorProvider.php index bc4f309..749de88 100644 --- a/app/Providers/ContextAwareValidatorProvider.php +++ b/app/Providers/ContextAwareValidatorProvider.php @@ -1,29 +1,11 @@ . - */ - namespace App\Providers; -use App; use Illuminate\Support\ServiceProvider; +use App; + class ContextAwareValidatorProvider extends ServiceProvider { /** @@ -43,8 +25,10 @@ class ContextAwareValidatorProvider extends ServiceProvider */ public function boot() { - App::bind('contextAwareValidator', function () { - return new App\Helpers\ContextAwareValidator(); - }); + App::bind('contextAwareValidator', function(){ + + return new App\Helpers\ContextAwareValidator(); + + }); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 11b6295..6ea787f 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -1,24 +1,5 @@ . - */ - namespace App\Providers; use App\Listeners\LogAuthenticationFailure; @@ -41,23 +22,23 @@ class EventServiceProvider extends ServiceProvider protected $listen = [ Registered::class => [ SendEmailVerificationNotification::class, - OnUserRegistration::class, + OnUserRegistration::class ], Failed::class => [ - LogAuthenticationFailure::class, + LogAuthenticationFailure::class ], Login::class => [ - LogAuthenticationSuccess::class, + LogAuthenticationSuccess::class ], 'App\Events\ApplicationApprovedEvent' => [ - 'App\Listeners\PromoteUser', + 'App\Listeners\PromoteUser' ], 'App\Events\ApplicationDeniedEvent' => [ - 'App\Listeners\DenyUser', + 'App\Listeners\DenyUser' ], 'App\Events\UserBannedEvent' => [ - 'App\Listeners\OnUserBanned', - ], + 'App\Listeners\OnUserBanned' + ] ]; /** @@ -67,6 +48,7 @@ class EventServiceProvider extends ServiceProvider */ public function boot() { + parent::boot(); // diff --git a/app/Providers/IPInfoProvider.php b/app/Providers/IPInfoProvider.php index 5ebe6f8..3b7150a 100644 --- a/app/Providers/IPInfoProvider.php +++ b/app/Providers/IPInfoProvider.php @@ -1,28 +1,9 @@ . - */ - namespace App\Providers; -use App; use Illuminate\Support\ServiceProvider; +use App; class IPInfoProvider extends ServiceProvider { @@ -43,8 +24,10 @@ class IPInfoProvider extends ServiceProvider */ public function boot() { - App::bind('ipInformationFacade', function () { + App::bind('ipInformationFacade', function(){ + return new App\CustomFacades\IP(); + }); } } diff --git a/app/Providers/MojangStatusProvider.php b/app/Providers/MojangStatusProvider.php index 84bb47d..3fe4dc1 100644 --- a/app/Providers/MojangStatusProvider.php +++ b/app/Providers/MojangStatusProvider.php @@ -1,32 +1,13 @@ . - */ - namespace App\Providers; use GuzzleHttp\Exception\ConnectException; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Facades\View; class MojangStatusProvider extends ServiceProvider { @@ -48,15 +29,19 @@ class MojangStatusProvider extends ServiceProvider public function boot() { // TODO: (IMPORTANT) Switch this to Middleware - if (! Cache::has('mojang_status')) { - Log::info('Mojang Status Provider: Mojang Status not found in the cache; Sending new request.'); + if (!Cache::has('mojang_status')) + { + Log::info("Mojang Status Provider: Mojang Status not found in the cache; Sending new request."); - try { + try + { $mcstatus = Http::get(config('general.urls.mojang.statuscheck')); Cache::put('mojang_status', base64_encode($mcstatus->body()), now()->addDays(3)); - } catch (ConnectException $connectException) { + } + catch(ConnectException $connectException) + { Log::critical('Could not connect to Mojang servers: Cannot check/refresh status', [ - 'message' => $connectException->getMessage(), + 'message' => $connectException->getMessage() ]); } } diff --git a/app/Providers/OptionsProvider.php b/app/Providers/OptionsProvider.php index 7c70e8e..3bc98db 100644 --- a/app/Providers/OptionsProvider.php +++ b/app/Providers/OptionsProvider.php @@ -1,28 +1,9 @@ . - */ - namespace App\Providers; -use App; use Illuminate\Support\ServiceProvider; +use App; class OptionsProvider extends ServiceProvider { @@ -43,7 +24,7 @@ class OptionsProvider extends ServiceProvider */ public function boot() { - App::bind('smOptions', function () { + App::bind('smOptions', function (){ return new App\Helpers\Options(); }); } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index eab8bbb..1235909 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,24 +1,5 @@ . - */ - namespace App\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; diff --git a/app/Providers/UUIDConversionProvider.php b/app/Providers/UUIDConversionProvider.php index 7f26d6b..6ce7fad 100644 --- a/app/Providers/UUIDConversionProvider.php +++ b/app/Providers/UUIDConversionProvider.php @@ -1,28 +1,9 @@ . - */ - namespace App\Providers; -use App; use Illuminate\Support\ServiceProvider; +use App; class UUIDConversionProvider extends ServiceProvider { @@ -43,8 +24,10 @@ class UUIDConversionProvider extends ServiceProvider */ public function boot() { - App::bind('uuidConversionFacade', function () { + App::bind('uuidConversionFacade', function(){ + return new App\UUID\UUID(); + }); } } diff --git a/app/Response.php b/app/Response.php index dfa96d0..08312ea 100644 --- a/app/Response.php +++ b/app/Response.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -28,9 +9,10 @@ class Response extends Model public $fillable = [ 'responseFormID', 'associatedVacancyID', - 'responseData', + 'responseData' ]; + public function form() { return $this->hasOne('App\Form', 'id', 'responseFormID'); diff --git a/app/StaffProfile.php b/app/StaffProfile.php index 87d131b..8d6cfba 100644 --- a/app/StaffProfile.php +++ b/app/StaffProfile.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -31,7 +12,7 @@ class StaffProfile extends Model 'approvalDate', 'terminationDate', 'resignationDate', - 'memberNotes', + 'memberNotes' ]; } diff --git a/app/Traits/AuthenticatesTwoFactor.php b/app/Traits/AuthenticatesTwoFactor.php index 9a36d51..4b6ab31 100644 --- a/app/Traits/AuthenticatesTwoFactor.php +++ b/app/Traits/AuthenticatesTwoFactor.php @@ -1,54 +1,40 @@ . - */ - namespace App\Traits; -use App\Http\Requests\Add2FASecretRequest; use Google2FA; +use App\Http\Requests\Add2FASecretRequest; use Illuminate\Support\Facades\Log; + trait AuthenticatesTwoFactor { + public function verify2FA(Add2FASecretRequest $request) { $isValid = Google2FA::verifyKey($request->user()->twofa_secret, $request->otp); - if ($isValid) { - Google2FA::login(); + if ($isValid) + { + Google2FA::login(); - Log::info('SECURITY (postauth): One-time password verification succeeded', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip(), - ]); + Log::info('SECURITY (postauth): One-time password verification succeeded', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip() + ]); - return redirect()->to($this->redirectTo); - } else { - Log::warning('SECURITY (preauth): One-time password verification failed', [ - 'initiator' => $request->user()->email, - 'ip' => $request->ip(), - ]); + return redirect()->to($this->redirectTo); + } + else + { + Log::warning('SECURITY (preauth): One-time password verification failed', [ + 'initiator' => $request->user()->email, + 'ip' => $request->ip() + ]); - $request->session()->flash('error', 'Your one time password is invalid.'); - - return redirect()->back(); + $request->session()->flash('error', 'Your one time password is invalid.'); + return redirect()->back(); } } + } diff --git a/app/Traits/Cancellable.php b/app/Traits/Cancellable.php index 53a9e37..cbccb67 100644 --- a/app/Traits/Cancellable.php +++ b/app/Traits/Cancellable.php @@ -1,37 +1,24 @@ . - */ namespace App\Traits; + use App\Facades\Options; trait Cancellable { + public function chooseChannelsViaOptions() { $channels = []; - if (Options::getOption('enable_slack_notifications') == 1) { + if (Options::getOption('enable_slack_notifications') == 1) + { array_push($channels, 'slack'); - } elseif (Options::getOption('enable_email_notifications') == 1) { + } + elseif(Options::getOption('enable_email_notifications') == 1) + { array_push($channels, 'email'); } @@ -45,15 +32,18 @@ trait Cancellable public function via($notifiable) { - if ($this->optOut($notifiable)) { + if ($this->optOut($notifiable)) + { return []; } return $this->channels(); } + public function optOut($notifiable) { return false; } + } diff --git a/app/UUID/UUID.php b/app/UUID/UUID.php index 2a4de20..cee10d1 100644 --- a/app/UUID/UUID.php +++ b/app/UUID/UUID.php @@ -1,66 +1,59 @@ . - */ + namespace App\UUID; -use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; +use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Log; class UUID { + // Caching would not be needed here since this method won't be used in pages that loop over a collection of usernames. public function toUUID($username) { - if (is_null($username)) { - throw new \LogicException('Argument username for '.__METHOD__.' cannot be null!'); + if (is_null($username)) + { + throw new \LogicException('Argument username for ' . __METHOD__ . ' cannot be null!'); } - $response = json_decode(Http::post(trim(config('general.urls.mojang.api')).'/profiles/minecraft', [ - $username, + $response = json_decode(Http::post(trim(config('general.urls.mojang.api')) . '/profiles/minecraft', [ + $username ])->body(), true); - if (isset($response[0])) { - return $response[0]['id']; + if (isset($response[0])) + { + return $response[0]['id']; + } - throw new \InvalidArgumentException('You must supply a valid, premium Minecraft account to sign up.'); + throw new \InvalidArgumentException("You must supply a valid, premium Minecraft account to sign up."); } // Note: Caching could simply be assigning the username to it's UUID, however, to make this work, we'd need to loop over all cache items, which would be slighly ineffective public function toUsername($uuid) { - if (is_null($uuid)) { - throw new \LogicException('Argument uuid for '.__METHOD__.' cannot be null!'); + + if (is_null($uuid)) + { + throw new \LogicException('Argument uuid for ' . __METHOD__ . ' cannot be null!'); } - $shortUUID = substr($uuid, 0, 8); - $username = Cache::remember('uuid_'.$shortUUID, now()->addDays(30), function () use ($shortUUID, $uuid) { - $response = json_decode(Http::get(trim(config('general.urls.mojang.session')).'/session/minecraft/profile/'.$uuid)->body(), true); + $shortUUID = substr($uuid, 0, 8); + $username = Cache::remember('uuid_' . $shortUUID, now()->addDays(30), function() use ($shortUUID, $uuid) { - Log::debug('Caching '.$shortUUID.'for thirty days'); + $response = json_decode(Http::get(trim(config('general.urls.mojang.session')) . '/session/minecraft/profile/' . $uuid)->body(), true); + Log::debug('Caching ' . $shortUUID . 'for thirty days'); return $response['name']; - }); - return $username; + }); + + return $username; + } + + } diff --git a/app/User.php b/app/User.php index fc55a40..06f555f 100644 --- a/app/User.php +++ b/app/User.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Contracts\Auth\MustVerifyEmail; @@ -37,7 +18,7 @@ class User extends Authenticatable implements MustVerifyEmail * @var array */ protected $fillable = [ - 'name', 'email', 'password', 'originalIP', 'username', 'uuid', 'dob', + 'name', 'email', 'password', 'originalIP', 'username', 'uuid', 'dob' ]; /** @@ -58,6 +39,7 @@ class User extends Authenticatable implements MustVerifyEmail 'email_verified_at' => 'datetime', ]; + // public function applications() { @@ -84,11 +66,15 @@ class User extends Authenticatable implements MustVerifyEmail return $this->hasMany('App\Comment', 'authorID', 'id'); } + public function isBanned() { - return ! $this->bans()->get()->isEmpty(); + return !$this->bans()->get()->isEmpty(); } + + + public function isStaffMember() { return $this->hasAnyRole('reviewer', 'admin', 'hiringManager'); @@ -96,11 +82,13 @@ class User extends Authenticatable implements MustVerifyEmail public function has2FA() { - return ! is_null($this->twofa_secret); + return !is_null($this->twofa_secret); } + + public function routeNotificationForSlack($notification) { - return config('slack.webhook.integrationURL'); + return config('slack.webhook.integrationURL'); } } diff --git a/app/Vacancy.php b/app/Vacancy.php index 476e14e..1a84996 100644 --- a/app/Vacancy.php +++ b/app/Vacancy.php @@ -1,31 +1,14 @@ . - */ - namespace App; -use GrahamCampbell\Markdown\Facades\Markdown; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; +use GrahamCampbell\Markdown\Facades\Markdown; + + class Vacancy extends Model { public $fillable = [ @@ -38,25 +21,30 @@ class Vacancy extends Model 'vacancyFormID', 'vacancyCount', 'vacancyStatus', - 'vacancySlug', + 'vacancySlug' ]; + /** - * Get the HTML variant of the vacancyFullDescription attribute. - * - * @param string $value The original value - * @return string - */ + * Get the HTML variant of the vacancyFullDescription attribute. + * + * @param string $value The original value + * @return string + */ public function getVacancyFullDescriptionAttribute($value) { - if (! is_null($value)) { - return Markdown::convertToHTML($value); - } else { - return null; + if (!is_null($value)) + { + return Markdown::convertToHTML($value); + } + else + { + return null; } } + public function forms() { return $this->belongsTo('App\Form', 'vacancyFormID', 'id'); @@ -65,18 +53,20 @@ class Vacancy extends Model public function open() { $this->update([ - 'vacancyStatus' => 'OPEN', + 'vacancyStatus' => 'OPEN' ]); - Log::info('Vacancies: Vacancy '.$this->id.' ('.$this->vacancyName.') opened by '.Auth::user()->name); + Log::info("Vacancies: Vacancy " . $this->id . " (" . $this->vacancyName . ") opened by " . Auth::user()->name); } public function close() { $this->update([ - 'vacancyStatus' => 'CLOSED', + 'vacancyStatus' => 'CLOSED' ]); - Log::warning('Vacancies: Vacancy '.$this->id.' ('.$this->vacancyName.') closed by '.Auth::user()->name); + Log::warning("Vacancies: Vacancy " . $this->id . " (" . $this->vacancyName . ") closed by " . Auth::user()->name); + } + } diff --git a/app/View/Components/Alert.php b/app/View/Components/Alert.php index be497b4..04b5f3c 100644 --- a/app/View/Components/Alert.php +++ b/app/View/Components/Alert.php @@ -1,30 +1,12 @@ . - */ - namespace App\View\Components; use Illuminate\View\Component; class Alert extends Component { + public $alertType; public $extraStyling; diff --git a/app/View/Components/Card.php b/app/View/Components/Card.php index ee20d0d..6a5a953 100644 --- a/app/View/Components/Card.php +++ b/app/View/Components/Card.php @@ -1,24 +1,5 @@ . - */ - namespace App\View\Components; use Illuminate\View\Component; @@ -27,10 +8,14 @@ class Card extends Component { public $id; + public $cardTitle; + + public $footerStyle; + /** * Create a new component instance. * diff --git a/app/View/Components/Form.php b/app/View/Components/Form.php index 821ea5d..06e868d 100644 --- a/app/View/Components/Form.php +++ b/app/View/Components/Form.php @@ -1,34 +1,16 @@ . - */ - namespace App\View\Components; use Illuminate\View\Component; class Form extends Component { + public $formFields; - public $disableFields = false; + public $disableFields = false; /** * Create a new component instance. * @@ -36,7 +18,7 @@ class Form extends Component */ public function __construct($disableFields = false) { - $this->disableFields = $disableFields; + $this->disableFields = $disableFields; } /** diff --git a/app/View/Components/GlobalErrors.php b/app/View/Components/GlobalErrors.php index 5360e13..ab130be 100644 --- a/app/View/Components/GlobalErrors.php +++ b/app/View/Components/GlobalErrors.php @@ -1,24 +1,5 @@ . - */ - namespace App\View\Components; use Illuminate\View\Component; diff --git a/app/View/Components/Modal.php b/app/View/Components/Modal.php index fd23b3f..4ab43d3 100644 --- a/app/View/Components/Modal.php +++ b/app/View/Components/Modal.php @@ -1,24 +1,5 @@ . - */ - namespace App\View\Components; use Illuminate\View\Component; @@ -27,10 +8,13 @@ class Modal extends Component { public $id; + public $modalLabel; + public $modalTitle; + public $includeCloseButton; /** diff --git a/app/View/Components/NoPermission.php b/app/View/Components/NoPermission.php index f55f30a..6da51a1 100644 --- a/app/View/Components/NoPermission.php +++ b/app/View/Components/NoPermission.php @@ -1,24 +1,5 @@ . - */ - namespace App\View\Components; use Illuminate\View\Component; @@ -28,7 +9,6 @@ class NoPermission extends Component public $type; public $inDashboard; - /** * Create a new component instance. * @@ -36,9 +16,9 @@ class NoPermission extends Component */ public function __construct($type, $inDashboard = true) { - $this->type = $type; + $this->type = $type; - $this->inDashboard = $inDashboard; + $this->inDashboard = $inDashboard; } /** diff --git a/app/Vote.php b/app/Vote.php index 74a5aa0..6a89b21 100644 --- a/app/Vote.php +++ b/app/Vote.php @@ -1,24 +1,5 @@ . - */ - namespace App; use Illuminate\Database\Eloquent\Model; @@ -33,7 +14,7 @@ class Vote extends Model ]; public $touches = [ - 'application', + 'application' ]; public function user() diff --git a/bootstrap/app.php b/bootstrap/app.php index c89db0b..037e17d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,23 +1,15 @@ . - */ +|-------------------------------------------------------------------------- +| Create The Application +|-------------------------------------------------------------------------- +| +| The first thing we will do is create a new Laravel application instance +| which serves as the "glue" for all the components of Laravel, and is +| the IoC container for the system binding all of the various parts. +| +*/ $app = new Illuminate\Foundation\Application( $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) diff --git a/config/adminlte.php b/config/adminlte.php index 867c604..9c71a48 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -1,24 +1,5 @@ . - */ - return [ /* @@ -69,7 +50,7 @@ return [ 'logo_img_class' => 'brand-image img-circle elevation-3', 'logo_img_xl' => null, 'logo_img_xl_class' => 'brand-image-xs', - 'logo_img_alt' => env('APP_NAME').'\'s Temporary Logo', + 'logo_img_alt' => env('APP_NAME') . '\'s Temporary Logo', /* |-------------------------------------------------------------------------- @@ -230,17 +211,17 @@ return [ [ 'text' => 'm_home', 'icon' => 'fas fa-home', - 'url' => 'dashboard', + 'url' => 'dashboard' ], [ 'text' => 'm_directory', 'icon' => 'fas fa-users', 'url' => 'users/directory', - 'can' => 'profiles.view.others', + 'can' => 'profiles.view.others' ], [ 'header' => 'h_applications', - 'can' => 'applications.view.own', + 'can' => 'applications.view.own' ], [ 'text' => 'm_my_applications', @@ -250,8 +231,8 @@ return [ [ 'text' => 'm_curr_applications', 'icon' => 'fas fa-fw fa-check-double', - 'url' => '/applications/my-applications', - ], + 'url' => '/applications/my-applications' + ] ], ], @@ -261,40 +242,40 @@ return [ [ 'text' => 'm_profile_settings', 'url' => '/profile/settings', - 'icon' => 'fas fa-fw fa-cog', + 'icon' => 'fas fa-fw fa-cog' ], [ 'text' => 'm_account_settings', 'icon' => 'fas fa-user-circle', - 'url' => '/profile/settings/account', + 'url' => '/profile/settings/account' ], [ 'header' => 'h_app_management', - 'can' => ['applications.view.all', 'applications.vote'], + 'can' => ['applications.view.all', 'applications.vote'] ], [ 'text' => 'm_all_apps', 'url' => 'applications/staff/all', 'icon' => 'fas fa-list-ol', - 'can' => 'applications.view.all', + 'can' => 'applications.view.all' ], [ 'text' => 'm_outstanding_apps', 'url' => '/applications/staff/outstanding', 'icon' => 'far fa-folder-open', - 'can' => 'applications.view.all', + 'can' => 'applications.view.all' ], [ 'text' => 'm_interview_queue', 'url' => '/applications/staff/pending-interview', 'icon' => 'fas fa-fw fa-microphone-alt', - 'can' => 'applications.view.all', + 'can' => 'applications.view.all' ], [ 'text' => 'm_peer_approval', 'url' => '/applications/staff/peer-review', 'icon' => 'fas fa-fw fa-search', - 'can' => 'applications.view.all', + 'can' => 'applications.view.all' ], [ 'header' => 'h_admin', @@ -303,20 +284,20 @@ return [ 'admin.userlist', 'admin.stafflist', 'admin.hiring.*', - 'admin.notificationsettings.*', - ], + 'admin.notificationsettings.*' + ] ], [ 'text' => 'm_staff_m', 'icon' => 'fas fa-fw fa-users', 'url' => '/hr/staff-members', - 'can' => 'admin.stafflist', + 'can' => 'admin.stafflist' ], [ // players who haven't been promoted yet 'text' => 'm_reg_players', 'icon' => 'fas fa-fw fa-user-friends', 'url' => '/hr/players', - 'can' => 'admin.userlist', + 'can' => 'admin.userlist' ], [ 'text' => 'sm_hiring_man', @@ -326,7 +307,7 @@ return [ [ 'text' => 'm_open_pos', 'icon' => 'fas fa-box-open', - 'url' => '/admin/positions', + 'url' => '/admin/positions' ], [ 'text' => 'sm_forms', @@ -335,16 +316,16 @@ return [ [ 'text' => 'sm_all_forms', 'icon' => 'far fa-list-alt', - 'url' => '/admin/forms', + 'url' => '/admin/forms' ], [ 'text' => 'm_form_builder', 'icon' => 'fas fa-fw fa-hammer', - 'url' => '/admin/forms/builder', - ], - ], - ], - ], + 'url' => '/admin/forms/builder' + ] + ] + ] + ] ], [ 'text' => 'sm_app_settings', @@ -355,22 +336,22 @@ return [ 'text' => 'm_global_app_s', 'icon' => 'fas fa-cogs', 'url' => '/admin/settings', - 'can' => 'admin.settings.view', + 'can' => 'admin.settings.view' ], [ 'text' => 'm_devtools', 'icon' => 'fas fa-code', 'url' => '/admin/devtools', - 'can' => 'admin.developertools.use', - ], - ], + 'can' => 'admin.developertools.use' + ] + ] ], [ 'text' => 'm_s_logs', 'url' => '/admin/maintenance/system-logs', 'icon' => 'fas fa-clipboard-list', - 'can' => 'admin.maintenance.logs.view', - ], + 'can' => 'admin.maintenance.logs.view' + ] ], /* @@ -436,9 +417,9 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => '/js/formbuilder.js', - ], - ], + 'location' => '/js/formbuilder.js' + ] + ] ], [ 'name' => 'Select2', @@ -501,14 +482,14 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => 'https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js', + 'location' => 'https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js' ], [ 'type' => 'css', 'asset' => false, - 'location' => 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css', - ], - ], + 'location' => 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css' + ] + ] ], [ 'name' => 'GlobalTooltip', @@ -517,9 +498,9 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => '/js/globaltooltip.js', - ], - ], + 'location' => '/js/globaltooltip.js' + ] + ] ], [ 'name' => 'DatePickApp', @@ -528,36 +509,36 @@ return [ [ 'type' => 'js', 'asset' => false, - 'location' => '/js/datepick.js', - ], - ], + 'location' => '/js/datepick.js' + ] + ] ], [ - 'name' => 'Fullcalendar', - 'active' => true, - 'files' => [ - [ - 'type' => 'js', - 'asset' => false, - 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.js', - ], - [ - 'type' => 'css', - 'asset' => false, - 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css', - ], + 'name' => 'Fullcalendar', + 'active' => true, + 'files' => [ + [ + 'type' => 'js', + 'asset' => false, + 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.js', ], + [ + 'type' => 'css', + 'asset' => false, + 'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css' + ] + ] ], [ - 'name' => 'AuthCustomisations', - 'active' => true, - 'files' => [ - [ - 'type' => 'css', - 'asset' => false, - 'location' => '/css/authpages.css', - ], - ], - ], + 'name' => 'AuthCustomisations', + 'active' => true, + 'files' => [ + [ + 'type' => 'css', + 'asset' => false, + 'location' => '/css/authpages.css' + ] + ] + ] ], ]; diff --git a/config/app.php b/config/app.php index 188a5ba..96e5484 100644 --- a/config/app.php +++ b/config/app.php @@ -1,24 +1,5 @@ . - */ - return [ /* @@ -34,6 +15,7 @@ return [ 'name' => env('APP_NAME', 'Laravel'), + /* |-------------------------------------------------------------------------- | Application Homepage @@ -211,7 +193,7 @@ return [ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, \App\Providers\MojangStatusProvider::class, - \App\Providers\OptionsProvider::class, + \App\Providers\OptionsProvider::class ], @@ -268,7 +250,7 @@ return [ 'IP' => App\Facades\IP::class, 'Markdown' => GrahamCampbell\Markdown\Facades\Markdown::class, 'ContextAwareValidator' => App\Facades\ContextAwareValidation::class, - 'Settings' => App\Facades\Options::class, + 'Settings' => App\Facades\Options::class ], diff --git a/config/auth.php b/config/auth.php index 071543c..aaf982b 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/broadcasting.php b/config/broadcasting.php index 2fa0dee..3bba110 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/cache.php b/config/cache.php index 475421a..4f41fdf 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Support\Str; return [ diff --git a/config/cors.php b/config/cors.php index c06d99f..558369d 100644 --- a/config/cors.php +++ b/config/cors.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/database.php b/config/database.php index 493e1af..b42d9b3 100644 --- a/config/database.php +++ b/config/database.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Support\Str; return [ diff --git a/config/filesystems.php b/config/filesystems.php index 7ae4a84..94c8112 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/general.php b/config/general.php index bdc5e90..7749c97 100644 --- a/config/general.php +++ b/config/general.php @@ -1,45 +1,27 @@ . - */ - return [ - 'urls' => [ + 'urls' => + [ 'mojang' => [ 'statuscheck' => env('MOJANG_STATUS_URL') ?? 'https://status.mojang.com/check', 'api' => env('MOJANG_API_URL') ?? ' https://api.mojang.com', - 'session' => env('MOJANG_SESSIONAPI_URL') ?? 'https://sessionserver.mojang.com', + 'session' => env('MOJANG_SESSIONAPI_URL') ?? 'https://sessionserver.mojang.com' ], 'ipapi' => [ - 'ipcheck' => env('IPGEO_API_URL') ?? 'https://api.ipgeolocation.io/ipgeo', - ], + 'ipcheck' => env('IPGEO_API_URL') ?? 'https://api.ipgeolocation.io/ipgeo' + ] ], 'keys' => [ 'ipapi' => [ - 'apikey' => env('IPGEO_API_KEY'), - ], + 'apikey' => env('IPGEO_API_KEY') + ] - ], + ] ]; diff --git a/config/google2fa.php b/config/google2fa.php index 42eab82..4dd5824 100644 --- a/config/google2fa.php +++ b/config/google2fa.php @@ -1,24 +1,5 @@ . - */ - return [ /* @@ -78,7 +59,7 @@ return [ * One Time Password error message. */ 'error_messages' => [ - 'wrong_otp' => 'Your one time code was incorrect.', + 'wrong_otp' => "Your one time code was incorrect.", 'cannot_be_empty' => 'The one time code cannot be empty.', 'unknown' => 'An unknown error has occurred. Please try again.', ], diff --git a/config/hashing.php b/config/hashing.php index e7a93bf..8425770 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/laravellocalization.php b/config/laravellocalization.php index 8055da2..37578d7 100644 --- a/config/laravellocalization.php +++ b/config/laravellocalization.php @@ -1,24 +1,5 @@ . - */ - return [ // Uncomment the languages that your site supports - or add new ones. @@ -83,7 +64,7 @@ return [ '/app.css', '/robots.txt', '/slides/*', - '/auth/logout', + '/auth/logout' ], ]; diff --git a/config/log-viewer.php b/config/log-viewer.php index c733cb7..b0532ba 100644 --- a/config/log-viewer.php +++ b/config/log-viewer.php @@ -1,24 +1,5 @@ . - */ - use Arcanedev\LogViewer\Contracts\Utilities\Filesystem; return [ @@ -114,7 +95,7 @@ return [ 'icons' => [ /** * Font awesome >= 4.3 - * http://fontawesome.io/icons/. + * http://fontawesome.io/icons/ */ 'all' => 'fa fa-fw fa-list', // http://fontawesome.io/icon/list/ 'emergency' => 'fa fa-fw fa-bug', // http://fontawesome.io/icon/bug/ diff --git a/config/logging.php b/config/logging.php index 283cdeb..088c204 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,24 +1,5 @@ . - */ - use Monolog\Handler\NullHandler; use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; diff --git a/config/mail.php b/config/mail.php index bf9953d..5201bb7 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/markdown.php b/config/markdown.php index a206312..6408d6f 100644 --- a/config/markdown.php +++ b/config/markdown.php @@ -3,22 +3,12 @@ declare(strict_types=1); /* - * Copyright © 2020 Miguel Nogueira + * This file is part of Laravel Markdown. * - * This file is part of Raspberry Staff Manager. + * (c) Graham Campbell * - * Raspberry Staff Manager is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Raspberry Staff Manager is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Raspberry Staff Manager. If not, see . + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ return [ diff --git a/config/notification.php b/config/notification.php index 4abedc4..8f3da66 100644 --- a/config/notification.php +++ b/config/notification.php @@ -1,31 +1,12 @@ . - */ - return [ - 'sender' => [ + 'sender' => [ - 'address' => 'teams@spacejewel-hosting.com', - 'name' => 'RaspberryNet Teams', + 'address' => 'teams@spacejewel-hosting.com', + 'name' => 'RaspberryNet Teams' - ], + ] ]; diff --git a/config/permission.php b/config/permission.php index 23d28d1..d4a7764 100644 --- a/config/permission.php +++ b/config/permission.php @@ -1,24 +1,5 @@ . - */ - return [ 'models' => [ diff --git a/config/queue.php b/config/queue.php index 1ca3b3a..00b76d6 100644 --- a/config/queue.php +++ b/config/queue.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/recaptcha.php b/config/recaptcha.php index 3487b17..82e0813 100644 --- a/config/recaptcha.php +++ b/config/recaptcha.php @@ -1,33 +1,14 @@ . - */ - return [ 'keys' => [ 'sitekey' => env('RECAPTCHA_SITE_KEY'), - 'secret' => env('RECAPTCHA_PRIVATE_KEY'), + 'secret' => env('RECAPTCHA_PRIVATE_KEY') ], 'verify' => [ - 'apiurl' => env('RECAPTCHA_VERIFY_URL'), - ], + 'apiurl' => env('RECAPTCHA_VERIFY_URL') + ] ]; diff --git a/config/sentry.php b/config/sentry.php index f8e2b20..4d9ef4d 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -1,24 +1,5 @@ . - */ - return [ 'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')), diff --git a/config/services.php b/config/services.php index cbda757..2a1d616 100644 --- a/config/services.php +++ b/config/services.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/config/session.php b/config/session.php index a5b0c90..37ae384 100644 --- a/config/session.php +++ b/config/session.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Support\Str; return [ diff --git a/config/slack.php b/config/slack.php index 02627e7..2651cc4 100644 --- a/config/slack.php +++ b/config/slack.php @@ -1,30 +1,12 @@ . - */ - return [ - 'webhook' => [ + 'webhook' => [ - 'integrationURL' => env('SLACK_INTEGRATION_WEBHOOK'), + 'integrationURL' => env('SLACK_INTEGRATION_WEBHOOK') + + ] - ], ]; diff --git a/config/view.php b/config/view.php index 44a66b9..22b8a18 100644 --- a/config/view.php +++ b/config/view.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 451aae6..741edea 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,23 +1,6 @@ . - */ +/** @var \Illuminate\Database\Eloquent\Factory $factory */ use App\User; use Faker\Generator as Faker; diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 2596a64..4ee8c3e 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 7715044..0ee0a36 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index b348447..9bddee3 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_04_29_022245_create_profiles_table.php b/database/migrations/2020_04_29_022245_create_profiles_table.php index bc21b71..b3ac735 100644 --- a/database/migrations/2020_04_29_022245_create_profiles_table.php +++ b/database/migrations/2020_04_29_022245_create_profiles_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -38,7 +19,7 @@ class CreateProfilesTable extends Migration $table->text('profileAboutMe')->nullable(); $table->enum('avatarPreference', [ 'crafatar', // Mojang Profile - 'gravatar', // Email profile + 'gravatar' // Email profile ])->default('gravatar'); $table->text('socialLinks')->nullable(); $table->bigInteger('userID')->unsigned(); diff --git a/database/migrations/2020_04_29_022402_create_applications_table.php b/database/migrations/2020_04_29_022402_create_applications_table.php index 529e046..3074f8e 100644 --- a/database/migrations/2020_04_29_022402_create_applications_table.php +++ b/database/migrations/2020_04_29_022402_create_applications_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -47,7 +28,7 @@ class CreateApplicationsTable extends Migration 'STAGE_INTERVIEW', 'STAGE_INTERVIEW_SCHEDULED', 'APPROVED', - 'DENIED', + 'DENIED' ])->default('STAGE_SUBMITTED'); $table->timestamps(); diff --git a/database/migrations/2020_04_29_022421_create_votes_table.php b/database/migrations/2020_04_29_022421_create_votes_table.php index 6164f56..9062e22 100644 --- a/database/migrations/2020_04_29_022421_create_votes_table.php +++ b/database/migrations/2020_04_29_022421_create_votes_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -37,7 +18,7 @@ class CreateVotesTable extends Migration $table->bigInteger('userID')->unsigned(); $table->enum('allowedVoteType', [ 'VOTE_DENY', - 'VOTE_APPROVE', + 'VOTE_APPROVE' ]); $table->timestamps(); diff --git a/database/migrations/2020_04_29_022442_create_appointments_table.php b/database/migrations/2020_04_29_022442_create_appointments_table.php index 08d60f2..77cce6e 100644 --- a/database/migrations/2020_04_29_022442_create_appointments_table.php +++ b/database/migrations/2020_04_29_022442_create_appointments_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -42,11 +23,11 @@ class CreateAppointmentsTable extends Migration 'DISCORD', 'SKYPE', 'MEET', - 'TEAMSPEAK', + 'TEAMSPEAK' ]); $table->enum('appointmentStatus', [ - 'SCHEDULED', - 'CONCLUDED', // TODO: Review whether this status is necessary + 'SCHEDULED', + 'CONCLUDED' // TODO: Review whether this status is necessary ])->default('SCHEDULED'); $table->boolean('userAccepted')->default(false); $table->longText('meetingNotes')->nullable(); diff --git a/database/migrations/2020_04_29_022541_create_forms_table.php b/database/migrations/2020_04_29_022541_create_forms_table.php index 32fbc27..610a6d7 100644 --- a/database/migrations/2020_04_29_022541_create_forms_table.php +++ b/database/migrations/2020_04_29_022541_create_forms_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -38,7 +19,7 @@ class CreateFormsTable extends Migration $table->string('formStructure'); $table->enum('formStatus', [ 'ACTIVE', - 'SUSPENDED', + 'SUSPENDED' ]); $table->timestamps(); }); diff --git a/database/migrations/2020_04_29_022542_create_vacancies_table.php b/database/migrations/2020_04_29_022542_create_vacancies_table.php index 7f17357..dfa3aa0 100644 --- a/database/migrations/2020_04_29_022542_create_vacancies_table.php +++ b/database/migrations/2020_04_29_022542_create_vacancies_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -45,6 +26,7 @@ class CreateVacanciesTable extends Migration $table->foreign('vacancyFormID') ->references('id') ->on('forms'); + }); } diff --git a/database/migrations/2020_04_29_023647_create_staff_profiles_table.php b/database/migrations/2020_04_29_023647_create_staff_profiles_table.php index be2ba85..352dbca 100644 --- a/database/migrations/2020_04_29_023647_create_staff_profiles_table.php +++ b/database/migrations/2020_04_29_023647_create_staff_profiles_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_04_29_030107_create_responses_table.php b/database/migrations/2020_04_29_030107_create_responses_table.php index 02acc46..35ea926 100644 --- a/database/migrations/2020_04_29_030107_create_responses_table.php +++ b/database/migrations/2020_04_29_030107_create_responses_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -42,6 +23,7 @@ class CreateResponsesTable extends Migration $table->foreign('responseFormID') ->references('id') ->on('forms'); + }); } diff --git a/database/migrations/2020_04_29_195848_votes_has_application.php b/database/migrations/2020_04_29_195848_votes_has_application.php index 8ccf13f..4464737 100644 --- a/database/migrations/2020_04_29_195848_votes_has_application.php +++ b/database/migrations/2020_04_29_195848_votes_has_application.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -32,7 +13,8 @@ class VotesHasApplication extends Migration */ public function up() { - Schema::create('votes_has_application', function (Blueprint $table) { + Schema::create('votes_has_application', function (Blueprint $table){ + $table->id('id'); $table->bigInteger('vote_id')->unsigned(); $table->bigInteger('application_id')->unsigned(); @@ -40,6 +22,7 @@ class VotesHasApplication extends Migration $table->foreign('vote_id')->references('id')->on('votes'); $table->foreign('application_id')->references('id')->on('applications'); + }); } diff --git a/database/migrations/2020_05_02_223355_create_cache_table.php b/database/migrations/2020_05_02_223355_create_cache_table.php index f50d132..7b73e5f 100644 --- a/database/migrations/2020_05_02_223355_create_cache_table.php +++ b/database/migrations/2020_05_02_223355_create_cache_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_05_07_021604_add_status_to_vacancies.php b/database/migrations/2020_05_07_021604_add_status_to_vacancies.php index 830bec4..1d40c92 100644 --- a/database/migrations/2020_05_07_021604_add_status_to_vacancies.php +++ b/database/migrations/2020_05_07_021604_add_status_to_vacancies.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -35,7 +16,7 @@ class AddStatusToVacancies extends Migration Schema::table('vacancies', function (Blueprint $table) { $table->enum('vacancyStatus', [ 'OPEN', - 'CLOSED', + 'CLOSED' ])->after('vacancyCount'); }); } diff --git a/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php b/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php index e14f42e..5daa2c6 100644 --- a/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php +++ b/database/migrations/2020_05_08_024654_add_slug_to_vacancy.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php b/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php index f2a3ea4..e8b8591 100644 --- a/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php +++ b/database/migrations/2020_05_08_063141_add_vacancy_i_d_to_responses.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_05_14_004542_change_form_structure_length.php b/database/migrations/2020_05_14_004542_change_form_structure_length.php index eb699ca..9ba0006 100644 --- a/database/migrations/2020_05_14_004542_change_form_structure_length.php +++ b/database/migrations/2020_05_14_004542_change_form_structure_length.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -32,8 +13,8 @@ class ChangeFormStructureLength extends Migration */ public function up() { - Schema::table('forms', function (Blueprint $schema) { - $schema->longText('formStructure')->change(); + Schema::table('forms', function (Blueprint $schema){ + $schema->longText('formStructure')->change(); }); } diff --git a/database/migrations/2020_05_29_234431_create_permission_tables.php b/database/migrations/2020_05_29_234431_create_permission_tables.php index e790941..3f9448d 100644 --- a/database/migrations/2020_05_29_234431_create_permission_tables.php +++ b/database/migrations/2020_05_29_234431_create_permission_tables.php @@ -1,27 +1,8 @@ . - */ - -use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; class CreatePermissionTables extends Migration { diff --git a/database/migrations/2020_06_08_153602_create_bans_table.php b/database/migrations/2020_06_08_153602_create_bans_table.php index dd18593..7674c17 100644 --- a/database/migrations/2020_06_08_153602_create_bans_table.php +++ b/database/migrations/2020_06_08_153602_create_bans_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -44,6 +25,7 @@ class CreateBansTable extends Migration $table->foreign('userID') ->references('id') ->on('users'); + }); } diff --git a/database/migrations/2020_06_20_210255_create_comments_table.php b/database/migrations/2020_06_20_210255_create_comments_table.php index fc9c1d2..501254f 100644 --- a/database/migrations/2020_06_20_210255_create_comments_table.php +++ b/database/migrations/2020_06_20_210255_create_comments_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -47,6 +28,8 @@ class CreateCommentsTable extends Migration ->references('id') ->on('applications'); }); + + } /** diff --git a/database/migrations/2020_06_25_093708_create_jobs_table.php b/database/migrations/2020_06_25_093708_create_jobs_table.php index 55d71dd..1be9e8a 100644 --- a/database/migrations/2020_06_25_093708_create_jobs_table.php +++ b/database/migrations/2020_06_25_093708_create_jobs_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php b/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php index e443101..d049d3f 100644 --- a/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php +++ b/database/migrations/2020_07_11_020743_add_detailed_description_to_vacancy.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php b/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php index 5ebf83d..b4dd0a9 100644 --- a/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php +++ b/database/migrations/2020_07_17_053247_add_twofa_secret_to_users.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/migrations/2020_08_30_152900_create_options_table.php b/database/migrations/2020_08_30_152900_create_options_table.php index 570a08f..2c0537c 100644 --- a/database/migrations/2020_08_30_152900_create_options_table.php +++ b/database/migrations/2020_08_30_152900_create_options_table.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 2c6e2f1..0db89f7 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder diff --git a/database/seeds/DefaultOptionsSeeder.php b/database/seeds/DefaultOptionsSeeder.php index 34811fc..90e73c5 100644 --- a/database/seeds/DefaultOptionsSeeder.php +++ b/database/seeds/DefaultOptionsSeeder.php @@ -1,24 +1,5 @@ . - */ - use App\Facades\Options; use Illuminate\Database\Seeder; @@ -38,7 +19,9 @@ class DefaultOptionsSeeder extends Seeder Options::setOption('notify_applicant_approved', true, 'Notify when an applicant is approved'); // done Options::setOption('notify_vacancystatus_change', false, 'Notify when a vacancy\'s status changes'); // done + Options::setOption('enable_slack_notifications', true, 'Enable slack notifications'); Options::setOption('enable_email_notifications', true, 'Enable e-mail notifications'); + } } diff --git a/database/seeds/NewPermissions.php b/database/seeds/NewPermissions.php index 8d3dc85..cc8b484 100644 --- a/database/seeds/NewPermissions.php +++ b/database/seeds/NewPermissions.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Role; @@ -33,7 +14,7 @@ class NewPermissions extends Seeder public function run() { $developer = Role::create([ - 'name' => 'developer', + 'name' => 'developer' ]); $admin = Role::where('name', 'admin')->first(); @@ -44,5 +25,7 @@ class NewPermissions extends Seeder $developer->givePermissionTo('admin.developertools.use'); $admin->givePermissionTo('admin.settings.view'); $admin->givePermissionTo('admin.settings.edit'); + + } } diff --git a/database/seeds/PermissionSeeder.php b/database/seeds/PermissionSeeder.php index 66694a1..2fde5f4 100644 --- a/database/seeds/PermissionSeeder.php +++ b/database/seeds/PermissionSeeder.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Role; @@ -37,24 +18,24 @@ class PermissionSeeder extends Seeder // $user = Role::create( [ - 'name' => 'user', + 'name' => 'user' ] ); $reviewer = Role::create( [ - 'name' => 'reviewer', + 'name' => 'reviewer' ] ); $hiringManager = Role::create( [ - 'name' => 'hiringManager', + 'name' => 'hiringManager' ] ); $admin = Role::create([ - 'name' => 'admin', + 'name' => 'admin' ]); // Spatie wildcard permissions (same concept of MC permissions) @@ -86,18 +67,19 @@ class PermissionSeeder extends Seeder Permission::create(['name' => 'admin.notificationsettings.*']); Permission::create(['name' => 'admin.maintenance.logs.view']); + Permission::create(['name' => 'admin.developertools.use']); $user->givePermissionTo([ 'applications.submit', 'applications.view.own', - 'profiles.view.others', + 'profiles.view.others' ]); // Able to view applications and vote on them once they reach the right stage, but not approve applications up to said stage $reviewer->givePermissionTo([ 'applications.view.all', - 'applications.vote', + 'applications.vote' ]); $hiringManager->givePermissionTo('appointments.*', 'applications.*', 'admin.hiring.*'); @@ -110,7 +92,7 @@ class PermissionSeeder extends Seeder 'admin.notificationsettings.*', 'profiles.view.others', 'profiles.edit.others', - 'admin.maintenance.logs.view', + 'admin.maintenance.logs.view' ]); } } diff --git a/database/seeds/UserSeeder.php b/database/seeds/UserSeeder.php index 0f2f838..8ba2603 100644 --- a/database/seeds/UserSeeder.php +++ b/database/seeds/UserSeeder.php @@ -1,24 +1,5 @@ . - */ - use App\Profile; use App\User; use Illuminate\Database\Seeder; @@ -41,7 +22,7 @@ class UserSeeder extends Seeder 'email' => 'tester1@example.com', 'username' => 'tester1', 'originalIP' => '99.18.146.235', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => 'ab22b5da02644953ace969fce85c0819', @@ -49,7 +30,7 @@ class UserSeeder extends Seeder 'email' => 'tester2@example.com', 'username' => 'tester2', 'originalIP' => '141.239.229.53', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => 'df38e6bf762944d3a600ded59a693ad1', @@ -57,7 +38,7 @@ class UserSeeder extends Seeder 'email' => 'tester3@example.com', 'username' => 'tester3', 'originalIP' => '25.63.20.97', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => '689e446484824f6bad5064e3df0aaa96', @@ -65,7 +46,7 @@ class UserSeeder extends Seeder 'email' => 'tester4@example.com', 'username' => 'tester4', 'originalIP' => '220.105.223.142', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => '172391f917bf418ab1c40ebc041ed5ba', @@ -73,7 +54,7 @@ class UserSeeder extends Seeder 'email' => 'tester5@example.com', 'username' => 'tester5', 'originalIP' => '224.66.76.60', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => '371f34dcce2a4457bf385ab9417a2345', @@ -81,7 +62,7 @@ class UserSeeder extends Seeder 'email' => 'tester6@example.com', 'username' => 'tester6', 'originalIP' => '97.113.131.0', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => '89aa5222855542bebe7a7780248ef5f9', @@ -89,7 +70,7 @@ class UserSeeder extends Seeder 'email' => 'tester7@example.com', 'username' => 'tester7', 'originalIP' => '15.160.137.222', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], ]; @@ -102,7 +83,7 @@ class UserSeeder extends Seeder 'email' => 'user1@example.com', 'username' => 'user1', 'originalIP' => '253.25.237.78', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => '5f900018241e4aaba7883f2d5c5c2357', @@ -110,7 +91,7 @@ class UserSeeder extends Seeder 'email' => 'user2@example.com', 'username' => 'user2', 'originalIP' => '82.92.156.176', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ], [ 'uuid' => 'ba9780c3270745c6840eaabe1bf8aa14', @@ -118,31 +99,34 @@ class UserSeeder extends Seeder 'email' => 'user3@example.com', 'username' => 'user3', 'originalIP' => '224.123.129.17', - 'password' => Hash::make('password'), - ], + 'password' => Hash::make('password') + ] ]; - foreach ($regularUsers as $regularUser) { + foreach ($regularUsers as $regularUser) + { $user = User::create($regularUser); Profile::create([ - 'profileShortBio' => 'Random data '.rand(0, 1000), - 'profileAboutMe' => 'Random data '.rand(0, 1000), - 'socialLinks' => '[]', // empty json set, not an array + 'profileShortBio' => 'Random data ' . rand(0,1000), + 'profileAboutMe' => 'Random data ' . rand(0, 1000), + 'socialLinks' => "[]", // empty json set, not an array 'avatarPreference' => 'gravatar', - 'userID' => $user->id, + 'userID' => $user->id ]); } - foreach ($staffUsers as $staffUser) { + foreach($staffUsers as $staffUser) + { $user = User::create($staffUser); Profile::create([ - 'profileShortBio' => 'Random data '.rand(0, 1000), - 'profileAboutMe' => 'Random data '.rand(0, 1000), - 'socialLinks' => '[]', + 'profileShortBio' => 'Random data ' . rand(0,1000), + 'profileAboutMe' => 'Random data ' . rand(0, 1000), + 'socialLinks' => "[]", 'avatarPreference' => 'gravatar', - 'userID' => $user->id, + 'userID' => $user->id ]); + } User::create([ @@ -151,10 +135,11 @@ class UserSeeder extends Seeder 'email' => 'admin@example.com', 'username' => 'admin', 'originalIP' => '192.168.1.2', - 'password' => Hash::make('password'), + 'password' => Hash::make('password') ]); - foreach (User::all() as $user) { + foreach (User::all() as $user) + { $user->assignRole('reviewer', 'user'); } } diff --git a/public/index.php b/public/index.php index e71fcb9..4584cbc 100644 --- a/public/index.php +++ b/public/index.php @@ -1,22 +1,10 @@ . + * @package Laravel + * @author Taylor Otwell */ define('LARAVEL_START', microtime(true)); diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index f7c5c88..e5506df 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index cb43ba7..9be7687 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -1,28 +1,24 @@ 'translate-me' + * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. + * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: + * auth.php, pagination.php, passwords.php, and validation.php. + * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote * - * This file is part of Raspberry Staff Manager. + * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. + * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. * - * Raspberry Staff Manager is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Raspberry Staff Manager is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Raspberry Staff Manager. If not, see . + * Thank you for translating! */ return [ // ============== MENU TRANSLATIONS ====================== + 'menu' => [ 'my_apps' => 'My Applications', @@ -32,9 +28,11 @@ return [ 'all_forms' => 'All Forms', 'app_settings' => 'App Settings', 'global_app_settings' => 'Global App Settings', - 'system_logs' => 'System Logs', + 'system_logs' => 'System Logs' ], + + // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -81,9 +79,10 @@ return [ 'platform' => 'Platform', 'notepad' => 'Shared Notepad', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Appointment Information', - 'ip_info' => 'IP Address Information for', + 'ip_info' => 'IP Address Information for' ], + // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -126,6 +125,8 @@ return [ 'contactlabel_subject' => 'Subject (ex. Site Suggestion)', 'contactlabel_send' => 'Send', + + // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Two-Factor Authentication', @@ -150,7 +151,7 @@ return [ 'line4' => 'A minimum of 10 characters;', 'line5' => 'At least 3 uppercase characters;', 'line6' => 'At least 3 numbers;', - 'line7' => 'Any number of special characters.', + 'line7' => 'Any number of special characters.' ], 'sronly_confirmpassword' => 'Confirm Password', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Minecraft Username (Premium)', @@ -179,6 +180,7 @@ return [ 'upcoming' => 'Your upcoming interviews', 'soon' => 'Coming soon', + //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administration', @@ -196,6 +198,7 @@ return [ 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', + 'forms' => 'Forms', 'positions' => 'Positions', // Context: Positions as in job opening 'edit_form' => 'Edit Form', @@ -231,7 +234,7 @@ return [ 'cancel' => 'Cancel', 'close_vacancy' => 'Close Position', 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', - '', + '' ], @@ -249,7 +252,7 @@ return [ 'title' => 'Application Form Preview', 'looks' => 'This is how your form looks like to applicants', 'f_info' => 'You may edit it and add more fields later.', - '', + '' ], 'forms_p' => [ @@ -257,7 +260,7 @@ return [ 'available_forms' => 'Available forms', 'form_title' => 'Form title', 'empty_noforms' => 'Nothing to see here! Please add some forms first.', - 'new_form' => 'NEW FORM', + 'new_form' => 'NEW FORM' ], 'players' => [ @@ -278,7 +281,7 @@ return [ Registered players are those without a staff role in the team management application. There may be other users registered in the platform, but they won't be displayed here. ", - 'see_staff' => 'See Staff Members', + 'see_staff' => 'See Staff Members' ], @@ -302,7 +305,7 @@ return [ 'settings' => 'Settings', 'settings_header' => 'Notification Settings', 'settings_p' => 'Change which notifications are sent here.', - 'back_btn' => 'Back to Dashboard', + 'back_btn' => 'Back to Dashboard' ], @@ -328,17 +331,19 @@ return [ 'yrs_old' => 'Years old', // Context: "years old" as in: Tom is 24 years old 'line1' => 'We\'re glad you\'ve decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.', 'line2' => 'Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :agerqr.', - 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.', + 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.' ], - 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.', + 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.' ], + 'application_m' => [ 'title' => 'Application Management', 'all_apps' => 'All Applications', 'modal_confirm' => 'Are you sure?', 'really_delete' => 'Really delete this?', + 'outstanding_sm' => 'Outstanding', 'outstanding_apps' => 'Outstanding Applications', 'outstanding_subm' => 'Outstanding (Submitted)', @@ -395,7 +400,7 @@ return [ 'title' => 'Voting Reminder', 'line1' => 'Applications which gain more than 50% of positive votes are automatically approved after one day.', 'line2' => 'Conversely, applications that do not reach this number are automatically denied.', - 'line3' => 'Please note that the vote system can be overridden', + 'line3' => 'Please note that the vote system can be overridden' ], @@ -516,7 +521,7 @@ return [ 'insta_user' => 'Instagram Username', 'discord_user' => 'Discord Handle', - 'update_prfl' => 'Update Profile', + 'update_prfl' => 'Update Profile' ], @@ -527,7 +532,7 @@ return [ 'app_process' => [ 'title' => 'Application Process', 'line1' => 'Please allow up to three days for your application to be processed. Your application will be reviewed by every team member, and will move up in stages.', - 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.', + 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.' ], 'account_standing' => 'Account Standing', @@ -546,9 +551,9 @@ return [ 'itsyou' => 'It\'s you!', 'title' => 'User Directory', - 'directory' => 'Directory', + 'directory' => 'Directory' - ], + ] ], @@ -585,7 +590,7 @@ return [ 'line1' => 'If you weren\'t present during this meeting, you can view the shared meeting notepad to help you make a decision.', 'line2' => 'You may vote on as many applications as needed; However, you can only vote once per application.', - 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.', + 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' ], @@ -600,7 +605,7 @@ return [ 'max_chars' => 'max characters', // Context: A number is added before max characters 'post' => 'Post', // Context: Post as in post comment - ], + ] // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php index 59d8a5d..d481411 100644 --- a/resources/lang/en/pagination.php +++ b/resources/lang/en/pagination.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index 8957598..2345a56 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index b5f1b29..a65914f 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/es/auth.php b/resources/lang/es/auth.php index f7c5c88..e5506df 100644 --- a/resources/lang/es/auth.php +++ b/resources/lang/es/auth.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/es/messages.php b/resources/lang/es/messages.php index cb43ba7..9be7687 100644 --- a/resources/lang/es/messages.php +++ b/resources/lang/es/messages.php @@ -1,28 +1,24 @@ 'translate-me' + * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. + * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: + * auth.php, pagination.php, passwords.php, and validation.php. + * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote * - * This file is part of Raspberry Staff Manager. + * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. + * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. * - * Raspberry Staff Manager is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Raspberry Staff Manager is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Raspberry Staff Manager. If not, see . + * Thank you for translating! */ return [ // ============== MENU TRANSLATIONS ====================== + 'menu' => [ 'my_apps' => 'My Applications', @@ -32,9 +28,11 @@ return [ 'all_forms' => 'All Forms', 'app_settings' => 'App Settings', 'global_app_settings' => 'Global App Settings', - 'system_logs' => 'System Logs', + 'system_logs' => 'System Logs' ], + + // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -81,9 +79,10 @@ return [ 'platform' => 'Platform', 'notepad' => 'Shared Notepad', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Appointment Information', - 'ip_info' => 'IP Address Information for', + 'ip_info' => 'IP Address Information for' ], + // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -126,6 +125,8 @@ return [ 'contactlabel_subject' => 'Subject (ex. Site Suggestion)', 'contactlabel_send' => 'Send', + + // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Two-Factor Authentication', @@ -150,7 +151,7 @@ return [ 'line4' => 'A minimum of 10 characters;', 'line5' => 'At least 3 uppercase characters;', 'line6' => 'At least 3 numbers;', - 'line7' => 'Any number of special characters.', + 'line7' => 'Any number of special characters.' ], 'sronly_confirmpassword' => 'Confirm Password', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Minecraft Username (Premium)', @@ -179,6 +180,7 @@ return [ 'upcoming' => 'Your upcoming interviews', 'soon' => 'Coming soon', + //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administration', @@ -196,6 +198,7 @@ return [ 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', + 'forms' => 'Forms', 'positions' => 'Positions', // Context: Positions as in job opening 'edit_form' => 'Edit Form', @@ -231,7 +234,7 @@ return [ 'cancel' => 'Cancel', 'close_vacancy' => 'Close Position', 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', - '', + '' ], @@ -249,7 +252,7 @@ return [ 'title' => 'Application Form Preview', 'looks' => 'This is how your form looks like to applicants', 'f_info' => 'You may edit it and add more fields later.', - '', + '' ], 'forms_p' => [ @@ -257,7 +260,7 @@ return [ 'available_forms' => 'Available forms', 'form_title' => 'Form title', 'empty_noforms' => 'Nothing to see here! Please add some forms first.', - 'new_form' => 'NEW FORM', + 'new_form' => 'NEW FORM' ], 'players' => [ @@ -278,7 +281,7 @@ return [ Registered players are those without a staff role in the team management application. There may be other users registered in the platform, but they won't be displayed here. ", - 'see_staff' => 'See Staff Members', + 'see_staff' => 'See Staff Members' ], @@ -302,7 +305,7 @@ return [ 'settings' => 'Settings', 'settings_header' => 'Notification Settings', 'settings_p' => 'Change which notifications are sent here.', - 'back_btn' => 'Back to Dashboard', + 'back_btn' => 'Back to Dashboard' ], @@ -328,17 +331,19 @@ return [ 'yrs_old' => 'Years old', // Context: "years old" as in: Tom is 24 years old 'line1' => 'We\'re glad you\'ve decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.', 'line2' => 'Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :agerqr.', - 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.', + 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.' ], - 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.', + 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.' ], + 'application_m' => [ 'title' => 'Application Management', 'all_apps' => 'All Applications', 'modal_confirm' => 'Are you sure?', 'really_delete' => 'Really delete this?', + 'outstanding_sm' => 'Outstanding', 'outstanding_apps' => 'Outstanding Applications', 'outstanding_subm' => 'Outstanding (Submitted)', @@ -395,7 +400,7 @@ return [ 'title' => 'Voting Reminder', 'line1' => 'Applications which gain more than 50% of positive votes are automatically approved after one day.', 'line2' => 'Conversely, applications that do not reach this number are automatically denied.', - 'line3' => 'Please note that the vote system can be overridden', + 'line3' => 'Please note that the vote system can be overridden' ], @@ -516,7 +521,7 @@ return [ 'insta_user' => 'Instagram Username', 'discord_user' => 'Discord Handle', - 'update_prfl' => 'Update Profile', + 'update_prfl' => 'Update Profile' ], @@ -527,7 +532,7 @@ return [ 'app_process' => [ 'title' => 'Application Process', 'line1' => 'Please allow up to three days for your application to be processed. Your application will be reviewed by every team member, and will move up in stages.', - 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.', + 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.' ], 'account_standing' => 'Account Standing', @@ -546,9 +551,9 @@ return [ 'itsyou' => 'It\'s you!', 'title' => 'User Directory', - 'directory' => 'Directory', + 'directory' => 'Directory' - ], + ] ], @@ -585,7 +590,7 @@ return [ 'line1' => 'If you weren\'t present during this meeting, you can view the shared meeting notepad to help you make a decision.', 'line2' => 'You may vote on as many applications as needed; However, you can only vote once per application.', - 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.', + 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' ], @@ -600,7 +605,7 @@ return [ 'max_chars' => 'max characters', // Context: A number is added before max characters 'post' => 'Post', // Context: Post as in post comment - ], + ] // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/es/pagination.php b/resources/lang/es/pagination.php index 59d8a5d..d481411 100644 --- a/resources/lang/es/pagination.php +++ b/resources/lang/es/pagination.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php index 8957598..2345a56 100644 --- a/resources/lang/es/passwords.php +++ b/resources/lang/es/passwords.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php index b5f1b29..a65914f 100644 --- a/resources/lang/es/validation.php +++ b/resources/lang/es/validation.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php index f7c5c88..e5506df 100644 --- a/resources/lang/fr/auth.php +++ b/resources/lang/fr/auth.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/fr/messages.php b/resources/lang/fr/messages.php index cb43ba7..9be7687 100644 --- a/resources/lang/fr/messages.php +++ b/resources/lang/fr/messages.php @@ -1,28 +1,24 @@ 'translate-me' + * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. + * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: + * auth.php, pagination.php, passwords.php, and validation.php. + * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote * - * This file is part of Raspberry Staff Manager. + * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. + * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. * - * Raspberry Staff Manager is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Raspberry Staff Manager is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Raspberry Staff Manager. If not, see . + * Thank you for translating! */ return [ // ============== MENU TRANSLATIONS ====================== + 'menu' => [ 'my_apps' => 'My Applications', @@ -32,9 +28,11 @@ return [ 'all_forms' => 'All Forms', 'app_settings' => 'App Settings', 'global_app_settings' => 'Global App Settings', - 'system_logs' => 'System Logs', + 'system_logs' => 'System Logs' ], + + // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -81,9 +79,10 @@ return [ 'platform' => 'Platform', 'notepad' => 'Shared Notepad', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Appointment Information', - 'ip_info' => 'IP Address Information for', + 'ip_info' => 'IP Address Information for' ], + // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -126,6 +125,8 @@ return [ 'contactlabel_subject' => 'Subject (ex. Site Suggestion)', 'contactlabel_send' => 'Send', + + // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Two-Factor Authentication', @@ -150,7 +151,7 @@ return [ 'line4' => 'A minimum of 10 characters;', 'line5' => 'At least 3 uppercase characters;', 'line6' => 'At least 3 numbers;', - 'line7' => 'Any number of special characters.', + 'line7' => 'Any number of special characters.' ], 'sronly_confirmpassword' => 'Confirm Password', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Minecraft Username (Premium)', @@ -179,6 +180,7 @@ return [ 'upcoming' => 'Your upcoming interviews', 'soon' => 'Coming soon', + //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administration', @@ -196,6 +198,7 @@ return [ 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', + 'forms' => 'Forms', 'positions' => 'Positions', // Context: Positions as in job opening 'edit_form' => 'Edit Form', @@ -231,7 +234,7 @@ return [ 'cancel' => 'Cancel', 'close_vacancy' => 'Close Position', 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', - '', + '' ], @@ -249,7 +252,7 @@ return [ 'title' => 'Application Form Preview', 'looks' => 'This is how your form looks like to applicants', 'f_info' => 'You may edit it and add more fields later.', - '', + '' ], 'forms_p' => [ @@ -257,7 +260,7 @@ return [ 'available_forms' => 'Available forms', 'form_title' => 'Form title', 'empty_noforms' => 'Nothing to see here! Please add some forms first.', - 'new_form' => 'NEW FORM', + 'new_form' => 'NEW FORM' ], 'players' => [ @@ -278,7 +281,7 @@ return [ Registered players are those without a staff role in the team management application. There may be other users registered in the platform, but they won't be displayed here. ", - 'see_staff' => 'See Staff Members', + 'see_staff' => 'See Staff Members' ], @@ -302,7 +305,7 @@ return [ 'settings' => 'Settings', 'settings_header' => 'Notification Settings', 'settings_p' => 'Change which notifications are sent here.', - 'back_btn' => 'Back to Dashboard', + 'back_btn' => 'Back to Dashboard' ], @@ -328,17 +331,19 @@ return [ 'yrs_old' => 'Years old', // Context: "years old" as in: Tom is 24 years old 'line1' => 'We\'re glad you\'ve decided to apply. Generally, applications take 48 hours to be processed and reviewed. Depending on the circumstances and the volume of applications, you may receive an answer in a shorter time.', 'line2' => 'Please fill out the form below. Keep all answers concise and complete. Please keep in mind that the age requirement is at least :agerqr.', - 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.', + 'line3' => 'Asking about your application will result in instant denial. Everything you need to know is here.' ], - 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.', + 'app_timeout' => 'Your account is not permitted to submit another application. Please wait :days more days before trying to submit an application.' ], + 'application_m' => [ 'title' => 'Application Management', 'all_apps' => 'All Applications', 'modal_confirm' => 'Are you sure?', 'really_delete' => 'Really delete this?', + 'outstanding_sm' => 'Outstanding', 'outstanding_apps' => 'Outstanding Applications', 'outstanding_subm' => 'Outstanding (Submitted)', @@ -395,7 +400,7 @@ return [ 'title' => 'Voting Reminder', 'line1' => 'Applications which gain more than 50% of positive votes are automatically approved after one day.', 'line2' => 'Conversely, applications that do not reach this number are automatically denied.', - 'line3' => 'Please note that the vote system can be overridden', + 'line3' => 'Please note that the vote system can be overridden' ], @@ -516,7 +521,7 @@ return [ 'insta_user' => 'Instagram Username', 'discord_user' => 'Discord Handle', - 'update_prfl' => 'Update Profile', + 'update_prfl' => 'Update Profile' ], @@ -527,7 +532,7 @@ return [ 'app_process' => [ 'title' => 'Application Process', 'line1' => 'Please allow up to three days for your application to be processed. Your application will be reviewed by every team member, and will move up in stages.', - 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.', + 'line2' => 'If an interview is scheduled, you\'ll need to open your application here and confirm the time, date, and location assigned for you.' ], 'account_standing' => 'Account Standing', @@ -546,9 +551,9 @@ return [ 'itsyou' => 'It\'s you!', 'title' => 'User Directory', - 'directory' => 'Directory', + 'directory' => 'Directory' - ], + ] ], @@ -585,7 +590,7 @@ return [ 'line1' => 'If you weren\'t present during this meeting, you can view the shared meeting notepad to help you make a decision.', 'line2' => 'You may vote on as many applications as needed; However, you can only vote once per application.', - 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.', + 'line3' => 'Votes carry no weight based on rank. This system has been designed with fairness and ease of use in mind.' ], @@ -600,7 +605,7 @@ return [ 'max_chars' => 'max characters', // Context: A number is added before max characters 'post' => 'Post', // Context: Post as in post comment - ], + ] // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/fr/pagination.php b/resources/lang/fr/pagination.php index 59d8a5d..d481411 100644 --- a/resources/lang/fr/pagination.php +++ b/resources/lang/fr/pagination.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php index 8957598..2345a56 100644 --- a/resources/lang/fr/passwords.php +++ b/resources/lang/fr/passwords.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php index b5f1b29..a65914f 100644 --- a/resources/lang/fr/validation.php +++ b/resources/lang/fr/validation.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/pt/auth.php b/resources/lang/pt/auth.php index bb63a28..fffd887 100644 --- a/resources/lang/pt/auth.php +++ b/resources/lang/pt/auth.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/pt/messages.php b/resources/lang/pt/messages.php index 78123b1..bc83c18 100644 --- a/resources/lang/pt/messages.php +++ b/resources/lang/pt/messages.php @@ -1,28 +1,24 @@ 'translate-me' + * Also, don't translate, change, or move placeholders (:this-is-a-placeholder) starting with a colon. + * Try to keep the message as close to the original in meaning as possible. These simple rules also apply to other files you're translating, such as: + * auth.php, pagination.php, passwords.php, and validation.php. + * It is VERY important that you "escape" single quotes with a backslash if they're present in your language, like this: I\'m an escaped quote * - * This file is part of Raspberry Staff Manager. + * Additionally, don't change anything in square or curly brackets, and don't remove pipe (|) characters. + * If you see two messages separated by pipe, then usually the left side is singular and the right side is plural, so translate accordingly. * - * Raspberry Staff Manager is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Raspberry Staff Manager is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Raspberry Staff Manager. If not, see . + * Thank you for translating! */ return [ // ============== MENU TRANSLATIONS ====================== + 'menu' => [ 'my_apps' => 'As minhas Candidaturas', @@ -32,9 +28,11 @@ return [ 'all_forms' => 'Todos os Formulários', 'app_settings' => 'Configurações da App', 'global_app_settings' => 'Configurações globais do aplicativo', - 'system_logs' => 'Registos do Sistema', + 'system_logs' => 'Registos do Sistema' ], + + // ============== REUSABLE, GENERIC STRINGS =============== 'reusable' => [ @@ -81,9 +79,10 @@ return [ 'platform' => 'Plataforma', 'notepad' => 'Bloco Notas Partilhado', // Context: The shared notepad that appears when votes are needed, 'appointment_info' => 'Informação da Marcação', - 'ip_info' => 'Informação de Endereço IP para', + 'ip_info' => 'Informação de Endereço IP para' ], + // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Início', @@ -126,6 +125,8 @@ return [ 'contactlabel_subject' => 'Assunto (ex. sugestão do site)', 'contactlabel_send' => 'Enviar', + + // ======================== AUTHENTICATION MESSAGES =========================== '2fa_txt' => 'Autenticação de dois Fatores', @@ -150,7 +151,7 @@ return [ 'line4' => 'Um mínimo de 10 caracteres;', 'line5' => 'Pelo menos 3 caracteres maiúsculos;', 'line6' => 'Pelo menos 3 números;', - 'line7' => 'Números e caracteres especiais.', + 'line7' => 'Números e caracteres especiais.' ], 'sronly_confirmpassword' => 'Confirmar palavra-passe', // hint: sronly stands for screen-reader only 'sronly_mcusername' => 'Utilizador do Minecraft (Premium)', @@ -179,6 +180,7 @@ return [ 'upcoming' => 'As suas próximas entrevistas', 'soon' => 'Disponível em breve', + //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== 'adm' => 'Administração', @@ -196,6 +198,7 @@ return [ 'artisan_evaluate' => 'Artisan: Avaliar Votos Agora', // Tip: Artisan is a program name, therefore not translatable 'devtools_info' => 'Este painel também pode ser usado para substituir completamente o sistema de votação em cenários de impasse', + 'forms' => 'Formulários', 'positions' => 'Vagas', // Context: Positions as in job opening 'edit_form' => 'Editar Formulário', @@ -231,7 +234,7 @@ return [ 'cancel' => 'Cancelar', 'close_vacancy' => 'Fechar vaga', 'description_tooltip' => 'Adicione coisas como requisitos de admissão, responsabilidades e funções, e qualquer outra coisa que você ache necessária', - '', + '' ], @@ -249,7 +252,7 @@ return [ 'title' => 'Pré-visualização do Formulário de Candidatura', 'looks' => 'É assim que o seu formulário aparece para os candidatos', 'f_info' => 'Você pode editá-lo e adicionar mais campos posteriormente.', - '', + '' ], 'forms_p' => [ @@ -257,7 +260,7 @@ return [ 'available_forms' => 'Formulários disponíveis', 'form_title' => 'Título do Formulário', 'empty_noforms' => 'Nada para ver aqui! Por favor, crie alguns formulários primeiro.', - 'new_form' => 'NOVO FORMULÁRIO', + 'new_form' => 'NOVO FORMULÁRIO' ], 'players' => [ @@ -274,11 +277,11 @@ return [ 'banned' => 'Banido', 'active' => 'Ativo', 'no_reg' => 'Não há jogadores inscritos!', - 'no_reg_exp' => ' + 'no_reg_exp' => " Jogadores registados são aqueles que não possuem uma função administrativa no aplicativo de gestão de equipa. Pode haver outros utilizadores registados na plataforma, mas eles não serão exibidos aqui. -', - 'see_staff' => 'Ver Membros da Equipa', +", + 'see_staff' => 'Ver Membros da Equipa' ], @@ -286,11 +289,11 @@ return [ 'application_form' => 'Formulário de Candidatura', 'select_form' => 'Selecione um formulário...', - 'no_form_error' => ' + 'no_form_error' => " Não pode criar uma vaga sem qualquer formulário cujos quais as pessoas se poderiam candidatar. Crie um formulário primeiro, e depois crie uma vaga. Um único formulário pode ter várias vagas, para que possa anexar futuras vagas ao mesmo formulário, se quiser. -', +", 'new_pos' => 'NOVA VAGA', 'empty_pos_warning' => 'Nada para ver aqui! Abra algumas vagas primeiro. Isso fará os candidatos aparecerem! (esperançoso)', 'manage_forms' => 'GERIR FORMULÁRIOS DE CANDIDATURA', @@ -302,7 +305,7 @@ return [ 'settings' => 'Definições', 'settings_header' => 'Configuração das notificações', 'settings_p' => 'Altere quais notificações são enviadas aqui.', - 'back_btn' => 'Voltar ao painel', + 'back_btn' => 'Voltar ao painel' ], @@ -328,17 +331,19 @@ return [ 'yrs_old' => 'Anos de idade', // Context: "years old" as in: Tom is 24 years old 'line1' => 'Estamos felizes que você decidiu se candidatar. Geralmente, as candidaturas levam 48 horas para serem processadas e revisadas. Dependendo das circunstâncias e do volume de candidaturas, você poderá receber uma resposta em um período mais curto de tempo.', 'line2' => 'Por favor, preencha o formulário abaixo. Mantenha todas as respostas concisas e completas. Lembre-se de que o requisito de idade é de pelo menos :agerqr.', - 'line3' => 'Perguntar sobre a sua candidatura resultará em ser negado instantaneamente. Tudo o que você precisa saber está aqui.', + 'line3' => 'Perguntar sobre a sua candidatura resultará em ser negado instantaneamente. Tudo o que você precisa saber está aqui.' ], - 'app_timeout' => 'A sua conta não pode enviar outra candidatura. Por favor, espere :days mais dias antes de tentar enviar uma candidatura.', + 'app_timeout' => 'A sua conta não pode enviar outra candidatura. Por favor, espere :days mais dias antes de tentar enviar uma candidatura.' ], + 'application_m' => [ 'title' => 'Gestão de Candidaturas', 'all_apps' => 'Todas as Candidaturas', 'modal_confirm' => 'Tem a certeza?', 'really_delete' => 'Deseja realmente excluir isto?', + 'outstanding_sm' => 'Pendente', 'outstanding_apps' => 'Candidaturas Pendendes', 'outstanding_subm' => 'Pendente (Enviado)', @@ -395,7 +400,7 @@ return [ 'title' => 'Lembrete de votação', 'line1' => 'Candidaturas que obtêm mais de 50% dos votos positivos são automaticamente aprovadas após um dia.', 'line2' => 'Inversamente, candidaturas que não atingem esse número são automaticamente negadas.', - 'line3' => 'Por favor, lembre-se que o sistema de votação pode ser substituído', + 'line3' => 'Por favor, lembre-se que o sistema de votação pode ser substituído' ], @@ -516,7 +521,7 @@ return [ 'insta_user' => 'Nome de Utilizador do Instagram', 'discord_user' => '"Handle" do Discord', - 'update_prfl' => 'Atualizar Perfil', + 'update_prfl' => 'Atualizar Perfil' ], @@ -527,7 +532,7 @@ return [ 'app_process' => [ 'title' => 'Processo de Candidatura', 'line1' => 'Por favor, aguarde pelo menos três dias para que sua candidatura seja processada. A inscrição será revisada por todos os membros da equipa, e será promovida em fases.', - 'line2' => 'Se uma entrevista estiver programada, você precisará abrir o aplicativo aqui e confirmar a hora, data e local atribuídos para você.', + 'line2' => 'Se uma entrevista estiver programada, você precisará abrir o aplicativo aqui e confirmar a hora, data e local atribuídos para você.' ], 'account_standing' => 'Estado da Conta', @@ -546,9 +551,9 @@ return [ 'itsyou' => 'É você!', 'title' => 'Diretório de Utilizadores', - 'directory' => 'Diretório', + 'directory' => 'Diretório' - ], + ] ], @@ -585,7 +590,7 @@ return [ 'line1' => 'Se você não estava presente durante esta reunião, pode visualizar o bloco de notas da reunião partilhado para ajudá-lo a tomar uma decisão.', 'line2' => 'Você pode votar em quantas candidaturas forem necessárias; no entanto, só pode votar uma vez por candidatura.', - 'line3' => 'Os votos não têm peso baseado no cargo. Esse sistema foi projetado com justiça e facilidade de uso em mente.', + 'line3' => 'Os votos não têm peso baseado no cargo. Esse sistema foi projetado com justiça e facilidade de uso em mente.' ], @@ -600,7 +605,7 @@ return [ 'max_chars' => 'caracteres no máximo', // Context: A number is added before max characters 'post' => 'Publicar', // Context: Post as in post comment - ], + ] // ==================== END OF MAIN I18N FILE ====================== diff --git a/resources/lang/pt/pagination.php b/resources/lang/pt/pagination.php index bed9cc9..afe7439 100644 --- a/resources/lang/pt/pagination.php +++ b/resources/lang/pt/pagination.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/resources/lang/pt/passwords.php b/resources/lang/pt/passwords.php index 0f19f79..178ca4f 100644 --- a/resources/lang/pt/passwords.php +++ b/resources/lang/pt/passwords.php @@ -1,24 +1,5 @@ . - */ - return [ /* @@ -36,6 +17,6 @@ return [ 'sent' => 'Enviamos um e-mail com um link para redefinir a sua password!', 'throttled' => 'Por favor, aguarde antes de tentar novamente.', 'token' => 'Token para recuperação de senha inválido.', - 'user' => 'Não foi possível encontrar um utilizador com este e-mail.', + 'user' => "Não foi possível encontrar um utilizador com este e-mail.", ]; diff --git a/resources/lang/pt/validation.php b/resources/lang/pt/validation.php index 6e69bb1..c167208 100644 --- a/resources/lang/pt/validation.php +++ b/resources/lang/pt/validation.php @@ -1,24 +1,5 @@ . - */ - return [ /* diff --git a/routes/api.php b/routes/api.php index b473196..bcb8b18 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; diff --git a/routes/channels.php b/routes/channels.php index a5399ff..963b0d2 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Support\Facades\Broadcast; /* diff --git a/routes/console.php b/routes/console.php index 8a11008..da55196 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Foundation\Inspiring; use Illuminate\Support\Facades\Artisan; diff --git a/routes/web.php b/routes/web.php index 201154e..87a50da 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,24 +1,5 @@ . - */ - use Illuminate\Support\Facades\Route; use Mcamara\LaravelLocalization\Facades\LaravelLocalization; @@ -32,21 +13,26 @@ use Mcamara\LaravelLocalization\Facades\LaravelLocalization; | contains the "web" middleware group. Now create something great! | */ -Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function () { - Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function () { +Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath' ]], function (){ + + Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function (){ + Auth::routes(['verify' => true]); Route::post('/twofa/authenticate', 'Auth\TwofaController@verify2FA') ->name('verify2FA'); + }); - Route::get('/', 'HomeController@index') + Route::get('/','HomeController@index') ->middleware('eligibility'); Route::post('/form/contact', 'ContactController@create') ->name('sendSubmission'); - Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function () { + + Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function(){ + Route::get('/dashboard', 'DashboardController@index') ->name('dashboard') ->middleware('eligibility'); @@ -54,7 +40,8 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::get('users/directory', 'ProfileController@index') ->name('directory'); - Route::group(['prefix' => '/applications'], function () { + Route::group(['prefix' => '/applications'], function (){ + Route::get('/my-applications', 'ApplicationController@showUserApps') ->name('showUserApps') ->middleware('eligibility'); @@ -68,48 +55,63 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::delete('/comments/{comment}/delete', 'CommentController@delete') ->name('deleteApplicationComment'); + Route::patch('/notes/save/{application}', 'AppointmentController@saveNotes') ->name('saveNotes'); + Route::patch('/update/{application}/{newStatus}', 'ApplicationController@updateApplicationStatus') ->name('updateApplicationStatus'); Route::delete('{application}/delete', 'ApplicationController@delete') ->name('deleteApplication'); + Route::get('/staff/all', 'ApplicationController@showAllApps') ->name('allApplications'); + Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps') ->name('staffPendingApps'); + Route::get('/staff/peer-review', 'ApplicationController@showPeerReview') ->name('peerReview'); + Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview') ->name('pendingInterview'); + + Route::post('{application}/staff/vote', 'VoteController@vote') ->name('voteApplication'); + + }); - Route::group(['prefix' => 'appointments'], function () { + Route::group(['prefix' => 'appointments'], function (){ + Route::post('schedule/appointments/{application}', 'AppointmentController@saveAppointment') ->name('scheduleAppointment'); Route::patch('update/appointments/{application}/{status}', 'AppointmentController@updateAppointment') ->name('updateAppointment'); + }); - Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function () { + Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function (){ + Route::get('positions/{vacancySlug}', 'ApplicationController@renderApplicationForm') ->name('renderApplicationForm'); Route::post('positions/{vacancySlug}/submit', 'ApplicationController@saveApplicationAnswers') ->name('saveApplicationForm'); + }); - Route::group(['prefix' => '/profile'], function () { + Route::group(['prefix' => '/profile'], function (){ + Route::get('/settings', 'ProfileController@showProfile') ->name('showProfileSettings'); @@ -119,9 +121,11 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::get('user/{user}', 'ProfileController@showSingleProfile') ->name('showSingleProfile'); + Route::get('/settings/account', 'UserController@showAccount') ->name('showAccountSettings'); + Route::patch('/settings/account/change-password', 'UserController@changePassword') ->name('changePassword'); @@ -136,9 +140,12 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::patch('/settings/account/twofa/disable', 'UserController@remove2FASecret') ->name('disable2FA'); + }); - Route::group(['prefix' => '/hr'], function () { + + Route::group(['prefix' => '/hr'], function (){ + Route::get('staff-members', 'UserController@showStaffMembers') ->name('staffMemberList'); @@ -150,9 +157,11 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::patch('staff-members/terminate/{user}', 'UserController@terminate') ->name('terminateStaffMember'); + }); - Route::group(['prefix' => 'admin'], function () { + Route::group(['prefix' => 'admin'], function (){ + Route::get('settings', 'OptionsController@index') ->name('showSettings'); @@ -165,27 +174,34 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::delete('players/unban/{user}', 'BanController@delete') ->name('unbanUser'); + + Route::delete('players/delete/{user}', 'UserController@delete') ->name('deleteUser'); Route::patch('players/update/{user}', 'UserController@update') ->name('updateUser'); + + Route::get('positions', 'VacancyController@index') ->name('showPositions'); Route::post('positions/save', 'VacancyController@store') ->name('savePosition'); + Route::get('positions/edit/{vacancy}', 'VacancyController@edit') ->name('editPosition'); Route::patch('positions/update/{vacancy}', 'VacancyController@update') ->name('updatePosition'); + Route::patch('positions/availability/{status}/{vacancy}', 'VacancyController@updatePositionAvailability') ->name('updatePositionAvailability'); + Route::get('forms/builder', 'FormController@showFormBuilder') ->name('showFormBuilder'); @@ -207,12 +223,17 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo Route::patch('forms/update/{form}', 'FormController@update') ->name('updateForm'); + Route::get('devtools', 'DevToolsController@index') ->name('devTools'); // we could use route model binding Route::post('devtools/vote-evaluation/force', 'DevToolsController@forceVoteCount') ->name('devToolsForceVoteCount'); + }); + }); }); + + diff --git a/server.php b/server.php index 8fef71b..5fb6379 100644 --- a/server.php +++ b/server.php @@ -1,22 +1,10 @@ . + * @package Laravel + * @author Taylor Otwell */ $uri = urldecode( diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 0320f1f..547152f 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -1,24 +1,5 @@ . - */ - namespace Tests; use Illuminate\Contracts\Console\Kernel; diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 0ad542e..cdb5111 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -1,26 +1,8 @@ . - */ - namespace Tests\Feature; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class ExampleTest extends TestCase diff --git a/tests/Feature/OptionsTest.php b/tests/Feature/OptionsTest.php index d06358e..08a68f5 100644 --- a/tests/Feature/OptionsTest.php +++ b/tests/Feature/OptionsTest.php @@ -1,26 +1,9 @@ . - */ - namespace Tests\Feature; +use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; class OptionsTest extends TestCase diff --git a/tests/TestCase.php b/tests/TestCase.php index 3997b9e..2932d4a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,24 +1,5 @@ . - */ - namespace Tests; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 2d151d7..358cfc8 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -1,24 +1,5 @@ . - */ - namespace Tests\Unit; use PHPUnit\Framework\TestCase; From 85c719c24dfe08fc64a274e8b3c7f8da5d0afdf9 Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Sat, 19 Dec 2020 01:33:59 +0000 Subject: [PATCH 4/8] Fix bad key name --- app/Console/Commands/Install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index d7f81ae..ff71cd9 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -99,7 +99,7 @@ class Install extends Command $settings['MAIL_PASSWORD'] = $this->secret('SMTP Password (Input won\'t be seen)'); $settings['MAIL_PORT'] = $this->ask('SMTP Server Port'); $settings['MAIL_HOST'] = $this->ask('SMTP Server Hostname'); - $settings['MAIL_FROM'] = $this->ask('E-mail address to send from: '); + $settings['MAIL_FROM_ADDRESS'] = $this->ask('E-mail address to send from'); $this->info('== Notification Settings (5/6) (Slack) =='); $settings['SLACK_INTEGRATION_WEBHOOK'] = $this->ask('Integration webhook URL'); From a3d073080800bfe22a78c3e7a073f43e2b3ce441 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Tue, 12 Oct 2021 18:08:15 +0100 Subject: [PATCH 5/8] Update to Laravel & PHP 8 --- .env.example | 2 +- composer.json | 26 +- composer.lock | 4735 +++++++++++------ database/factories/UserFactory.php | 2 + database/seeders/DatabaseSeeder.php | 20 + .../DefaultOptionsSeeder.php | 1 + .../{seeds => seeders}/NewPermissions.php | 1 + .../{seeds => seeders}/PermissionSeeder.php | 1 + database/{seeds => seeders}/UserSeeder.php | 1 + database/seeds/DatabaseSeeder.php | 18 - public/index.php | 4 + 11 files changed, 3109 insertions(+), 1702 deletions(-) create mode 100644 database/seeders/DatabaseSeeder.php rename database/{seeds => seeders}/DefaultOptionsSeeder.php (97%) rename database/{seeds => seeders}/NewPermissions.php (96%) rename database/{seeds => seeders}/PermissionSeeder.php (99%) rename database/{seeds => seeders}/UserSeeder.php (99%) delete mode 100644 database/seeds/DatabaseSeeder.php diff --git a/.env.example b/.env.example index f897c91..2e9fddc 100644 --- a/.env.example +++ b/.env.example @@ -10,7 +10,7 @@ APP_SITEHOMEPAGE="" LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=127.0.0.1 +DB_HOST=z DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root diff --git a/composer.json b/composer.json index 6e7374b..bf90ae1 100644 --- a/composer.json +++ b/composer.json @@ -8,33 +8,33 @@ ], "license": "MIT", "require": { - "php": "^7.2.5", + "php": "^8.0", "ext-imagick": "*", "ext-json": "*", - "arcanedev/log-viewer": "^7.0", + "arcanedev/log-viewer": "^8.1.0", "doctrine/dbal": "^2.10", "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^1.0", "geo-sot/laravel-env-editor": "^0.9.9", - "graham-campbell/markdown": "^12.0", - "guzzlehttp/guzzle": "^6.5", + "graham-campbell/markdown": "^13.1", + "guzzlehttp/guzzle": "^7.0.1", "jeroennoten/laravel-adminlte": "^3.2", - "laravel/framework": "^7.0", + "laravel/framework": "^8.0", "laravel/slack-notification-channel": "^2.0", "laravel/tinker": "^2.0", - "laravel/ui": "^2.0", + "laravel/ui": "^3.0", "mcamara/laravel-localization": "^1.5", "pragmarx/google2fa-laravel": "^1.3", - "sentry/sentry-laravel": "1.7.1", + "sentry/sentry-laravel": "2.9.0", "spatie/laravel-permission": "^3.13" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.3", - "facade/ignition": "^2.0", + "facade/ignition": "^2.3.6", "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.3.1", - "nunomaduro/collision": "^4.1", - "phpunit/phpunit": "^8.5" + "nunomaduro/collision": "^5.0", + "phpunit/phpunit": "^9.3" }, "config": { "optimize-autoloader": true, @@ -50,10 +50,8 @@ "psr-4": { "App\\": "app/" }, - "classmap": [ - "database/seeds", - "database/factories" - ] + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index 4126db1..7a17f9b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7a6e859cac39fc7ff3a85d5e4d1219e1", + "content-hash": "c89391bfd2557bb2adbf7f31deda6b2d", "packages": [ { "name": "almasaeed2010/adminlte", - "version": "v3.0.5", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/ColorlibHQ/AdminLTE.git", - "reference": "6b8b69261f1aacbb4be037c934f3c3652e6dff27" + "reference": "c641d7f5716ed47e76f70ab16e05ae41420120b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ColorlibHQ/AdminLTE/zipball/6b8b69261f1aacbb4be037c934f3c3652e6dff27", - "reference": "6b8b69261f1aacbb4be037c934f3c3652e6dff27", + "url": "https://api.github.com/repos/ColorlibHQ/AdminLTE/zipball/c641d7f5716ed47e76f70ab16e05ae41420120b8", + "reference": "c641d7f5716ed47e76f70ab16e05ae41420120b8", "shasum": "" }, "type": "library", @@ -31,7 +31,7 @@ } ], "description": "AdminLTE - admin control panel and dashboard that's based on Bootstrap 4", - "homepage": "http://adminlte.io/", + "homepage": "https://adminlte.io/", "keywords": [ "JS", "admin", @@ -43,34 +43,43 @@ "theme", "web" ], - "time": "2020-05-19T20:41:11+00:00" + "support": { + "issues": "https://github.com/ColorlibHQ/AdminLTE/issues", + "source": "https://github.com/ColorlibHQ/AdminLTE/tree/v3.1.0" + }, + "time": "2021-03-22T07:30:50+00:00" }, { "name": "arcanedev/log-viewer", - "version": "7.0.0", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/ARCANEDEV/LogViewer.git", - "reference": "fd976c90f19e5f2446f7a2d6eeb6c5705cb67178" + "reference": "c302c406ea7e0a5def75aac2e7ef1669caca6d63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ARCANEDEV/LogViewer/zipball/fd976c90f19e5f2446f7a2d6eeb6c5705cb67178", - "reference": "fd976c90f19e5f2446f7a2d6eeb6c5705cb67178", + "url": "https://api.github.com/repos/ARCANEDEV/LogViewer/zipball/c302c406ea7e0a5def75aac2e7ef1669caca6d63", + "reference": "c302c406ea7e0a5def75aac2e7ef1669caca6d63", "shasum": "" }, "require": { - "arcanedev/support": "^7.0", + "arcanedev/support": "^8.0", "ext-json": "*", - "php": "^7.2.5", - "psr/log": "^1.0" + "php": "^7.3|^8.0", + "psr/log": "^1.1" }, "require-dev": { - "orchestra/testbench": "^5.0", - "phpunit/phpunit": "^8.0|^9.0" + "laravel/framework": "^8.19", + "mockery/mockery": "^1.4.2", + "orchestra/testbench-core": "^6.4", + "phpunit/phpunit": "^9.3.3" }, "type": "library", "extra": { + "branch-alias": { + "dev-develop": "8.x-dev" + }, "laravel": { "providers": [ "Arcanedev\\LogViewer\\LogViewerServiceProvider", @@ -98,7 +107,7 @@ "role": "Developer" } ], - "description": "Provides a Log Viewer for Laravel 5/6", + "description": "Provides a Log Viewer for Laravel", "homepage": "https://github.com/ARCANEDEV/LogViewer", "keywords": [ "arcanedev", @@ -109,35 +118,40 @@ "log-viewer", "logviewer" ], - "time": "2020-03-04T08:47:57+00:00" + "support": { + "issues": "https://github.com/ARCANEDEV/LogViewer/issues", + "source": "https://github.com/ARCANEDEV/LogViewer/tree/8.1.0" + }, + "time": "2021-02-26T17:24:57+00:00" }, { "name": "arcanedev/support", - "version": "7.1.2", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/ARCANEDEV/Support.git", - "reference": "7e4199d30f04c611ba5d895e663f111c217ff5a3" + "reference": "b161c3c080b314e832410295011625721fbd3a2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ARCANEDEV/Support/zipball/7e4199d30f04c611ba5d895e663f111c217ff5a3", - "reference": "7e4199d30f04c611ba5d895e663f111c217ff5a3", + "url": "https://api.github.com/repos/ARCANEDEV/Support/zipball/b161c3c080b314e832410295011625721fbd3a2f", + "reference": "b161c3c080b314e832410295011625721fbd3a2f", "shasum": "" }, "require": { - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5" + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "require-dev": { - "orchestra/testbench": "^5.0", - "phpunit/phpunit": "^8.0|^9.0" + "laravel/framework": "^8.0", + "orchestra/testbench": "^6.0", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-develop": "8.x-dev" } }, "autoload": { @@ -167,7 +181,11 @@ "laravel", "support" ], - "time": "2020-03-12T09:28:19+00:00" + "support": { + "issues": "https://github.com/ARCANEDEV/Support/issues", + "source": "https://github.com/ARCANEDEV/Support/tree/8.1.0" + }, + "time": "2020-11-27T17:09:38+00:00" }, { "name": "asm89/stack-cors", @@ -186,7 +204,7 @@ "require": { "php": ">=5.5.9", "symfony/http-foundation": "~2.7|~3.0|~4.0|~5.0", - "symfony/http-kernel": "~2.7|~3.0|~4.0|^5.1" + "symfony/http-kernel": "~2.7|~3.0|~4.0|~5.0" }, "require-dev": { "phpunit/phpunit": "^5.0 || ^4.8.10", @@ -219,26 +237,30 @@ "cors", "stack" ], + "support": { + "issues": "https://github.com/asm89/stack-cors/issues", + "source": "https://github.com/asm89/stack-cors/tree/1.3.0" + }, "time": "2019-12-24T22:41:47+00:00" }, { "name": "bacon/bacon-qr-code", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "add6d9ff97336b62f95a3b94f75cea4e085465b2" + "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/add6d9ff97336b62f95a3b94f75cea4e085465b2", - "reference": "add6d9ff97336b62f95a3b94f75cea4e085465b2", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09", + "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "shasum": "" }, "require": { - "dasprid/enum": "^1.0", + "dasprid/enum": "^1.0.3", "ext-iconv": "*", - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "phly/keep-a-changelog": "^1.4", @@ -268,30 +290,34 @@ ], "description": "BaconQrCode is a QR code generator for PHP.", "homepage": "https://github.com/Bacon/BaconQrCode", - "time": "2020-07-30T16:40:58+00:00" + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.4" + }, + "time": "2021-06-18T13:26:35+00:00" }, { "name": "brick/math", - "version": "0.9.1", + "version": "0.9.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "283a40c901101e66de7061bd359252c013dcc43c" + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/283a40c901101e66de7061bd359252c013dcc43c", - "reference": "283a40c901101e66de7061bd359252c013dcc43c", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15|^8.5", - "vimeo/psalm": "^3.5" + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.9.2" }, "type": "library", "autoload": { @@ -314,33 +340,41 @@ "brick", "math" ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.9.3" + }, "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/brick/math", "type": "tidelift" } ], - "time": "2020-08-18T23:57:15+00:00" + "time": "2021-08-15T20:50:18+00:00" }, { "name": "clue/stream-filter", - "version": "v1.4.1", + "version": "v1.5.0", "source": { "type": "git", - "url": "https://github.com/clue/php-stream-filter.git", - "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" + "url": "https://github.com/clue/stream-filter.git", + "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", - "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", "shasum": "" }, "require": { "php": ">=5.3" }, "require-dev": { - "phpunit/phpunit": "^5.0 || ^4.8" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -358,7 +392,7 @@ "authors": [ { "name": "Christian Lück", - "email": "christian@lueck.tv" + "email": "christian@clue.engineering" } ], "description": "A simple and modern approach to stream filtering in PHP", @@ -372,89 +406,34 @@ "stream_filter_append", "stream_filter_register" ], - "time": "2019-04-09T12:31:48+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855" + "support": { + "issues": "https://github.com/clue/stream-filter/issues", + "source": "https://github.com/clue/stream-filter/tree/v1.5.0" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855", - "reference": "c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "funding": [ { - "url": "https://packagist.com", + "url": "https://clue.engineering/support", "type": "custom" }, { - "url": "https://github.com/composer", + "url": "https://github.com/clue", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2020-08-25T05:50:16+00:00" + "time": "2020-10-02T12:38:20+00:00" }, { "name": "dasprid/enum", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/DASPRiD/Enum.git", - "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07" + "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07", - "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2", + "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2", "shasum": "" }, "require-dev": { @@ -484,53 +463,24 @@ "enum", "map" ], - "time": "2020-07-30T16:37:13+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.3" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "time": "2019-12-04T15:06:13+00:00" + "time": "2020-10-02T16:03:48+00:00" }, { "name": "doctrine/cache", - "version": "1.10.2", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "13e3381b25847283a91948d04640543941309727" + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", - "reference": "13e3381b25847283a91948d04640543941309727", + "url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce", + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce", "shasum": "" }, "require": { @@ -541,20 +491,19 @@ }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^6.0", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^8.0", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", + "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" @@ -599,37 +548,57 @@ "redis", "xcache" ], - "time": "2020-07-07T18:54:01+00:00" + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2021-07-17T14:49:29+00:00" }, { "name": "doctrine/dbal", - "version": "2.10.3", + "version": "2.13.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "03ca23afc2ee062f5d3e32426ad37c34a4770dcf" + "reference": "2411a55a2a628e6d8dd598388ab13474802c7b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/03ca23afc2ee062f5d3e32426ad37c34a4770dcf", - "reference": "03ca23afc2ee062f5d3e32426ad37c34a4770dcf", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/2411a55a2a628e6d8dd598388ab13474802c7b6e", + "reference": "2411a55a2a628e6d8dd598388ab13474802c7b6e", "shasum": "" }, "require": { - "doctrine/cache": "^1.0", + "doctrine/cache": "^1.0|^2.0", + "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", "ext-pdo": "*", - "php": "^7.2" + "php": "^7.1 || ^8" }, "require-dev": { - "doctrine/coding-standard": "^8.1", - "jetbrains/phpstorm-stubs": "^2019.1", - "nikic/php-parser": "^4.4", - "phpstan/phpstan": "^0.12.40", - "phpunit/phpunit": "^8.5.5", - "psalm/plugin-phpunit": "^0.10.0", + "doctrine/coding-standard": "9.0.0", + "jetbrains/phpstorm-stubs": "2021.1", + "phpstan/phpstan": "0.12.99", + "phpunit/phpunit": "^7.5.20|^8.5|9.5.10", + "psalm/plugin-phpunit": "0.16.1", + "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", - "vimeo/psalm": "^3.14.2" + "vimeo/psalm": "4.10.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -638,12 +607,6 @@ "bin/doctrine-dbal" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.10.x-dev", - "dev-develop": "3.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" @@ -694,6 +657,10 @@ "sqlserver", "sqlsrv" ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/2.13.4" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -708,7 +675,50 @@ "type": "tidelift" } ], - "time": "2020-09-02T01:35:42+00:00" + "time": "2021-10-02T15:59:26+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v0.5.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/9504165960a1f83cc1480e2be1dd0a0478561314", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0|^7.0|^8.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v0.5.3" + }, + "time": "2021-03-21T12:59:47+00:00" }, { "name": "doctrine/event-manager", @@ -784,6 +794,10 @@ "event system", "events" ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -875,6 +889,24 @@ "uppercase", "words" ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], "time": "2020-05-29T15:13:26+00:00" }, { @@ -937,34 +969,54 @@ "parser", "php" ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], "time": "2020-05-25T17:44:05+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27" + "reference": "7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", - "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c", + "reference": "7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2|^8.0", + "webmozart/assert": "^1.7.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-webmozart-assert": "^0.12.7", + "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -975,11 +1027,6 @@ "MIT" ], "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -991,20 +1038,30 @@ "cron", "schedule" ], - "time": "2019-03-31T00:38:28+00:00" + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.1.0" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2020-11-24T19:55:57+00:00" }, { "name": "egulias/email-validator", - "version": "2.1.19", + "version": "2.1.25", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c" + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/840d5603eb84cc81a6a0382adac3293e57c1c64c", - "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", "shasum": "" }, "require": { @@ -1049,28 +1106,38 @@ "validation", "validator" ], - "time": "2020-08-08T21:28:19+00:00" + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2020-12-29T14:50:06+00:00" }, { "name": "fideloper/proxy", - "version": "4.4.0", + "version": "4.4.1", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8" + "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8", - "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0", + "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", "php": ">=5.4.0" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0", + "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.0" }, @@ -1103,7 +1170,11 @@ "proxy", "trusted proxy" ], - "time": "2020-06-23T01:36:47+00:00" + "support": { + "issues": "https://github.com/fideloper/TrustedProxy/issues", + "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1" + }, + "time": "2020-10-22T13:48:01+00:00" }, { "name": "fruitcake/laravel-cors", @@ -1171,34 +1242,41 @@ "crossdomain", "laravel" ], + "support": { + "issues": "https://github.com/fruitcake/laravel-cors/issues", + "source": "https://github.com/fruitcake/laravel-cors/tree/1.0" + }, + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], "time": "2020-04-28T08:47:37+00:00" }, { "name": "geo-sot/laravel-env-editor", - "version": "v0.9.9", + "version": "v0.9.12", "source": { "type": "git", "url": "https://github.com/GeoSot/Laravel-EnvEditor.git", - "reference": "e828d3d3310890286d0b53045de9381187258605" + "reference": "fc6f83787d86119bcdab016b2fdb8ebc57ebb1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GeoSot/Laravel-EnvEditor/zipball/e828d3d3310890286d0b53045de9381187258605", - "reference": "e828d3d3310890286d0b53045de9381187258605", + "url": "https://api.github.com/repos/GeoSot/Laravel-EnvEditor/zipball/fc6f83787d86119bcdab016b2fdb8ebc57ebb1a5", + "reference": "fc6f83787d86119bcdab016b2fdb8ebc57ebb1a5", "shasum": "" }, "require": { - "laravel/framework": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0|~7.0", - "php": "^7.1" + "laravel/framework": ">=5.5", + "php": ">=7.1" }, "require-dev": { "orchestra/testbench": "^3" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "0.9.*-dev" - }, "laravel": { "providers": [ "GeoSot\\EnvEditor\\ServiceProvider" @@ -1223,47 +1301,49 @@ "email": "geo.sotis@gmail.com" } ], - "description": "A laravel Package that Supports .Env File editing and backup ", + "description": "A laravel Package that supports .Env File, editing and backup ", "keywords": [ "EnvEditor", "geo-sot", "laravel", "laravel-env-editor" ], - "time": "2020-04-17T23:33:36+00:00" + "support": { + "issues": "https://github.com/GeoSot/Laravel-EnvEditor/issues", + "source": "https://github.com/GeoSot/Laravel-EnvEditor/tree/v0.9.12" + }, + "time": "2021-06-02T11:35:51+00:00" }, { "name": "graham-campbell/markdown", - "version": "v12.0.2", + "version": "v13.1.1", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Markdown.git", - "reference": "584eb9f24004238b80ee98b6e7be82f0933554dd" + "reference": "d25b873e5c5870edc4de7d980808f1a8e092a9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Markdown/zipball/584eb9f24004238b80ee98b6e7be82f0933554dd", - "reference": "584eb9f24004238b80ee98b6e7be82f0933554dd", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Markdown/zipball/d25b873e5c5870edc4de7d980808f1a8e092a9c7", + "reference": "d25b873e5c5870edc4de7d980808f1a8e092a9c7", "shasum": "" }, "require": { - "illuminate/contracts": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "illuminate/view": "^6.0|^7.0", - "league/commonmark": "^1.3", - "php": "^7.2.5" + "illuminate/contracts": "^6.0 || ^7.0 || ^8.0", + "illuminate/filesystem": "^6.0 || ^7.0 || ^8.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0", + "illuminate/view": "^6.0 || ^7.0 || ^8.0", + "league/commonmark": "^1.5", + "php": "^7.2.5 || ^8.0" }, "require-dev": { "graham-campbell/analyzer": "^3.0", "graham-campbell/testbench": "^5.4", "mockery/mockery": "^1.3.1", - "phpunit/phpunit": "^8.5|^9.0" + "phpunit/phpunit": "^8.5.8 || ^9.3.7" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "12.0-dev" - }, "laravel": { "providers": [ "GrahamCampbell\\Markdown\\MarkdownServiceProvider" @@ -1297,41 +1377,123 @@ "laravel", "markdown" ], - "time": "2020-04-14T16:14:52+00:00" + "support": { + "issues": "https://github.com/GrahamCampbell/Laravel-Markdown/issues", + "source": "https://github.com/GrahamCampbell/Laravel-Markdown/tree/v13.1.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/markdown", + "type": "tidelift" + } + ], + "time": "2020-08-22T14:18:21+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "name": "graham-campbell/result-type", + "version": "v1.0.2", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "84afea85c6841deeea872f36249a206e878a5de0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/84afea85c6841deeea872f36249a206e878a5de0", + "reference": "84afea85c6841deeea872f36249a206e878a5de0", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "phpoption/phpoption": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2021-08-28T21:34:50+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "7008573787b430c1c1f650e3722d9bba59967628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", + "reference": "7008573787b430c1c1f650e3722d9bba59967628", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7 || ^2.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", "psr/log": "^1.1" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -1351,6 +1513,11 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "Guzzle is a PHP HTTP client library", @@ -1361,35 +1528,59 @@ "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], - "time": "2020-06-16T21:01:06+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2021-03-23T11:33:13+00:00" }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/136a635e2b4a49b9d79e9c8fee267ffb257fdba0", + "reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -1405,74 +1596,133 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-07T13:05:22+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "2.1-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -1486,32 +1736,54 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2021-10-06T17:43:30+00:00" }, { "name": "http-interop/http-factory-guzzle", - "version": "1.0.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/http-interop/http-factory-guzzle.git", - "reference": "34861658efb9899a6618cef03de46e2a52c80fc0" + "reference": "8f06e92b95405216b237521cc64c804dd44c4a81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/34861658efb9899a6618cef03de46e2a52c80fc0", - "reference": "34861658efb9899a6618cef03de46e2a52c80fc0", + "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/8f06e92b95405216b237521cc64c804dd44c4a81", + "reference": "8f06e92b95405216b237521cc64c804dd44c4a81", "shasum": "" }, "require": { - "guzzlehttp/psr7": "^1.4.2", + "guzzlehttp/psr7": "^1.7||^2.0", + "php": ">=7.3", "psr/http-factory": "^1.0" }, "provide": { "psr/http-factory-implementation": "^1.0" }, "require-dev": { - "http-interop/http-factory-tests": "^0.5", - "phpunit/phpunit": "^6.5" + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "guzzlehttp/psr7": "Includes an HTTP factory starting in version 2.0" }, "type": "library", "autoload": { @@ -1536,28 +1808,36 @@ "psr-17", "psr-7" ], - "time": "2018-07-31T19:32:56+00:00" + "support": { + "issues": "https://github.com/http-interop/http-factory-guzzle/issues", + "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.0" + }, + "time": "2021-07-21T13:50:14+00:00" }, { "name": "jean85/pretty-package-versions", - "version": "1.5.0", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "e9f4324e88b8664be386d90cf60fbc202e1f7fc9" + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/e9f4324e88b8664be386d90cf60fbc202e1f7fc9", - "reference": "e9f4324e88b8664be386d90cf60fbc202e1f7fc9", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0" + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" }, "type": "library", "extra": { @@ -1580,31 +1860,35 @@ "email": "alessandro.lai85@gmail.com" } ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "description": "A library to get pretty versions strings of installed dependencies", "keywords": [ "composer", "package", "release", "versions" ], - "time": "2020-06-23T06:23:06+00:00" + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" + }, + "time": "2021-10-08T21:21:46+00:00" }, { "name": "jeroennoten/laravel-adminlte", - "version": "v3.4.4", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/jeroennoten/Laravel-AdminLTE.git", - "reference": "496e7cb3a770fcf05e78627d1b3cb0f3e4c865f3" + "reference": "81558083c2a99c091e32f11dd0ddbc1e74918ff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/zipball/496e7cb3a770fcf05e78627d1b3cb0f3e4c865f3", - "reference": "496e7cb3a770fcf05e78627d1b3cb0f3e4c865f3", + "url": "https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/zipball/81558083c2a99c091e32f11dd0ddbc1e74918ff2", + "reference": "81558083c2a99c091e32f11dd0ddbc1e74918ff2", "shasum": "" }, "require": { - "almasaeed2010/adminlte": "^3.0", + "almasaeed2010/adminlte": "3.1.*", "laravel/framework": ">=6.0", "php": ">=7.2.0" }, @@ -1642,64 +1926,71 @@ "administrator", "laravel" ], - "time": "2020-07-17T17:35:17+00:00" + "support": { + "issues": "https://github.com/jeroennoten/Laravel-AdminLTE/issues", + "source": "https://github.com/jeroennoten/Laravel-AdminLTE/tree/v3.7.0" + }, + "time": "2021-08-20T13:26:30+00:00" }, { "name": "laravel/framework", - "version": "v7.27.0", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "17777a92da9b3cf0026f26462d289d596420e6d0" + "reference": "8f3d280f36a427730c8c8fa34316c79eed38781e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/17777a92da9b3cf0026f26462d289d596420e6d0", - "reference": "17777a92da9b3cf0026f26462d289d596420e6d0", + "url": "https://api.github.com/repos/laravel/framework/zipball/8f3d280f36a427730c8c8fa34316c79eed38781e", + "reference": "8f3d280f36a427730c8c8fa34316c79eed38781e", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^2.0", + "dragonmantank/cron-expression": "^3.0.2", "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3", - "league/flysystem": "^1.0.34", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^1.3|^2.0.2", + "league/flysystem": "^1.1", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.17", - "opis/closure": "^3.1", - "php": "^7.2.5", + "nesbot/carbon": "^2.31", + "opis/closure": "^3.6", + "php": "^7.3|^8.0", "psr/container": "^1.0", + "psr/log": "^1.0 || ^2.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7|^4.0", + "ramsey/uuid": "^4.2.2", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.0", - "symfony/error-handler": "^5.0", - "symfony/finder": "^5.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0", - "symfony/polyfill-php73": "^1.17", - "symfony/process": "^5.0", - "symfony/routing": "^5.0", - "symfony/var-dumper": "^5.0", + "symfony/console": "^5.1.4", + "symfony/error-handler": "^5.1.4", + "symfony/finder": "^5.1.4", + "symfony/http-foundation": "^5.1.4", + "symfony/http-kernel": "^5.1.4", + "symfony/mime": "^5.1.4", + "symfony/process": "^5.1.4", + "symfony/routing": "^5.1.4", + "symfony/var-dumper": "^5.1.4", "tijsverkoyen/css-to-inline-styles": "^2.2.2", - "vlucas/phpdotenv": "^4.0", + "vlucas/phpdotenv": "^5.2", "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", + "illuminate/collections": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -1712,6 +2003,7 @@ "illuminate/hashing": "self.version", "illuminate/http": "self.version", "illuminate/log": "self.version", + "illuminate/macroable": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", @@ -1727,61 +2019,66 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/dbal": "^2.6", - "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3.1|^7.0", + "aws/aws-sdk-php": "^3.189.0", + "doctrine/dbal": "^2.13.3|^3.1.2", + "filp/whoops": "^2.8", + "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.3.1", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "^5.0", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^6.23", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.4|^9.0", - "predis/predis": "^1.1.1", - "symfony/cache": "^5.0" + "phpunit/phpunit": "^8.5.19|^9.5.8", + "predis/predis": "^1.1.2", + "symfony/cache": "^5.1.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.189.0).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.2).", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", - "filp/whoops": "Required for friendly error pages in development (^2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.8).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "mockery/mockery": "Required to use mocking (^1.3.1).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", "predis/predis": "Required to use the predis connector (^1.1.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", - "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { - "Illuminate\\": "src/Illuminate/" + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -1800,26 +2097,89 @@ "framework", "laravel" ], - "time": "2020-09-01T13:41:48+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-10-05T14:04:25+00:00" }, { - "name": "laravel/slack-notification-channel", - "version": "v2.2.0", + "name": "laravel/serializable-closure", + "version": "v1.0.3", "source": { "type": "git", - "url": "https://github.com/laravel/slack-notification-channel.git", - "reference": "98e0fe5c8dda645e6af914285af7b742e167462a" + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "6cfc678735f22ccedad761b8cae2bab14c3d8e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/98e0fe5c8dda645e6af914285af7b742e167462a", - "reference": "98e0fe5c8dda645e6af914285af7b742e167462a", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/6cfc678735f22ccedad761b8cae2bab14c3d8e5b", + "reference": "6cfc678735f22ccedad761b8cae2bab14c3d8e5b", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.18", + "phpstan/phpstan": "^0.12.98", + "symfony/var-dumper": "^5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2021-10-07T14:00:57+00:00" + }, + { + "name": "laravel/slack-notification-channel", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/slack-notification-channel.git", + "reference": "f428e76b8d0a0a2ff413ab225eeb829b9a8ffc20" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/f428e76b8d0a0a2ff413ab225eeb829b9a8ffc20", + "reference": "f428e76b8d0a0a2ff413ab225eeb829b9a8ffc20", "shasum": "" }, "require": { "guzzlehttp/guzzle": "^6.0|^7.0", "illuminate/notifications": "~5.8.0|^6.0|^7.0|^8.0", - "php": "^7.1.3" + "php": "^7.1.3|^8.0" }, "require-dev": { "mockery/mockery": "^1.0", @@ -1857,33 +2217,37 @@ "notifications", "slack" ], - "time": "2020-08-25T18:21:34+00:00" + "support": { + "issues": "https://github.com/laravel/slack-notification-channel/issues", + "source": "https://github.com/laravel/slack-notification-channel/tree/v2.3.1" + }, + "time": "2021-01-26T20:04:54+00:00" }, { "name": "laravel/tinker", - "version": "v2.4.2", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "58424c24e8aec31c3a3ac54eb3adb15e8a0a067b" + "reference": "c808a7227f97ecfd9219fbf913bad842ea854ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/58424c24e8aec31c3a3ac54eb3adb15e8a0a067b", - "reference": "58424c24e8aec31c3a3ac54eb3adb15e8a0a067b", + "url": "https://api.github.com/repos/laravel/tinker/zipball/c808a7227f97ecfd9219fbf913bad842ea854ddc", + "reference": "c808a7227f97ecfd9219fbf913bad842ea854ddc", "shasum": "" }, "require": { "illuminate/console": "^6.0|^7.0|^8.0", "illuminate/contracts": "^6.0|^7.0|^8.0", "illuminate/support": "^6.0|^7.0|^8.0", - "php": "^7.2", - "psy/psysh": "^0.10.3", - "symfony/var-dumper": "^4.3|^5.0" + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.10.4", + "symfony/var-dumper": "^4.3.4|^5.0" }, "require-dev": { - "mockery/mockery": "^1.3.1", - "phpunit/phpunit": "^8.4|^9.0" + "mockery/mockery": "~1.3.3|^1.4.2", + "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)." @@ -1921,34 +2285,38 @@ "laravel", "psysh" ], - "time": "2020-08-11T19:28:08+00:00" + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.6.2" + }, + "time": "2021-09-28T15:47:34+00:00" }, { "name": "laravel/ui", - "version": "v2.2.0", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "fb1404f04ece6eee128e3fb750d3a1e064238b33" + "reference": "07d725813350c695c779382cbd6dac0ab8665537" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/fb1404f04ece6eee128e3fb750d3a1e064238b33", - "reference": "fb1404f04ece6eee128e3fb750d3a1e064238b33", + "url": "https://api.github.com/repos/laravel/ui/zipball/07d725813350c695c779382cbd6dac0ab8665537", + "reference": "07d725813350c695c779382cbd6dac0ab8665537", "shasum": "" }, "require": { - "illuminate/console": "^7.0|^8.0", - "illuminate/filesystem": "^7.0|^8.0", - "illuminate/support": "^7.0|^8.0", - "php": "^7.2.5" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.0|^9.0" + "illuminate/console": "^8.42", + "illuminate/filesystem": "^8.42", + "illuminate/support": "^8.42", + "illuminate/validation": "^8.42", + "php": "^7.3|^8.0" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, "laravel": { "providers": [ "Laravel\\Ui\\UiServiceProvider" @@ -1976,20 +2344,23 @@ "laravel", "ui" ], - "time": "2020-08-25T18:30:43+00:00" + "support": { + "source": "https://github.com/laravel/ui/tree/v3.3.0" + }, + "time": "2021-05-25T16:45:33+00:00" }, { "name": "league/commonmark", - "version": "1.5.4", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "21819c989e69bab07e933866ad30c7e3f32984ba" + "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/21819c989e69bab07e933866ad30c7e3f32984ba", - "reference": "21819c989e69bab07e933866ad30c7e3f32984ba", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c4228d11e30d7493c6836d20872f9582d8ba6dcf", + "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf", "shasum": "" }, "require": { @@ -2001,13 +2372,13 @@ }, "require-dev": { "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.1", + "commonmark/commonmark.js": "0.29.2", "erusev/parsedown": "~1.0", "ext-json": "*", "github/gfm": "0.29.0", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^0.12.90", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" @@ -2045,6 +2416,12 @@ "md", "parser" ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, "funding": [ { "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", @@ -2071,20 +2448,20 @@ "type": "tidelift" } ], - "time": "2020-08-18T01:19:12+00:00" + "time": "2021-07-17T17:13:23+00:00" }, { "name": "league/flysystem", - "version": "1.1.3", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", - "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea", + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea", "shasum": "" }, "require": { @@ -2100,7 +2477,6 @@ "phpunit/phpunit": "^8.5.8" }, "suggest": { - "ext-fileinfo": "Required for MimeType", "ext-ftp": "Allows you to use FTP server storage", "ext-openssl": "Allows you to use FTPS server storage", "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", @@ -2156,26 +2532,30 @@ "sftp", "storage" ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.1.5" + }, "funding": [ { "url": "https://offset.earth/frankdejonge", "type": "other" } ], - "time": "2020-08-23T07:39:11+00:00" + "time": "2021-08-17T13:49:42+00:00" }, { "name": "league/mime-type-detection", - "version": "1.4.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "fda190b62b962d96a069fcc414d781db66d65b69" + "reference": "b38b25d7b372e9fddb00335400467b223349fd7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69", - "reference": "fda190b62b962d96a069fcc414d781db66d65b69", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b38b25d7b372e9fddb00335400467b223349fd7e", + "reference": "b38b25d7b372e9fddb00335400467b223349fd7e", "shasum": "" }, "require": { @@ -2183,8 +2563,9 @@ "php": "^7.2 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.36", - "phpunit/phpunit": "^8.5.8" + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" }, "type": "library", "autoload": { @@ -2203,6 +2584,10 @@ } ], "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.8.0" + }, "funding": [ { "url": "https://github.com/frankdejonge", @@ -2213,24 +2598,24 @@ "type": "tidelift" } ], - "time": "2020-08-09T10:34:01+00:00" + "time": "2021-09-25T08:23:19+00:00" }, { "name": "mcamara/laravel-localization", - "version": "1.5.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/mcamara/laravel-localization.git", - "reference": "13a51715f8e066b0bfb637fd9065d7496c3579ec" + "reference": "4f0bfd89e5ee8100cb8cff8ca2cc3b985ed46694" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/13a51715f8e066b0bfb637fd9065d7496c3579ec", - "reference": "13a51715f8e066b0bfb637fd9065d7496c3579ec", + "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/4f0bfd89e5ee8100cb8cff8ca2cc3b985ed46694", + "reference": "4f0bfd89e5ee8100cb8cff8ca2cc3b985ed46694", "shasum": "" }, "require": { - "laravel/framework": "~5.2.0||~5.3.0||~5.4.0||~5.5.0||~5.6.0||~5.7.0||~5.8.0||^6.0||^7.0", + "laravel/framework": "~5.2.0||~5.3.0||~5.4.0||~5.5.0||~5.6.0||~5.7.0||~5.8.0||^6.0||^7.0||^8.0", "php": ">=7.1.0" }, "require-dev": { @@ -2275,6 +2660,10 @@ "localization", "php" ], + "support": { + "issues": "https://github.com/mcamara/laravel-localization/issues", + "source": "https://github.com/mcamara/laravel-localization/tree/1.6.1" + }, "funding": [ { "url": "https://github.com/iwasherefirst2", @@ -2285,42 +2674,43 @@ "type": "github" } ], - "time": "2020-03-05T15:19:05+00:00" + "time": "2020-10-01T07:45:06+00:00" }, { "name": "monolog/monolog", - "version": "2.1.1", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" + "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", + "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", "shasum": "" }, "require": { "php": ">=7.2", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "provide": { - "psr/log-implementation": "1.0.0" + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" }, "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^6.0", + "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", - "php-amqplib/php-amqplib": "~2.4", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", - "php-parallel-lint/php-parallel-lint": "^1.0", "phpspec/prophecy": "^1.6.1", + "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <3.0", + "ruflin/elastica": ">=0.90@dev", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { @@ -2328,8 +2718,11 @@ "doctrine/couchdb": "Allow sending log messages to a CouchDB server", "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", "ext-mbstring": "Allow to work properly with unicode symbols", "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", @@ -2340,7 +2733,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "2.x-dev" } }, "autoload": { @@ -2356,16 +2749,20 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", + "homepage": "https://github.com/Seldaek/monolog", "keywords": [ "log", "logging", "psr-3" ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.3.5" + }, "funding": [ { "url": "https://github.com/Seldaek", @@ -2376,36 +2773,37 @@ "type": "tidelift" } ], - "time": "2020-07-23T08:41:23+00:00" + "time": "2021-10-01T21:08:31+00:00" }, { "name": "nesbot/carbon", - "version": "2.39.0", + "version": "2.53.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "0a41ea7f7fedacf307b7a339800e10356a042918" + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0a41ea7f7fedacf307b7a339800e10356a042918", - "reference": "0a41ea7f7fedacf307b7a339800e10356a042918", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045", + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", - "phpmd/phpmd": "^2.8", + "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.35", - "phpunit/phpunit": "^7.5 || ^8.0", + "phpstan/phpstan": "^0.12.54", + "phpunit/phpunit": "^7.5.20 || ^8.5.14", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -2414,8 +2812,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev", - "dev-3.x": "3.x-dev" + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" }, "laravel": { "providers": [ @@ -2441,20 +2839,24 @@ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "homepage": "https://markido.com" }, { "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "homepage": "https://github.com/kylekatarnls" } ], "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, "funding": [ { "url": "https://opencollective.com/Carbon", @@ -2465,20 +2867,20 @@ "type": "tidelift" } ], - "time": "2020-08-24T12:35:58+00:00" + "time": "2021-09-06T09:29:23+00:00" }, { "name": "nikic/php-parser", - "version": "v4.9.1", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "88e519766fc58bd46b8265561fb79b54e2e00b28" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/88e519766fc58bd46b8265561fb79b54e2e00b28", - "reference": "88e519766fc58bd46b8265561fb79b54e2e00b28", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -2517,33 +2919,114 @@ "parser", "php" ], - "time": "2020-08-30T16:15:20+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + }, + "time": "2021-09-20T12:20:58+00:00" }, { - "name": "opis/closure", - "version": "3.5.6", + "name": "nyholm/psr7", + "version": "1.4.1", "source": { "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9" + "url": "https://github.com/Nyholm/psr7.git", + "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/e8d34df855b0a0549a300cb8cb4db472556e8aa9", - "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/2212385b47153ea71b1c1b1374f8cb5e4f7892ec", + "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0" + "php": ">=7.1", + "php-http/message-factory": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" }, "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "http-interop/http-factory-tests": "^0.9", + "php-http/psr7-integration-tests": "^1.0", + "phpunit/phpunit": "^7.5 || 8.5 || 9.4", + "symfony/error-handler": "^4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5.x-dev" + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Nyholm\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + }, + { + "name": "Martijn van der Ven", + "email": "martijn@vanderven.se" + } + ], + "description": "A fast PHP7 implementation of PSR-7", + "homepage": "https://tnyholm.se", + "keywords": [ + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/Nyholm/psr7/issues", + "source": "https://github.com/Nyholm/psr7/tree/1.4.1" + }, + "funding": [ + { + "url": "https://github.com/Zegnat", + "type": "github" + }, + { + "url": "https://github.com/nyholm", + "type": "github" + } + ], + "time": "2021-07-02T08:32:20+00:00" + }, + { + "name": "opis/closure", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6", + "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0 || ^8.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6.x-dev" } }, "autoload": { @@ -2578,28 +3061,32 @@ "serialization", "serialize" ], - "time": "2020-08-11T08:46:50+00:00" + "support": { + "issues": "https://github.com/opis/closure/issues", + "source": "https://github.com/opis/closure/tree/3.6.2" + }, + "time": "2021-04-09T13:42:10+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2" + "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2", - "reference": "47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", + "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", "shasum": "" }, "require": { "php": "^7|^8" }, "require-dev": { - "phpunit/phpunit": "^6|^7", - "vimeo/psalm": "^1|^2|^3" + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" }, "type": "library", "autoload": { @@ -2640,65 +3127,25 @@ "hex2bin", "rfc4648" ], - "time": "2019-11-06T19:20:29+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" + "time": "2020-12-06T15:14:20+00:00" }, { "name": "php-http/client-common", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "e37e46c610c87519753135fb893111798c69076a" + "reference": "29e0c60d982f04017069483e832b92074d0a90b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/e37e46c610c87519753135fb893111798c69076a", - "reference": "e37e46c610c87519753135fb893111798c69076a", + "url": "https://api.github.com/repos/php-http/client-common/zipball/29e0c60d982f04017069483e832b92074d0a90b2", + "reference": "29e0c60d982f04017069483e832b92074d0a90b2", "shasum": "" }, "require": { @@ -2756,20 +3203,24 @@ "http", "httplug" ], - "time": "2020-07-21T10:04:13+00:00" + "support": { + "issues": "https://github.com/php-http/client-common/issues", + "source": "https://github.com/php-http/client-common/tree/2.4.0" + }, + "time": "2021-07-05T08:19:25+00:00" }, { "name": "php-http/discovery", - "version": "1.9.1", + "version": "1.14.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "64a18cc891957e05d91910b3c717d6bd11fbede9" + "reference": "de90ab2b41d7d61609f504e031339776bc8c7223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/64a18cc891957e05d91910b3c717d6bd11fbede9", - "reference": "64a18cc891957e05d91910b3c717d6bd11fbede9", + "url": "https://api.github.com/repos/php-http/discovery/zipball/de90ab2b41d7d61609f504e031339776bc8c7223", + "reference": "de90ab2b41d7d61609f504e031339776bc8c7223", "shasum": "" }, "require": { @@ -2786,8 +3237,7 @@ "puli/composer-plugin": "1.0.0-beta10" }, "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", - "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" }, "type": "library", "extra": { @@ -2821,70 +3271,11 @@ "message", "psr7" ], - "time": "2020-07-13T15:44:45+00:00" - }, - { - "name": "php-http/guzzle6-adapter", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f" + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.14.1" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/6074a4b1f4d5c21061b70bab3b8ad484282fe31f", - "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1", - "php-http/httplug": "^2.0", - "psr/http-client": "^1.0" - }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0", - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/client-integration-tests": "^2.0", - "phpunit/phpunit": "^7.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" - } - ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", - "keywords": [ - "Guzzle", - "http" - ], - "time": "2018-12-16T14:44:03+00:00" + "time": "2021-09-18T07:57:46+00:00" }, { "name": "php-http/httplug", @@ -2942,25 +3333,29 @@ "client", "http" ], + "support": { + "issues": "https://github.com/php-http/httplug/issues", + "source": "https://github.com/php-http/httplug/tree/master" + }, "time": "2020-07-13T15:43:23+00:00" }, { "name": "php-http/message", - "version": "1.9.0", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "2c7256e3c1aba0bfca70f099810f1c7712e00945" + "reference": "39eb7548be982a81085fe5a6e2a44268cd586291" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/2c7256e3c1aba0bfca70f099810f1c7712e00945", - "reference": "2c7256e3c1aba0bfca70f099810f1c7712e00945", + "url": "https://api.github.com/repos/php-http/message/zipball/39eb7548be982a81085fe5a6e2a44268cd586291", + "reference": "39eb7548be982a81085fe5a6e2a44268cd586291", "shasum": "" }, "require": { - "clue/stream-filter": "^1.4.1", - "php": "^7.1", + "clue/stream-filter": "^1.5", + "php": "^7.1 || ^8.0", "php-http/message-factory": "^1.0.2", "psr/http-message": "^1.0" }, @@ -2968,26 +3363,23 @@ "php-http/message-factory-implementation": "1.0" }, "require-dev": { - "akeneo/phpspec-skip-example-extension": "^1.0", - "coduo/phpspec-data-provider-extension": "^1.0", - "ergebnis/composer-normalize": "^2.1", + "ergebnis/composer-normalize": "^2.6", "ext-zlib": "*", "guzzlehttp/psr7": "^1.0", - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4", - "slim/slim": "^3.0", - "zendframework/zend-diactoros": "^1.0" + "laminas/laminas-diactoros": "^2.0", + "phpspec/phpspec": "^5.1 || ^6.3", + "slim/slim": "^3.0" }, "suggest": { "ext-zlib": "Used with compressor/decompressor streams", "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "zendframework/zend-diactoros": "Used with Diactoros Factories" + "laminas/laminas-diactoros": "Used with Diactoros Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -3015,7 +3407,11 @@ "message", "psr-7" ], - "time": "2020-08-17T06:33:14+00:00" + "support": { + "issues": "https://github.com/php-http/message/issues", + "source": "https://github.com/php-http/message/tree/1.12.0" + }, + "time": "2021-08-29T09:13:12+00:00" }, { "name": "php-http/message-factory", @@ -3065,6 +3461,10 @@ "stream", "uri" ], + "support": { + "issues": "https://github.com/php-http/message-factory/issues", + "source": "https://github.com/php-http/message-factory/tree/master" + }, "time": "2015-12-19T14:08:53+00:00" }, { @@ -3118,33 +3518,37 @@ "keywords": [ "promise" ], + "support": { + "issues": "https://github.com/php-http/promise/issues", + "source": "https://github.com/php-http/promise/tree/1.1.0" + }, "time": "2020-07-07T09:29:14+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": "^7.0 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^6.5.14 || ^7.0.20 || ^8.5.19 || ^9.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -3163,7 +3567,7 @@ }, { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk" } ], "description": "Option Type for PHP", @@ -3173,6 +3577,10 @@ "php", "type" ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.8.0" + }, "funding": [ { "url": "https://github.com/GrahamCampbell", @@ -3183,7 +3591,7 @@ "type": "tidelift" } ], - "time": "2020-07-20T17:29:33+00:00" + "time": "2021-08-28T21:27:29+00:00" }, { "name": "pragmarx/google2fa", @@ -3231,29 +3639,33 @@ "Two Factor Authentication", "google2fa" ], + "support": { + "issues": "https://github.com/antonioribeiro/google2fa/issues", + "source": "https://github.com/antonioribeiro/google2fa/tree/8.0.0" + }, "time": "2020-04-05T10:47:18+00:00" }, { "name": "pragmarx/google2fa-laravel", - "version": "v1.3.3", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/antonioribeiro/google2fa-laravel.git", - "reference": "ed6e0a9ea1519550688ffb5afb4919204e46ecea" + "reference": "f9014fd7ea36a1f7fffa233109cf59b209469647" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa-laravel/zipball/ed6e0a9ea1519550688ffb5afb4919204e46ecea", - "reference": "ed6e0a9ea1519550688ffb5afb4919204e46ecea", + "url": "https://api.github.com/repos/antonioribeiro/google2fa-laravel/zipball/f9014fd7ea36a1f7fffa233109cf59b209469647", + "reference": "f9014fd7ea36a1f7fffa233109cf59b209469647", "shasum": "" }, "require": { - "laravel/framework": ">=5.4.36", + "laravel/framework": ">=5.4.36|^8.0", "php": ">=7.0", "pragmarx/google2fa-qrcode": "^1.0" }, "require-dev": { - "orchestra/testbench": "3.4.*|3.5.*|3.6.*|3.7.*|4.*", + "orchestra/testbench": "3.4.*|3.5.*|3.6.*|3.7.*|4.*|5.*|6.*", "phpunit/phpunit": "~5|~6|~7|~8" }, "suggest": { @@ -3302,7 +3714,11 @@ "google2fa", "laravel" ], - "time": "2020-04-05T17:39:30+00:00" + "support": { + "issues": "https://github.com/antonioribeiro/google2fa-laravel/issues", + "source": "https://github.com/antonioribeiro/google2fa-laravel/tree/v1.4.1" + }, + "time": "2020-09-20T21:01:48+00:00" }, { "name": "pragmarx/google2fa-qrcode", @@ -3360,31 +3776,30 @@ "qr code", "qrcode" ], + "support": { + "issues": "https://github.com/antonioribeiro/google2fa-qrcode/issues", + "source": "https://github.com/antonioribeiro/google2fa-qrcode/tree/master" + }, "time": "2019-03-20T16:42:58+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -3397,7 +3812,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -3409,7 +3824,11 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/event-dispatcher", @@ -3455,6 +3874,10 @@ "psr", "psr-14" ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, "time": "2019-01-08T18:20:26+00:00" }, { @@ -3504,6 +3927,9 @@ "psr", "psr-18" ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, "time": "2020-06-29T06:28:15+00:00" }, { @@ -3556,6 +3982,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, "time": "2019-04-30T12:38:16+00:00" }, { @@ -3606,20 +4035,23 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -3643,7 +4075,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -3653,7 +4085,10 @@ "psr", "psr-3" ], - "time": "2020-03-23T09:12:05+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -3701,24 +4136,26 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { "name": "psy/psysh", - "version": "v0.10.4", + "version": "v0.10.9", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" + "reference": "01281336c4ae557fe4a994544f30d3a1bc204375" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", - "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/01281336c4ae557fe4a994544f30d3a1bc204375", + "reference": "01281336c4ae557fe4a994544f30d3a1bc204375", "shasum": "" }, "require": { - "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", @@ -3743,7 +4180,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.10.x-dev" + "dev-main": "0.10.x-dev" } }, "autoload": { @@ -3773,7 +4210,11 @@ "interactive", "shell" ], - "time": "2020-05-03T19:32:03+00:00" + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.10.9" + }, + "time": "2021-10-10T13:37:39+00:00" }, { "name": "ralouphie/getallheaders", @@ -3813,42 +4254,48 @@ } ], "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, "time": "2019-03-08T08:55:37+00:00" }, { "name": "ramsey/collection", - "version": "1.1.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "044184884e3c803e4cbb6451386cb71562939b18" + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/044184884e3c803e4cbb6451386cb71562939b18", - "reference": "044184884e3c803e4cbb6451386cb71562939b18", + "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", "shasum": "" }, "require": { - "php": "^7.2 || ^8" + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" }, "require-dev": { "captainhook/captainhook": "^5.3", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "ergebnis/composer-normalize": "^2.6", - "fzaninotto/faker": "^1.5", + "fakerphp/faker": "^1.5", "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.6", + "jangregor/phpstan-prophecy": "^0.8", "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^0.12.32", "phpstan/phpstan-mockery": "^0.12.5", "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^8.5 || ^9", "psy/psysh": "^0.10.4", "slevomat/coding-standard": "^6.3", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^3.12.2" + "vimeo/psalm": "^4.4" }, "type": "library", "autoload": { @@ -3867,7 +4314,7 @@ "homepage": "https://benramsey.com" } ], - "description": "A PHP 7.2+ library for representing and manipulating collections.", + "description": "A PHP library for representing and manipulating collections.", "keywords": [ "array", "collection", @@ -3876,59 +4323,68 @@ "queue", "set" ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/1.2.2" + }, "funding": [ { "url": "https://github.com/ramsey", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" } ], - "time": "2020-08-11T00:57:21+00:00" + "time": "2021-10-10T03:01:02+00:00" }, { "name": "ramsey/uuid", - "version": "4.1.1", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "cd4032040a750077205918c86049aa0f43d22947" + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", - "reference": "cd4032040a750077205918c86049aa0f43d22947", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "php": "^7.2 || ^8", + "php": "^7.2 || ^8.0", "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8" + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php80": "^1.14" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.8", - "goaop/framework": "^2", + "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", - "php-mock/php-mock-phpunit": "^2.5", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^0.17.1", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-mockery": "^0.12", "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^8.5", - "psy/psysh": "^0.10.0", - "slevomat/coding-standard": "^6.0", + "phpunit/phpunit": "^8.5 || ^9", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "3.9.4" + "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", @@ -3941,7 +4397,10 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-main": "4.x-dev" + }, + "captainhook": { + "force-install": true } }, "autoload": { @@ -3957,38 +4416,45 @@ "MIT" ], "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", "uuid" ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.2.3" + }, "funding": [ { "url": "https://github.com/ramsey", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" } ], - "time": "2020-08-18T17:17:46+00:00" + "time": "2021-09-25T23:10:38+00:00" }, { "name": "sentry/sdk", - "version": "2.1.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php-sdk.git", - "reference": "18921af9c2777517ef9fb480845c22a98554d6af" + "reference": "f03133b067fdf03fed09ff03daf3f1d68f5f3673" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/18921af9c2777517ef9fb480845c22a98554d6af", - "reference": "18921af9c2777517ef9fb480845c22a98554d6af", + "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/f03133b067fdf03fed09ff03daf3f1d68f5f3673", + "reference": "f03133b067fdf03fed09ff03daf3f1d68f5f3673", "shasum": "" }, "require": { "http-interop/http-factory-guzzle": "^1.0", - "php-http/guzzle6-adapter": "^1.1|^2.0", - "sentry/sentry": "^2.3" + "sentry/sentry": "^3.1", + "symfony/http-client": "^4.3|^5.0" }, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", @@ -4001,30 +4467,53 @@ "email": "accounts@sentry.io" } ], - "description": "This is a metapackage shipping sentry/sentry with a recommended http client.", - "time": "2020-01-08T19:16:29+00:00" + "description": "This is a metapackage shipping sentry/sentry with a recommended HTTP client.", + "homepage": "http://sentry.io", + "keywords": [ + "crash-reporting", + "crash-reports", + "error-handler", + "error-monitoring", + "log", + "logging", + "sentry" + ], + "support": { + "source": "https://github.com/getsentry/sentry-php-sdk/tree/3.1.0" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2020-12-01T10:31:45+00:00" }, { "name": "sentry/sentry", - "version": "2.4.3", + "version": "3.3.3", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "89fd1f91657b33ec9139f33f8a201eb086276103" + "reference": "9a7b6d84ac8fa370397336028e760c71accac1dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/89fd1f91657b33ec9139f33f8a201eb086276103", - "reference": "89fd1f91657b33ec9139f33f8a201eb086276103", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/9a7b6d84ac8fa370397336028e760c71accac1dc", + "reference": "9a7b6d84ac8fa370397336028e760c71accac1dc", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "guzzlehttp/promises": "^1.3", - "guzzlehttp/psr7": "^1.6", - "jean85/pretty-package-versions": "^1.2", - "php": "^7.1", + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7|^2.0", + "jean85/pretty-package-versions": "^1.5|^2.0.1", + "php": "^7.2|^8.0", "php-http/async-client-implementation": "^1.0", "php-http/client-common": "^1.5|^2.0", "php-http/discovery": "^1.6.1", @@ -4032,8 +4521,9 @@ "php-http/message": "^1.5", "psr/http-factory": "^1.0", "psr/http-message-implementation": "^1.0", - "psr/log": "^1.0", - "symfony/options-resolver": "^2.7|^3.0|^4.0|^5.0", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/options-resolver": "^3.4.43|^4.4.11|^5.0.11", + "symfony/polyfill-php80": "^1.17", "symfony/polyfill-uuid": "^1.13.1" }, "conflict": { @@ -4041,15 +4531,17 @@ "raven/raven": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "^2.17", + "http-interop/http-factory-guzzle": "^1.0", "monolog/monolog": "^1.3|^2.0", + "nikic/php-parser": "^4.10.3", "php-http/mock-client": "^1.3", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.18", - "symfony/phpunit-bridge": "^4.3|^5.0", - "vimeo/psalm": "^3.4" + "phpunit/phpunit": "^8.5.13|^9.4", + "symfony/phpunit-bridge": "^5.2", + "vimeo/psalm": "^4.2" }, "suggest": { "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler." @@ -4057,7 +4549,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "3.3.x-dev" } }, "autoload": { @@ -4089,6 +4581,10 @@ "logging", "sentry" ], + "support": { + "issues": "https://github.com/getsentry/sentry-php/issues", + "source": "https://github.com/getsentry/sentry-php/tree/3.3.3" + }, "funding": [ { "url": "https://sentry.io/", @@ -4099,42 +4595,50 @@ "type": "custom" } ], - "time": "2020-08-13T10:54:32+00:00" + "time": "2021-10-04T11:20:34+00:00" }, { "name": "sentry/sentry-laravel", - "version": "1.7.1", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-laravel.git", - "reference": "8ec4695c5c6fa28d952c0f361e02997e84920354" + "reference": "3acb930f1abeb67046097c3912c7b4b9b4303f08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/8ec4695c5c6fa28d952c0f361e02997e84920354", - "reference": "8ec4695c5c6fa28d952c0f361e02997e84920354", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/3acb930f1abeb67046097c3912c7b4b9b4303f08", + "reference": "3acb930f1abeb67046097c3912c7b4b9b4303f08", "shasum": "" }, "require": { - "illuminate/support": "5.0 - 5.8 | ^6.0 | ^7.0", - "php": "^7.1", - "sentry/sdk": "^2.1" + "illuminate/support": "5.0 - 5.8 | ^6.0 | ^7.0 | ^8.0", + "nyholm/psr7": "^1.0", + "php": "^7.2 | ^8.0", + "sentry/sdk": "^3.1", + "sentry/sentry": "^3.3", + "symfony/psr-http-message-bridge": "^1.0 | ^2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "2.14.*", - "laravel/framework": "^6.0", - "orchestra/testbench": "^3.9", - "phpunit/phpunit": "^8.0" + "friendsofphp/php-cs-fixer": "2.18.*", + "laravel/framework": "5.0 - 5.8 | ^6.0 | ^7.0 | ^8.0", + "mockery/mockery": "1.3.*", + "orchestra/testbench": "3.1 - 3.8 | ^4.7 | ^5.1 | ^6.0", + "phpunit/phpunit": "^5.7 | ^6.5 | ^7.5 | ^8.4 | ^9.3" + }, + "suggest": { + "zendframework/zend-diactoros": "When using Laravel >=5.1 - <=6.9 this package can help get more accurate request info, not used on Laravel >=6.10 anymore (https://laravel.com/docs/5.8/requests#psr7-requests)" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev", + "dev-master": "2.x-dev", "dev-0.x": "0.x-dev" }, "laravel": { "providers": [ - "Sentry\\Laravel\\ServiceProvider" + "Sentry\\Laravel\\ServiceProvider", + "Sentry\\Laravel\\Tracing\\ServiceProvider" ], "aliases": { "Sentry": "Sentry\\Laravel\\Facade" @@ -4168,20 +4672,34 @@ "logging", "sentry" ], - "time": "2020-04-01T10:30:44+00:00" + "support": { + "issues": "https://github.com/getsentry/sentry-laravel/issues", + "source": "https://github.com/getsentry/sentry-laravel/tree/2.9.0" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2021-10-06T13:08:08+00:00" }, { "name": "spatie/laravel-permission", - "version": "3.16.0", + "version": "3.18.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-permission.git", - "reference": "c5082ee84e0d128896b4a6864a8502d8c5f1df08" + "reference": "1c51a5fa12131565fe3860705163e53d7a26258a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/c5082ee84e0d128896b4a6864a8502d8c5f1df08", - "reference": "c5082ee84e0d128896b4a6864a8502d8c5f1df08", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/1c51a5fa12131565fe3860705163e53d7a26258a", + "reference": "1c51a5fa12131565fe3860705163e53d7a26258a", "shasum": "" }, "require": { @@ -4189,7 +4707,7 @@ "illuminate/container": "^5.8|^6.0|^7.0|^8.0", "illuminate/contracts": "^5.8|^6.0|^7.0|^8.0", "illuminate/database": "^5.8|^6.0|^7.0|^8.0", - "php": "^7.2.5" + "php": "^7.2.5|^8.0" }, "require-dev": { "orchestra/testbench": "^3.8|^4.0|^5.0|^6.0", @@ -4236,42 +4754,45 @@ "security", "spatie" ], + "support": { + "issues": "https://github.com/spatie/laravel-permission/issues", + "source": "https://github.com/spatie/laravel-permission/tree/3.18.0" + }, "funding": [ { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" + "url": "https://github.com/spatie", + "type": "github" } ], - "time": "2020-08-18T17:14:06+00:00" + "time": "2020-11-09T14:08:36+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + "reference": "15f7faf8508e04471f666633addacf54c0ab5933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933", "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", + "egulias/email-validator": "^2.0|^3.1", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" }, "suggest": { - "ext-intl": "Needed to support internationalized email addresses", - "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + "ext-intl": "Needed to support internationalized email addresses" }, "type": "library", "extra": { @@ -4304,31 +4825,47 @@ "mail", "mailer" ], - "time": "2019-11-12T09:31:26+00:00" + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "time": "2021-03-09T12:30:35+00:00" }, { "name": "symfony/console", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf" + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/186f395b256065ba9b890c0a4e48a91d598fa2cf", - "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf", + "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", + "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2", "symfony/string": "^5.1" }, "conflict": { + "psr/log": ">=3", "symfony/dependency-injection": "<4.4", "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", @@ -4336,10 +4873,10 @@ "symfony/process": "<4.4" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", "symfony/event-dispatcher": "^4.4|^5.0", @@ -4354,11 +4891,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -4381,8 +4913,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4397,31 +4938,27 @@ "type": "tidelift" } ], - "time": "2020-09-02T07:07:40+00:00" + "time": "2021-08-25T20:02:16+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.5", + "version": "v5.3.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9" + "reference": "7fb120adc7f600a59027775b224c13a33530dd90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9", - "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90", + "reference": "7fb120adc7f600a59027775b224c13a33530dd90", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\CssSelector\\": "" @@ -4448,8 +4985,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony CssSelector Component", + "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v5.3.4" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4464,20 +5004,20 @@ "type": "tidelift" } ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2021-07-21T12:38:00+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.1.3", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14" + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14", - "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", "shasum": "" }, "require": { @@ -4486,7 +5026,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -4514,26 +5054,42 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2020-06-06T08:49:21+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" }, { "name": "symfony/error-handler", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "525636d4b84e06c6ca72d96b6856b5b169416e6a" + "reference": "3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/525636d4b84e06c6ca72d96b6856b5b169416e6a", - "reference": "525636d4b84e06c6ca72d96b6856b5b169416e6a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321", + "reference": "3bc60d0fba00ae8d1eaa9eb5ab11a2bbdd1fc321", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/log": "^1.0", - "symfony/polyfill-php80": "^1.15", + "psr/log": "^1|^2|^3", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { @@ -4542,11 +5098,6 @@ "symfony/serializer": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\ErrorHandler\\": "" @@ -4569,8 +5120,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony ErrorHandler Component", + "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4585,27 +5139,27 @@ "type": "tidelift" } ], - "time": "2020-08-17T10:01:29+00:00" + "time": "2021-08-28T15:07:08+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "94871fc0a69c3c5da57764187724cdce0755899c" + "reference": "ce7b20d69c66a20939d8952b617506a44d102130" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/94871fc0a69c3c5da57764187724cdce0755899c", - "reference": "94871fc0a69c3c5da57764187724cdce0755899c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ce7b20d69c66a20939d8952b617506a44d102130", + "reference": "ce7b20d69c66a20939d8952b617506a44d102130", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", "symfony/event-dispatcher-contracts": "^2", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "symfony/dependency-injection": "<4.4" @@ -4615,9 +5169,10 @@ "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/service-contracts": "^1.1|^2", @@ -4628,11 +5183,6 @@ "symfony/http-kernel": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -4655,8 +5205,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4671,20 +5224,20 @@ "type": "tidelift" } ], - "time": "2020-08-13T14:19:42+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.1.3", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f6f613d74cfc5a623fc36294d3451eb7fa5a042b" + "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f6f613d74cfc5a623fc36294d3451eb7fa5a042b", - "reference": "f6f613d74cfc5a623fc36294d3451eb7fa5a042b", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/69fee1ad2332a7cbab3aca13591953da9cdb7a11", + "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11", "shasum": "" }, "require": { @@ -4697,7 +5250,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -4733,31 +5286,44 @@ "interoperability", "standards" ], - "time": "2020-07-06T13:23:11+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" }, { "name": "symfony/finder", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d" + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2b765f0cf6612b3636e738c0689b29aa63088d5d", - "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d", + "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -4780,8 +5346,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4796,27 +5365,192 @@ "type": "tidelift" } ], - "time": "2020-08-17T10:01:29+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { - "name": "symfony/http-foundation", - "version": "v5.1.5", + "name": "symfony/http-client", + "version": "v5.3.8", "source": { "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "41a4647f12870e9d41d9a7d72ff0614a27208558" + "url": "https://github.com/symfony/http-client.git", + "reference": "c6370fe2c0a445aedc08f592a6a3149da1fea4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/41a4647f12870e9d41d9a7d72ff0614a27208558", - "reference": "41a4647f12870e9d41d9a7d72ff0614a27208558", + "url": "https://api.github.com/repos/symfony/http-client/zipball/c6370fe2c0a445aedc08f592a6a3149da1fea4c7", + "reference": "c6370fe2c0a445aedc08f592a6a3149da1fea4c7", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.1", + "symfony/http-client-contracts": "^2.4", + "symfony/polyfill-php73": "^1.11", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.0|^2" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "2.4" + }, + "require-dev": { + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/http-kernel": "^4.4.13|^5.1.5", + "symfony/process": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-client/tree/v5.3.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-09-07T10:45:28+00:00" + }, + { + "name": "symfony/http-client-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/7e82f6084d7cae521a75ef2cb5c9457bbda785f4", + "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "suggest": { + "symfony/http-client-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-11T23:07:08+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v5.3.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", + "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "require-dev": { "predis/predis": "~1.0", @@ -4828,11 +5562,6 @@ "symfony/mime": "To use the file extension guesser" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" @@ -4855,8 +5584,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4871,39 +5603,40 @@ "type": "tidelift" } ], - "time": "2020-08-17T07:48:54+00:00" + "time": "2021-08-27T11:20:35+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.1.5", + "version": "v5.3.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "3e32676e6cb5d2081c91a56783471ff8a7f7110b" + "reference": "ceaf46a992f60e90645e7279825a830f733a17c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3e32676e6cb5d2081c91a56783471ff8a7f7110b", - "reference": "3e32676e6cb5d2081c91a56783471ff8a7f7110b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ceaf46a992f60e90645e7279825a830f733a17c5", + "reference": "ceaf46a992f60e90645e7279825a830f733a17c5", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/log": "~1.0", + "psr/log": "^1|^2", "symfony/deprecation-contracts": "^2.1", "symfony/error-handler": "^4.4|^5.0", "symfony/event-dispatcher": "^5.0", - "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-client-contracts": "^1.1|^2", + "symfony/http-foundation": "^5.3.7", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "symfony/browser-kit": "<4.4", "symfony/cache": "<5.0", "symfony/config": "<5.0", "symfony/console": "<4.4", - "symfony/dependency-injection": "<4.4", + "symfony/dependency-injection": "<5.3", "symfony/doctrine-bridge": "<5.0", "symfony/form": "<5.0", "symfony/http-client": "<5.0", @@ -4912,18 +5645,18 @@ "symfony/translation": "<5.0", "symfony/twig-bridge": "<5.0", "symfony/validator": "<5.0", - "twig/twig": "<2.4" + "twig/twig": "<2.13" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/cache": "~1.0", + "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^4.4|^5.0", "symfony/config": "^5.0", "symfony/console": "^4.4|^5.0", "symfony/css-selector": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", + "symfony/dependency-injection": "^5.3", "symfony/dom-crawler": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/finder": "^4.4|^5.0", @@ -4932,7 +5665,7 @@ "symfony/stopwatch": "^4.4|^5.0", "symfony/translation": "^4.4|^5.0", "symfony/translation-contracts": "^1.1|^2", - "twig/twig": "^2.4|^3.0" + "twig/twig": "^2.13|^3.0.4" }, "suggest": { "symfony/browser-kit": "", @@ -4941,11 +5674,6 @@ "symfony/dependency-injection": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\HttpKernel\\": "" @@ -4968,8 +5696,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpKernel Component", + "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v5.3.9" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4984,41 +5715,44 @@ "type": "tidelift" } ], - "time": "2020-09-02T08:15:18+00:00" + "time": "2021-09-28T10:25:11+00:00" }, { "name": "symfony/mime", - "version": "v5.1.5", + "version": "v5.3.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc" + "reference": "a756033d0a7e53db389618653ae991eba5a19a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", - "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", + "url": "https://api.github.com/repos/symfony/mime/zipball/a756033d0a7e53db389618653ae991eba5a19a11", + "reference": "a756033d0a7e53db389618653ae991eba5a19a11", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<4.4" }, "require-dev": { - "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "^4.4|^5.0" + "egulias/email-validator": "^2.1.10|^3.1", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/property-access": "^4.4|^5.1", + "symfony/property-info": "^4.4|^5.1", + "symfony/serializer": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Mime\\": "" @@ -5041,12 +5775,15 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "A library to manipulate MIME messages", + "description": "Allows manipulating MIME messages", "homepage": "https://symfony.com", "keywords": [ "mime", "mime-type" ], + "support": { + "source": "https://github.com/symfony/mime/tree/v5.3.8" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5061,33 +5798,29 @@ "type": "tidelift" } ], - "time": "2020-08-17T10:01:29+00:00" + "time": "2021-09-10T12:30:38+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "9ff59517938f88d90b6e65311fef08faa640f681" + "reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681", - "reference": "9ff59517938f88d90b6e65311fef08faa640f681", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4b78e55b179003a42523a362cc0e8327f7a69b5e", + "reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" @@ -5110,13 +5843,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony OptionsResolver Component", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ "config", "configuration", "options" ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5131,24 +5867,24 @@ "type": "tidelift" } ], - "time": "2020-07-12T12:58:00+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -5156,7 +5892,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5193,6 +5929,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5207,24 +5946,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.18.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36" + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", - "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-iconv": "For best performance" @@ -5232,7 +5971,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5270,6 +6009,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5284,24 +6026,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.18.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -5309,7 +6051,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5348,6 +6090,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5362,26 +6107,25 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.18.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", - "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=7.1", "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -5390,7 +6134,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5433,6 +6177,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5447,24 +6194,24 @@ "type": "tidelift" } ], - "time": "2020-08-04T06:02:08+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -5472,7 +6219,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5514,6 +6261,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5528,24 +6278,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -5553,7 +6303,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5591,6 +6341,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5605,106 +6358,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.18.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5741,6 +6417,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5755,29 +6434,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5817,6 +6496,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5831,29 +6513,29 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.18.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5897,6 +6579,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5911,25 +6596,103 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-07-28T13:41:28+00:00" }, { - "name": "symfony/polyfill-uuid", - "version": "v1.18.1", + "name": "symfony/polyfill-php81", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "da48e2cccd323e48c16c26481bf5800f6ab1c49d" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "e66119f3de95efc359483f810c4c3e6436279436" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/da48e2cccd323e48c16c26481bf5800f6ab1c49d", - "reference": "da48e2cccd323e48c16c26481bf5800f6ab1c49d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", + "reference": "e66119f3de95efc359483f810c4c3e6436279436", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-21T13:25:03+00:00" + }, + { + "name": "symfony/polyfill-uuid", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "9165effa2eb8a31bb3fa608df9d529920d21ddd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/9165effa2eb8a31bb3fa608df9d529920d21ddd9", + "reference": "9165effa2eb8a31bb3fa608df9d529920d21ddd9", + "shasum": "" + }, + "require": { + "php": ">=7.1" }, "suggest": { "ext-uuid": "For best performance" @@ -5937,7 +6700,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5974,6 +6737,9 @@ "portable", "uuid" ], + "support": { + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5988,32 +6754,27 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/process", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1864216226af21eb76d9477f691e7cbf198e0402" + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1864216226af21eb76d9477f691e7cbf198e0402", - "reference": "1864216226af21eb76d9477f691e7cbf198e0402", + "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -6036,8 +6797,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6052,54 +6816,137 @@ "type": "tidelift" } ], - "time": "2020-07-23T08:36:24+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { - "name": "symfony/routing", - "version": "v5.1.5", + "name": "symfony/psr-http-message-bridge", + "version": "v2.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "47b0218344cb6af25c93ca8ee1137fafbee5005d" + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "c9012994c4b4fb23e7c57dd86b763a417a04feba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/47b0218344cb6af25c93ca8ee1137fafbee5005d", - "reference": "47b0218344cb6af25c93ca8ee1137fafbee5005d", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/c9012994c4b4fb23e7c57dd86b763a417a04feba", + "reference": "c9012994c4b4fb23e7c57dd86b763a417a04feba", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^4.4 || ^5.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "psr/log": "^1.1 || ^2 || ^3", + "symfony/browser-kit": "^4.4 || ^5.0", + "symfony/config": "^4.4 || ^5.0", + "symfony/event-dispatcher": "^4.4 || ^5.0", + "symfony/framework-bundle": "^4.4 || ^5.0", + "symfony/http-kernel": "^4.4 || ^5.0", + "symfony/phpunit-bridge": "^4.4.19 || ^5.2" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-main": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/symfony/psr-http-message-bridge/issues", + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-27T17:25:39+00:00" + }, + { + "name": "symfony/routing", + "version": "v5.3.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "be865017746fe869007d94220ad3f5297951811b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/be865017746fe869007d94220ad3f5297951811b", + "reference": "be865017746fe869007d94220ad3f5297951811b", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/config": "<5.0", + "doctrine/annotations": "<1.12", + "symfony/config": "<5.3", "symfony/dependency-injection": "<4.4", "symfony/yaml": "<4.4" }, "require-dev": { - "doctrine/annotations": "~1.2", - "psr/log": "~1.0", - "symfony/config": "^5.0", + "doctrine/annotations": "^1.12", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.3", "symfony/dependency-injection": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/yaml": "^4.4|^5.0" }, "suggest": { - "doctrine/annotations": "For using the annotation loader", "symfony/config": "For using the all-in-one router or any loader", "symfony/expression-language": "For using expression matching", "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Routing\\": "" @@ -6122,7 +6969,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Routing Component", + "description": "Maps an HTTP request to a set of configuration variables", "homepage": "https://symfony.com", "keywords": [ "router", @@ -6130,6 +6977,9 @@ "uri", "url" ], + "support": { + "source": "https://github.com/symfony/routing/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6144,25 +6994,25 @@ "type": "tidelift" } ], - "time": "2020-08-10T08:03:57+00:00" + "time": "2021-08-04T21:42:42+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.1.3", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442" + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442", - "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.0" + "psr/container": "^1.1" }, "suggest": { "symfony/service-implementation": "" @@ -6170,7 +7020,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -6206,20 +7056,37 @@ "interoperability", "standards" ], - "time": "2020-07-06T13:23:11+00:00" + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-01T10:43:52+00:00" }, { "name": "symfony/string", - "version": "v5.1.5", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a" + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", - "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", + "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", "shasum": "" }, "require": { @@ -6237,11 +7104,6 @@ "symfony/var-exporter": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\String\\": "" @@ -6267,7 +7129,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony String component", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", "keywords": [ "grapheme", @@ -6277,6 +7139,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6291,27 +7156,28 @@ "type": "tidelift" } ], - "time": "2020-08-17T07:48:54+00:00" + "time": "2021-08-26T08:00:08+00:00" }, { "name": "symfony/translation", - "version": "v5.1.5", + "version": "v5.3.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "917b02cdc5f33e0309b8e9d33ee1480b20687413" + "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/917b02cdc5f33e0309b8e9d33ee1480b20687413", - "reference": "917b02cdc5f33e0309b8e9d33ee1480b20687413", + "url": "https://api.github.com/repos/symfony/translation/zipball/6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", + "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15", - "symfony/translation-contracts": "^2" + "symfony/polyfill-php80": "^1.16", + "symfony/translation-contracts": "^2.3" }, "conflict": { "symfony/config": "<4.4", @@ -6321,16 +7187,17 @@ "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "2.0" + "symfony/translation-implementation": "2.3" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^4.4|^5.0", "symfony/console": "^4.4|^5.0", "symfony/dependency-injection": "^5.0", "symfony/finder": "^4.4|^5.0", "symfony/http-kernel": "^5.0", "symfony/intl": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2", "symfony/yaml": "^4.4|^5.0" }, @@ -6340,12 +7207,10 @@ "symfony/yaml": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { + "files": [ + "Resources/functions.php" + ], "psr-4": { "Symfony\\Component\\Translation\\": "" }, @@ -6367,8 +7232,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Translation Component", + "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v5.3.9" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6383,20 +7251,20 @@ "type": "tidelift" } ], - "time": "2020-08-17T10:01:29+00:00" + "time": "2021-08-26T08:22:53+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.1.3", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63" + "reference": "95c812666f3e91db75385749fe219c5e494c7f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/616a9773c853097607cf9dd6577d5b143ffdcd63", - "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", + "reference": "95c812666f3e91db75385749fe219c5e494c7f95", "shasum": "" }, "require": { @@ -6408,7 +7276,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -6444,26 +7312,43 @@ "interoperability", "standards" ], - "time": "2020-07-06T13:23:11+00:00" + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.1.5", + "version": "v5.3.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b43a3905262bcf97b2510f0621f859ca4f5287be" + "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b43a3905262bcf97b2510f0621f859ca4f5287be", - "reference": "b43a3905262bcf97b2510f0621f859ca4f5287be", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eaaea4098be1c90c8285543e1356a09c8aa5c8da", + "reference": "eaaea4098be1c90c8285543e1356a09c8aa5c8da", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "conflict": { "phpunit/phpunit": "<5.4.3", @@ -6473,7 +7358,7 @@ "ext-iconv": "*", "symfony/console": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", - "twig/twig": "^2.4|^3.0" + "twig/twig": "^2.13|^3.0.4" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -6484,11 +7369,6 @@ "Resources/bin/var-dump-server" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "files": [ "Resources/functions/dump.php" @@ -6514,12 +7394,15 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony mechanism for exploring and dumping PHP variables", + "description": "Provides mechanisms for walking through any arbitrary PHP variable", "homepage": "https://symfony.com", "keywords": [ "debug", "dump" ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v5.3.8" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6534,7 +7417,7 @@ "type": "tidelift" } ], - "time": "2020-08-17T07:42:30+00:00" + "time": "2021-09-24T15:59:58+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -6583,41 +7466,47 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.3" + }, "time": "2020-07-13T06:12:54+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v4.1.8", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32" + "reference": "accaddf133651d4b5cf81a119f25296736ffc850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/572af79d913627a9d70374d27a6f5d689a35de32", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", + "reference": "accaddf133651d4b5cf81a119f25296736ffc850", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "5.3-dev" } }, "autoload": { @@ -6632,13 +7521,11 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "email": "hello@gjcampbell.co.uk" }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "email": "vance@vancelucas.com" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -6647,27 +7534,41 @@ "env", "environment" ], - "time": "2020-07-14T19:22:52+00:00" + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2021-10-02T19:24:42+00:00" }, { "name": "voku/portable-ascii", - "version": "1.5.3", + "version": "1.5.6", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "25bcbf01678930251fd572891447d9e318a6e2b8" + "reference": "80953678b19901e5165c56752d087fc11526017c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/25bcbf01678930251fd572891447d9e318a6e2b8", - "reference": "25bcbf01678930251fd572891447d9e318a6e2b8", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/80953678b19901e5165c56752d087fc11526017c", + "reference": "80953678b19901e5165c56752d087fc11526017c", "shasum": "" }, "require": { "php": ">=7.0.0" }, "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0" + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" }, "suggest": { "ext-intl": "Use Intl for transliterator_transliterate() support" @@ -6695,6 +7596,10 @@ "clean", "php" ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/1.5.6" + }, "funding": [ { "url": "https://www.paypal.me/moelleken", @@ -6717,41 +7622,101 @@ "type": "tidelift" } ], - "time": "2020-07-22T23:32:04+00:00" + "time": "2020-11-12T00:07:28+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v3.4.2", + "version": "v3.6.2", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "91ee8b3acf0d72a4937f4855bd245acbda9910ac" + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/91ee8b3acf0d72a4937f4855bd245acbda9910ac", - "reference": "91ee8b3acf0d72a4937f4855bd245acbda9910ac", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", "shasum": "" }, "require": { - "illuminate/routing": "^5.5|^6|^7", - "illuminate/session": "^5.5|^6|^7", - "illuminate/support": "^5.5|^6|^7", + "illuminate/routing": "^6|^7|^8", + "illuminate/session": "^6|^7|^8", + "illuminate/support": "^6|^7|^8", "maximebf/debugbar": "^1.16.3", - "php": ">=7.0", - "symfony/debug": "^3|^4|^5", - "symfony/finder": "^3|^4|^5" + "php": ">=7.2", + "symfony/debug": "^4.3|^5", + "symfony/finder": "^4.3|^5" }, "require-dev": { - "orchestra/testbench": "^3.5|^4.0|^5.0", - "phpunit/phpunit": "^6.0|^7.0|^8.5|^9.0" + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^4|^5|^6", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.5-dev" }, "laravel": { "providers": [ @@ -6788,46 +7753,49 @@ "profiler", "webprofiler" ], + "support": { + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" + }, "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, { "url": "https://github.com/barryvdh", "type": "github" } ], - "time": "2020-08-30T07:08:17+00:00" + "time": "2021-06-14T14:29:26+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -6841,7 +7809,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -6850,33 +7818,50 @@ "constructor", "instantiate" ], - "time": "2020-05-29T17:27:14+00:00" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" }, { "name": "facade/flare-client-php", - "version": "1.3.5", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "25907a113bfc212a38d458ae365bfb902b4e7fb8" + "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/25907a113bfc212a38d458ae365bfb902b4e7fb8", - "reference": "25907a113bfc212a38d458ae365bfb902b4e7fb8", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", + "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", "shasum": "" }, "require": { "facade/ignition-contracts": "~1.0", "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", - "php": "^7.1", + "php": "^7.1|^8.0", "symfony/http-foundation": "^3.3|^4.1|^5.0", "symfony/mime": "^3.4|^4.0|^5.1", "symfony/var-dumper": "^3.4|^4.0|^5.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", - "larapack/dd": "^1.1", "phpunit/phpunit": "^7.5.16", "spatie/phpunit-snapshot-assertions": "^2.0" }, @@ -6906,45 +7891,48 @@ "flare", "reporting" ], + "support": { + "issues": "https://github.com/facade/flare-client-php/issues", + "source": "https://github.com/facade/flare-client-php/tree/1.9.1" + }, "funding": [ { "url": "https://github.com/spatie", "type": "github" } ], - "time": "2020-08-26T18:06:23+00:00" + "time": "2021-09-13T12:16:46+00:00" }, { "name": "facade/ignition", - "version": "2.3.6", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "d7d05dba5a0bdbf018a2cb7be268f22f5d73eb81" + "reference": "3ee6e94815462bcf09bca0efc1c9069685df8da3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/d7d05dba5a0bdbf018a2cb7be268f22f5d73eb81", - "reference": "d7d05dba5a0bdbf018a2cb7be268f22f5d73eb81", + "url": "https://api.github.com/repos/facade/ignition/zipball/3ee6e94815462bcf09bca0efc1c9069685df8da3", + "reference": "3ee6e94815462bcf09bca0efc1c9069685df8da3", "shasum": "" }, "require": { + "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "facade/flare-client-php": "^1.0", - "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.4", + "facade/flare-client-php": "^1.9.1", + "facade/ignition-contracts": "^1.0.2", "illuminate/support": "^7.0|^8.0", "monolog/monolog": "^2.0", - "php": "^7.2.5", - "scrivo/highlight.php": "^9.15", + "php": "^7.2.5|^8.0", "symfony/console": "^5.0", "symfony/var-dumper": "^5.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", "mockery/mockery": "^1.3", - "orchestra/testbench": "5.0", + "orchestra/testbench": "^5.0|^6.0", "psalm/plugin-laravel": "^1.2" }, "suggest": { @@ -6984,29 +7972,35 @@ "laravel", "page" ], - "time": "2020-08-10T13:50:38+00:00" + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/facade/ignition/issues", + "source": "https://github.com/facade/ignition" + }, + "time": "2021-10-11T15:24:06+00:00" }, { "name": "facade/ignition-contracts", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/facade/ignition-contracts.git", - "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b" + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/aeab1ce8b68b188a43e81758e750151ad7da796b", - "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3|^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5|^8.0", - "vimeo/psalm": "^3.12" + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" }, "type": "library", "autoload": { @@ -7033,29 +8027,33 @@ "flare", "ignition" ], - "time": "2020-07-14T10:10:28+00:00" + "support": { + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + }, + "time": "2020-10-16T08:27:54+00:00" }, { "name": "filp/whoops", - "version": "2.7.3", + "version": "2.14.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d" + "reference": "f056f1fe935d9ed86e698905a957334029899895" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", - "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", + "url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895", + "reference": "f056f1fe935d9ed86e698905a957334029899895", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0", - "psr/log": "^1.0.1" + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "suggest": { @@ -7065,7 +8063,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { @@ -7094,30 +8092,41 @@ "throwable", "whoops" ], - "time": "2020-06-14T09:00:00+00:00" + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.4" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2021-10-03T12:00:00+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.9.1", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" + "reference": "5ffe7db6c80f441f150fc88008d64e64af66634b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/5ffe7db6c80f441f150fc88008d64e64af66634b", + "reference": "5ffe7db6c80f441f150fc88008d64e64af66634b", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0 || ^8.0" }, "require-dev": { "ext-intl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7", "squizlabs/php_codesniffer": "^2.9.2" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -7144,7 +8153,12 @@ "faker", "fixtures" ], - "time": "2019-12-12T13:22:17+00:00" + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/master" + }, + "abandoned": true, + "time": "2020-12-11T09:59:14+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7191,29 +8205,33 @@ "keywords": [ "test" ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, "time": "2020-07-09T08:09:16+00:00" }, { "name": "maximebf/debugbar", - "version": "v1.16.3", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372" + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/1a1605b8e9bacb34cc0c6278206d699772e1d372", - "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.1|^8", "psr/log": "^1.0", "symfony/var-dumper": "^2.6|^3|^4|^5" }, "require-dev": { - "phpunit/phpunit": "^5" + "phpunit/phpunit": "^7.5.20 || ^9.4.2" }, "suggest": { "kriswallsmith/assetic": "The best way to manage assets", @@ -7223,7 +8241,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -7252,20 +8270,24 @@ "debug", "debugbar" ], - "time": "2020-05-06T07:06:27+00:00" + "support": { + "issues": "https://github.com/maximebf/php-debugbar/issues", + "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" + }, + "time": "2021-08-01T09:19:02+00:00" }, { "name": "mockery/mockery", - "version": "1.4.2", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "20cab678faed06fac225193be281ea0fddb43b93" + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/20cab678faed06fac225193be281ea0fddb43b93", - "reference": "20cab678faed06fac225193be281ea0fddb43b93", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", "shasum": "" }, "require": { @@ -7320,20 +8342,24 @@ "test double", "testing" ], - "time": "2020-08-11T18:10:13+00:00" + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.4.4" + }, + "time": "2021-09-13T15:28:59+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.1", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { @@ -7368,39 +8394,48 @@ "object", "object graph" ], - "time": "2020-06-29T13:22:24+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" }, { "name": "nunomaduro/collision", - "version": "v4.2.0", + "version": "v5.10.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "d50490417eded97be300a92cd7df7badc37a9018" + "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/d50490417eded97be300a92cd7df7badc37a9018", - "reference": "d50490417eded97be300a92cd7df7badc37a9018", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/3004cfa49c022183395eabc6d0e5207dfe498d00", + "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.4", - "php": "^7.2.5", + "filp/whoops": "^2.14.3", + "php": "^7.3 || ^8.0", "symfony/console": "^5.0" }, "require-dev": { - "facade/ignition": "^2.0", - "fideloper/proxy": "^4.2", - "friendsofphp/php-cs-fixer": "^2.16", - "fruitcake/laravel-cors": "^1.0", - "laravel/framework": "^7.0", - "laravel/tinker": "^2.0", - "nunomaduro/larastan": "^0.5", - "orchestra/testbench": "^5.0", - "phpstan/phpstan": "^0.12.3", - "phpunit/phpunit": "^8.5.1 || ^9.0" + "brianium/paratest": "^6.1", + "fideloper/proxy": "^4.4.1", + "fruitcake/laravel-cors": "^2.0.3", + "laravel/framework": "8.x-dev", + "nunomaduro/larastan": "^0.6.2", + "nunomaduro/mock-final-classes": "^1.0", + "orchestra/testbench": "^6.0", + "phpstan/phpstan": "^0.12.64", + "phpunit/phpunit": "^9.5.0" }, "type": "library", "extra": { @@ -7438,32 +8473,51 @@ "php", "symfony" ], - "time": "2020-04-04T19:56:08+00:00" + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-09-20T15:06:32+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -7493,24 +8547,28 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -7540,7 +8598,11 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -7589,20 +8651,24 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.1", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d870572532cd70bc3fab58f2e23ad423c8404c44", - "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { @@ -7641,20 +8707,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-08-15T11:14:08+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.3.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -7662,7 +8732,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -7686,37 +8757,41 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-27T10:12:23+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + }, + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "1.11.1", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2", - "phpdocumentor/reflection-docblock": "^5.0", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0" + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -7749,44 +8824,52 @@ "spy", "stub" ], - "time": "2020-07-08T12:44:21+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + }, + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "9.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.12.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -7812,32 +8895,42 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-09-17T05:39:03+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -7862,26 +8955,107 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -7903,32 +9077,42 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -7952,105 +9136,69 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.8", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -8058,12 +9206,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -8084,44 +9235,51 @@ "testing", "xunit" ], - "time": "2020-06-22T07:06:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-09-25T07:38:51+00:00" }, { - "name": "scrivo/highlight.php", - "version": "v9.18.1.2", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/scrivo/highlight.php.git", - "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/efb6e445494a9458aa59b0af5edfa4bdcc6809d9", - "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=5.4" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8|^5.7", - "sabberworm/php-css-parser": "^8.3", - "symfony/finder": "^2.8|^3.4", - "symfony/var-dumper": "^2.8|^3.4" - }, - "suggest": { - "ext-dom": "Needed to make use of the features in the utilities namespace" + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { - "psr-0": { - "Highlight\\": "", - "HighlightUtilities\\": "" - }, - "files": [ - "HighlightUtilities/functions.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -8130,61 +9288,105 @@ ], "authors": [ { - "name": "Geert Bergman", - "homepage": "http://www.scrivo.org/", - "role": "Project Author" - }, - { - "name": "Vladimir Jimenez", - "homepage": "https://allejo.io", - "role": "Maintainer" - }, - { - "name": "Martin Folkers", - "homepage": "https://twobrain.io", - "role": "Contributor" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js", - "keywords": [ - "code", - "highlight", - "highlight.js", - "highlight.php", - "syntax" - ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, "funding": [ { - "url": "https://github.com/allejo", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-08-27T03:24:44+00:00" + "time": "2020-09-28T06:08:49+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" } }, "autoload": { @@ -8204,34 +9406,44 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -8244,6 +9456,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -8255,10 +9471,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -8268,33 +9480,43 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" }, { - "name": "sebastian/diff", - "version": "3.0.2", + "name": "sebastian/complexity", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", "shasum": "" }, "require": { - "php": "^7.1" + "nikic/php-parser": "^4.7", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -8308,12 +9530,69 @@ ], "authors": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -8324,27 +9603,37 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -8352,7 +9641,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -8377,34 +9666,44 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -8444,30 +9743,40 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { - "php": "^7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -8475,7 +9784,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -8498,34 +9807,101 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.3", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "nikic/php-parser": "^4.6", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" } }, "autoload": { @@ -8545,122 +9921,37 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "shasum": "" - }, - "require": { - "php": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -8683,34 +9974,162 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "sebastian/type", - "version": "1.1.3", + "name": "sebastian/recursion-context", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" } }, "autoload": { @@ -8731,29 +10150,39 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -8774,26 +10203,35 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "symfony/debug", - "version": "v4.4.13", + "version": "v4.4.31", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "aeb73aca16a8f1fe958230fe44e6cf4c84cbb85e" + "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/aeb73aca16a8f1fe958230fe44e6cf4c84cbb85e", - "reference": "aeb73aca16a8f1fe958230fe44e6cf4c84cbb85e", + "url": "https://api.github.com/repos/symfony/debug/zipball/43ede438d4cb52cd589ae5dc070e9323866ba8e0", + "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0", "shasum": "" }, "require": { "php": ">=7.1.3", - "psr/log": "~1.0", - "symfony/polyfill-php80": "^1.15" + "psr/log": "^1|^2|^3" }, "conflict": { "symfony/http-kernel": "<3.4" @@ -8802,11 +10240,6 @@ "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" @@ -8829,8 +10262,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.31" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -8845,20 +10281,20 @@ "type": "tidelift" } ], - "time": "2020-08-10T07:47:39+00:00" + "time": "2021-09-24T13:30:14+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -8885,56 +10321,17 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2020-07-12T23:59:07+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.9.1", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "url": "https://github.com/theseer", + "type": "github" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-07-28T10:34:58+00:00" } ], "aliases": [], @@ -8943,10 +10340,10 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.2.5", + "php": "^8.0", "ext-imagick": "*", "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.1.0" } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 741edea..eb55ae0 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,6 +2,8 @@ /** @var \Illuminate\Database\Eloquent\Factory $factory */ +namespace Database\Factories; + use App\User; use Faker\Generator as Faker; use Illuminate\Support\Str; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php new file mode 100644 index 0000000..c70a928 --- /dev/null +++ b/database/seeders/DatabaseSeeder.php @@ -0,0 +1,20 @@ +call(\Database\Seeders\PermissionSeeder::class); + $this->call(\Database\Seeders\UserSeeder::class); + $this->call(\Database\Seeders\DefaultOptionsSeeder::class); + } +} diff --git a/database/seeds/DefaultOptionsSeeder.php b/database/seeders/DefaultOptionsSeeder.php similarity index 97% rename from database/seeds/DefaultOptionsSeeder.php rename to database/seeders/DefaultOptionsSeeder.php index 90e73c5..1940264 100644 --- a/database/seeds/DefaultOptionsSeeder.php +++ b/database/seeders/DefaultOptionsSeeder.php @@ -1,4 +1,5 @@ call(PermissionSeeder::class); - $this->call(UserSeeder::class); - $this->call(DefaultOptionsSeeder::class); - } -} diff --git a/public/index.php b/public/index.php index 4584cbc..26e536a 100644 --- a/public/index.php +++ b/public/index.php @@ -9,6 +9,10 @@ define('LARAVEL_START', microtime(true)); +if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) { + require __DIR__.'/../storage/framework/maintenance.php'; +} + /* |-------------------------------------------------------------------------- | Register The Auto Loader From 8d1e39c43c6f9b8d90220a4ee61f9f10881d62c6 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Tue, 12 Oct 2021 22:41:24 +0100 Subject: [PATCH 6/8] Replaced ConnectException with ConnectionException This exception is thrown and handled when Mojang servers are down. --- app/Providers/MojangStatusProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Providers/MojangStatusProvider.php b/app/Providers/MojangStatusProvider.php index 3fe4dc1..b369879 100644 --- a/app/Providers/MojangStatusProvider.php +++ b/app/Providers/MojangStatusProvider.php @@ -2,12 +2,12 @@ namespace App\Providers; -use GuzzleHttp\Exception\ConnectException; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\View; +use Illuminate\Http\Client\ConnectionException; class MojangStatusProvider extends ServiceProvider { @@ -38,7 +38,7 @@ class MojangStatusProvider extends ServiceProvider $mcstatus = Http::get(config('general.urls.mojang.statuscheck')); Cache::put('mojang_status', base64_encode($mcstatus->body()), now()->addDays(3)); } - catch(ConnectException $connectException) + catch(ConnectionException $connectException) { Log::critical('Could not connect to Mojang servers: Cannot check/refresh status', [ 'message' => $connectException->getMessage() From d8e836980ab4b01ea88443c60633b9bde6facca5 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Tue, 12 Oct 2021 22:46:43 +0100 Subject: [PATCH 7/8] Move seeder to right place --- composer.json | 9 +++++---- database/seeders/DatabaseSeeder.php | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index bf90ae1..85eeb76 100644 --- a/composer.json +++ b/composer.json @@ -48,10 +48,11 @@ }, "autoload": { "psr-4": { - "App\\": "app/" - }, - "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/" + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" + } + }, "autoload-dev": { "psr-4": { diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index c70a928..8fd1b20 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -16,5 +16,6 @@ class DatabaseSeeder extends Seeder $this->call(\Database\Seeders\PermissionSeeder::class); $this->call(\Database\Seeders\UserSeeder::class); $this->call(\Database\Seeders\DefaultOptionsSeeder::class); + $this->call(\Database\Seeders\NewPermissions::class); } } From 92679e94d597309a0854249521e8ce49873e8b02 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Tue, 12 Oct 2021 23:01:15 +0100 Subject: [PATCH 8/8] Add unknown MC status placeholder to cache --- app/Providers/MojangStatusProvider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Providers/MojangStatusProvider.php b/app/Providers/MojangStatusProvider.php index b369879..f9cc93b 100644 --- a/app/Providers/MojangStatusProvider.php +++ b/app/Providers/MojangStatusProvider.php @@ -28,6 +28,8 @@ class MojangStatusProvider extends ServiceProvider */ public function boot() { + $unknown_status = '[{"minecraft.net":"red"},{"session.minecraft.net":"red"},{"account.mojang.com":"red"},{"authserver.mojang.com":"red"},{"sessionserver.mojang.com":"red"},{"api.mojang.com":"red"},{"textures.minecraft.net":"red"},{"mojang.com":"red"}]'; + // TODO: (IMPORTANT) Switch this to Middleware if (!Cache::has('mojang_status')) { @@ -40,6 +42,10 @@ class MojangStatusProvider extends ServiceProvider } catch(ConnectionException $connectException) { + // Shorter TTL because mojang status server might have recovered + Cache::put('mojang_status', base64_encode($unknown_status), now()->addMinutes(60)); + + Log::alert('Writing unknown Mojang status placeholder to cache'); Log::critical('Could not connect to Mojang servers: Cannot check/refresh status', [ 'message' => $connectException->getMessage() ]);