File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed
tests/Console/ModelsCommand/CustomPhpdocTags Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Barryvdh \LaravelIdeHelper \Tests \Console \ModelsCommand \CustomPhpdocTags \Models ;
6
+
7
+ use Illuminate \Database \Eloquent \Model ;
8
+
9
+ /**
10
+ * The `@SuppressWarnings` tag below contains no space before the `(` but when
11
+ * the class phpdoc is written back, one is inserted.
12
+ *
13
+ * @link https://github.com/barryvdh/laravel-ide-helper/issues/666
14
+ *
15
+ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
16
+ */
17
+ class Simple extends Model
18
+ {
19
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Barryvdh \LaravelIdeHelper \Tests \Console \ModelsCommand \CustomPhpdocTags ;
6
+
7
+ use Barryvdh \LaravelIdeHelper \Console \ModelsCommand ;
8
+ use Barryvdh \LaravelIdeHelper \Tests \Console \ModelsCommand \AbstractModelsCommand ;
9
+
10
+ class Test extends AbstractModelsCommand
11
+ {
12
+ /**
13
+ * This test makes sure that custom phpdoc tags are not mangled, e.g.
14
+ * there are no spaces inserted etc.
15
+ *
16
+ * @link https://github.com/barryvdh/laravel-ide-helper/issues/666
17
+ */
18
+ public function testNoSpaceAfterCustomPhpdocTag (): void
19
+ {
20
+ $ command = $ this ->app ->make (ModelsCommand::class);
21
+
22
+ $ tester = $ this ->runCommand ($ command , [
23
+ '--write ' => true ,
24
+ ]);
25
+
26
+ $ this ->assertSame (0 , $ tester ->getStatusCode ());
27
+ $ this ->assertStringContainsString ('Written new phpDocBlock to ' , $ tester ->getDisplay ());
28
+ $ this ->assertMatchesMockedSnapshot ();
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Barryvdh \LaravelIdeHelper \Tests \Console \ModelsCommand \CustomPhpdocTags \Models ;
6
+
7
+ use Illuminate \Database \Eloquent \Model ;
8
+
9
+ /**
10
+ * The `@SuppressWarnings` tag below contains no space before the `(` but when
11
+ * the class phpdoc is written back, one is inserted.
12
+ *
13
+ * @link https://github.com/barryvdh/laravel-ide-helper/issues/666
14
+ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
15
+ * @property integer $id
16
+ * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
17
+ * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
18
+ * @method static \Illuminate\Database\Eloquent\Builder|Simple query()
19
+ * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value)
20
+ * @mixin \Eloquent
21
+ */
22
+ class Simple extends Model
23
+ {
24
+ }
You can’t perform that action at this time.
0 commit comments