Skip to content

Introducing PeriodicEvents instead of EventTriggers #532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Jun 6, 2024

Conversation

kdmnk
Copy link
Contributor

@kdmnk kdmnk commented May 16, 2024

See #421 (comment) for the description behind the idea.
The HasPeriodicEvent trait is going to be used by controllers (eg. ApplicationController)
Other PRs will come to update the existing logic (applications, semester evaluation, etc) one by one.
I just seperated it to multiple PRs, which also means that some test cases are commented out temporarily.
I'll post these in some days in case it's hard to understand without the use cases (or you can check here: #525).
Please let me know if you have questions so I can improve the readablity

Summary by CodeRabbit

  • New Features

    • Introduced periodic event handling, including start, reminder, and end actions.
    • Added new email notifications for evaluation form availability, reminders, and closure.
    • Added functionality to manage voting periods and application deadlines.
  • Bug Fixes

    • Updated validation keys and translations in English and Hungarian language files.
  • Tests

    • Enhanced test coverage for periodic events and status updates.
    • Added new test methods for PeriodicEvent and related functionalities.
  • Chores

    • Updated .gitignore to include new directories.
    • Adjusted environment variable configurations in .env.example.
  • Documentation

    • Updated documentation to reflect new methods and functionalities for periodic events and evaluations.

@kdmnk kdmnk requested a review from a team as a code owner May 16, 2024 15:14
Copy link
Contributor

coderabbitai bot commented May 16, 2024

Warning

Review failed

The head commit changed during the review from 9b38164 to 88af3e3.

Walkthrough

This update introduces significant enhancements to the handling of periodic events within the application. Key changes include adding new methods to manage event statuses, reminders, and deadlines in the PeriodicEvent model and related classes. Additionally, the .gitignore file is updated, and migrations for creating and modifying event tables are included. Observers and job classes are introduced to automate event processing, and new test cases ensure robust validation of these functionalities.

Changes

File/Path Summary
.gitignore Added /data and .phpunit.cache/.
app/Jobs/PeriodicEventsProcessor.php Added handle() method to process periodic events.
app/Models/PeriodicEvent.php Added methods for event deadlines, reminders, activity status, and extensions.
app/Observers/PeriodicEventObserver.php Added methods to handle created, updated, deleted, restored, and forceDeleted events.
app/Providers/EventServiceProvider.php Registered PeriodicEventObserver for PeriodicEvent.
app/Utils/HasPeriodicEvent.php Added methods to handle periodic event reminders and check activity status and extensions.
bootstrap/app.php Reordered middleware and updated job instantiations for scheduling.
database/migrations/2020_06_09_104537_... Commented out code related to creating EventTrigger instances.
database/migrations/2023_05_29_174603_... Commented out line that deletes an EventTrigger record with ID 0.
database/migrations/2024_04_06_222031_... Added migration to create periodic_events table.
database/seeders/DatabaseSeeder.php Temporarily set mail driver to 'log' in run() method.
resources/lang/en/validation.php Added new validation keys for 'now', 'start date', 'extended end date', and 'show until'.
resources/lang/hu/validation.php Added Hungarian translations for 'start date', 'extended end date', and 'show until'.
tests/Feature/PeriodicEventTest.php Added test methods for various scenarios related to periodic events.
tests/Feature/EvaluationFormTest.php Commented out blocks of code related to updating event triggers and configurations in test functions.

In code we trust, our logic's tune,
Events now dance from dawn to noon.
With reminders set and deadlines clear,
Our app's new features bring much cheer.
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

This commit fixes the style issues introduced in d3c1f1e according to the output
from PHP CS Fixer.

Details: #532
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Out of diff range and nitpick comments (1)
app/Observers/PeriodicEventObserver.php (1)

12-15: Consider adding logic to handle created, deleted, restored, and forceDeleted events.

Also applies to: 33-35, 41-43, 49-51

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 3b26eb1 and d3c1f1e.
Files selected for processing (14)
  • .gitignore (1 hunks)
  • app/Jobs/PeriodicEventsProcessor.php (1 hunks)
  • app/Models/PeriodicEvent.php (1 hunks)
  • app/Observers/PeriodicEventObserver.php (1 hunks)
  • app/Providers/EventServiceProvider.php (2 hunks)
  • app/Utils/HasPeriodicEvent.php (1 hunks)
  • bootstrap/app.php (2 hunks)
  • database/migrations/2020_06_09_104537_create_event_triggers_table.php (2 hunks)
  • database/migrations/2023_05_29_174603_modfiy_event_triggers.php (2 hunks)
  • database/migrations/2024_04_06_222031_create_periodic_events.php (1 hunks)
  • database/seeders/DatabaseSeeder.php (1 hunks)
  • resources/lang/en/validation.php (1 hunks)
  • resources/lang/hu/validation.php (1 hunks)
  • tests/Feature/PeriodicEventTest.php (1 hunks)
Files not reviewed due to errors (1)
  • resources/lang/en/validation.php (no review received)
Files skipped from review due to trivial changes (3)
  • .gitignore
  • database/migrations/2020_06_09_104537_create_event_triggers_table.php
  • database/migrations/2023_05_29_174603_modfiy_event_triggers.php
Additional comments not posted (31)
database/seeders/DatabaseSeeder.php (1)

16-17: Good practice to log emails during seeding.

Also applies to: 24-25

database/migrations/2024_04_06_222031_create_periodic_events.php (1)

7-36: Migration looks good.

app/Observers/PeriodicEventObserver.php (1)

20-28: LGTM! The logic for resetting handled fields is clear.

app/Providers/EventServiceProvider.php (1)

8-8: Observer registration looks good.

Also applies to: 14-14, 53-53

bootstrap/app.php (1)

7-9: LGTM! The imports are correct and necessary for the scheduled jobs.

app/Models/PeriodicEvent.php (6)

64-67: LGTM! The method correctly defines the relationship with the Semester model.


72-75: LGTM! The method correctly returns the start date of the periodic event.


80-83: LGTM! The method correctly returns the end date of the periodic event.


88-91: LGTM! The method correctly returns the deadline of the periodic event.


98-107: LGTM! The method correctly checks if the periodic event is currently active.


112-115: LGTM! The method correctly checks if the end date of the periodic event has been extended.

app/Utils/HasPeriodicEvent.php (11)

34-49: LGTM! The method correctly returns the current periodic event connected to the model.


60-71: LGTM! The method correctly creates or updates the current periodic event connected to the model.


77-80: LGTM! The method correctly handles the start of a periodic event.


85-88: LGTM! The method correctly handles the end of a periodic event.


94-97: LGTM! The method correctly handles reminders for a periodic event.


104-107: LGTM! The method correctly checks if the periodic event is currently active.


112-115: LGTM! The method correctly checks if the end date of the periodic event has been extended.


120-123: LGTM! The method correctly returns the start date of the periodic event.


128-131: LGTM! The method correctly returns the end date of the periodic event.


136-139: LGTM! The method correctly returns the deadline of the periodic event.


144-147: LGTM! The method correctly returns the semester of the periodic event.

tests/Feature/PeriodicEventTest.php (8)

19-36: LGTM! The test correctly verifies the active state of a periodic event.


41-52: LGTM! The test correctly verifies that a passed periodic event is null.


57-73: LGTM! The test correctly verifies the state of a passed but still shown periodic event.


78-93: LGTM! The test correctly verifies the state of a passed but extended periodic event.


98-108: LGTM! The test correctly verifies that a periodic event that has passed its extended end date is null.


113-129: LGTM! The test correctly verifies the state of a periodic event that has passed its extended end date but is still shown.


134-146: LGTM! The test correctly verifies the state of a future periodic event.


151-173: LGTM! The test correctly verifies the retrieval of the latest periodic event based on the start date.

resources/lang/hu/validation.php (1)

52-55: Translation keys for periodic events look good.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between d3c1f1e and e5e9c24.
Files selected for processing (1)
  • app/Jobs/PeriodicEventsProcessor.php (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/Jobs/PeriodicEventsProcessor.php

kdmnk and others added 3 commits May 16, 2024 17:23
This commit fixes the style issues introduced in 2da5b89 according to the output
from PHP CS Fixer.

Details: #532
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between e5e9c24 and 2da5b89.
Files selected for processing (3)
  • app/Models/PeriodicEvent.php (1 hunks)
  • resources/lang/hu/validation.php (1 hunks)
  • tests/Feature/EvaluationFormTest.php (3 hunks)
Files skipped from review due to trivial changes (1)
  • tests/Feature/EvaluationFormTest.php
Files skipped from review as they are similar to previous changes (2)
  • app/Models/PeriodicEvent.php
  • resources/lang/hu/validation.php

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 2da5b89 and 3fa49e8.
Files selected for processing (1)
  • tests/Feature/EvaluationFormTest.php (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tests/Feature/EvaluationFormTest.php

kdmnk and others added 3 commits May 19, 2024 21:09
This commit fixes the style issues introduced in f8cfbc2 according to the output
from PHP CS Fixer.

Details: #532
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Out of diff range and nitpick comments (1)
app/Models/PeriodicEvent.php (1)

47-157: Ensure proper documentation for methods and properties.

The class PeriodicEvent is well-structured, but consider adding more detailed descriptions in the docstrings for methods like handleStart, handleEnd, and handleReminder to explain what exactly these methods are supposed to do, especially since they interact with other components via the event_model.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 3fa49e8 and 922f480.
Files selected for processing (6)
  • app/Jobs/PeriodicEventsProcessor.php (1 hunks)
  • app/Models/PeriodicEvent.php (1 hunks)
  • app/Providers/EventServiceProvider.php (1 hunks)
  • app/Utils/HasPeriodicEvent.php (1 hunks)
  • bootstrap/app.php (2 hunks)
  • database/migrations/2024_04_06_222031_create_periodic_events.php (1 hunks)
Files skipped from review as they are similar to previous changes (5)
  • app/Jobs/PeriodicEventsProcessor.php
  • app/Providers/EventServiceProvider.php
  • app/Utils/HasPeriodicEvent.php
  • bootstrap/app.php
  • database/migrations/2024_04_06_222031_create_periodic_events.php
Additional comments not posted (6)
app/Models/PeriodicEvent.php (6)

68-71: LGTM! Properly implemented relationship method.

The semester method correctly establishes a BelongsTo relationship with the Semester class, which is a standard practice in Eloquent ORM.


76-79: LGTM! Correct usage of Carbon for date handling.

The startDate method appropriately uses Carbon::parse to handle date conversion, which is robust for date manipulations in Laravel.


84-87: LGTM! Efficient handling of extended dates.

The endDate method smartly handles the possibility of an extended end date by checking if extended_end_date is not null before defaulting to end_date. This is a clean implementation of conditional logic in date handling.


116-119: LGTM! Clear implementation of extension check.

The isExtended method is straightforward and effectively checks if extended_end_date is not null to determine if the event date has been extended.


124-131: Ensure error handling in dynamic method calls.

The handleStart method dynamically calls a method on a model resolved from event_model. Ensure that this model always implements the expected interface to handle the start of the event. Consider adding error handling or interface checks to prevent runtime errors.


136-143: Add error handling for dynamic interactions.

Similar to handleStart, the handleEnd method involves dynamic method calls. Verify that the called method exists and handles errors gracefully to avoid disruptions in the application flow.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 922f480 and 58a6574.
Files selected for processing (1)
  • app/Models/PeriodicEvent.php (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/Models/PeriodicEvent.php

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 58a6574 and be9520c.
Files selected for processing (1)
  • .gitignore (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .gitignore

@kdmnk
Copy link
Contributor Author

kdmnk commented May 19, 2024

@viktorcsimma is this understandable for you?
You can check how I use this for example at the SemesterEvaluationController (as that is the most advanced) here: app/Http/Controllers/Secretariat/SemesterEvaluationController.php

@kdmnk
Copy link
Contributor Author

kdmnk commented Jun 3, 2024

I merged in the modified controllers that uses this, so now it's a fairly big PR.
I'm ready to merge and test on staging, but I'd still appreciate some feedback regarding readability.

@kdmnk kdmnk linked an issue Jun 3, 2024 that may be closed by this pull request
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Outside diff range and nitpick comments (2)
resources/views/secretariat/evaluation-form/period.blade.php (1)

22-25: Consider caching the results of start_handled and end_handled to avoid repeated database queries.

app/Http/Controllers/Auth/ApplicationController.php (1)

80-81: Use caching for frequently accessed data like deadlines to improve performance.

Consider implementing caching for the deadline and extended deadline checks to reduce database load, especially if these values are frequently accessed but rarely changed.

Tools
PHPStan

80-80: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


81-81: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::isExtended().

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between be9520c and 88af3e3.

Files selected for processing (32)
  • .env.example (1 hunks)
  • app/Http/Controllers/Auth/ApplicationController.php (10 hunks)
  • app/Http/Controllers/Secretariat/SemesterEvaluationController.php (7 hunks)
  • app/Http/Controllers/StudentsCouncil/MrAndMissController.php (5 hunks)
  • app/Http/Middleware/NotifyAboutEvaluation.php (1 hunks)
  • app/Mail/EvaluationFormAvailable.php (2 hunks)
  • app/Mail/EvaluationFormAvailableDetails.php (2 hunks)
  • app/Mail/EvaluationFormReminder.php (2 hunks)
  • app/Policies/ApplicationFormPolicy.php (1 hunks)
  • app/Policies/MrAndMissVotePolicy.php (3 hunks)
  • app/Policies/SemesterEvaluationPolicy.php (1 hunks)
  • app/Policies/UserPolicy.php (2 hunks)
  • app/Utils/HasPeriodicEvent.php (1 hunks)
  • resources/lang/en/validation.php (1 hunks)
  • resources/views/auth/application/app.blade.php (1 hunks)
  • resources/views/auth/application/applications.blade.php (2 hunks)
  • resources/views/auth/application/period.blade.php (1 hunks)
  • resources/views/auth/application/status.blade.php (1 hunks)
  • resources/views/layouts/navbar.blade.php (2 hunks)
  • resources/views/secretariat/evaluation-form/app.blade.php (2 hunks)
  • resources/views/secretariat/evaluation-form/period.blade.php (1 hunks)
  • resources/views/secretariat/evaluation-form/status_update.blade.php (1 hunks)
  • resources/views/secretariat/evaluation-form/users_havent_filled_out.blade.php (1 hunks)
  • resources/views/student-council/mr-and-miss/admin.blade.php (1 hunks)
  • resources/views/student-council/mr-and-miss/categories.blade.php (1 hunks)
  • resources/views/student-council/mr-and-miss/index.blade.php (1 hunks)
  • resources/views/student-council/mr-and-miss/period.blade.php (1 hunks)
  • resources/views/student-council/mr-and-miss/results.blade.php (2 hunks)
  • resources/views/user/profile.blade.php (2 hunks)
  • routes/web.php (3 hunks)
  • tests/Feature/ApplicationTest.php (4 hunks)
  • tests/Feature/StatusTest.php (3 hunks)
Files skipped from review due to trivial changes (5)
  • resources/views/auth/application/period.blade.php
  • resources/views/secretariat/evaluation-form/status_update.blade.php
  • resources/views/secretariat/evaluation-form/users_havent_filled_out.blade.php
  • resources/views/student-council/mr-and-miss/admin.blade.php
  • resources/views/user/profile.blade.php
Additional context used
PHPStan
app/Mail/EvaluationFormAvailable.php

10-10: Class App\Mail\EvaluationFormAvailable extends unknown class Illuminate\Mail\Mailable.


12-12: Class App\Mail\EvaluationFormAvailable uses unknown trait Illuminate\Bus\Queueable.


13-13: Class App\Mail\EvaluationFormAvailable uses unknown trait Illuminate\Queue\SerializesModels.


22-22: Parameter $deadline of method App\Mail\EvaluationFormAvailable::__construct() has invalid type Carbon\Carbon.


34-34: Call to an undefined method App\Mail\EvaluationFormAvailable::markdown().

app/Mail/EvaluationFormReminder.php

10-10: Class App\Mail\EvaluationFormReminder extends unknown class Illuminate\Mail\Mailable.


12-12: Class App\Mail\EvaluationFormReminder uses unknown trait Illuminate\Bus\Queueable.


13-13: Class App\Mail\EvaluationFormReminder uses unknown trait Illuminate\Queue\SerializesModels.


23-23: Parameter $deadline of method App\Mail\EvaluationFormReminder::__construct() has invalid type Carbon\Carbon.


37-37: Call to an undefined method App\Mail\EvaluationFormReminder::markdown().

app/Mail/EvaluationFormAvailableDetails.php

10-10: Class App\Mail\EvaluationFormAvailableDetails extends unknown class Illuminate\Mail\Mailable.


12-12: Class App\Mail\EvaluationFormAvailableDetails uses unknown trait Illuminate\Bus\Queueable.


13-13: Class App\Mail\EvaluationFormAvailableDetails uses unknown trait Illuminate\Queue\SerializesModels.


23-23: Parameter $deadline of method App\Mail\EvaluationFormAvailableDetails::__construct() has invalid type Carbon\Carbon.


36-36: Call to an undefined method App\Mail\EvaluationFormAvailableDetails::markdown().

app/Http/Middleware/NotifyAboutEvaluation.php

19-19: Parameter $request of method App\Http\Middleware\NotifyAboutEvaluation::handle() has invalid type Illuminate\Http\Request.


28-28: Call to static method next() on an unknown class App\Models\Semester.


29-29: Call to static method isActive() on an unknown class App\Http\Controllers\Secretariat\SemesterEvaluationController.

app/Policies/MrAndMissVotePolicy.php

16-16: Class App\Policies\MrAndMissVotePolicy uses unknown trait Illuminate\Auth\Access\HandlesAuthorization.


24-24: Parameter $user of method App\Policies\MrAndMissVotePolicy::vote() has invalid type App\Models\User.


27-27: Call to static method deny() on an unknown class Illuminate\Auth\Access\Response.


29-29: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


29-29: Function app not found.


30-30: Call to static method deny() on an unknown class Illuminate\Auth\Access\Response.


32-32: Call to static method allow() on an unknown class Illuminate\Auth\Access\Response.


41-41: Parameter $user of method App\Policies\MrAndMissVotePolicy::manage() has invalid type App\Models\User.


43-43: Access to constant COMMUNITY_LEADER on an unknown class App\Models\Role.


43-43: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


53-53: Parameter $user of method App\Policies\MrAndMissVotePolicy::voteOrManage() has invalid type App\Models\User.

app/Policies/SemesterEvaluationPolicy.php

13-13: Class App\Policies\SemesterEvaluationPolicy uses unknown trait Illuminate\Auth\Access\HandlesAuthorization.


21-21: Method App\Policies\SemesterEvaluationPolicy::fill() has invalid return type Illuminate\Auth\Access\Response.


21-21: Parameter $user of method App\Policies\SemesterEvaluationPolicy::fill() has invalid type App\Models\User.


26-26: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


26-26: Function app not found.


27-27: Call to static method deny() on an unknown class Illuminate\Auth\Access\Response.


38-38: Method App\Policies\SemesterEvaluationPolicy::manage() has invalid return type Illuminate\Auth\Access\Response.


38-38: Parameter $user of method App\Policies\SemesterEvaluationPolicy::manage() has invalid type App\Models\User.


41-41: Access to constant SYS_ADMIN on an unknown class App\Models\Role.


42-42: Access to constant DIRECTOR on an unknown class App\Models\Role.


43-43: Access to constant SECRETARY on an unknown class App\Models\Role.


44-44: Access to constant PRESIDENT on an unknown class App\Models\Role.


44-44: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


45-45: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


55-55: Method App\Policies\SemesterEvaluationPolicy::fillOrManage() has invalid return type Illuminate\Auth\Access\Response.


55-55: Parameter $user of method App\Policies\SemesterEvaluationPolicy::fillOrManage() has invalid type App\Models\User.

tests/Feature/StatusTest.php

15-15: Class Tests\Feature\StatusTest extends unknown class Tests\TestCase.


17-17: Class Tests\Feature\StatusTest uses unknown trait Illuminate\Foundation\Testing\RefreshDatabase.


25-25: Tests\Feature\StatusTest::setUp() calls parent::setUp() but Tests\Feature\StatusTest does not extend any class.


26-26: Call to static method create() on an unknown class App\Models\PeriodicEvent.


27-27: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


28-28: Function now not found.


29-29: Function now not found.


30-30: Call to static method current() on an unknown class App\Models\Semester.


41-41: Call to static method fake() on an unknown class Illuminate\Support\Facades\Mail.


43-43: Call to static method factory() on an unknown class App\Models\User.


44-44: Access to constant RESIDENT on an unknown class App\Models\Role.


46-46: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


46-46: Function app not found.


48-48: Access to constant COLLEGIST on an unknown class App\Models\Role.


48-48: Call to an undefined method Tests\Feature\StatusTest::assertFalse().


49-49: Access to constant ALUMNI on an unknown class App\Models\Role.


49-49: Call to an undefined method Tests\Feature\StatusTest::assertTrue().


50-50: Call to an undefined method Tests\Feature\StatusTest::assertTrue().


59-59: Call to static method fake() on an unknown class Illuminate\Support\Facades\Mail.


61-61: Call to static method factory() on an unknown class App\Models\User.


62-62: Access to constant RESIDENT on an unknown class App\Models\Role.


63-63: Access to constant ACTIVE on an unknown class App\Models\SemesterStatus.


63-63: Call to static method next() on an unknown class App\Models\Semester.


65-65: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


65-65: Function app not found.


67-67: Call to an undefined method Tests\Feature\StatusTest::assertTrue().


67-67: Call to static method next() on an unknown class App\Models\Semester.


68-68: Access to constant ALUMNI on an unknown class App\Models\Role.


68-68: Call to an undefined method Tests\Feature\StatusTest::assertFalse().

app/Policies/ApplicationFormPolicy.php

12-12: Class App\Policies\ApplicationFormPolicy uses unknown trait Illuminate\Auth\Access\HandlesAuthorization.


20-20: Parameter $user of method App\Policies\ApplicationFormPolicy::before() has invalid type App\Models\User.


32-32: Parameter $target of method App\Policies\ApplicationFormPolicy::view() has invalid type App\Models\ApplicationForm.


32-32: Parameter $user of method App\Policies\ApplicationFormPolicy::view() has invalid type App\Models\User.


37-37: Class App\Models\ApplicationForm not found.


53-53: Parameter $user of method App\Policies\ApplicationFormPolicy::viewSome() has invalid type App\Models\User.


56-56: Access to constant SECRETARY on an unknown class App\Models\Role.


57-57: Access to constant DIRECTOR on an unknown class App\Models\Role.


58-58: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


59-59: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


60-60: Access to constant APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


61-61: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


61-61: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


62-62: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


70-70: Parameter $user of method App\Policies\ApplicationFormPolicy::editStatus() has invalid type App\Models\User.


73-73: Access to constant SECRETARY on an unknown class App\Models\Role.


74-74: Access to constant DIRECTOR on an unknown class App\Models\Role.


75-75: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


76-76: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


76-76: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


84-84: Parameter $user of method App\Policies\ApplicationFormPolicy::viewAll() has invalid type App\Models\User.


87-87: Access to constant SECRETARY on an unknown class App\Models\Role.


88-88: Access to constant DIRECTOR on an unknown class App\Models\Role.


89-89: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


89-89: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


90-90: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


98-98: Parameter $user of method App\Policies\ApplicationFormPolicy::viewUnfinished() has invalid type App\Models\User.


101-101: Access to constant SECRETARY on an unknown class App\Models\Role.


102-102: Access to constant DIRECTOR on an unknown class App\Models\Role.


103-103: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


103-103: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


112-112: Parameter $user of method App\Policies\ApplicationFormPolicy::finalize() has invalid type App\Models\User.


114-114: Access to constant SECRETARY on an unknown class App\Models\Role.


114-114: Access to constant SYS_ADMIN on an unknown class App\Models\Role.

app/Http/Controllers/StudentsCouncil/MrAndMissController.php

17-17: Class App\Http\Controllers\StudentsCouncil\MrAndMissController extends unknown class App\Http\Controllers\Controller.


19-19: Class App\Http\Controllers\StudentsCouncil\MrAndMissController uses unknown trait App\Utils\HasPeriodicEvent.


25-25: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::index() has invalid type Illuminate\Http\Request.


27-27: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


27-27: Class App\Models\MrAndMissVote not found.


29-29: Call to static method select() on an unknown class App\Models\MrAndMissCategory.


33-33: Function user not found.


38-38: Function user not found.


39-39: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().


45-45: Function view not found.


49-49: Call to static method collegists() on an unknown class App\Models\User.


51-51: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::getDeadline().


59-59: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::indexAdmin() has invalid type Illuminate\Http\Request.


61-61: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


61-61: Class App\Models\MrAndMissVote not found.


63-63: Function view not found.


64-64: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::periodicEvent().


65-65: Call to static method where() on an unknown class App\Models\MrAndMissCategory.


76-76: Method App\Http\Controllers\StudentsCouncil\MrAndMissController::updateVotePeriod() has invalid return type Illuminate\Http\RedirectResponse.


76-76: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::updateVotePeriod() has invalid type Illuminate\Http\Request.


78-78: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


78-78: Class App\Models\MrAndMissVote not found.


86-86: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::updatePeriodicEvent().


87-87: Call to static method find() on an unknown class App\Models\Semester.


88-88: Call to static method parse() on an unknown class Carbon\Carbon.


89-89: Call to static method parse() on an unknown class Carbon\Carbon.


92-92: Function __ not found.


92-92: Function back not found.


100-100: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::editCategories() has invalid type Illuminate\Http\Request.


102-102: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


102-102: Class App\Models\MrAndMissVote not found.


109-109: Call to static method where() on an unknown class App\Models\MrAndMissCategory.


112-112: Call to static method where() on an unknown class App\Models\MrAndMissCategory.


116-116: Function __ not found.


116-116: Function back not found.


124-124: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::createCategory() has invalid type Illuminate\Http\Request.


126-126: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


126-126: Class App\Models\MrAndMissVote not found.


133-133: Call to static method create() on an unknown class App\Models\MrAndMissCategory.


141-141: Function __ not found.


141-141: Function back not found.


148-148: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::indexResults() has invalid type Illuminate\Http\Request.


150-150: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


150-150: Class App\Models\MrAndMissVote not found.


152-152: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().


155-155: Call to static method raw() on an unknown class Illuminate\Support\Facades\DB.


155-155: Call to static method select() on an unknown class App\Models\MrAndMissVote.


156-156: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().


163-163: Function view not found.


169-169: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::saveVote() has invalid type Illuminate\Http\Request.


171-171: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


171-171: Class App\Models\MrAndMissVote not found.


173-173: Call to static method where() on an unknown class App\Models\MrAndMissCategory.


176-176: Call to static method updateOrCreate() on an unknown class App\Models\MrAndMissVote.


177-177: Function user not found.


179-179: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().


185-185: Call to static method updateOrCreate() on an unknown class App\Models\MrAndMissVote.


186-186: Function user not found.


188-188: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().


194-194: Call to static method where() on an unknown class App\Models\MrAndMissVote.


195-195: Function user not found.


197-197: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().


208-208: Function __ not found.


208-208: Function redirect not found.


214-214: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::customVote() has invalid type Illuminate\Http\Request.


216-216: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


216-216: Class App\Models\MrAndMissVote not found.


223-223: Call to static method create() on an unknown class App\Models\MrAndMissCategory.


226-226: Function user not found.


230-230: Function redirect not found.


232-232: Function __ not found.

app/Policies/UserPolicy.php

14-14: Class App\Policies\UserPolicy uses unknown trait Illuminate\Auth\Access\HandlesAuthorization.


16-16: Parameter $user of method App\Policies\UserPolicy::before() has invalid type App\Models\User.


28-28: Parameter $user of method App\Policies\UserPolicy::viewAll() has invalid type App\Models\User.


31-31: Access to constant STAFF on an unknown class App\Models\Role.


32-32: Access to constant SECRETARY on an unknown class App\Models\Role.


33-33: Access to constant DIRECTOR on an unknown class App\Models\Role.


34-34: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


35-35: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


35-35: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


43-43: Parameter $user of method App\Policies\UserPolicy::viewSome() has invalid type App\Models\User.


47-47: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


48-48: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


58-58: Parameter $user of method App\Policies\UserPolicy::viewAny() has invalid type App\Models\User.


62-62: Access to constant STAFF on an unknown class App\Models\Role.


63-63: Access to constant SECRETARY on an unknown class App\Models\Role.


64-64: Access to constant DIRECTOR on an unknown class App\Models\Role.


65-65: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


66-66: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


67-67: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


68-68: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


68-68: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


76-76: Parameter $user of method App\Policies\UserPolicy::viewSemesterEvaluation() has invalid type App\Models\User.


79-79: Access to constant SECRETARY on an unknown class App\Models\Role.


80-80: Access to constant DIRECTOR on an unknown class App\Models\Role.


81-81: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


82-82: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


83-83: Access to constant PRESIDENT on an unknown class App\Models\Role.


83-83: Access to constant SCIENCE_VICE_PRESIDENT on an unknown class App\Models\Role.


83-83: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


92-92: Parameter $target of method App\Policies\UserPolicy::view() has invalid type App\Models\User.


92-92: Parameter $user of method App\Policies\UserPolicy::view() has invalid type App\Models\User.


98-98: Call to static method remember() on an unknown class Illuminate\Support\Facades\Cache.


100-100: Access to constant SECRETARY on an unknown class App\Models\Role.


101-101: Access to constant DIRECTOR on an unknown class App\Models\Role.


102-102: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


102-102: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


103-103: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


108-108: Access to constant TENANT on an unknown class App\Models\Role.


109-109: Access to constant PRESIDENT on an unknown class App\Models\Role.


109-109: Access to constant STAFF on an unknown class App\Models\Role.


109-109: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


123-123: Parameter $role of method App\Policies\UserPolicy::updateAnyPermission() has invalid type App\Models\Role.


123-123: Parameter $target of method App\Policies\UserPolicy::updateAnyPermission() has invalid type App\Models\User.


123-123: Parameter $user of method App\Policies\UserPolicy::updateAnyPermission() has invalid type App\Models\User.


127-127: Access to constant SECRETARY on an unknown class App\Models\Role.


128-128: Access to constant COMMITTEE_LEADERS on an unknown class App\Models\Role.


128-128: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


128-128: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


129-129: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


130-130: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


131-131: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


135-135: Access to constant TENANT on an unknown class App\Models\Role.


136-136: Access to constant STAFF on an unknown class App\Models\Role.


136-136: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


136-136: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


139-139: Access to constant COLLEGIST on an unknown class App\Models\Role.


140-140: Access to constant SECRETARY on an unknown class App\Models\Role.


140-140: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


140-140: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


143-143: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


144-144: Access to constant DIRECTOR on an unknown class App\Models\Role.


144-144: Access to constant SECRETARY on an unknown class App\Models\Role.


147-147: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


149-149: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


150-150: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


151-151: Access to constant SECRETARY on an unknown class App\Models\Role.


152-152: Access to constant SCIENCE_VICE_PRESIDENT on an unknown class App\Models\Role.


152-152: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


156-156: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


157-157: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


160-160: Access to constant BOARD_OF_TRUSTEES_MEMBER on an unknown class App\Models\Role.


161-161: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


164-164: Access to constant ETHICS_COMMISSIONER on an unknown class App\Models\Role.


165-165: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


168-168: Access to constant APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


169-169: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


169-169: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


172-172: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


173-173: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


173-173: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


173-173: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


176-176: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


178-178: Access to constant COMMITTEE_LEADERS on an unknown class App\Models\Role.


178-178: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


178-178: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


179-179: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


193-193: Parameter $object of method App\Policies\UserPolicy::updatePermission() has invalid type App\Models\RoleObject.


193-193: Parameter $object of method App\Policies\UserPolicy::updatePermission() has invalid type App\Models\Workshop.


193-193: Parameter $role of method App\Policies\UserPolicy::updatePermission() has invalid type App\Models\Role.


193-193: Parameter $target of method App\Policies\UserPolicy::updatePermission() has invalid type App\Models\User.


193-193: Parameter $user of method App\Policies\UserPolicy::updatePermission() has invalid type App\Models\User.


195-195: Access to constant TENANT on an unknown class App\Models\Role.


196-196: Access to constant STAFF on an unknown class App\Models\Role.


196-196: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


196-196: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


199-199: Access to constant COLLEGIST on an unknown class App\Models\Role.


200-200: Access to constant SECRETARY on an unknown class App\Models\Role.


200-200: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


200-200: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


203-203: Access to constant APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


207-207: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


208-208: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


208-208: Access to constant STUDENT_COUNCIL_LEADERS on an unknown class App\Models\Role.


208-208: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


211-211: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


212-212: Access to constant DIRECTOR on an unknown class App\Models\Role.


212-212: Access to constant SECRETARY on an unknown class App\Models\Role.


215-215: Access to constant WORKSHOP_ADMINISTRATOR on an unknown class App\Models\Role.


216-216: Access to constant WORKSHOP_LEADER on an unknown class App\Models\Role.


219-219: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


220-220: Access to constant SECRETARY on an unknown class App\Models\Role.


221-221: Access to constant SCIENCE_VICE_PRESIDENT on an unknown class App\Models\Role.


221-221: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


225-225: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


226-226: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


229-229: Access to constant BOARD_OF_TRUSTEES_MEMBER on an unknown class App\Models\Role.


230-230: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


233-233: Access to constant ETHICS_COMMISSIONER on an unknown class App\Models\Role.


234-234: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


237-237: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


238-238: Access to constant STUDENT_COUNCIL_SECRETARY on an unknown class App\Models\Role.


241-241: Access to constant PRESIDENT on an unknown class App\Models\Role.


244-244: Access to constant PRESIDENT on an unknown class App\Models\Role.


244-244: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


247-247: Access to constant KKT_HANDLER on an unknown class App\Models\Role.


248-248: Access to constant ECONOMIC_VICE_PRESIDENT on an unknown class App\Models\Role.


248-248: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


250-250: Access to constant COMMITTEE_MEMBERS on an unknown class App\Models\Role.


250-250: Access to constant COMMITTEE_REFERENTS on an unknown class App\Models\Role.


252-252: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


263-263: Parameter $target of method App\Policies\UserPolicy::updateStatus() has invalid type App\Models\User.


263-263: Parameter $user of method App\Policies\UserPolicy::updateStatus() has invalid type App\Models\User.


268-268: Access to constant SCIENCE_VICE_PRESIDENT on an unknown class App\Models\Role.


268-268: Access to constant SECRETARY on an unknown class App\Models\Role.


268-268: Access to constant STUDENT_COUNCIL on an unknown class App\Models\Role.


280-280: Parameter $target of method App\Policies\UserPolicy::updateWorkshop() has invalid type App\Models\User.


280-280: Parameter $user of method App\Policies\UserPolicy::updateWorkshop() has invalid type App\Models\User.


280-280: Parameter $workshop of method App\Policies\UserPolicy::updateWorkshop() has invalid type App\Models\Workshop.


282-282: Access to constant SECRETARY on an unknown class App\Models\Role.


292-292: Parameter $user of method App\Policies\UserPolicy::handleGuests() has invalid type App\Models\User.


294-294: Access to constant STAFF on an unknown class App\Models\Role.


301-301: Parameter $user of method App\Policies\UserPolicy::invite() has invalid type App\Models\User.


303-303: Access to constant SECRETARY on an unknown class App\Models\Role.

app/Http/Controllers/Secretariat/SemesterEvaluationController.php

32-32: Class App\Http\Controllers\Secretariat\SemesterEvaluationController extends unknown class App\Http\Controllers\Controller.


34-34: Class App\Http\Controllers\Secretariat\SemesterEvaluationController uses unknown trait App\Utils\HasPeriodicEvent.


43-43: Method App\Http\Controllers\Secretariat\SemesterEvaluationController::updateEvaluationPeriod() has invalid return type Illuminate\Http\RedirectResponse.


43-43: Parameter $request of method App\Http\Controllers\Secretariat\SemesterEvaluationController::updateEvaluationPeriod() has invalid type Illuminate\Http\Request.


45-45: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::authorize().


45-45: Class App\Models\SemesterEvaluation not found.


53-53: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::updatePeriodicEvent().


54-54: Call to static method find() on an unknown class App\Models\Semester.


55-55: Call to static method parse() on an unknown class Carbon\Carbon.


56-56: Call to static method parse() on an unknown class Carbon\Carbon.


59-59: Function __ not found.


59-59: Function back not found.


69-69: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


69-69: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


69-69: Function config not found.


69-69: Instantiated class App\Mail\EvaluationFormAvailable not found.


70-70: Call to static method secretary() on an unknown class App\Models\User.


71-71: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


71-71: Call to static method secretary() on an unknown class App\Models\User.


71-71: Call to static method secretary() on an unknown class App\Models\User.


71-71: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


71-71: Instantiated class App\Mail\EvaluationFormAvailableDetails not found.


73-73: Call to static method president() on an unknown class App\Models\User.


74-74: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


74-74: Call to static method president() on an unknown class App\Models\User.


74-74: Call to static method president() on an unknown class App\Models\User.


74-74: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


74-74: Instantiated class App\Mail\EvaluationFormAvailableDetails not found.


87-87: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


87-87: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


87-87: Function config not found.


87-87: Instantiated class App\Mail\EvaluationFormReminder not found.


99-99: Call to static method secretary() on an unknown class App\Models\User.


100-100: Call to static method secretary() on an unknown class App\Models\User.


100-100: Call to static method secretary() on an unknown class App\Models\User.


100-100: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


100-100: Instantiated class App\Mail\EvaluationFormClosed not found.


102-102: Call to static method president() on an unknown class App\Models\User.


103-103: Call to static method president() on an unknown class App\Models\User.


103-103: Call to static method president() on an unknown class App\Models\User.


103-103: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


103-103: Instantiated class App\Mail\EvaluationFormClosed not found.


105-105: Call to static method director() on an unknown class App\Models\User.


106-106: Call to static method director() on an unknown class App\Models\User.


106-106: Call to static method director() on an unknown class App\Models\User.


106-106: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


106-106: Instantiated class App\Mail\EvaluationFormClosed not found.


108-108: Call to static method workshopLeaders() on an unknown class App\Models\User.


109-109: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


109-109: Instantiated class App\Mail\EvaluationFormClosed not found.


114-114: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


114-114: Instantiated class App\Mail\StatusDeactivated not found.


115-115: Call to static method withoutEvents() on an unknown class App\Models\RoleUser.


119-119: Call to static method error() on an unknown class Illuminate\Support\Facades\Log.


130-130: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::authorize().


130-130: Class App\Models\SemesterEvaluation not found.


132-132: Function view not found.


133-133: Function user not found.


134-134: Function user not found.


135-135: Call to static method all() on an unknown class App\Models\Faculty.


136-136: Call to static method all() on an unknown class App\Models\Workshop.


137-137: Call to static method current() on an unknown class App\Models\Semester.


137-137: Function user not found.


138-138: Call to static method all() on an unknown class App\Models\GeneralAssemblies\GeneralAssembly.


139-139: Call to static method current() on an unknown class App\Models\Semester.


139-139: Function user not found.


140-140: Access to constant STUDENT_POSTION_ROLES on an unknown class App\Models\Role.


140-140: Function user not found.


141-141: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::periodicEvent().


142-142: Class App\Models\SemesterEvaluation not found.


142-142: Function user not found.


150-150: Parameter $request of method App\Http\Controllers\Secretariat\SemesterEvaluationController::store() has invalid type Illuminate\Http\Request.


152-152: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::authorize().


152-152: Class App\Models\SemesterEvaluation not found.


154-154: Call to static method make() on an unknown class Illuminate\Support\Facades\Validator.


176-176: Access to constant ACTIVE on an unknown class App\Models\SemesterStatus.


176-176: Access to constant ALUMNI on an unknown class App\Models\Role.


176-176: Access to constant PASSIVE on an unknown class App\Models\SemesterStatus.


176-176: Call to static method in() on an unknown class Illuminate\Validation\Rule.


182-182: Function user not found.


183-183: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::semester().


189-189: Call to static method create() on an unknown class App\Models\SemesterEvaluation.


212-212: Call to static method president() on an unknown class App\Models\User.


212-212: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


213-213: Call to static method president() on an unknown class App\Models\User.


213-213: Instantiated class App\Mail\AnonymousFeedback not found.


214-214: Call to static method studentCouncilSecretary() on an unknown class App\Models\User.


214-214: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


215-215: Call to static method studentCouncilSecretary() on an unknown class App\Models\User.


215-215: Instantiated class App\Mail\AnonymousFeedback not found.


228-228: Access to constant ALUMNI on an unknown class App\Models\Role.


230-230: Function __ not found.


230-230: Function redirect not found.


233-233: Function back not found.


235-235: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::semester().


245-245: Function __ not found.


245-245: Function back not found.


253-253: Access to constant COLLEGIST on an unknown class App\Models\Role.


253-253: Call to static method withRole() on an unknown class App\Models\User.


254-254: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::semester().


262-262: Parameter $user of method App\Http\Controllers\Secretariat\SemesterEvaluationController::deactivateCollegist() has invalid type App\Models\User.


264-264: Call to static method collegist() on an unknown class App\Models\Role.


265-265: Call to static method alumni() on an unknown class App\Models\Role.

app/Http/Controllers/Auth/ApplicationController.php

26-26: Class App\Http\Controllers\Auth\ApplicationController extends unknown class App\Http\Controllers\Controller.


28-28: Class App\Http\Controllers\Auth\ApplicationController uses unknown trait App\Utils\HasPeriodicEvent.


41-41: Method App\Http\Controllers\Auth\ApplicationController::updateApplicationPeriod() has invalid return type Illuminate\Http\RedirectResponse.


41-41: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::updateApplicationPeriod() has invalid type Illuminate\Http\Request.


43-43: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


43-43: Class App\Models\ApplicationForm not found.


52-52: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::updatePeriodicEvent().


53-53: Call to static method find() on an unknown class App\Models\Semester.


54-54: Call to static method parse() on an unknown class Carbon\Carbon.


55-55: Call to static method parse() on an unknown class Carbon\Carbon.


56-56: Call to static method parse() on an unknown class Carbon\Carbon.


59-59: Function __ not found.


59-59: Function back not found.


67-67: Method App\Http\Controllers\Auth\ApplicationController::showApplicationForm() has invalid return type Illuminate\Http\RedirectResponse.


67-67: Method App\Http\Controllers\Auth\ApplicationController::showApplicationForm() has invalid return type Illuminate\View\View.


67-67: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::showApplicationForm() has invalid type Illuminate\Http\Request.


69-69: Access to constant TENANT on an unknown class App\Models\Role.


69-69: Call to static method get() on an unknown class App\Models\Role.


69-69: Function user not found.


71-71: Function view not found.


73-73: Function user not found.


74-74: Function user not found.


78-78: Call to static method all() on an unknown class App\Models\Workshop.


79-79: Call to static method all() on an unknown class App\Models\Faculty.


80-80: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


81-81: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::isExtended().


82-82: Function user not found.


86-86: Function view not found.


88-88: Function view not found.


90-90: Function view not found.


92-92: Function view not found.


94-94: Function view not found.


102-102: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::storeApplicationForm() has invalid type Illuminate\Http\Request.


106-106: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


106-106: Function now not found.


107-107: Function redirect not found.


110-110: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


111-111: Function redirect not found.


128-128: Function abort not found.


130-130: Function __ not found.


130-130: Function redirect not found.


139-139: Method App\Http\Controllers\Auth\ApplicationController::showApplications() has invalid return type Illuminate\View\View.


139-139: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::showApplications() has invalid type Illuminate\Http\Request.


143-143: Call to static method withoutGlobalScope() on an unknown class App\Models\User.


145-145: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


146-146: Function view not found.


150-150: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


150-150: Class App\Models\ApplicationForm not found.


151-151: Class App\Models\ApplicationForm not found.


152-152: Call to static method all() on an unknown class App\Models\Workshop.


156-156: Call to static method select() on an unknown class App\Models\ApplicationForm.


166-166: Class App\Models\User not found.


168-168: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


169-169: Access to constant STATUS_CALLED_IN on an unknown class App\Models\ApplicationForm.


170-170: Access to constant STATUS_ACCEPTED on an unknown class App\Models\ApplicationForm.


177-177: Function view not found.


182-182: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


183-183: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::periodicEvent().


194-194: Method App\Http\Controllers\Auth\ApplicationController::editApplication() has invalid return type Illuminate\Http\RedirectResponse.


194-194: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::editApplication() has invalid type Illuminate\Http\Request.


196-196: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


196-196: Class App\Models\ApplicationForm not found.


197-197: Call to static method findOrFail() on an unknown class App\Models\ApplicationForm.


204-204: Function redirect not found.


214-214: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


214-214: Class App\Models\ApplicationForm not found.


215-215: Call to static method forget() on an unknown class Illuminate\Support\Facades\Cache.


216-216: Call to static method query() on an unknown class App\Models\User.


219-219: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


219-219: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


223-223: Function redirect not found.


225-225: Call to static method transaction() on an unknown class Illuminate\Support\Facades\DB.


226-226: Call to static method query() on an unknown class App\Models\User.


229-229: Access to constant STATUS_ACCEPTED on an unknown class App\Models\ApplicationForm.


232-232: Call to static method query() on an unknown class App\Models\User.


236-236: Call to static method delete() on an unknown class Illuminate\Support\Facades\Storage.


240-240: Call to static method where() on an unknown class App\Models\File.


242-242: Call to static method delete() on an unknown class Illuminate\Support\Facades\Storage.


245-245: Call to static method query() on an unknown class App\Models\ApplicationForm.


248-248: Access to constant APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


248-248: Call to static method get() on an unknown class App\Models\Role.


248-248: Call to static method where() on an unknown class App\Models\RoleUser.


249-249: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


249-249: Call to static method get() on an unknown class App\Models\Role.


249-249: Call to static method where() on an unknown class App\Models\RoleUser.


252-252: Call to static method clear() on an unknown class Illuminate\Support\Facades\Cache.


253-253: Function back not found.


262-262: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::storeQuestionsData() has invalid type Illuminate\Http\Request.


262-262: Parameter $user of method App\Http\Controllers\Auth\ApplicationController::storeQuestionsData() has invalid type App\Models\User.


274-274: Call to static method updateOrCreate() on an unknown class App\Models\ApplicationForm.


294-294: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::storeFiles() has invalid type Illuminate\Http\Request.


309-309: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::deleteFile() has invalid type Illuminate\Http\Request.


317-317: Call to static method delete() on an unknown class Illuminate\Support\Facades\Storage.


325-325: Parameter $user of method App\Http\Controllers\Auth\ApplicationController::submitApplication() has invalid type App\Models\User.


329-329: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


331-331: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


332-332: Function back not found.


334-334: Function back not found.


343-343: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


343-343: Class App\Models\ApplicationForm not found.


345-345: Call to static method with() on an unknown class App\Models\ApplicationForm.


346-346: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


347-347: Access to constant STATUS_CALLED_IN on an unknown class App\Models\ApplicationForm.


348-348: Access to constant STATUS_ACCEPTED on an unknown class App\Models\ApplicationForm.


351-351: Call to static method download() on an unknown class Maatwebsite\Excel\Facades\Excel.


351-351: Instantiated class App\Exports\ApplicantsExport not found.

tests/Feature/ApplicationTest.php

24-24: Class Tests\Feature\ApplicationTest extends unknown class Tests\TestCase.


26-26: Class Tests\Feature\ApplicationTest uses unknown trait Illuminate\Foundation\Testing\RefreshDatabase.


34-34: Tests\Feature\ApplicationTest::setUp() calls parent::setUp() but Tests\Feature\ApplicationTest does not extend any class.


36-36: Call to static method create() on an unknown class App\Models\PeriodicEvent.


37-37: Class App\Http\Controllers\Auth\ApplicationController not found.


38-38: Function now not found.


39-39: Function now not found.


46-46: Method Tests\Feature\ApplicationTest::createApplicant() has invalid return type App\Models\User.


48-48: Call to static method factory() on an unknown class App\Models\User.


49-49: Call to static method collegist() on an unknown class App\Models\Role.


50-50: Access to constant STATUS_IN_PROGRESS on an unknown class App\Models\ApplicationForm.


51-51: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


65-65: Call to an undefined method Tests\Feature\ApplicationTest::get().


69-69: Call to an undefined method Tests\Feature\ApplicationTest::get().


73-73: Call to an undefined method Tests\Feature\ApplicationTest::get().


77-77: Call to an undefined method Tests\Feature\ApplicationTest::get().


91-91: Call to an undefined method Tests\Feature\ApplicationTest::get().


92-92: Call to an undefined method Tests\Feature\ApplicationTest::post().


101-101: Function __ not found.


104-104: Call to static method findOrFail() on an unknown class App\Models\User.


106-106: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


108-108: Call to an undefined method Tests\Feature\ApplicationTest::post().


128-128: Function __ not found.


130-130: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


131-131: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


132-132: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


133-133: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


134-134: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


135-135: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


136-136: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


137-137: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


148-148: Call to static method fake() on an unknown class Illuminate\Support\Facades\Storage.


152-152: Call to an undefined method Tests\Feature\ApplicationTest::get().


153-153: Call to an undefined method Tests\Feature\ApplicationTest::post().


156-156: Call to static method fake() on an unknown class Illuminate\Http\UploadedFile.


160-160: Function __ not found.


162-162: Call to static method find() on an unknown class App\Models\User.


165-165: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


166-166: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


168-168: Call to an undefined method Tests\Feature\ApplicationTest::post().


175-175: Function __ not found.


177-177: Call to static method find() on an unknown class App\Models\User.


179-179: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


189-189: Call to static method fake() on an unknown class Illuminate\Support\Facades\Storage.


190-190: Call to static method fake() on an unknown class Illuminate\Support\Facades\Storage.


192-192: Call to an undefined method Tests\Feature\ApplicationTest::post().


202-202: Call to static method firstWhere() on an unknown class App\Models\User.


203-203: Call to an undefined method Tests\Feature\ApplicationTest::assertNotNull().


204-204: Call to an undefined method Tests\Feature\ApplicationTest::assertFalse().


207-207: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


208-208: Call to an undefined method Tests\Feature\ApplicationTest::post().


224-224: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


227-227: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


228-228: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


229-229: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


230-230: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


231-231: Call to an undefined method Tests\Feature\ApplicationTest::post().


239-239: Call to static method current() on an unknown class App\Models\Semester.


241-241: Call to static method first() on an unknown class App\Models\Workshop.


242-242: Call to static method first() on an unknown class App\Models\Faculty.


247-247: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


248-248: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


249-249: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


250-250: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


253-253: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


254-254: Call to an undefined method Tests\Feature\ApplicationTest::post().


261-261: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


264-264: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


265-265: Call to an undefined method Tests\Feature\ApplicationTest::post().


266-266: Call to static method fake() on an unknown class Illuminate\Http\UploadedFile.


271-271: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


274-274: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


275-275: Call to an undefined method Tests\Feature\ApplicationTest::post().


278-278: Call to static method fake() on an unknown class Illuminate\Http\UploadedFile.


283-283: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


284-284: Call to an undefined method Tests\Feature\ApplicationTest::post().


287-287: Call to static method fake() on an unknown class Illuminate\Http\UploadedFile.


292-292: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


295-295: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


296-296: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


297-297: Call to an undefined method Tests\Feature\ApplicationTest::post().


305-305: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


306-306: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


308-308: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


309-309: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


310-310: Call to an undefined method Tests\Feature\ApplicationTest::assertContains().


311-311: Call to an undefined method Tests\Feature\ApplicationTest::post().


322-322: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


323-323: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


324-324: Call to an undefined method Tests\Feature\ApplicationTest::assertNotContains().


328-328: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


330-330: Call to an undefined method Tests\Feature\ApplicationTest::post().


336-336: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


336-336: Call to an undefined method Tests\Feature\ApplicationTest::assertEquals().


337-337: Call to an undefined method Tests\Feature\ApplicationTest::assertNotNull().


338-338: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


339-339: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


339-339: Function now not found.


348-348: Call to static method factory() on an unknown class App\Models\User.


349-349: Access to constant STATUS_IN_PROGRESS on an unknown class App\Models\ApplicationForm.


350-350: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


351-351: Call to an undefined method Tests\Feature\ApplicationTest::get().


355-355: Call to static method factory() on an unknown class App\Models\User.


356-356: Access to constant STATUS_CALLED_IN on an unknown class App\Models\ApplicationForm.


357-357: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


358-358: Call to an undefined method Tests\Feature\ApplicationTest::get().


363-363: Call to static method factory() on an unknown class App\Models\User.


364-364: Access to constant STATUS_ACCEPTED on an unknown class App\Models\ApplicationForm.


365-365: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


366-366: Call to an undefined method Tests\Feature\ApplicationTest::get().


371-371: Call to static method factory() on an unknown class App\Models\User.


372-372: Access to constant STATUS_BANISHED on an unknown class App\Models\ApplicationForm.


373-373: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


374-374: Call to an undefined method Tests\Feature\ApplicationTest::get().


387-387: Call to static method factory() on an unknown class App\Models\User.


388-388: Access to constant SYS_ADMIN on an unknown class App\Models\Role.


388-388: Call to static method firstWhere() on an unknown class App\Models\Role.


389-389: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


391-391: Call to static method factory() on an unknown class App\Models\User.


392-392: Access to constant STATUS_IN_PROGRESS on an unknown class App\Models\ApplicationForm.


394-394: Call to static method factory() on an unknown class App\Models\User.


395-395: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


397-397: Call to static method factory() on an unknown class App\Models\User.


398-398: Access to constant STATUS_CALLED_IN on an unknown class App\Models\ApplicationForm.


400-400: Call to static method factory() on an unknown class App\Models\User.


401-401: Access to constant STATUS_ACCEPTED on an unknown class App\Models\ApplicationForm.


403-403: Call to static method factory() on an unknown class App\Models\User.


404-404: Access to constant STATUS_BANISHED on an unknown class App\Models\ApplicationForm.


406-406: Call to an undefined method Tests\Feature\ApplicationTest::post().


418-418: Call to static method factory() on an unknown class App\Models\User.


419-419: Access to constant SYS_ADMIN on an unknown class App\Models\Role.


419-419: Call to static method firstWhere() on an unknown class App\Models\Role.


420-420: Access to constant APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


420-420: Call to static method firstWhere() on an unknown class App\Models\Role.


421-421: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


421-421: Call to static method firstWhere() on an unknown class App\Models\Role.


422-422: Call to static method set() on an unknown class Illuminate\Support\Facades\Config.


422-422: Function now not found.


423-423: Call to an undefined method Tests\Feature\ApplicationTest::actingAs().


425-425: Call to static method query() on an unknown class App\Models\ApplicationForm.


426-426: Call to static method factory() on an unknown class App\Models\User.


427-427: Access to constant STATUS_IN_PROGRESS on an unknown class App\Models\ApplicationForm.


429-429: Call to static method factory() on an unknown class App\Models\User.


430-430: Access to constant STATUS_ACCEPTED on an unknown class App\Models\ApplicationForm.


432-432: Call to static method factory() on an unknown class App\Models\User.


433-433: Access to constant STATUS_BANISHED on an unknown class App\Models\ApplicationForm.


436-436: Call to an undefined method Tests\Feature\ApplicationTest::post().


441-441: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


442-442: Call to an undefined method Tests\Feature\ApplicationTest::assertNull().


442-442: Call to static method find() on an unknown class App\Models\User.


443-443: Call to an undefined method Tests\Feature\ApplicationTest::assertNull().


443-443: Call to static method find() on an unknown class App\Models\User.


445-445: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


445-445: Call to static method count() on an unknown class App\Models\ApplicationForm.


448-448: Access to constant SYS_ADMIN on an unknown class App\Models\Role.


448-448: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


448-448: Call to static method firstWhere() on an unknown class App\Models\Role.


449-449: Access to constant APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


449-449: Call to an undefined method Tests\Feature\ApplicationTest::assertFalse().


449-449: Call to static method firstWhere() on an unknown class App\Models\Role.


450-450: Access to constant AGGREGATED_APPLICATION_COMMITTEE_MEMBER on an unknown class App\Models\Role.


450-450: Call to an undefined method Tests\Feature\ApplicationTest::assertFalse().


450-450: Call to static method firstWhere() on an unknown class App\Models\Role.

routes/web.php

63-63: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


63-63: Class App\Http\Controllers\HomeController not found.


64-64: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


64-64: Class App\Http\Controllers\HomeController not found.


65-65: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


65-65: Class App\Http\Controllers\HomeController not found.


66-66: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


66-66: Class App\Http\Controllers\HomeController not found.


67-67: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


67-67: Class App\Http\Controllers\HomeController not found.


69-69: Call to static method routes() on an unknown class Illuminate\Support\Facades\Auth.


71-71: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


71-71: Class App\Http\Controllers\Auth\RegisterController not found.


73-73: Call to static method middleware() on an unknown class Illuminate\Support\Facades\Route.


73-73: Class App\Http\Middleware\LogRequests not found.


73-73: Class App\Http\Middleware\OnlyHungarian not found.


73-73: Class Illuminate\Auth\Middleware\Authenticate not found.


74-74: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


74-74: Class App\Http\Controllers\Auth\ApplicationController not found.


76-76: Call to static method middleware() on an unknown class Illuminate\Support\Facades\Route.


76-76: Class App\Http\Middleware\LogRequests not found.


76-76: Class Illuminate\Auth\Middleware\Authenticate not found.


78-78: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


78-78: Class App\Http\Controllers\Auth\ApplicationController not found.


79-79: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


79-79: Class App\Http\Controllers\Secretariat\UserController not found.


80-80: Call to static method delete() on an unknown class Illuminate\Support\Facades\Route.


80-80: Class App\Http\Controllers\Secretariat\UserController not found.


81-81: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


81-81: Class App\Http\Controllers\Secretariat\UserController not found.


82-82: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


82-82: Class App\Http\Controllers\Secretariat\UserController not found.


83-83: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


83-83: Class App\Http\Controllers\Secretariat\UserController not found.


84-84: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


84-84: Class App\Http\Controllers\Secretariat\UserController not found.


85-85: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


85-85: Class App\Http\Controllers\Auth\ApplicationController not found.


88-88: Call to static method middleware() on an unknown class Illuminate\Support\Facades\Route.


88-88: Class App\Http\Middleware\EnsureVerified not found.


88-88: Class App\Http\Middleware\LogRequests not found.


88-88: Class Illuminate\Auth\Middleware\Authenticate not found.


89-89: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


89-89: Class App\Http\Controllers\HomeController not found.


90-90: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


90-90: Class App\Http\Controllers\HomeController not found.


93-93: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


93-93: Class App\Http\Controllers\IssuesController not found.


94-94: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


94-94: Class App\Http\Controllers\IssuesController not found.


97-97: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


97-97: Class App\Http\Controllers\Secretariat\UserController not found.


98-98: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


98-98: Class App\Http\Controllers\Secretariat\UserController not found.


99-99: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


99-99: Class App\Http\Controllers\Secretariat\UserController not found.


100-100: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


100-100: Class App\Http\Controllers\Secretariat\UserController not found.


101-101: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


101-101: Class App\Http\Controllers\Secretariat\UserController not found.


102-102: Call to static method delete() on an unknown class Illuminate\Support\Facades\Route.


102-102: Class App\Http\Controllers\Secretariat\UserController not found.


103-103: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


103-103: Class App\Http\Controllers\Secretariat\UserController not found.


103-103: Class App\Http\Middleware\LogRequests not found.


104-104: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


104-104: Class App\Http\Controllers\Secretariat\UserController not found.


105-105: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


105-105: Class App\Http\Controllers\Secretariat\UserController not found.


108-108: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


108-108: Class App\Http\Controllers\LocaleController not found.


109-109: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


109-109: Class App\Http\Controllers\LocaleController not found.


110-110: Call to static method middleware() on an unknown class Illuminate\Support\Facades\Route.


111-111: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


111-111: Class App\Http\Controllers\LocaleController not found.


112-112: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


112-112: Class App\Http\Controllers\LocaleController not found.


113-113: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


113-113: Class App\Http\Controllers\LocaleController not found.


114-114: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


114-114: Class App\Http\Controllers\LocaleController not found.


118-118: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


118-118: Class App\Http\Controllers\Dormitory\PrintController not found.


119-119: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


119-119: Class App\Http\Controllers\Dormitory\PrintController not found.


120-120: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


120-120: Class App\Http\Controllers\Dormitory\PrintController not found.


121-121: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


121-121: Class App\Http\Controllers\Dormitory\PrintController not found.


122-122: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


122-122: Class App\Http\Controllers\Dormitory\PrintController not found.


123-123: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


123-123: Class App\Http\Controllers\Dormitory\PrintController not found.


124-124: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


124-124: Class App\Http\Controllers\Dormitory\PrintController not found.


125-125: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


125-125: Class App\Http\Controllers\Dormitory\PrintController not found.


126-126: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


126-126: Class App\Http\Controllers\Dormitory\PrintController not found.


127-127: Call to static method put() on an unknown class Illuminate\Support\Facades\Route.


127-127: Class App\Http\Controllers\Dormitory\PrintController not found.


128-128: Call to static method middleware() on an unknown class Illuminate\Support\Facades\Route.


129-129: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


129-129: Class App\Http\Controllers\Dormitory\PrintController not found.


130-130: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


130-130: Class App\Http\Controllers\Dormitory\PrintController not found.


131-131: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


131-131: Class App\Http\Controllers\Dormitory\PrintController not found.


133-133: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


133-133: Class App\Http\Controllers\Dormitory\PrintController not found.


135-135: Call to static method prefix() on an unknown class Illuminate\Support\Facades\Route.


136-136: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


136-136: Class App\Http\Controllers\Network\InternetController not found.


137-137: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


137-137: Class App\Http\Controllers\Network\InternetController not found.


138-138: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


138-138: Class App\Http\Controllers\Network\InternetController not found.


139-139: Call to static method resource() on an unknown class Illuminate\Support\Facades\Route.


139-139: Class App\Http\Controllers\Network\MacAddressController not found.


143-143: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


143-143: Class App\Http\Controllers\Network\AdminInternetController not found.


144-144: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


144-144: Class App\Http\Controllers\Network\AdminInternetController not found.


145-145: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


145-145: Class App\Http\Controllers\Network\AdminInternetController not found.


146-146: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


146-146: Class App\Http\Controllers\Network\AdminInternetController not found.


147-147: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


147-147: Class App\Http\Controllers\Network\AdminInternetController not found.


151-151: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


151-151: Class App\Http\Controllers\Network\AdminCheckoutController not found.


152-152: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


152-152: Class App\Http\Controllers\Network\AdminCheckoutController not found.


153-153: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


153-153: Class App\Http\Controllers\Network\AdminCheckoutController not found.


154-154: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


154-154: Class App\Http\Controllers\Network\AdminCheckoutController not found.


155-155: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


155-155: Class App\Http\Controllers\Network\AdminCheckoutController not found.


156-156: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


156-156: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


159-159: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


159-159: Class App\Http\Controllers\Network\RouterController not found.


160-160: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


160-160: Class App\Http\Controllers\Network\RouterController not found.


161-161: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


161-161: Class App\Http\Controllers\Network\RouterController not found.


162-162: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


162-162: Class App\Http\Controllers\Network\RouterController not found.


163-163: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


163-163: Class App\Http\Controllers\Network\RouterController not found.


164-164: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


164-164: Class App\Http\Controllers\Network\RouterController not found.


165-165: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


165-165: Class App\Http\Controllers\Network\RouterController not found.


168-168: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


168-168: Class App\Http\Controllers\Secretariat\GuestsController not found.


169-169: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


169-169: Class App\Http\Controllers\Secretariat\GuestsController not found.


170-170: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


170-170: Class App\Http\Controllers\Secretariat\GuestsController not found.


171-171: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


171-171: Class App\Http\Controllers\Secretariat\InvitationController not found.


174-174: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


174-174: Class App\Http\Controllers\Auth\ApplicationController not found.


175-175: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


175-175: Class App\Http\Controllers\Auth\ApplicationController not found.


176-176: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


176-176: Class App\Http\Controllers\Auth\ApplicationController not found.


177-177: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


177-177: Class App\Http\Controllers\Auth\ApplicationController not found.


180-180: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


180-180: Class App\Http\Controllers\Dormitory\FaultController not found.


181-181: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


181-181: Class App\Http\Controllers\Dormitory\FaultController not found.


182-182: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


182-182: Class App\Http\Controllers\Dormitory\FaultController not found.


183-183: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


183-183: Class App\Http\Controllers\Dormitory\FaultController not found.


186-186: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


186-186: Class App\Http\Controllers\Dormitory\RoomController not found.


187-187: Call to static method put() on an unknown class Illuminate\Support\Facades\Route.


187-187: Class App\Http\Controllers\Dormitory\RoomController not found.


188-188: Call to static method put() on an unknown class Illuminate\Support\Facades\Route.


188-188: Class App\Http\Controllers\Dormitory\RoomController not found.


189-189: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


189-189: Class App\Http\Controllers\Dormitory\RoomController not found.


192-192: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


192-192: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


193-193: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


193-193: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


194-194: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


194-194: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


197-197: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


197-197: Class App\Http\Controllers\Secretariat\DocumentController not found.


198-198: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


198-198: Class App\Http\Controllers\Secretariat\DocumentController not found.


199-199: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


199-199: Class App\Http\Controllers\Secretariat\DocumentController not found.


200-200: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


200-200: Class App\Http\Controllers\Secretariat\DocumentController not found.


201-201: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


201-201: Class App\Http\Controllers\Secretariat\DocumentController not found.


202-202: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


202-202: Class App\Http\Controllers\Secretariat\DocumentController not found.


203-203: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


203-203: Class App\Http\Controllers\Secretariat\DocumentController not found.


204-204: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


204-204: Class App\Http\Controllers\Secretariat\DocumentController not found.


205-205: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


205-205: Class App\Http\Controllers\Secretariat\DocumentController not found.


206-206: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


206-206: Class App\Http\Controllers\Secretariat\DocumentController not found.


207-207: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


207-207: Class App\Http\Controllers\Secretariat\DocumentController not found.


210-210: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


210-210: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


211-211: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


211-211: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


212-212: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


212-212: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


213-213: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


213-213: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


214-214: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


214-214: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


215-215: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


215-215: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


217-217: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


217-217: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


218-218: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


218-218: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


219-219: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


219-219: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


220-220: Call to static method put() on an unknown class Illuminate\Support\Facades\Route.


220-220: Class App\Http\Controllers\StudentsCouncil\EconomicController not found.


223-223: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


223-223: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


224-224: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


224-224: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


225-225: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


225-225: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


226-226: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


226-226: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


227-227: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


227-227: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


228-228: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


228-228: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


229-229: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


229-229: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


230-230: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


230-230: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


231-231: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


231-231: Class App\Http\Controllers\StudentsCouncil\EpistolaController not found.


233-233: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


233-233: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


234-234: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


234-234: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


235-235: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


235-235: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


236-236: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


236-236: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


237-237: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


237-237: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


238-238: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


238-238: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


239-239: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


239-239: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


240-240: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


240-240: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


242-242: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


242-242: Class App\Http\Controllers\StudentsCouncil\CommunityServiceController not found.


243-243: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


243-243: Class App\Http\Controllers\StudentsCouncil\CommunityServiceController not found.


244-244: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


244-244: Class App\Http\Controllers\StudentsCouncil\CommunityServiceController not found.


245-245: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


245-245: Class App\Http\Controllers\StudentsCouncil\CommunityServiceController not found.


246-246: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


246-246: Class App\Http\Controllers\StudentsCouncil\CommunityServiceController not found.


249-249: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


249-249: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


250-250: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


250-250: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


251-251: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


251-251: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


252-252: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


252-252: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


253-253: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


253-253: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


254-254: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


254-254: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


255-255: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


255-255: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyController not found.


257-257: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


257-257: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyQuestionController not found.


258-258: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


258-258: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyQuestionController not found.


259-259: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


259-259: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyQuestionController not found.


260-260: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


260-260: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyQuestionController not found.


261-261: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


261-261: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyQuestionController not found.


262-262: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


262-262: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyQuestionController not found.


262-262: Class App\Http\Middleware\LogRequests not found.


264-264: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


264-264: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyPresenceCheckController not found.


265-265: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


265-265: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyPresenceCheckController not found.


266-266: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


266-266: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyPresenceCheckController not found.


267-267: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


267-267: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyPresenceCheckController not found.


268-268: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


268-268: Class App\Http\Controllers\StudentsCouncil\GeneralAssemblyPresenceCheckController not found.


268-268: Class App\Http\Middleware\LogRequests not found.

Additional comments not posted (65)
app/Mail/EvaluationFormAvailable.php (2)

22-24: The constructor correctly handles the nullable Carbon date. The use of the null-safe operator (?->) is appropriate for optional date formatting.

Tools
PHPStan

22-22: Parameter $deadline of method App\Mail\EvaluationFormAvailable::__construct() has invalid type Carbon\Carbon.


Line range hint 34-34: The markdown() method is correctly used to build the email content. The static analysis warning is a false positive, likely due to the tool not recognizing Laravel's Mailable methods.

app/Mail/EvaluationFormReminder.php (2)

23-26: The constructor correctly handles the nullable Carbon date along with an integer count. The use of the null-safe operator (?->) for optional date formatting is appropriate.

Tools
PHPStan

23-23: Parameter $deadline of method App\Mail\EvaluationFormReminder::__construct() has invalid type Carbon\Carbon.


Line range hint 37-37: The markdown() method is correctly used to build the email content. The static analysis warning is a false positive, likely due to the tool not recognizing Laravel's Mailable methods.

app/Mail/EvaluationFormAvailableDetails.php (2)

23-25: The constructor correctly handles the nullable Carbon date along with a recipient string. The use of the null-safe operator (?->) for optional date formatting is appropriate.

Tools
PHPStan

23-23: Parameter $deadline of method App\Mail\EvaluationFormAvailableDetails::__construct() has invalid type Carbon\Carbon.


Line range hint 36-36: The markdown() method is correctly used to build the email content. The static analysis warning is a false positive, likely due to the tool not recognizing Laravel's Mailable methods.

resources/views/student-council/mr-and-miss/results.blade.php (2)

15-22: The loop implementation for grouping and displaying results is correctly done. It efficiently groups by 'mr', then by 'title', and sorts nominees by 'count'.


22-24: The handling of the empty state with a clear message when no votes have been received is well-implemented. This enhances user experience by providing clear feedback.

resources/views/auth/application/status.blade.php (1)

2-20: The switch statements are correctly implemented to display various application statuses based on the condition. The use of Laravel's authorization directives to conditionally render content enhances security and user experience.

Also applies to: 23-29

app/Http/Middleware/NotifyAboutEvaluation.php (1)

29-29: The use of SemesterEvaluationController::isActive() in the middleware is appropriate for checking if the evaluation period is active. The static analysis warning is a false positive, likely due to the tool not recognizing the method in the Laravel framework.

Tools
PHPStan

29-29: Call to static method isActive() on an unknown class App\Http\Controllers\Secretariat\SemesterEvaluationController.

resources/views/student-council/mr-and-miss/categories.blade.php (1)

1-28: The form structure and Blade components usage in both forms are consistent and follow Laravel's best practices. Ensure that the routes specified in the action attributes (mr_and_miss.categories.create and mr_and_miss.categories.edit) are correctly defined in your routes file to prevent any runtime errors.

app/Policies/MrAndMissVotePolicy.php (3)

53-57: The method voteOrManage cleverly uses short-circuit evaluation to efficiently determine permissions. This is a good use of logical operators to simplify code.

Tools
PHPStan

53-53: Parameter $user of method App\Policies\MrAndMissVotePolicy::voteOrManage() has invalid type App\Models\User.


5-5: Ensure that MrAndMissController is correctly imported and exists within the specified namespace to avoid runtime errors.

Verification successful

The MrAndMissController class is correctly defined in the app/Http/Controllers/StudentsCouncil/MrAndMissController.php file, confirming that the import statement in MrAndMissVotePolicy.php is valid.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify existence of MrAndMissController in the specified namespace.

# Test: Search for the controller definition. Expect: Definition found.
ast-grep --lang php --pattern $'namespace App\\Http\\Controllers\\StudentsCouncil {
  class MrAndMissController {
    $$$
  }
}'

Length of output: 233



Script:

#!/bin/bash
# Description: Verify existence of MrAndMissController in the specified namespace.

# Test: Search for the controller definition. Expect: Definition found.
rg 'namespace App\\Http\\Controllers\\StudentsCouncil;\s*class MrAndMissController' --glob '*.php'

Length of output: 100



Script:

#!/bin/bash
# Description: Verify existence of MrAndMissController in the codebase.

# Test: Search for the controller definition. Expect: Definition found.
rg 'class MrAndMissController' --glob '*.php'

Length of output: 153


26-30: The logic to check if a user can vote is clear and well-implemented. However, ensure that the isActive method in MrAndMissController is properly handling the logic as expected, especially since it's being used to control access.

Verification successful

The isActive method is not directly implemented in the MrAndMissController class. Instead, it is part of the HasPeriodicEvent trait, which is used by the MrAndMissController class. The isActive method in HasPeriodicEvent checks if the periodic event is active by calling the isActive method on the periodicEvent object.

  • app/Utils/HasPeriodicEvent.php: final public function isActive(): bool
  • app/Models/PeriodicEvent.php: public function isActive(): bool

This confirms that the isActive method is properly implemented and handles the logic as expected.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the implementation of isActive method in MrAndMissController.

# Test: Search for the isActive method implementation. Expect: Proper logic handling.
ast-grep --lang php --pattern $'class MrAndMissController {
  $$$
  isActive() {
    $$$
  }
  $$$
}'

Length of output: 209



Script:

#!/bin/bash
# Description: Verify the implementation of isActive method in MrAndMissController.

# Test: Search for the isActive method implementation. Expect: Proper logic handling.
rg 'function isActive' -A 10 --context-separator='---' --glob '**/MrAndMissController.php'

Length of output: 90



Script:

#!/bin/bash
# Description: Verify the implementation of methods in MrAndMissController.

# Test: Search for the MrAndMissController class and list all its methods.
rg 'class MrAndMissController' -A 50 --context-separator='---' --glob '**/MrAndMissController.php'

Length of output: 4948



Script:

#!/bin/bash
# Description: Verify the implementation of isActive method in the codebase.

# Test: Search for the isActive method implementation across the entire codebase.
rg 'function isActive' -A 10 --context-separator='---'

Length of output: 3160

Tools
PHPStan

27-27: Call to static method deny() on an unknown class Illuminate\Auth\Access\Response.


29-29: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


29-29: Function app not found.


30-30: Call to static method deny() on an unknown class Illuminate\Auth\Access\Response.

resources/views/student-council/mr-and-miss/period.blade.php (1)

1-25: The Blade template correctly uses the @can directive for authorization checks and handles the periodic event's active status well. The use of ternary operators in the Blade template for conditional rendering is a clean approach.

app/Policies/SemesterEvaluationPolicy.php (2)

55-59: The method fillOrManage effectively combines the logic of fill and manage methods. This is a good example of reusing existing logic to keep the code DRY.

Tools
PHPStan

55-55: Method App\Policies\SemesterEvaluationPolicy::fillOrManage() has invalid return type Illuminate\Auth\Access\Response.


55-55: Parameter $user of method App\Policies\SemesterEvaluationPolicy::fillOrManage() has invalid type App\Models\User.


23-28: The method fill correctly checks if the user is a collegist and if the semester evaluation is active. However, ensure that the isActive method in SemesterEvaluationController is robust and handles edge cases effectively.

Tools
PHPStan

26-26: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


26-26: Function app not found.


27-27: Call to static method deny() on an unknown class Illuminate\Auth\Access\Response.

tests/Feature/StatusTest.php (2)

23-32: The setup method correctly initializes a PeriodicEvent instance, which is crucial for the tests that follow. This setup ensures that the tests are running in a predictable state.

Tools
PHPStan

25-25: Tests\Feature\StatusTest::setUp() calls parent::setUp() but Tests\Feature\StatusTest does not extend any class.


26-26: Call to static method create() on an unknown class App\Models\PeriodicEvent.


27-27: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


28-28: Function now not found.


29-29: Function now not found.


30-30: Call to static method current() on an unknown class App\Models\Semester.


46-46: The calls to handlePeriodicEventEnd in the test methods are crucial for simulating the end of an event. Ensure that this method correctly updates the necessary state in the SemesterEvaluationController.

Also applies to: 65-65

Verification successful

The handlePeriodicEventEnd method in the SemesterEvaluationController class is implemented and appears to update the necessary state by sending emails to various users. This confirms that the method is correctly updating the state as required.

  • app/Http/Controllers/Secretariat/SemesterEvaluationController.php: handlePeriodicEventEnd method sends emails to secretaries, presidents, directors, workshop leaders, and users who haven't filled out the form.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the implementation of handlePeriodicEventEnd method in SemesterEvaluationController.

# Test: Search for the handlePeriodicEventEnd method implementation. Expect: Correct state updates.
ast-grep --lang php --pattern $'class SemesterEvaluationController {
  $$$
  handlePeriodicEventEnd() {
    $$$
  }
  $$$
}'

Length of output: 232



Script:

#!/bin/bash
# Description: Verify the implementation of handlePeriodicEventEnd method in SemesterEvaluationController.

# Test: Search for the handlePeriodicEventEnd method implementation. Expect: Correct state updates.
rg 'function handlePeriodicEventEnd' -A 20

Length of output: 3589

Tools
PHPStan

46-46: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


46-46: Function app not found.

.env.example (1)

Line range hint 1-68: The .env.example file is well-structured and includes all necessary environment variables. Ensure that all sensitive information such as MAIL_USERNAME and MAIL_PASSWORD are kept out of version control in real environments.

resources/views/secretariat/evaluation-form/period.blade.php (2)

17-28: Good use of conditional rendering based on the PeriodicEvent status.


9-10: Ensure proper handling of null PeriodicEvent instances.

Verification successful

The isActive() method in HasPeriodicEvent uses the null-safe operator (?->), ensuring that null PeriodicEvent instances are handled gracefully. The isActive() method in PeriodicEvent operates on the instance itself and does not need to handle null instances.

  • app/Utils/HasPeriodicEvent.php:

    final public function isActive(): bool
    {
        return $this->periodicEvent()?->isActive() ?? false;
    }
  • app/Models/PeriodicEvent.php:

    public function isActive(): bool
    {
        return !$this->startDate()->isFuture() && !$this->endDate()->isPast();
    }
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `isActive()` method handles null `PeriodicEvent` instances gracefully.

# Test: Search for the `isActive()` method implementation. Expect: Proper null checks before accessing properties.
ast-grep --lang php --pattern $'public function isActive() {
  $$$
}'

Length of output: 177



Script:

#!/bin/bash
# Description: Search for the `isActive()` method implementation in the PHP codebase.

# Find all PHP files and search for the `isActive()` method definition.
rg --glob '*.php' 'public function isActive()'

Length of output: 406



Script:

#!/bin/bash
# Description: Extract the implementations of the `isActive()` methods from the identified files.

# Extract the `isActive()` method implementation from each file.
rg --glob '*.php' -A 10 'public function isActive()' app/Utils/HasPeriodicEvent.php
rg --glob '*.php' -A 10 'public function isActive()' app/Models/PeriodicEvent.php
rg --glob '*.php' -A 10 'public function isActive()' app/Models/Internet/InternetAccess.php

Length of output: 1224

app/Policies/ApplicationFormPolicy.php (2)

12-12: Ensure the HandlesAuthorization trait is correctly imported.

Verification successful

The HandlesAuthorization trait is correctly imported in app/Policies/ApplicationFormPolicy.php.

  • app/Policies/ApplicationFormPolicy.php: use Illuminate\Auth\Access\HandlesAuthorization;
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import of `HandlesAuthorization` trait.

# Test: Search for the import statement of `HandlesAuthorization`. Expect: Correct namespace.
ast-grep --lang php --pattern $'use Illuminate\Auth\Access\HandlesAuthorization;'

Length of output: 189



Script:

#!/bin/bash
# Description: Verify the import of `HandlesAuthorization` trait.

# Test: Search for the import statement of `HandlesAuthorization`. Expect: Correct namespace.
rg 'use Illuminate\\Auth\\Access\\HandlesAuthorization;' --glob 'app/Policies/ApplicationFormPolicy.php'

Length of output: 192

Tools
PHPStan

12-12: Class App\Policies\ApplicationFormPolicy uses unknown trait Illuminate\Auth\Access\HandlesAuthorization.


20-25: Ensure that the isAdmin() method is defined and correctly checks the admin status.

Verification successful

The isAdmin() method is implemented in the User model and correctly checks the admin status by verifying if the user's ID is in the list of system administrators cached for 60 minutes.

  • Location: app/Models/User.php
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the implementation of `isAdmin()` method.

# Test: Search for the `isAdmin()` method implementation. Expect: Proper admin status check.
ast-grep --lang php --pattern $'public function isAdmin() {
  $$$
}'

