File tree Expand file tree Collapse file tree 2 files changed +15
-26
lines changed
tests/Console/ModelsCommand/Attributes Expand file tree Collapse file tree 2 files changed +15
-26
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ public function uppercaseName(): Attribute
28
28
});
29
29
}
30
30
31
+ public function lowercaseName (): Attribute
32
+ {
33
+ return Attribute::get (function () {
34
+ return strtolower ($ this ->name );
35
+ });
36
+ }
37
+
31
38
/**
32
39
* ide-helper does not recognize this method being an Attribute
33
40
* because the method has no actual return type;
@@ -47,17 +54,4 @@ function (?string $value): ?string {
47
54
}
48
55
);
49
56
}
50
-
51
- /**
52
- * ide-helper does not recognize this method being an Attribute
53
- * because the callable has no specified return type;
54
- *
55
- * @return \Illuminate\Database\Eloquent\Casts\Attribute
56
- */
57
- public function alsoNotAnAttribute (): Attribute
58
- {
59
- return Attribute::get (function () {
60
- return strtoupper ($ this ->name );
61
- });
62
- }
63
57
}
Original file line number Diff line number Diff line change 11
11
* Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Attributes\Models\Simple
12
12
*
13
13
* @property integer $id
14
+ * @property-read mixed $lowercase_name
14
15
* @property string|null $name
15
16
* @property-read string $uppercase_name
16
17
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
@@ -40,6 +41,13 @@ public function uppercaseName(): Attribute
40
41
});
41
42
}
42
43
44
+ public function lowercaseName (): Attribute
45
+ {
46
+ return Attribute::get (function () {
47
+ return strtolower ($ this ->name );
48
+ });
49
+ }
50
+
43
51
/**
44
52
* ide-helper does not recognize this method being an Attribute
45
53
* because the method has no actual return type;
@@ -59,17 +67,4 @@ function (?string $value): ?string {
59
67
}
60
68
);
61
69
}
62
-
63
- /**
64
- * ide-helper does not recognize this method being an Attribute
65
- * because the callable has no specified return type;
66
- *
67
- * @return \Illuminate\Database\Eloquent\Casts\Attribute
68
- */
69
- public function alsoNotAnAttribute (): Attribute
70
- {
71
- return Attribute::get (function () {
72
- return strtoupper ($ this ->name );
73
- });
74
- }
75
70
}
You can’t perform that action at this time.
0 commit comments