Skip to content

Fix get method Application Layer#97

Merged
zigzagdev merged 2 commits into
feature/west-asia-midlle-eastfrom
feature/west-asia-midlle-east-application
Sep 5, 2025
Merged

Fix get method Application Layer#97
zigzagdev merged 2 commits into
feature/west-asia-midlle-eastfrom
feature/west-asia-midlle-east-application

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

what i have done

  • application layer changes
  • change tests

@zigzagdev zigzagdev requested a review from Copilot September 5, 2025 00:13
@zigzagdev zigzagdev self-assigned this Sep 5, 2025
@zigzagdev zigzagdev linked an issue Sep 5, 2025 that may be closed by this pull request
@zigzagdev zigzagdev merged commit 0d7ce03 into feature/west-asia-midlle-east Sep 5, 2025
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes issues in the Application Layer by updating the WorldHeritageDto parameter order, changing latitude/longitude types to nullable floats, and updating test data and configuration.

  • Reorders parameters in WorldHeritageDto constructor to fix parameter sequence issues
  • Changes latitude and longitude from required floats to nullable floats
  • Updates test data from Japanese heritage site to European beech forests site

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
GetWorldHeritageByIdUseCase.php Reorders DTO constructor parameters and adds unused WorldHeritage import
GetWorldHeritageByIdUseCaseTest.php Updates test data and seeder, adds Country model import
GetWorldHeritageByIdDtoTest.php Updates test data and adds database refresh functionality
WorldHeritageDtoCollection.php Adds null coalescing operators for latitude/longitude
WorldHeritageDto.php Changes latitude/longitude types to nullable float

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


namespace App\Packages\Features\QueryUseCases\UseCase;

use App\Models\WorldHeritage;

Copilot AI Sep 5, 2025

Copy link

Choose a reason for hiding this comment

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

The WorldHeritage model import is not used in this file. Remove the unused import to keep the code clean.

Suggested change
use App\Models\WorldHeritage;

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +35
DB::connection('mysql')->statement('SET FOREIGN_KEY_CHECKS=0;');
WorldHeritage::truncate();
Country::truncate();
DB::table('site_state_parties')->truncate();
DB::connection('mysql')->statement('SET FOREIGN_KEY_CHECKS=1;');

Copilot AI Sep 5, 2025

Copy link

Choose a reason for hiding this comment

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

The database refresh logic is duplicated between this test and GetWorldHeritageByIdUseCaseTest. Consider extracting this into a shared trait or base test class to reduce code duplication.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix get method Application Layer

2 participants