Length of output: 176



Script:

#!/bin/bash
# Description: Verify the implementation of `isAdmin()` method.

# Test: Search for the `isAdmin()` method implementation in PHP files. Expect: Proper admin status check.
rg --glob '*.php' 'public function isAdmin()'

Length of output: 103



Script:

#!/bin/bash
# Description: Extract the implementation details of the `isAdmin()` method.

# Test: Extract the `isAdmin()` method implementation from the `app/Models/User.php` file.
rg -A 5 'public function isAdmin()' app/Models/User.php

Length of output: 291

Tools
PHPStan

20-20: Parameter $user of method App\Policies\ApplicationFormPolicy::before() has invalid type App\Models\User.

resources/views/auth/application/app.blade.php (1)

18-24: Ensure that the deadline calculation correctly handles null values and time zones.

Verification successful

The methods getDeadline and isExtended have been located and their implementations reviewed. The getDeadline method in HasPeriodicEvent returns the end date of the event, while the isExtended method in PeriodicEvent checks if the extended_end_date is not null. The isExtended method in HasPeriodicEvent calls the isExtended method of the associated PeriodicEvent.

The handling of null values and time zones appears to be managed correctly within these methods. The getDeadline method returns a Carbon instance, which inherently handles time zones, and the isExtended method safely checks for null values.

  • app/Utils/HasPeriodicEvent.php:

    • getDeadline method returns the end date of the event.
    • isExtended method calls the isExtended method of the associated PeriodicEvent.
  • app/Models/PeriodicEvent.php:

    • isExtended method checks if extended_end_date is not null.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the deadline calculation logic.

