Skip to content

Commit 464bc7d

Browse files
authored
Remove double line break before first relationship method (#517)
1 parent f1eab0a commit 464bc7d

22 files changed

+1
-22
lines changed

src/Generators/ModelGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected function buildRelationships(Model $model)
242242

243243
$phpDoc = str_replace('{{ namespacedReturnClass }}', '\Illuminate\Database\Eloquent\Relations\\' . Str::ucfirst($type), $commentTemplate);
244244

245-
$methods .= PHP_EOL . $phpDoc . $method;
245+
$methods .= $phpDoc . $method. PHP_EOL;
246246
}
247247
}
248248

tests/fixtures/models/alias-relationships.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class Salesman extends Model
2727
'id' => 'integer',
2828
];
2929

30-
3130
public function lead()
3231
{
3332
return $this->hasOne(\App\User::class);

tests/fixtures/models/certificate-pascal-case-example.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class Certificate extends Model
3434
'expiry_date' => 'date',
3535
];
3636

37-
3837
public function certificateType()
3938
{
4039
return $this->belongsTo(\App\CertificateType::class);

tests/fixtures/models/certificate-type-pascal-case-example.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class CertificateType extends Model
2727
'id' => 'integer',
2828
];
2929

30-
3130
public function certificates()
3231
{
3332
return $this->hasMany(\App\Certificate::class);

tests/fixtures/models/custom-pivot-table-name.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class User extends Model
3636
'id' => 'integer',
3737
];
3838

39-
4039
public function accounts()
4140
{
4241
return $this->belongsToMany(\App\Account::class, 'test');

tests/fixtures/models/foreign-key-shorthand-phpdoc.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class Comment extends Model
4040
'ccid' => 'integer',
4141
];
4242

43-
4443
/**
4544
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
4645
*/

tests/fixtures/models/image-polymorphic-relationship.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class Image extends Model
2727
'id' => 'integer',
2828
];
2929

30-
3130
public function imageable()
3231
{
3332
return $this->morphTo();

tests/fixtures/models/model-configured.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class Comment extends Model
3030
'author_id' => 'integer',
3131
];
3232

33-
3433
public function post()
3534
{
3635
return $this->belongsTo(\Some\App\Models\Post::class);

tests/fixtures/models/model-relationships-morphone-morphmany-with-fqn.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Flag extends Model
2828
'user_id' => 'integer',
2929
];
3030

31-
3231
public function stars()
3332
{
3433
return $this->morphOne(\Other\Package\Order::class, 'starable');

tests/fixtures/models/model-relationships-with-full-namespace.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class Recurrency extends Model
2929
'user_id' => 'integer',
3030
];
3131

32-
3332
public function teams()
3433
{
3534
return $this->belongsToMany(\Some\Package\Team::class);

0 commit comments

Comments
 (0)