Skip to content

Conversation

@phpfour
Copy link
Contributor

@phpfour phpfour commented Nov 3, 2025

This removes some duplicate code in src/Install/GuidelineComposer.php where the same loop is executed twice:

First occurrence (lines 174-182):

$pathsUsed = $guidelines->pluck('path');

foreach ($userGuidelines as $guideline) {
    if ($pathsUsed->contains($guideline['path'])) {
        continue; // Don't include this twice if it's an override
    }

    $guidelines->put('.ai/'.$guideline['name'], $guideline);
}

Second occurrence (lines 184-192):

$pathsUsed = $guidelines->pluck('path');

foreach ($userGuidelines as $guideline) {
    if ($pathsUsed->contains($guideline['path'])) {
        continue; // Don't include this twice if it's an override
    }

    $guidelines->put('.ai/'.$guideline['name'], $guideline);
}

Copy link
Member

@pushpak1300 pushpak1300 left a comment

Choose a reason for hiding this comment

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

Thanks !

@pushpak1300 pushpak1300 merged commit 2278b9b into laravel:main Nov 3, 2025
19 checks passed
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.

2 participants