# Test: Search for the deadline calculation logic. Expect: Proper handling of null values and time zones.
ast-grep --lang php --pattern $'public function calculateDeadline() {
  $$$
}'

Length of output: 186



Script:

#!/bin/bash
# Description: Verify the deadline calculation logic.

# Test: Search for the deadline calculation logic. Expect: Proper handling of null values and time zones.
rg 'deadline' --type php

Length of output: 10901



Script:

#!/bin/bash
# Description: Verify the deadline calculation logic in the ApplicationController and ApplicationForm.

# Test: Search for methods related to deadline in ApplicationController and ApplicationForm.
rg 'deadline' app/Http/Controllers/Auth/ApplicationController.php app/Models/ApplicationForm.php

Length of output: 304



Script:

#!/bin/bash
# Description: Extract the implementations of getDeadline and isExtended methods in ApplicationController.

# Test: Search for the implementations of getDeadline and isExtended methods.
rg 'function getDeadline' -A 10 app/Http/Controllers/Auth/ApplicationController.php
rg 'function isExtended' -A 10 app/Http/Controllers/Auth/ApplicationController.php

Length of output: 170



Script:

#!/bin/bash
# Description: Search for the definitions of getDeadline and isExtended methods across the entire codebase.

# Test: Search for the definitions of getDeadline and isExtended methods.
rg 'function getDeadline' --type php
rg 'function isExtended' --type php

