Skip to content

Commit 8922601

Browse files
authored
Merge pull request #186 from RonasIT/update-annotaions-logic
fix: generate @Property annotations with $ before variable names
2 parents 39aa179 + d5cc913 commit 8922601

File tree

4 files changed

+36
-36
lines changed

4 files changed

+36
-36
lines changed

stubs/model.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@if(!empty($anotationProperties))
1313
/**
1414
@foreach($anotationProperties as $key => $value)
15-
* @property {{$value}} {{$key}}
15+
* @property {{$value}} ${{$key}}
1616
@endforeach
1717
*/
1818
@else

tests/fixtures/ModelGeneratorTest/new_model.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
use Carbon\Carbon;
88

99
/**
10-
* @property int|null priority
11-
* @property int media_id
12-
* @property float|null seo_score
13-
* @property float rating
14-
* @property string|null description
15-
* @property string title
16-
* @property bool|null is_reviewed
17-
* @property bool is_published
18-
* @property Carbon|null reviewed_at
19-
* @property Carbon|null created_at
20-
* @property Carbon|null updated_at
21-
* @property Carbon published_at
22-
* @property array meta
10+
* @property int|null $priority
11+
* @property int $media_id
12+
* @property float|null $seo_score
13+
* @property float $rating
14+
* @property string|null $description
15+
* @property string $title
16+
* @property bool|null $is_reviewed
17+
* @property bool $is_published
18+
* @property Carbon|null $reviewed_at
19+
* @property Carbon|null $created_at
20+
* @property Carbon|null $updated_at
21+
* @property Carbon $published_at
22+
* @property array $meta
2323
*/
2424
class Post extends Model
2525
{

tests/fixtures/ModelGeneratorTest/new_model_without_date_fields.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
use RonasIT\Support\Traits\ModelTrait;
77

88
/**
9-
* @property int|null priority
10-
* @property int media_id
11-
* @property float|null seo_score
12-
* @property float rating
13-
* @property string|null description
14-
* @property string title
15-
* @property bool|null is_reviewed
16-
* @property bool is_published
17-
* @property array meta
9+
* @property int|null $priority
10+
* @property int $media_id
11+
* @property float|null $seo_score
12+
* @property float $rating
13+
* @property string|null $description
14+
* @property string $title
15+
* @property bool|null $is_reviewed
16+
* @property bool $is_published
17+
* @property array $meta
1818
*/
1919
class Post extends Model
2020
{

tests/fixtures/ModelGeneratorTest/new_subfolders_model.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
use Carbon\Carbon;
1010

1111
/**
12-
* @property int|null priority
13-
* @property int media_id
14-
* @property float|null seo_score
15-
* @property float rating
16-
* @property string|null description
17-
* @property string title
18-
* @property bool|null is_reviewed
19-
* @property bool is_published
20-
* @property Carbon|null reviewed_at
21-
* @property Carbon|null created_at
22-
* @property Carbon|null updated_at
23-
* @property Carbon published_at
24-
* @property array meta
12+
* @property int|null $priority
13+
* @property int $media_id
14+
* @property float|null $seo_score
15+
* @property float $rating
16+
* @property string|null $description
17+
* @property string $title
18+
* @property bool|null $is_reviewed
19+
* @property bool $is_published
20+
* @property Carbon|null $reviewed_at
21+
* @property Carbon|null $created_at
22+
* @property Carbon|null $updated_at
23+
* @property Carbon $published_at
24+
* @property array $meta
2525
*/
2626
class Post extends Model
2727
{

0 commit comments

Comments
 (0)