Skip to content

Commit ece9d73

Browse files
committed
composer fix-style
1 parent 96a5f4c commit ece9d73

File tree

12 files changed

+29
-29
lines changed

12 files changed

+29
-29
lines changed

src/Alias.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ protected function addMagicMethods()
329329
continue;
330330
}
331331
$method = new \ReflectionMethod($className, $name);
332-
$class = new \ReflectionClass($className);
332+
$class = new ReflectionClass($className);
333333

334334
if (!in_array($magic, $this->usedMethods)) {
335335
if ($class !== $this->root) {
@@ -348,7 +348,7 @@ protected function addMagicMethods()
348348
protected function detectMethods()
349349
{
350350
foreach ($this->classes as $class) {
351-
$reflection = new \ReflectionClass($class);
351+
$reflection = new ReflectionClass($class);
352352

353353
$methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
354354
if ($methods) {

src/Console/GeneratorCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class GeneratorCommand extends Command
4242
/** @var \Illuminate\Config\Repository */
4343
protected $config;
4444

45-
/** @var \Illuminate\Filesystem\Filesystem */
45+
/** @var Filesystem */
4646
protected $files;
4747

4848
/** @var \Illuminate\View\Factory */
@@ -54,7 +54,7 @@ class GeneratorCommand extends Command
5454
/**
5555
*
5656
* @param \Illuminate\Config\Repository $config
57-
* @param \Illuminate\Filesystem\Filesystem $files
57+
* @param Filesystem $files
5858
* @param \Illuminate\View\Factory $view
5959
*/
6060
public function __construct(

src/Console/ModelsCommand.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ protected function loadModels()
354354
/**
355355
* cast the properties's type from $casts.
356356
*
357-
* @param \Illuminate\Database\Eloquent\Model $model
357+
* @param Model $model
358358
*/
359359
public function castPropertiesType($model)
360360
{
@@ -498,7 +498,7 @@ protected function getTypeOverride($type)
498498
/**
499499
* Load the properties from the database table.
500500
*
501-
* @param \Illuminate\Database\Eloquent\Model $model
501+
* @param Model $model
502502
*
503503
* @throws DBALException If custom field failed to register
504504
*/
@@ -602,7 +602,7 @@ public function getPropertiesFromTable($model)
602602
}
603603

604604
/**
605-
* @param \Illuminate\Database\Eloquent\Model $model
605+
* @param Model $model
606606
*/
607607
public function getPropertiesFromMethods($model)
608608
{
@@ -777,7 +777,7 @@ public function getPropertiesFromMethods($model)
777777
'int|null',
778778
true,
779779
false
780-
// What kind of comments should be added to the relation count here?
780+
// What kind of comments should be added to the relation count here?
781781
);
782782
}
783783
} elseif (
@@ -1126,7 +1126,7 @@ protected function getCollectionClass($className)
11261126
return '\Illuminate\Database\Eloquent\Collection';
11271127
}
11281128

1129-
/** @var \Illuminate\Database\Eloquent\Model $model */
1129+
/** @var Model $model */
11301130
$model = new $className();
11311131
return '\\' . get_class($model->newCollection());
11321132
}
@@ -1285,7 +1285,7 @@ protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?
12851285

12861286
/**
12871287
* Generates methods provided by the SoftDeletes trait
1288-
* @param \Illuminate\Database\Eloquent\Model $model
1288+
* @param Model $model
12891289
*/
12901290
protected function getSoftDeleteMethods($model)
12911291
{
@@ -1302,7 +1302,7 @@ protected function getSoftDeleteMethods($model)
13021302
/**
13031303
* Generate factory method from "HasFactory" trait.
13041304
*
1305-
* @param \Illuminate\Database\Eloquent\Model $model
1305+
* @param Model $model
13061306
*/
13071307
protected function getFactoryMethods($model)
13081308
{
@@ -1335,7 +1335,7 @@ protected function getFactoryMethods($model)
13351335

13361336
/**
13371337
* Generates methods that return collections
1338-
* @param \Illuminate\Database\Eloquent\Model $model
1338+
* @param Model $model
13391339
*/
13401340
protected function getCollectionMethods($model)
13411341
{
@@ -1378,7 +1378,7 @@ protected function checkForCastableCasts(string $type, array $params = []): stri
13781378
return $type;
13791379
}
13801380

1381-
$reflection = new \ReflectionClass($type);
1381+
$reflection = new ReflectionClass($type);
13821382

13831383
if (!$reflection->implementsInterface(Castable::class)) {
13841384
return $type;
@@ -1410,7 +1410,7 @@ protected function checkForCustomLaravelCasts(string $type): ?string
14101410
return $type;
14111411
}
14121412

1413-
$reflection = new \ReflectionClass($type);
1413+
$reflection = new ReflectionClass($type);
14141414

14151415
if (!$reflection->implementsInterface(CastsAttributes::class)) {
14161416
return $type;
@@ -1616,7 +1616,7 @@ protected function getReflectionNamedType(ReflectionNamedType $paramType): strin
16161616
}
16171617

16181618
/**
1619-
* @param \Illuminate\Database\Eloquent\Model $model
1619+
* @param Model $model
16201620
* @throws \Illuminate\Contracts\Container\BindingResolutionException
16211621
* @throws \RuntimeException
16221622
*/

src/Generator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Generator
2626
/** @var \Illuminate\View\Factory */
2727
protected $view;
2828

29-
/** @var \Symfony\Component\Console\Output\OutputInterface */
29+
/** @var OutputInterface */
3030
protected $output;
3131

3232
protected $extra = [];
@@ -37,7 +37,7 @@ class Generator
3737
/**
3838
* @param \Illuminate\Config\Repository $config
3939
* @param \Illuminate\View\Factory $view
40-
* @param \Symfony\Component\Console\Output\OutputInterface $output
40+
* @param OutputInterface $output
4141
* @param string $helpers
4242
*/
4343
public function __construct(

src/Listeners/GenerateModelHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ class GenerateModelHelper
1616
*/
1717
public static $shouldRun = false;
1818

19-
/** @var \Illuminate\Contracts\Console\Kernel */
19+
/** @var Artisan */
2020
protected $artisan;
2121

22-
/** @var \Illuminate\Contracts\Config\Repository */
22+
/** @var Config */
2323
protected $config;
2424

2525
/**
26-
* @param \Illuminate\Contracts\Console\Kernel $artisan
27-
* @param \Illuminate\Contracts\Config\Repository $config
26+
* @param Artisan $artisan
27+
* @param Config $config
2828
*/
2929
public function __construct(Artisan $artisan, Config $config)
3030
{

src/Method.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
class Method
2424
{
25-
/** @var \Barryvdh\Reflection\DocBlock */
25+
/** @var DocBlock */
2626
protected $phpdoc;
2727

2828
/** @var \ReflectionMethod */

tests/Console/ModelsCommand/Attributes/Models/Simple.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function (?string $name): ?string {
2727
* phpdoc is ignored here deliberately due to performance reasons and also
2828
* isn't supported by Laravel itself.
2929
*
30-
* @return \Illuminate\Database\Eloquent\Casts\Attribute
30+
* @return Attribute
3131
*/
3232
protected function notAnAttribute()
3333
{

tests/Console/ModelsCommand/Attributes/__snapshots__/Test__test__1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function (?string $name): ?string {
3838
* phpdoc is ignored here deliberately due to performance reasons and also
3939
* isn't supported by Laravel itself.
4040
*
41-
* @return \Illuminate\Database\Eloquent\Casts\Attribute
41+
* @return Attribute
4242
*/
4343
protected function notAnAttribute()
4444
{

tests/Console/ModelsCommand/LaravelCustomCasts/Casts/CastableReturnsAnonymousCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CastableReturnsAnonymousCaster implements Castable
1111
{
1212
public static function castUsing(array $arguments)
1313
{
14-
return new class() implements CastsAttributes {
14+
return new class () implements CastsAttributes {
1515
/**
1616
* @inheritDoc
1717
* @return CastedProperty

tests/Console/ModelsCommand/LaravelCustomCasts/Casts/CastableWithoutReturnType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CastableWithoutReturnType implements Castable
1111
{
1212
public static function castUsing(array $arguments)
1313
{
14-
return new class() implements CastsAttributes {
14+
return new class () implements CastsAttributes {
1515
public function get($model, string $key, $value, array $attributes)
1616
{
1717
return new CastedProperty();

0 commit comments

Comments
 (0)