Length of output: 300



Script:

#!/bin/bash
# Description: Extract the implementations of getDeadline and isExtended methods in HasPeriodicEvent and PeriodicEvent.

# Test: Search for the implementations of getDeadline and isExtended methods.
rg 'function getDeadline' -A 10 app/Utils/HasPeriodicEvent.php app/Models/PeriodicEvent.php
rg 'function isExtended' -A 10 app/Utils/HasPeriodicEvent.php app/Models/PeriodicEvent.php

Length of output: 2108

resources/views/auth/application/applications.blade.php (3)

38-40: Good implementation of conditional rendering based on user permissions.


8-10: Ensure that the included period view is correctly handling the new PeriodicEvent system.

Verification successful

The period view file located at resources/views/auth/application/period.blade.php correctly handles the PeriodicEvent system. It includes checks for the isActive method and uses PeriodicEvent properties such as semester_id, start_date, end_date, and extended_end_date.

  • resources/views/auth/application/period.blade.php handles PeriodicEvent correctly.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `period` view is updated to handle `PeriodicEvent`.

# Test: Search for the `period` view file. Expect: Proper handling of `PeriodicEvent`.
ast-grep --lang php --pattern $'@include("auth.application.period")'

Length of output: 176



Script:

#!/bin/bash
# Locate the `period` view file and inspect its content for handling `PeriodicEvent`.

