From 0fa3161af3d77740d1db5ce0ea88df09428c3123 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:33:07 +0000 Subject: [PATCH] Add advanced edge case tests: final+nested-brackets and multiple attributes Co-authored-by: barryvdh <973269+barryvdh@users.noreply.github.com> --- .../Models/FinalWithNested.php | 14 ++++++ .../Models/MultipleAttributes.php | 15 +++++++ .../__snapshots__/Test__test__1.php | 45 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 tests/Console/ModelsCommand/PhpAttributesBeforeClass/Models/FinalWithNested.php create mode 100644 tests/Console/ModelsCommand/PhpAttributesBeforeClass/Models/MultipleAttributes.php diff --git a/tests/Console/ModelsCommand/PhpAttributesBeforeClass/Models/FinalWithNested.php b/tests/Console/ModelsCommand/PhpAttributesBeforeClass/Models/FinalWithNested.php new file mode 100644 index 0000000..aa43c69 --- /dev/null +++ b/tests/Console/ModelsCommand/PhpAttributesBeforeClass/Models/FinalWithNested.php @@ -0,0 +1,14 @@ +|FinalWithNested newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|FinalWithNested newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|FinalWithNested query() + * @method static \Illuminate\Database\Eloquent\Builder|FinalWithNested whereId($value) + * @mixin \Eloquent + */ +#[ObservedByStub([StubObserver::class])] +final class FinalWithNested extends Model +{ + protected $table = 'simples'; +} +|MultipleAttributes newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|MultipleAttributes newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|MultipleAttributes query() + * @method static \Illuminate\Database\Eloquent\Builder|MultipleAttributes whereId($value) + * @mixin \Eloquent + */ +#[\AllowDynamicProperties] +#[SecondAttribute] +class MultipleAttributes extends Model +{ + protected $table = 'simples'; +} +|Simple newModelQuery()