diff --git a/app/Http/Controllers/AuthorEmploymentController.php b/app/Http/Controllers/AuthorEmploymentController.php index 1d65e4c9..6214f9ff 100644 --- a/app/Http/Controllers/AuthorEmploymentController.php +++ b/app/Http/Controllers/AuthorEmploymentController.php @@ -16,7 +16,7 @@ class AuthorEmploymentController extends Controller */ public function index(Author $author) { - //validate user can do this + // validate user can do this $this->authorize('viewAny', [AuthorEmployment::class, $author]); return AuthorEmploymentResource::collection($author->employments()->orderByDesc('start_date')->with('organization')->get()); diff --git a/app/Http/Controllers/ManuscriptAuthorController.php b/app/Http/Controllers/ManuscriptAuthorController.php index f744c93c..9a1a3fc8 100644 --- a/app/Http/Controllers/ManuscriptAuthorController.php +++ b/app/Http/Controllers/ManuscriptAuthorController.php @@ -78,7 +78,7 @@ public function update(Request $request, ManuscriptRecord $manuscriptRecord, Man Gate::authorize('update', $manuscriptRecord); $validated = $request->validate([ - //'author_id' => 'integer|exists:authors,id', + // 'author_id' => 'integer|exists:authors,id', 'is_corresponding_author' => 'boolean', 'organization_id' => 'integer|exists:organizations,id', ]); diff --git a/app/Http/Controllers/PublicationAuthorController.php b/app/Http/Controllers/PublicationAuthorController.php index 91e2e9bc..f4bd2c38 100644 --- a/app/Http/Controllers/PublicationAuthorController.php +++ b/app/Http/Controllers/PublicationAuthorController.php @@ -74,7 +74,7 @@ public function update(Request $request, Publication $publication, PublicationAu Gate::authorize('update', $publication); $validated = $request->validate([ - //'author_id' => 'integer|exists:authors,id', + // 'author_id' => 'integer|exists:authors,id', 'is_corresponding_author' => 'boolean', 'organization_id' => 'integer|exists:organizations,id', ]); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 0918e856..6d2dd9fb 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -20,7 +20,7 @@ class Kernel extends HttpKernel \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, - //Removed for ManuscriptRecords empty string as valid value + // Removed for ManuscriptRecords empty string as valid value \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, ]; diff --git a/app/Http/Resources/ManuscriptRecordResource.php b/app/Http/Resources/ManuscriptRecordResource.php index 7427caea..61d08af5 100644 --- a/app/Http/Resources/ManuscriptRecordResource.php +++ b/app/Http/Resources/ManuscriptRecordResource.php @@ -48,7 +48,7 @@ public function toArray($request) 'accepted_on' => $this->accepted_on, 'withdrawn_on' => $this->withdrawn_on, - //relationships - if loaded + // relationships - if loaded 'region' => RegionResource::make($this->whenLoaded('region')), 'functional_area' => FunctionalAreaResource::make($this->whenLoaded('functionalArea')), 'manuscript_authors' => ManuscriptAuthorResource::collection($this->whenLoaded('manuscriptAuthors')), diff --git a/app/Http/Resources/ManuscriptRecordSummaryResource.php b/app/Http/Resources/ManuscriptRecordSummaryResource.php index d60f6cfe..63270010 100644 --- a/app/Http/Resources/ManuscriptRecordSummaryResource.php +++ b/app/Http/Resources/ManuscriptRecordSummaryResource.php @@ -34,7 +34,7 @@ public function toArray($request) 'submitted_to_journal_on' => $this->submitted_to_journal_on, 'accepted_on' => $this->accepted_on, 'withdrawn_on' => $this->withdrawn_on, - //relationships - if loaded + // relationships - if loaded 'region' => RegionResource::make($this->whenLoaded('region')), 'manuscript_authors' => ManuscriptAuthorResource::collection($this->whenLoaded('manuscriptAuthors')), 'user' => UserResource::make($this->whenLoaded('user')), diff --git a/app/Jobs/SyncAuthorEmploymentWithOrcid.php b/app/Jobs/SyncAuthorEmploymentWithOrcid.php index b62611bc..68344755 100644 --- a/app/Jobs/SyncAuthorEmploymentWithOrcid.php +++ b/app/Jobs/SyncAuthorEmploymentWithOrcid.php @@ -78,7 +78,7 @@ private function createEmploymentRecordInOrcid(OrcidMemberAPIConnector $connecto // there should be no putcode here; the only scneario where this // is usefull is when the record is being updated after being - //mistakenly deleted in ORCID profile by user. + // mistakenly deleted in ORCID profile by user. $employmentData->putCode = Optional::create(); $request = new PostEmploymentRequest($employmentData); diff --git a/app/Models/ManuscriptRecord.php b/app/Models/ManuscriptRecord.php index a5942741..9b9a29a1 100644 --- a/app/Models/ManuscriptRecord.php +++ b/app/Models/ManuscriptRecord.php @@ -351,5 +351,5 @@ public function validateIsFilled(bool $noExceptions = false): bool return $validator->passes(); } - /// Scope methods + // / Scope methods } diff --git a/app/Policies/PublicationPolicy.php b/app/Policies/PublicationPolicy.php index b104cba2..47e995a3 100644 --- a/app/Policies/PublicationPolicy.php +++ b/app/Policies/PublicationPolicy.php @@ -93,7 +93,7 @@ public function downloadMedia(User $user, Publication $publication, Media $media return $user->can('view', $publication->manuscriptRecord); } - //if it's a publication file and not under embargo, then it can be downloaded + // if it's a publication file and not under embargo, then it can be downloaded if ($media->collection_name === MediaCollection::PUBLICATION->value) { return ! $publication->isUnderEmbargo(); } diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index 63434b45..47a17866 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -29,7 +29,7 @@ public function view(User $user, User $model) { // a user can view their own profile return true; - //return $user->id === $model->id; + // return $user->id === $model->id; } /** diff --git a/app/Rules/Ocrid.php b/app/Rules/Ocrid.php index d1cf4f0d..220e0e66 100644 --- a/app/Rules/Ocrid.php +++ b/app/Rules/Ocrid.php @@ -19,7 +19,7 @@ public function validate(string $attribute, mixed $value, Closure $fail): void $fail(__('validation.orcid.prefix', ['attribute' => $attribute])); } - //check remainder against only the ORCID part + // check remainder against only the ORCID part $orcid = Str::substr($value, -19); // check value against regex diff --git a/config/media-library.php b/config/media-library.php index 9b396383..ecf67b55 100644 --- a/config/media-library.php +++ b/config/media-library.php @@ -108,7 +108,7 @@ '-m 6', // for the slowest compression method in order to get the best compression. '-pass 10', // for maximizing the amount of analysis pass. '-mt', // multithreading for some speed improvements. - '-q 90', //quality factor that brings the least noticeable changes. + '-q 90', // quality factor that brings the least noticeable changes. ], ], diff --git a/config/permission.php b/config/permission.php index 5b6e184c..f7c8f5a9 100644 --- a/config/permission.php +++ b/config/permission.php @@ -75,8 +75,8 @@ /* * Change this if you want to name the related pivots other than defaults */ - 'role_pivot_key' => null, //default 'role_id', - 'permission_pivot_key' => null, //default 'permission_id', + 'role_pivot_key' => null, // default 'role_id', + 'permission_pivot_key' => null, // default 'permission_id', /* * Change this if you want to name the related model primary key other than diff --git a/database/migrations/2022_10_27_195706_create_journals_table.php b/database/migrations/2022_10_27_195706_create_journals_table.php index 747ed4eb..a2693b69 100644 --- a/database/migrations/2022_10_27_195706_create_journals_table.php +++ b/database/migrations/2022_10_27_195706_create_journals_table.php @@ -25,7 +25,7 @@ public function up() $table->string('publisher', 255); // add index for title_en - //$table->index('title_en'); + // $table->index('title_en'); }); } }; diff --git a/tests/Feature/Auth/EmailVerificationTest.php b/tests/Feature/Auth/EmailVerificationTest.php index 6f503945..8d62e944 100644 --- a/tests/Feature/Auth/EmailVerificationTest.php +++ b/tests/Feature/Auth/EmailVerificationTest.php @@ -66,7 +66,7 @@ public function test_email_can_be_verified_for_user_with_invitation() $this->assertNotNull($user->invitation->registered_at); $this->assertTrue($user->hasVerifiedEmail()); - //$this->assertNull($user->email_verification_token); //disabled because of MS SafeLink + // $this->assertNull($user->email_verification_token); //disabled because of MS SafeLink $this->assertTrue($user->active); $response->assertRedirect(config('app.frontend_url').'#/auth/login?verified=1'.'&email='.$user->email); diff --git a/tests/Feature/ManuscriptRecordSharingTest.php b/tests/Feature/ManuscriptRecordSharingTest.php index 53484257..e6381cb7 100644 --- a/tests/Feature/ManuscriptRecordSharingTest.php +++ b/tests/Feature/ManuscriptRecordSharingTest.php @@ -258,7 +258,7 @@ $mailable->assertSeeInHtml($shareable->shareable->title); $mailable->assertSeeInHtml(now()->addDays(5)->format('Y-m-d')); - //check with null expires_at + // check with null expires_at $shareable->update(['expires_at' => null]); ray($mailable); diff --git a/tests/Feature/Models/ManuscriptAuthorTest.php b/tests/Feature/Models/ManuscriptAuthorTest.php index 694abfdb..7561fcf3 100644 --- a/tests/Feature/Models/ManuscriptAuthorTest.php +++ b/tests/Feature/Models/ManuscriptAuthorTest.php @@ -52,7 +52,7 @@ // this is there as if it doesn't exist we can't tell the frontend // if the user can update or delete the record (e.g. AuthorChip) - //dd('data', $response->json('can')); + // dd('data', $response->json('can')); expect($response->json('can'))->toMatchArray([ 'update' => true, diff --git a/tests/Feature/Models/PublicationTest.php b/tests/Feature/Models/PublicationTest.php index be38057d..50d416c5 100644 --- a/tests/Feature/Models/PublicationTest.php +++ b/tests/Feature/Models/PublicationTest.php @@ -241,7 +241,7 @@ $response->assertCreated(); expect($response->json('data.file_name'))->toBe('test.pdf'); expect($response->json('data.uuid'))->toBeString(); - //expect($response->json('data.publication_pdf'))->not()->toBeNull(); + // expect($response->json('data.publication_pdf'))->not()->toBeNull(); $uuid = $response->json('data.uuid'); diff --git a/tests/Feature/Models/UserManuscriptRecordListTest.php b/tests/Feature/Models/UserManuscriptRecordListTest.php index 30dcc101..c1cd886e 100644 --- a/tests/Feature/Models/UserManuscriptRecordListTest.php +++ b/tests/Feature/Models/UserManuscriptRecordListTest.php @@ -51,18 +51,18 @@ $response = $this->actingAs($user)->getJson('/api/my/manuscript-records?include-reviews=true')->assertOk(); expect($response->json('data'))->toHaveCount(3); - //filter by status - just draft + // filter by status - just draft $response = $this->actingAs($user)->getJson('/api/my/manuscript-records?filter[status]='.ManuscriptRecordStatus::DRAFT->value)->assertOk(); expect($response->json('data'))->toHaveCount(2); $manuscript2->status = ManuscriptRecordStatus::ACCEPTED; $manuscript2->save(); - //filter by status - just in review + // filter by status - just in review $response = $this->actingAs($user)->getJson('/api/my/manuscript-records?include-reviews=true&filter[status]='.ManuscriptRecordStatus::IN_REVIEW->value)->assertOk(); expect($response->json('data'))->toHaveCount(1); - //filter by status - just accepted + // filter by status - just accepted $response = $this->actingAs($user)->getJson('/api/my/manuscript-records?include-reviews=true&filter[status]='.ManuscriptRecordStatus::ACCEPTED->value)->assertOk(); expect($response->json('data'))->toHaveCount(1); });