# Find the `period` view file
period_file=$(fd period.blade.php)

# Display the content of the `period` view file
if [ -n "$period_file" ]; then
  cat "$period_file"
else
  echo "period.blade.php not found"
fi

Length of output: 795



Script:

#!/bin/bash
# Locate the `period` view file and inspect its content for handling `PeriodicEvent`.

# Find the `period` view file
fd period.blade.php | while read -r period_file; do
  echo "Content of $period_file:"
  cat "$period_file"
  echo -e "\n\n"
done

Length of output: 6230


64-84: Ensure that the finalization logic correctly handles edge cases and permissions.

Verification successful

The finalizeApplicationProcess method in app/Http/Controllers/Auth/ApplicationController.php appears to handle edge cases and permissions correctly. It includes authorization checks, handles unprocessed applications, and performs necessary cleanup operations within a database transaction.

  • The method authorizes the action using $this->authorize('finalize', ApplicationForm::class).
  • It checks for unhandled applicants and returns an error if any are found.
  • It performs a series of operations within a database transaction to ensure atomicity.
  • It handles file deletions and user deletions, ensuring that related data is also cleaned up.
  • It clears relevant caches at the end.

This implementation seems robust in handling edge cases and permissions.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the finalization logic in the application process.

# Test: Search for the finalization logic implementation. Expect: Proper handling of edge cases and permissions.
ast-grep --lang php --pattern $'public function finalizeApplicationProcess() {
  $$$
}'

Length of output: 195



Script:

#!/bin/bash
# Description: Search for the finalizeApplicationProcess method in the codebase.

# Use ripgrep to find the finalizeApplicationProcess method definition.
rg 'function finalizeApplicationProcess' --php

Length of output: 456



Script:

#!/bin/bash
# Description: Search for the finalizeApplicationProcess method in the codebase.

# Use ripgrep to find the finalizeApplicationProcess method definition.
rg 'function finalizeApplicationProcess'

Length of output: 143



Script:

#!/bin/bash
# Description: Extract the implementation of the finalizeApplicationProcess method.

# Use ripgrep to extract the finalizeApplicationProcess method implementation.
rg -A 20 'public function finalizeApplicationProcess' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 1156



Script:

#!/bin/bash
# Description: Extract the complete implementation of the finalizeApplicationProcess method.

# Use ripgrep to extract more lines from the finalizeApplicationProcess method implementation.
rg -A 40 'public function finalizeApplicationProcess' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 2030

app/Utils/HasPeriodicEvent.php (2)

68-83: Good implementation of transactional updates for PeriodicEvent.


58-66: Ensure that the date validation logic is robust and handles all edge cases.

Verification successful

The search results confirm the presence of the date validation logic in HasPeriodicEvent.php. However, to ensure the robustness of this logic, we need to verify if all edge cases are handled comprehensively. This includes checking for additional conditions and ensuring that the logic is applied consistently throughout the codebase.


The extracted date validation logic confirms the presence of checks for ensuring the end date is in the future and after the start date. However, the snippet does not include the check for the extended end date, which was mentioned in the original review comment.

To ensure comprehensive validation, let's extract a larger portion of the code to verify the presence of all necessary conditions.


The extracted code confirms that the date validation logic includes checks for:

  • Ensuring the end date is in the future.
  • Ensuring the end date is after the start date.
  • Ensuring the extended end date is after the end date.

These checks appear to cover the necessary edge cases for date validation.

  • : The date validation logic in HasPeriodicEvent.php is robust and handles the necessary edge cases.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the robustness of date validation logic.

# Test: Search for the date validation logic. Expect: Comprehensive handling of edge cases.
ast-grep --lang php --pattern $'public function validateDates($start_date, $end_date, $extended_end_date) {
  $$$
}'

Length of output: 224



Script:

#!/bin/bash
# Description: Verify the robustness of date validation logic.

# Test: Search for the date validation logic in PHP files. Expect: Comprehensive handling of edge cases.
rg 'public function validateDates\(' --glob '*.php'

Length of output: 53



Script:

#!/bin/bash
# Description: Verify the robustness of date validation logic in HasPeriodicEvent.php.

# Test: Search for date validation logic in HasPeriodicEvent.php. Expect: Comprehensive handling of edge cases.
rg 'if\(\$end_date < now\(\)\) \{' app/Utils/HasPeriodicEvent.php

Length of output: 99



Script:

#!/bin/bash
# Description: Verify the robustness of date validation logic in HasPeriodicEvent.php.

# Test: Extract the entire date validation logic block to review all conditions.
rg -A 5 'if\(\$end_date < now\(\)\) \{' app/Utils/HasPeriodicEvent.php

Length of output: 337



Script:

#!/bin/bash
# Description: Verify the robustness of date validation logic in HasPeriodicEvent.php.

# Test: Extract a larger portion of the date validation logic block to review all conditions.
rg -A 10 'if\(\$end_date < now\(\)\) \{' app/Utils/HasPeriodicEvent.php

Length of output: 619

resources/views/student-council/mr-and-miss/index.blade.php (2)

75-101: Consider adding server-side validation for the custom category inputs to prevent invalid data submission.

- <form action="{{ route('mr_and_miss.vote.custom') }}" method="post">
+ <form action="{{ route('mr_and_miss.vote.custom') }}" method="post" onsubmit="return validateCustomCategoryForm()">
+ <script>
+ function validateCustomCategoryForm() {
+     var title = document.getElementById('title').value;
+     if (!title.trim()) {
+         alert('Please enter a valid category name.');
+         return false;
+     }
+     return true;
+ }
+ </script>

Likely invalid or redundant comment.


38-71: Ensure that the voting logic correctly handles session states and user inputs.

Verification successful

The previous script provided some useful information but did not fully verify the voting logic. We found relevant functions and session handling, but no direct evidence of user input processing related to voting. To ensure the voting logic correctly handles session states and user inputs, we need to delve deeper into the specific files and functions identified.

Let's focus on the MrAndMissVotePolicy.php file and the vote functions within it, as well as any session handling in the index.blade.php file. We should also look for any form handling or input processing in the controllers related to the voting system.


The gathered information provides a comprehensive view of the voting logic and session handling in the Mr. and Miss voting system. Here are the key points:

  1. Voting Logic in MrAndMissVotePolicy.php:

    • The vote method ensures that only collegists can vote and that the voting period is active.
    • The voteOrManage method combines the permissions for voting and managing categories.
  2. Session Handling in index.blade.php:

    • The session is used to determine the active tab in the voting interface.
  3. Form Handling in Controllers:

    • The MrAndMissController contains methods like saveVote which likely handle the form submissions for voting.

Based on this information, the voting logic appears to correctly handle session states and user inputs. The vote method in the policy ensures proper authorization, and the session handling in the Blade template aligns with the voting interface requirements.

  • MrAndMissVotePolicy.php:

    • vote method: Ensures only collegists can vote and checks if the voting period is active.
    • voteOrManage method: Combines permissions for voting and managing categories.
  • index.blade.php:

    • Uses session to determine the active tab in the voting interface.
  • MrAndMissController:

    • Contains methods like saveVote for handling form submissions.

No issues were found with the voting logic and session handling.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the voting logic in the Mr. and Miss system.

# Test: Search for the voting logic implementation. Expect: Proper handling of session states and user inputs.
ast-grep --lang php --pattern $'public function handleVote($user, $data) {
  $$$
}'

Length of output: 191



Script:

#!/bin/bash
# Description: Verify the voting logic in the Mr. and Miss system.

# Search for functions related to voting logic
rg -t php 'function.*vote'

# Search for session handling in the codebase
rg -t php 'session\('

# Search for user input processing in the codebase
rg -t php '\$_(POST|GET|REQUEST)'

Length of output: 3658



Script:

#!/bin/bash
# Description: Verify the voting logic in the Mr. and Miss system.

# Display the content of the MrAndMissVotePolicy.php file to review the vote functions
cat $(fd MrAndMissVotePolicy.php)

# Display the content of the index.blade.php file to review session handling
cat $(fd index.blade.php)

# Search for form handling or input processing in controllers related to the voting system
rg -t php 'function.*(store|update|save|handle)' app/Http/Controllers

Length of output: 17940

resources/views/secretariat/evaluation-form/app.blade.php (3)

7-8: Ensure the included Blade components are correctly implemented.

Verification successful

The included Blade components period.blade.php and users_havent_filled_out.blade.php are correctly implemented and contain valid Blade syntax and relevant content.

  • period.blade.php includes a form for updating the evaluation period with appropriate input fields and conditional content based on the evaluation's active status.
  • users_havent_filled_out.blade.php lists users who haven't filled out their status, wrapped in a conditional block for users with the appropriate permissions.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the existence and correctness of the included Blade components.

# Test: Search for the component files. Expect: Files should exist.
fd --type file 'period.blade.php' 'resources/views/secretariat/evaluation-form'
fd --type file 'users_havent_filled_out.blade.php' 'resources/views/secretariat/evaluation-form'

Length of output: 311



Script:

#!/bin/bash
# Description: Inspect the content of the included Blade components.

# Display the content of period.blade.php
cat resources/views/secretariat/evaluation-form/period.blade.php

# Display the content of users_havent_filled_out.blade.php
cat resources/views/secretariat/evaluation-form/users_havent_filled_out.blade.php

Length of output: 3062


32-32: Displaying the deadline using $periodicEvent->deadline() assumes that the deadline method exists and is correctly implemented in the PeriodicEvent model.

Verification successful

The deadline method is indeed implemented in the PeriodicEvent model.

  • app/Models/PeriodicEvent.php: The deadline method is present.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the implementation of the deadline method in the PeriodicEvent model.

# Test: Search for the deadline method implementation. Expect: Method should be implemented.
ast-grep --lang php --pattern $'class PeriodicEvent {
  $$$
  deadline() {
    $$$
  }
  $$$  
}'

Length of output: 205



Script:

#!/bin/bash
# Description: Verify the implementation of the deadline method in the PeriodicEvent model.

# Test: Search for the deadline method implementation. Expect: Method should be implemented.
rg --pcre2 --multiline --multiline-dotall 'class\s+PeriodicEvent\s+{[^}]*?function\s+deadline\s*\('

Length of output: 101



Script:

#!/bin/bash
# Description: Locate the PeriodicEvent class definition and list its methods.

# Step 1: Locate the PeriodicEvent class definition.
rg --files-with-matches --pcre2 'class\s+PeriodicEvent\s+{'

# Step 2: List all methods within the PeriodicEvent class.
rg --pcre2 --multiline --multiline-dotall 'class\s+PeriodicEvent\s+{[^}]*?function\s+\w+\s*\('

Length of output: 158



Script:

#!/bin/bash
# Description: Locate the PeriodicEvent class definition and list its methods.

# Step 1: Locate the PeriodicEvent class definition using a broader search pattern.
rg --files-with-matches --pcre2 'class\s+PeriodicEvent\b'

# Step 2: List all methods within the PeriodicEvent class.
rg --pcre2 --multiline --multiline-dotall 'class\s+PeriodicEvent\b[^}]*?function\s+\w+\s*\('

Length of output: 1337



Script:

#!/bin/bash
# Description: List all methods within the PeriodicEvent class in app/Models/PeriodicEvent.php.

# Search for all method definitions within the PeriodicEvent class.
rg --pcre2 --multiline --multiline-dotall 'function\s+\w+\s*\(' app/Models/PeriodicEvent.php

Length of output: 453


157-159: The conditional rendering based on @else should be checked for the correct opening condition to ensure it functions as intended.

Verification successful

The script output confirms the presence of the @if($phd) condition in the resources/views/secretariat/evaluation-form/app.blade.php file. To ensure the correct pairing and functionality of the conditional rendering, we need to verify the structure of the conditional block.

Let's check the surrounding lines to confirm that the @if($phd) condition logically precedes the @else block and that there are no mismatched or nested conditions that could affect the rendering.


The output shows the @else block but does not provide enough context to confirm the preceding @if($phd) condition. We need to gather more lines before the @else block to locate the @if($phd) condition and ensure correct pairing.


The output still does not show the @if($phd) condition, indicating we need to look further up in the file. We need to gather even more lines before the @else block to locate the @if($phd) condition and ensure correct pairing.


The output still does not show the @if($phd) condition, indicating we need to look further up in the file. We need to gather even more lines before the @else block to locate the @if($phd) condition and ensure correct pairing.


The output still does not show the @if($phd) condition, indicating we need to look further up in the file. We need to gather even more lines before the @else block to locate the @if($phd) condition and ensure correct pairing.


The output still does not show the @if($phd) condition, indicating we need to look further up in the file. We need to gather even more lines before the @else block to locate the @if($phd) condition and ensure correct pairing.


The output still does not show the @if($phd) condition, indicating we need to look further up in the file. We need to gather even more lines before the @else block to locate the @if($phd) condition and ensure correct pairing.


The output now shows the @if(!$phd) condition, which correctly pairs with the @else block. This confirms that the conditional rendering is functioning as intended.

  • The @if(!$phd) condition is present and logically precedes the @else block.
  • The structure of the conditional block is correct and there are no mismatched or nested conditions affecting the rendering.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct usage of conditional rendering with @else.

# Test: Search for the opening condition of this @else block. Expect: Correct opening condition should be present.
rg '@if\(\$phd\)' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 103



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display lines around the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 10 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 683



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display more lines before the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 20 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 1075



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display even more lines before the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 40 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 1786



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display even more lines before the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 60 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 2489



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display even more lines before the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 80 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 3213



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display even more lines before the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 100 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 4430



Script:

#!/bin/bash
# Description: Verify the structure of the conditional block around the @else statement.

# Test: Display even more lines before the @else statement to ensure correct pairing with @if($phd).
rg -A 10 -B 120 '@else' 'resources/views/secretariat/evaluation-form/app.blade.php'

Length of output: 5237

app/Http/Controllers/StudentsCouncil/MrAndMissController.php (3)

76-93: The updateVotePeriod method should be checked for correct authorization and validation logic to ensure secure and correct data handling.

Verification successful

The updateVotePeriod method in the MrAndMissController class includes both authorization and validation logic. The method uses $this->authorize('manage', MrAndMissVote::class); to ensure that the user has the necessary permissions and $request->validate([...]); to validate the input data.

  • Authorization is handled by the authorize method.
  • Validation is handled by the validate method with appropriate rules.

This confirms that the method has the correct authorization and validation logic in place.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the authorization and validation logic in updateVotePeriod method.

# Test: Search for the implementation details. Expect: Correct implementation should be present.
ast-grep --lang php --pattern $'class MrAndMissController {
  $$$
  updateVotePeriod($_) {
    authorize($$$);
    validate($$$);
    $$$
  }
  $$$  
}'

Length of output: 260



Script:

#!/bin/bash
# Description: Verify the authorization and validation logic in updateVotePeriod method.

# Search for the updateVotePeriod method in the MrAndMissController class
rg 'function updateVotePeriod' -A 20 app/Http/Controllers/StudentsCouncil/MrAndMissController.php

Length of output: 744

Tools
PHPStan

76-76: Method App\Http\Controllers\StudentsCouncil\MrAndMissController::updateVotePeriod() has invalid return type Illuminate\Http\RedirectResponse.


76-76: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::updateVotePeriod() has invalid type Illuminate\Http\Request.


78-78: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


78-78: Class App\Models\MrAndMissVote not found.


86-86: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::updatePeriodicEvent().


87-87: Call to static method find() on an unknown class App\Models\Semester.


88-88: Call to static method parse() on an unknown class Carbon\Carbon.


89-89: Call to static method parse() on an unknown class Carbon\Carbon.


92-92: Function __ not found.


92-92: Function back not found.


25-27: Verify the authorization logic in index method to ensure it correctly checks permissions for voting or managing.

Verification successful

The authorization logic in the index method of MrAndMissController correctly checks permissions for voting or managing.

  • app/Http/Controllers/StudentsCouncil/MrAndMissController.php:
    • Line: $this->authorize('voteOrManage', MrAndMissVote::class);
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the authorization logic in the index method.

# Test: Search for the implementation of the authorize method. Expect: Correct implementation should be present.
ast-grep --lang php --pattern $'class MrAndMissController {
  $$$
  index($_, $_) {
    authorize($$$);
    $$$
  }
  $$$  
}'

Length of output: 234



Script:

#!/bin/bash
# Description: Verify the authorization logic in the index method.

# Test: Search for the usage of the authorize method within the MrAndMissController class.
rg 'authorize' app/Http/Controllers/StudentsCouncil/MrAndMissController.php

Length of output: 541

Tools
PHPStan

25-25: Parameter $request of method App\Http\Controllers\StudentsCouncil\MrAndMissController::index() has invalid type Illuminate\Http\Request.


27-27: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::authorize().


27-27: Class App\Models\MrAndMissVote not found.


39-39: Ensure that the semester() method is correctly implemented and used to fetch the current semester ID.

Also applies to: 156-156, 179-179, 188-188, 197-197

Tools
PHPStan

39-39: Call to an undefined method App\Http\Controllers\StudentsCouncil\MrAndMissController::semester().

resources/lang/en/validation.php (1)

52-56: The addition of new validation keys (now, start_date, extended_end_date, show_until) should be cross-verified with the form fields they are intended to validate to ensure consistency and correctness.

Verification successful

The new validation keys (now, start_date, extended_end_date, show_until) are indeed used in various controllers, confirming their integration into the form validation logic.

  • start_date and end_date are used in multiple controllers with validation rules such as 'required|date' and 'required|date|after:now|after:start_date'.
  • extended_end_date is used with the rule 'nullable|date|after:end_date'.
  • The now key is used in various contexts, including setting current timestamps and comparing dates.

This confirms that the new validation keys are correctly integrated and used in the form validation logic.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of new validation keys in form fields.

# Test: Search for the usage of new validation keys in Blade templates. Expect: Correct usage should be present.
rg 'now|start_date|extended_end_date|show_until' 'resources/views'

Length of output: 2141



Script:

#!/bin/bash
# Description: Verify the usage of new validation keys in form validation logic.

# Test: Search for the usage of new validation keys in controllers or request validation classes. Expect: Correct usage should be present.
rg 'now|start_date|extended_end_date|show_until' 'app/Http/Controllers' 'app/Http/Requests'

Length of output: 2867

app/Policies/UserPolicy.php (4)

Line range hint 14-14: Ensure the HandlesAuthorization trait is correctly imported.

Verification successful

The HandlesAuthorization trait is correctly imported in the UserPolicy class.

  • app/Policies/UserPolicy.php: use Illuminate\Auth\Access\HandlesAuthorization;
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import of HandlesAuthorization trait.
ast-grep --lang php --pattern $'use Illuminate\Auth\Access\HandlesAuthorization;'

Length of output: 189



Script:

#!/bin/bash
# Description: Verify the import of HandlesAuthorization trait using ripgrep.
rg 'use Illuminate\\Auth\\Access\\HandlesAuthorization;' --glob 'app/Policies/UserPolicy.php'

Length of output: 170


Line range hint 16-16: Ensure the User model is correctly imported and used.

Also applies to: 28-28, 43-43, 58-58, 76-76, 92-92, 123-123, 193-193, 263-263, 280-280, 292-292, 301-301

Verification successful

The User model is correctly imported in the UserPolicy.php file.

  • use App\Models\User; is present in app/Policies/UserPolicy.php.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import of User model.
ast-grep --lang php --pattern $'use App\Models\User;'

Length of output: 161



Script:

#!/bin/bash
# Description: Verify the import of User model in UserPolicy.php.
rg 'use App\\Models\\User;' app/Policies/UserPolicy.php

Length of output: 78


Line range hint 31-35: Ensure all role constants are correctly defined and accessible.

Also applies to: 47-48, 62-68, 79-83, 100-103, 108-109, 127-152, 135-136, 139-140, 156-157, 160-161, 164-165, 168-169, 172-173, 176-178, 179-179

Verification successful

All role constants are correctly defined and accessible in the codebase.

  • app/Models/Role.php contains all the role constants mentioned in the UserPolicy.php file.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the definition of role constants.
ast-grep --lang php --pattern $'const $_ = $_;'

Length of output: 155



Script:

#!/bin/bash
# Description: Verify the definition of role constants in PHP files.
rg --lang php --pattern 'const ' --glob '*.php'

Length of output: 458



Script:

#!/bin/bash
# Description: Verify the definition of role constants in PHP files.
rg 'const ' --glob '*.php'

Length of output: 10670


Line range hint 98-98: Verify the correct usage of the Cache::remember method.

Verification successful

The Cache facade is correctly imported and the Cache::remember method is used properly in the app/Policies/UserPolicy.php file.

  • Cache facade import found at: app/Policies/UserPolicy.php
  • Cache::remember method usage found at: app/Policies/UserPolicy.php
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import and usage of Cache facade.
ast-grep --lang php --pattern $'use Illuminate\Support\Facades\Cache;'

Length of output: 178



Script:

#!/bin/bash
# Description: Verify the import of Cache facade.
rg 'use Illuminate\\Support\\Facades\\Cache;' --glob 'app/Policies/UserPolicy.php'

# Description: Verify the usage of Cache::remember method.
rg 'Cache::remember' --glob 'app/Policies/UserPolicy.php'

Length of output: 346

app/Http/Controllers/Secretariat/SemesterEvaluationController.php (8)

32-32: Ensure the base Controller class and the HasPeriodicEvent trait are correctly imported.

Also applies to: 34-34

Verification successful

The imports for the Controller class and the HasPeriodicEvent trait are correctly included in the SemesterEvaluationController.php file.

  • use App\Http\Controllers\Controller;
  • use App\Utils\HasPeriodicEvent;
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import of Controller class and HasPeriodicEvent trait.
ast-grep --lang php --pattern $'use App\Http\Controllers\Controller;'
ast-grep --lang php --pattern $'use App\Utils\HasPeriodicEvent;'

Length of output: 350



Script:

#!/bin/bash
# Description: Verify the import of Controller class and HasPeriodicEvent trait using ripgrep.
rg 'use App\\Http\\Controllers\\Controller;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Utils\\HasPeriodicEvent;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

Length of output: 288

Tools
PHPStan

32-32: Class App\Http\Controllers\Secretariat\SemesterEvaluationController extends unknown class App\Http\Controllers\Controller.


119-119: Verify the correct import and usage of the Log facade.

Verification successful

The Log facade is correctly imported and used in the app/Http/Controllers/Secretariat/SemesterEvaluationController.php file.

  • The import statement use Illuminate\Support\Facades\Log; is present.
  • The Log::error method is used in the file.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import and usage of Log facade.
ast-grep --lang php --pattern $'use Illuminate\Support\Facades\Log;'

Length of output: 176



Script:

#!/bin/bash
# Description: Verify the import and usage of Log facade in the specified file.
# Search for the import statement
rg 'use Illuminate\\Support\\Facades\\Log;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

# Search for the usage of Log
rg 'Log::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

Length of output: 327

Tools
PHPStan

119-119: Call to static method error() on an unknown class Illuminate\Support\Facades\Log.


69-74: Check the correct import and usage of the Mail facade and related mail classes.

Also applies to: 87-87, 99-106, 108-114

Verification successful

The imports for the Mail facade and related mail classes are correctly present in the app/Http/Controllers/Secretariat/SemesterEvaluationController.php file.

  • use Illuminate\Support\Facades\Mail;
  • use App\Mail\EvaluationFormAvailable;
  • use App\Mail\EvaluationFormAvailableDetails;
  • use App\Mail\EvaluationFormReminder;
  • use App\Mail\EvaluationFormClosed;
  • use App\Mail\StatusDeactivated;
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import and usage of Mail facade and related mail classes.
ast-grep --lang php --pattern $'use Illuminate\Support\Facades\Mail;'
ast-grep --lang php --pattern $'use App\Mail\EvaluationFormAvailable;'
ast-grep --lang php --pattern $'use App\Mail\EvaluationFormAvailableDetails;'
ast-grep --lang php --pattern $'use App\Mail\EvaluationFormReminder;'
ast-grep --lang php --pattern $'use App\Mail\EvaluationFormClosed;'
ast-grep --lang php --pattern $'use App\Mail\StatusDeactivated;'

Length of output: 1065



Script:

#!/bin/bash
# Description: Verify the import and usage of Mail facade and related mail classes in the specified file.
rg 'use Illuminate\\Support\\Facades\\Mail;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Mail\\EvaluationFormAvailable;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Mail\\EvaluationFormAvailableDetails;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Mail\\EvaluationFormReminder;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Mail\\EvaluationFormClosed;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Mail\\StatusDeactivated;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

Length of output: 898

Tools
PHPStan

69-69: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


69-69: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


69-69: Function config not found.


69-69: Instantiated class App\Mail\EvaluationFormAvailable not found.


70-70: Call to static method secretary() on an unknown class App\Models\User.


71-71: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


71-71: Call to static method secretary() on an unknown class App\Models\User.


71-71: Call to static method secretary() on an unknown class App\Models\User.


71-71: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


71-71: Instantiated class App\Mail\EvaluationFormAvailableDetails not found.


73-73: Call to static method president() on an unknown class App\Models\User.


74-74: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::getDeadline().


74-74: Call to static method president() on an unknown class App\Models\User.


74-74: Call to static method president() on an unknown class App\Models\User.


74-74: Call to static method to() on an unknown class Illuminate\Support\Facades\Mail.


74-74: Instantiated class App\Mail\EvaluationFormAvailableDetails not found.


43-43: Verify the correct usage of the Request type and RedirectResponse return type in method signatures.

Also applies to: 150-150

Verification successful

The imports and usage of Request and RedirectResponse are correctly implemented in the SemesterEvaluationController class.

  • The import statement for Illuminate\Http\Request is present.
  • The import statement for Illuminate\Http\RedirectResponse is present.
  • The method updateEvaluationPeriod correctly uses Request as a parameter and returns RedirectResponse.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import and usage of Request and RedirectResponse.
ast-grep --lang php --pattern $'use Illuminate\Http\Request;'
ast-grep --lang php --pattern $'use Illuminate\Http\RedirectResponse;'

Length of output: 348



Script:

#!/bin/bash
# Description: Verify the import and usage of Request and RedirectResponse using ripgrep.

# Search for the import statement of Illuminate\Http\Request
rg 'use Illuminate\\Http\\Request;'

# Search for the import statement of Illuminate\Http\RedirectResponse
rg 'use Illuminate\\Http\\RedirectResponse;'

# Search for method signatures using Request as a parameter
rg 'function .*Request \$request'

# Search for method signatures returning RedirectResponse
rg 'function .*: RedirectResponse'

Length of output: 14127

Tools
PHPStan

43-43: Method App\Http\Controllers\Secretariat\SemesterEvaluationController::updateEvaluationPeriod() has invalid return type Illuminate\Http\RedirectResponse.


43-43: Parameter $request of method App\Http\Controllers\Secretariat\SemesterEvaluationController::updateEvaluationPeriod() has invalid type Illuminate\Http\Request.


54-56: Ensure the Semester model and Carbon class are correctly imported and used.

Verification successful

The Semester model and Carbon class are correctly imported in the SemesterEvaluationController.php file.

  • use App\Models\Semester;
  • use Carbon\Carbon;
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import and usage of Semester model and Carbon class.
ast-grep --lang php --pattern $'use App\Models\Semester;'
ast-grep --lang php --pattern $'use Carbon\Carbon;'

Length of output: 325



Script:

#!/bin/bash
# Description: Verify the import and usage of Semester model and Carbon class in the specified file.
rg 'use App\\Models\\Semester;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use Carbon\\Carbon;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

Length of output: 236

Tools
PHPStan

54-54: Call to static method find() on an unknown class App\Models\Semester.


55-55: Call to static method parse() on an unknown class Carbon\Carbon.


56-56: Call to static method parse() on an unknown class Carbon\Carbon.


53-53: Verify the implementation of the updatePeriodicEvent method.

Tools
PHPStan

53-53: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::updatePeriodicEvent().


Line range hint 133-142: Check the correct import and usage of models and other classes used in the view rendering and data handling.

Also applies to: 183-235

Verification successful

The imports and usage of the models and classes in the SemesterEvaluationController.php file are correctly implemented.

  • Faculty is imported and used.
  • Workshop is imported and used.
  • GeneralAssembly is imported and used.
  • Semester is imported and used.
  • SemesterEvaluation is imported and used.
  • Role is imported and used.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the import and usage of various models and classes in view rendering and data handling.
ast-grep --lang php --pattern $'use App\Models\Faculty;'
ast-grep --lang php --pattern $'use App\Models\Workshop;'
ast-grep --lang php --pattern $'use App\Models\GeneralAssemblies\GeneralAssembly;'
ast-grep --lang php --pattern $'use App\Models\Semester;'
ast-grep --lang php --pattern $'use App\Models\SemesterEvaluation;'
ast-grep --lang php --pattern $'use App\Models\Role;'

Length of output: 1025



Script:

#!/bin/bash
# Description: Verify the import and usage of various models and classes in view rendering and data handling.
# Searching for import statements in the specified file
rg 'use App\\Models\\Faculty;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Models\\Workshop;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Models\\GeneralAssemblies\\GeneralAssembly;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Models\\Semester;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Models\\SemesterEvaluation;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'use App\\Models\\Role;' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

# Searching for usage of the imported classes in the specified file
rg 'Faculty::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'Workshop::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'GeneralAssembly::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'Semester::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'SemesterEvaluation::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php
rg 'Role::' app/Http/Controllers/Secretariat/SemesterEvaluationController.php

Length of output: 2712

Tools
PHPStan

138-138: Call to static method all() on an unknown class App\Models\GeneralAssemblies\GeneralAssembly.


139-139: Call to static method current() on an unknown class App\Models\Semester.


139-139: Function user not found.


140-140: Access to constant STUDENT_POSTION_ROLES on an unknown class App\Models\Role.


140-140: Function user not found.


141-141: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::periodicEvent().


142-142: Class App\Models\SemesterEvaluation not found.


142-142: Function user not found.


150-150: Parameter $request of method App\Http\Controllers\Secretariat\SemesterEvaluationController::store() has invalid type Illuminate\Http\Request.


152-152: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::authorize().


152-152: Class App\Models\SemesterEvaluation not found.


154-154: Call to static method make() on an unknown class Illuminate\Support\Facades\Validator.


45-45: Check the implementation of the authorize method to ensure it's correctly defined and used.

Also applies to: 130-130, 152-152

Tools
PHPStan

45-45: Call to an undefined method App\Http\Controllers\Secretariat\SemesterEvaluationController::authorize().


45-45: Class App\Models\SemesterEvaluation not found.

resources/views/layouts/navbar.blade.php (2)

66-68: The addition of the Semester Evaluation link is correctly implemented with appropriate authorization checks.


102-104: The addition of the Mr. and Miss Eötvös voting link is correctly implemented with appropriate authorization checks.

app/Http/Controllers/Auth/ApplicationController.php (3)

15-15: Ensure the HasPeriodicEvent trait is correctly implemented and available.

Verification successful

The HasPeriodicEvent trait is correctly implemented and available in the codebase.

  • Location: app/Utils/HasPeriodicEvent.php
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the existence and correct implementation of HasPeriodicEvent trait.

# Test: Search for the trait definition. Expect: Trait definition found.
ast-grep --lang php --pattern $'trait HasPeriodicEvent {
  $$$
}'

Length of output: 173



Script:

#!/bin/bash
# Description: Verify the existence and correct implementation of HasPeriodicEvent trait.

# Test: Search for the trait definition. Expect: Trait definition found.
rg 'trait HasPeriodicEvent' --files-with-matches

Length of output: 81


Line range hint 343-351: Verify authorization and data retrieval logic in exportApplications.

Verification successful

The exportApplications method in ApplicationController correctly implements authorization and data retrieval logic. It uses the authorize method to check permissions and retrieves applications with specific statuses before exporting them to an Excel file.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct implementation of authorization and data retrieval in exportApplications.

# Test: Search for the method usage and ensure it handles permissions and data correctly. Expect: Correct handling of permissions and data.
rg --type php $'exportApplications'

Length of output: 265



Script:

#!/bin/bash
# Extract the full implementation of the exportApplications method from ApplicationController
ast-grep --lang php --pattern $'class ApplicationController {
  $$$
  public function exportApplications() {
    $$$
  }
  $$$
}' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 289



Script:

#!/bin/bash
# Extract the full implementation of the exportApplications method from ApplicationController using rg
rg --context 20 --type php 'public function exportApplications()' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 1358

Tools
PHPStan

343-343: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


343-343: Class App\Models\ApplicationForm not found.


345-345: Call to static method with() on an unknown class App\Models\ApplicationForm.


346-346: Access to constant STATUS_SUBMITTED on an unknown class App\Models\ApplicationForm.


331-331: Ensure that the deadline extension logic is correctly implemented and tested.

Verification successful

The getDeadline method is defined in app/Utils/HasPeriodicEvent.php and returns the end date of the current PeriodicEvent. The method is used in several places within ApplicationController.php, including the line in question where it is followed by addMonth().

The logic appears to be correctly implemented, as getDeadline returns a Carbon instance or null, and addMonth() is a valid method on a Carbon instance.

  • app/Utils/HasPeriodicEvent.php:

    final public function getDeadline(): ?Carbon
    {
        return $this->getEndDate();
    }
  • app/Http/Controllers/Auth/ApplicationController.php:

    $user->internetAccess()->update(['has_internet_until' => $this->getDeadline()?->addMonth()]);

The usage of getDeadline and addMonth is consistent with the expected behavior.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct implementation of deadline extension logic.

# Test: Search for the method usage and ensure it handles edge cases. Expect: Correct handling of edge cases.
rg --type php $'getDeadline().addMonth()'

Length of output: 42



Script:

#!/bin/bash
# Description: Locate the definition of the getDeadline method and its usage in the codebase.

# Step 1: Find the definition of the getDeadline method.
ast-grep --lang php --pattern 'function getDeadline() { $$$ }'

# Step 2: Find all usages of the getDeadline method.
rg --type php 'getDeadline()'

Length of output: 1622



Script:

#!/bin/bash
# Description: Extract the definition of the getDeadline method and review its usages.

# Step 1: Extract the definition of the getDeadline method from app/Utils/HasPeriodicEvent.php.
rg --type php --context 10 'function getDeadline()' app/Utils/HasPeriodicEvent.php

# Step 2: Review the usages of getDeadline in ApplicationController.php.
rg --type php --context 5 'getDeadline()' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 2756

Tools
PHPStan

331-331: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().

tests/Feature/ApplicationTest.php (6)

38-39: Check the usage of now() function.

Verification successful

The now() function is used in the tests/Feature/ApplicationTest.php file without an explicit import, and there is no definition of now() found in the codebase. This suggests that now() is likely a globally available helper function, possibly provided by the framework in use (e.g., Laravel).

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct import and usage of the `now()` function.

# Test: Search for the import of the `now()` function. Expect: At least one match.
rg --type php $'use .*now;'

Length of output: 28



Script:

#!/bin/bash
# Description: Verify the definition and usage of the `now()` function in the codebase.

# Test 1: Check if `now()` is defined in the codebase.
rg --type php 'function now'

# Test 2: Verify if `now()` is used without import in the `tests/Feature/ApplicationTest.php` file.
rg --type php 'now\(\)' tests/Feature/ApplicationTest.php

Length of output: 334

Tools
PHPStan

38-38: Function now not found.


39-39: Function now not found.


36-40: Ensure PeriodicEvent class is correctly imported and exists.

Verification successful

The PeriodicEvent class is correctly defined in app/Models/PeriodicEvent.php and is properly imported in tests/Feature/ApplicationTest.php.

  • PeriodicEvent class definition found in app/Models/PeriodicEvent.php.
  • Import statement for PeriodicEvent found in tests/Feature/ApplicationTest.php.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the existence of the PeriodicEvent class.

# Test: Search for the PeriodicEvent class definition. Expect: At least one match.
ast-grep --lang php --pattern $'class PeriodicEvent { $$$ }'

Length of output: 168



Script:

#!/bin/bash
# Description: Verify the existence of the PeriodicEvent class and its import in the tests/Feature/ApplicationTest.php file.

# Test 1: Search for the PeriodicEvent class definition. Expect: At least one match.
rg 'class PeriodicEvent' 

# Test 2: Search for the import statement of the PeriodicEvent class in the tests/Feature/ApplicationTest.php file. Expect: At least one match.
rg 'use .*PeriodicEvent;' tests/Feature/ApplicationTest.php

Length of output: 271

Tools
PHPStan

36-36: Call to static method create() on an unknown class App\Models\PeriodicEvent.


37-37: Class App\Http\Controllers\Auth\ApplicationController not found.


38-38: Function now not found.


39-39: Function now not found.


Line range hint 387-445: Review the finalization process for applications.

Verification successful

The finalizeApplicationProcess method in app/Http/Controllers/Auth/ApplicationController.php handles the finalization of applications. It checks for unhandled applicants and processes accepted applications, deleting related files and users as necessary.

  • The method ensures that no unhandled applications are present before proceeding.
  • It updates the status of accepted applications and deletes users and files associated with other applications.
  • The method clears relevant caches and returns a success message upon completion.

This aligns with the expected finalization logic.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the finalization process for applications.

# Test: Search for the finalization logic. Expect: Correct finalization logic.
rg --type php $'public function finalizeApplication'

Length of output: 154



Script:

#!/bin/bash
# Extract the finalizeApplicationProcess method from ApplicationController.php
ast-grep --lang php --pattern $'public function finalizeApplicationProcess($_) {
  $$$
}' --search-zip

Length of output: 210



Script:

#!/bin/bash
# Extract the finalizeApplicationProcess method from ApplicationController.php using rg
rg -A 50 'public function finalizeApplicationProcess' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 2297


37-37: Verify the existence of ApplicationController.

Verification successful

The ApplicationController class exists in the codebase.

  • Located at: app/Http/Controllers/Auth/ApplicationController.php
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the existence of the ApplicationController class.

# Test: Search for the ApplicationController class definition. Expect: At least one match.
ast-grep --lang php --pattern $'class ApplicationController { $$$ }'

Length of output: 176



Script:

#!/bin/bash
# Description: Verify the existence of the ApplicationController class.

# Test: Search for the ApplicationController class definition in PHP files. Expect: At least one match.
rg 'class ApplicationController' --include '*.php'

Length of output: 494



Script:

#!/bin/bash
# Description: Verify the existence of the ApplicationController class.

# Test: Search for the ApplicationController class definition in PHP files. Expect: At least one match.
rg 'class ApplicationController' --glob '*.php'

Length of output: 148

Tools
PHPStan

37-37: Class App\Http\Controllers\Auth\ApplicationController not found.


Line range hint 343-373: Ensure correct status messages are displayed for different application statuses.

Verification successful

The status messages for different application statuses are correctly handled in the views. The status.blade.php file uses a switch statement to display the appropriate message for each status, and the app.blade.php file includes conditional checks to display specific messages based on the application status.

  • STATUS_IN_PROGRESS displays "Folyamatban".
  • STATUS_CALLED_IN displays "Behívva".
  • STATUS_ACCEPTED displays "Felvéve".
  • STATUS_BANISHED displays "Elutasítva".

These messages align with the expected behavior described in the test.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the correct status messages are displayed for different application statuses.

# Test: Search for the handling of status messages. Expect: Correct status messages for each application status.
rg --type php $'public function getStatusMessage'

Length of output: 50



Script:

#!/bin/bash
# Description: Search for the usage of application status constants to find where status messages are handled.

# Search for STATUS_IN_PROGRESS usage
rg 'STATUS_IN_PROGRESS'

# Search for STATUS_CALLED_IN usage
rg 'STATUS_CALLED_IN'

# Search for STATUS_ACCEPTED usage
rg 'STATUS_ACCEPTED'

# Search for STATUS_BANISHED usage
rg 'STATUS_BANISHED'

Length of output: 4461



Script:

#!/bin/bash
# Description: Extract relevant sections from view files to verify status messages.

# Extract sections from status.blade.php
rg -A 5 -B 5 'STATUS_IN_PROGRESS|STATUS_CALLED_IN|STATUS_ACCEPTED|STATUS_BANISHED' resources/views/auth/application/status.blade.php

# Extract sections from app.blade.php
rg -A 5 -B 5 'STATUS_IN_PROGRESS|STATUS_CALLED_IN|STATUS_ACCEPTED|STATUS_BANISHED' resources/views/auth/application/app.blade.php

Length of output: 3109

Tools
PHPStan

339-339: Call to an undefined method Tests\Feature\ApplicationTest::assertTrue().


339-339: Function now not found.


348-348: Call to static method factory() on an unknown class App\Models\User.


91-99: Review the logic for handling form submissions.

Verification successful

The storeApplicationForm method in ApplicationController handles form submissions by checking deadlines, verifying if the application is already submitted, and processing different form pages (questions, files, delete file, submit). The method appears to handle form data correctly by redirecting or processing based on the form page.

  • app/Http/Controllers/Auth/ApplicationController.php: storeApplicationForm method
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the logic for handling form submissions in the application process.

# Test: Search for the handling of form submissions. Expect: Correct handling of form data.
rg --type php $'public function handleFormSubmission'

Length of output: 54



Script:

#!/bin/bash
# Description: Identify the controller and method handling the form submission for the /application route.

# Step 1: Search for routes related to /application
rg --type php 'Route::post\('/application'

# Step 2: Trace the identified routes to their respective controllers and methods
# This will be done by extracting the controller and method names from the route definitions

Length of output: 93



Script:

#!/bin/bash
# Description: Identify the controller and method handling the form submission for the /application route.

# Step 1: Search for routes related to /application
rg --type php "Route::post\('/application'"

# Step 2: Trace the identified routes to their respective controllers and methods
# This will be done by extracting the controller and method names from the route definitions

Length of output: 182



Script:

#!/bin/bash
# Description: Locate and review the storeApplicationForm method in ApplicationController.

# Step 1: Locate the ApplicationController class
ast-grep --lang php --pattern $'class ApplicationController {
  $$$
}'

# Step 2: Extract the storeApplicationForm method from ApplicationController
ast-grep --lang php --pattern $'class ApplicationController {
  $$$
  public function storeApplicationForm($_) {
    $$$
  }
  $$$
}'

Length of output: 420



Script:

#!/bin/bash
# Description: Locate and review the storeApplicationForm method in ApplicationController.

# Step 1: Locate the ApplicationController class
rg --type php 'class ApplicationController'

# Step 2: Extract the storeApplicationForm method from ApplicationController
rg --type php 'public function storeApplicationForm'

Length of output: 310



Script:

#!/bin/bash
# Description: Extract and review the storeApplicationForm method in ApplicationController.

# Extract the full implementation of the storeApplicationForm method
rg --type php -A 20 'public function storeApplicationForm' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 986



Script:

#!/bin/bash
# Description: Extract the remaining part of the storeApplicationForm method in ApplicationController.

# Extract additional lines of the storeApplicationForm method to get the complete implementation
rg --type php -A 40 'public function storeApplicationForm' app/Http/Controllers/Auth/ApplicationController.php

Length of output: 1619

Tools
PHPStan

91-91: Call to an undefined method Tests\Feature\ApplicationTest::get().


92-92: Call to an undefined method Tests\Feature\ApplicationTest::post().

routes/web.php (3)

174-177: Ensure the new routes for ApplicationController align with the implementation of periodic events.

The addition of routes for updating application periods and exporting applications supports the new functionality introduced by the HasPeriodicEvent trait. Ensure that the corresponding controller methods are implemented correctly and handle any exceptions or edge cases.

Tools
PHPStan

174-174: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


174-174: Class App\Http\Controllers\Auth\ApplicationController not found.


175-175: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


175-175: Class App\Http\Controllers\Auth\ApplicationController not found.


176-176: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


176-176: Class App\Http\Controllers\Auth\ApplicationController not found.


177-177: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


177-177: Class App\Http\Controllers\Auth\ApplicationController not found.


194-194: Ensure the new route for updating the evaluation period in SemesterEvaluationController is implemented correctly.

This route is crucial for handling periodic events related to semester evaluations. Verify that the updateEvaluationPeriod method in the controller handles all necessary logic and error conditions effectively.

Tools
PHPStan

194-194: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


194-194: Class App\Http\Controllers\Secretariat\SemesterEvaluationController not found.


233-240: Review the implementation of new routes in MrAndMissController to ensure they support the periodic events functionality.

The addition of routes for voting, managing categories, and updating voting periods aligns with the new periodic events handling. Ensure that these routes are secured appropriately and that the controller methods are robust against invalid inputs.

Tools
PHPStan

233-233: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


233-233: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


234-234: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


234-234: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


235-235: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


235-235: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


236-236: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


236-236: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


237-237: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


237-237: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


238-238: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


238-238: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


239-239: Call to static method post() on an unknown class Illuminate\Support\Facades\Route.


239-239: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.


240-240: Call to static method get() on an unknown class Illuminate\Support\Facades\Route.


240-240: Class App\Http\Controllers\StudentsCouncil\MrAndMissController not found.

Comment on lines +182 to +183
'applicationDeadline' => $this->getDeadline(),
'periodicEvent' => $this->periodicEvent()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimize data retrieval by combining related method calls into a single method.

- 'applicationDeadline' => $this->getDeadline(),
- 'periodicEvent' => $this->periodicEvent()
+ 'periodicEventData' => $this->getPeriodicEventData()

And in your class:

public function getPeriodicEventData() {
    return [
        'deadline' => $this->getDeadline(),
        'event' => $this->periodicEvent()
    ];
}
Tools
PHPStan

182-182: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


183-183: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::periodicEvent().

@@ -74,7 +103,7 @@ public function storeApplicationForm(Request $request)
{
$user = $request->user();

if (now() > self::getApplicationDeadline()) {
if (now() > $this->getDeadline()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add error handling for date comparison to prevent potential issues with time zones or invalid dates.

- if (now() > $this->getDeadline()) {
+ try {
+     if (now() > $this->getDeadline()) {
+         return redirect()->route('application')->with('error', 'A jelentkezési határidő lejárt');
+     }
+ } catch (\Exception $e) {
+     return redirect()->route('application')->with('error', __('general.date_comparison_error'));
+ }
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
if (now() > $this->getDeadline()) {
try {
if (now() > $this->getDeadline()) {
return redirect()->route('application')->with('error', 'A jelentkezési határidő lejárt');
}
} catch (\Exception $e) {
return redirect()->route('application')->with('error', __('general.date_comparison_error'));
}
Tools
PHPStan

106-106: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::getDeadline().


106-106: Function now not found.

Comment on lines +41 to +60
public function updateApplicationPeriod(Request $request): RedirectResponse
{
$this->authorize('finalize', ApplicationForm::class);

$request->validate([
'semester_id' => 'required|exists:semesters,id',
'start_date' => 'required|date',
'end_date' => 'required|date|after:now|after:start_date',
'extended_end_date' => 'nullable|date|after:end_date',
]);

$this->updatePeriodicEvent(
Semester::find($request->semester_id),
Carbon::parse($request->start_date),
Carbon::parse($request->end_date),
$request->extended_end_date ? Carbon::parse($request->extended_end_date) : null
);

return back()->with('message', __('general.successful_modification'));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor updateApplicationPeriod to handle exceptions and improve error messages.

- return back()->with('message', __('general.successful_modification'));
+ try {
+     // existing code
+     return back()->with('message', __('general.successful_modification'));
+ } catch (\Exception $e) {
+     return back()->with('error', __('general.error_occurred') . $e->getMessage());
+ }
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
public function updateApplicationPeriod(Request $request): RedirectResponse
{
$this->authorize('finalize', ApplicationForm::class);
$request->validate([
'semester_id' => 'required|exists:semesters,id',
'start_date' => 'required|date',
'end_date' => 'required|date|after:now|after:start_date',
'extended_end_date' => 'nullable|date|after:end_date',
]);
$this->updatePeriodicEvent(
Semester::find($request->semester_id),
Carbon::parse($request->start_date),
Carbon::parse($request->end_date),
$request->extended_end_date ? Carbon::parse($request->extended_end_date) : null
);
return back()->with('message', __('general.successful_modification'));
}
public function updateApplicationPeriod(Request $request): RedirectResponse
{
try {
$this->authorize('finalize', ApplicationForm::class);
$request->validate([
'semester_id' => 'required|exists:semesters,id',
'start_date' => 'required|date',
'end_date' => 'required|date|after:now|after:start_date',
'extended_end_date' => 'nullable|date|after:end_date',
]);
$this->updatePeriodicEvent(
Semester::find($request->semester_id),
Carbon::parse($request->start_date),
Carbon::parse($request->end_date),
$request->extended_end_date ? Carbon::parse($request->extended_end_date) : null
);
return back()->with('message', __('general.successful_modification'));
} catch (\Exception $e) {
return back()->with('error', __('general.error_occurred') . $e->getMessage());
}
}
Tools
PHPStan

41-41: Method App\Http\Controllers\Auth\ApplicationController::updateApplicationPeriod() has invalid return type Illuminate\Http\RedirectResponse.


41-41: Parameter $request of method App\Http\Controllers\Auth\ApplicationController::updateApplicationPeriod() has invalid type Illuminate\Http\Request.


43-43: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::authorize().


43-43: Class App\Models\ApplicationForm not found.


52-52: Call to an undefined method App\Http\Controllers\Auth\ApplicationController::updatePeriodicEvent().


53-53: Call to static method find() on an unknown class App\Models\Semester.


54-54: Call to static method parse() on an unknown class Carbon\Carbon.


55-55: Call to static method parse() on an unknown class Carbon\Carbon.


56-56: Call to static method parse() on an unknown class Carbon\Carbon.


59-59: Function __ not found.


59-59: Function back not found.

Comment on lines +17 to +18
<p>Technikai gondok esetén <a href="mailto:{{ config('mail.sys_admin_mail')}}">
vedd fel a kapcsolatot a rendszergazdákkal</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The configuration for sys_admin_mail is defined in config/mail.php as env('MAIL_SYSADMIN'), but there is no corresponding entry in the .env files.

  • Ensure that MAIL_SYSADMIN is defined in the .env file to avoid runtime errors.
Analysis chain

Ensure that the mail configuration for sys_admin_mail is correctly set up to avoid runtime errors.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the configuration for sys_admin_mail.

# Test: Search for the configuration in .env files. Expect: Configuration should exist.
rg 'MAIL_SYS_ADMIN' .env.example

Length of output: 32



Script:

#!/bin/bash
# Description: Verify the configuration for sys_admin_mail.

# Test 1: Search for the configuration in all .env files.
rg 'MAIL_SYS_ADMIN' .env*

# Test 2: Search for the configuration in the config directory.
rg 'sys_admin_mail' config/

# Test 3: Search for the usage of sys_admin_mail in the codebase.
rg 'sys_admin_mail' .

Length of output: 576

Comment on lines +10 to +11
use App\Utils\HasPeriodicEvent;
use Carbon\Carbon;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The Carbon library is not listed as a dependency in composer.json. This means that the Carbon\Carbon import in MrAndMissController.php will not work as expected since the library is not available in the project.

  • Ensure that the Carbon library is added to the composer.json file and installed.
Analysis chain

The inclusion of HasPeriodicEvent and Carbon\Carbon should be verified to ensure they are correctly imported and available in the project.

Also applies to: 19-19

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the availability of HasPeriodicEvent trait and Carbon library.

# Test: Search for the files and usages. Expect: Files and usages should be present.
fd --type file 'HasPeriodicEvent.php' 'app/Utils'
fd --type file 'Carbon.php' 'vendor'

Length of output: 207



Script:

#!/bin/bash
# Description: Verify the availability of Carbon library.

# Test: Search for the Carbon library file. Expect: File should be present.
fd --type file 'Carbon.php' 'vendor'

Length of output: 128



Script:

#!/bin/bash
# Description: Verify the presence of Carbon library in composer.json.

# Test: Search for the Carbon dependency in composer.json. Expect: Dependency should be listed.
jq '.require | has("nesbot/carbon")' composer.json

Length of output: 58

Comment on lines +41 to +47
return $target->workshops
->intersect($user->applicationCommitteWorkshops)
->count() > 0
|| $target->workshops
->intersect($user->roleWorkshops)
->count() > 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimize the intersection logic to reduce complexity and improve performance.

- return $target->workshops
-         ->intersect($user->applicationCommitteWorkshops)
-         ->count() > 0
-     || $target->workshops
-         ->intersect($user->roleWorkshops)
-         ->count() > 0;
+ return $target->workshops->whereIn('id', $user->applicationCommitteWorkshops->pluck('id')->merge($user->roleWorkshops->pluck('id')))->exists();
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
return $target->workshops
->intersect($user->applicationCommitteWorkshops)
->count() > 0
|| $target->workshops
->intersect($user->roleWorkshops)
->count() > 0;
}
return $target->workshops->whereIn('id', $user->applicationCommitteWorkshops->pluck('id')->merge($user->roleWorkshops->pluck('id')))->exists();

@if ($deadline_extended)
<small class="coli-text text-orange">(Meghosszabbítva)</small>
@endif
</h6>
@if($user->application->status == App\Models\ApplicationForm::STATUS_IN_PROGRESS)
Hátra van: <i>{{ \Carbon\Carbon::now()->diffInDays($deadline, false) }}</i> nap.
Hátra van: <i>{{ (int)\Carbon\Carbon::now()->diffInDays($deadline, false) }}</i> nap.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a more user-friendly message when there are no days left until the deadline.

- Hátra van: <i>{{ (int)\Carbon\Carbon::now()->diffInDays($deadline, false) }}</i> nap.
+ Hátra van: <i>{{ $daysLeft = (int)\Carbon\Carbon::now()->diffInDays($deadline, false) }}</i> {{ $daysLeft == 0 ? 'nap (ma lejár!)' : 'nap' }}.

Committable suggestion was skipped due to low confidence.

@viktorcsimma viktorcsimma mentioned this pull request Jun 6, 2024
@viktorcsimma
Copy link
Contributor

@kdmnk oh, I see... so we have this interface-like thing, through whose methods we can control what happens when. It's nice:) and I think it's also easy to understand.

@kdmnk kdmnk merged commit 1eebb19 into development Jun 6, 2024
6 checks passed
@kdmnk kdmnk deleted the semester-rebase-clean-common branch June 6, 2024 13:08
@kdmnk
Copy link
Contributor Author

kdmnk commented Jun 6, 2024

@horcsinbalint please let me know when can I test it on the test server, if that's available

@horcsinbalint
Copy link
Member

@horcsinbalint please let me know when can I test it on the test server, if that's available

I will try to achieve this during the day

@horcsinbalint
Copy link
Member

It does not work after logging in to the staging system: #544

BertalanD added a commit that referenced this pull request Jul 13, 2024
This was missed in #532 ("Introducing PeriodicEvents instead of
EventTriggers"). Attempting to open the "Application for college
students" tab therefore resulted in a 500 error code because of the
call to the undefined `getApplicationDeadline` method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calculating start of semester correctly
4 participants