Lint
This commit is contained in:
parent
e4ff680e4f
commit
ff245397d5
|
@ -14,15 +14,27 @@ class Subactivity extends Model
|
|||
use HasNamiField;
|
||||
use Sluggable;
|
||||
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public $fillable = ['is_age_group', 'is_filterable', 'slug', 'name', 'nami_id'];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
public $casts = [
|
||||
'is_age_group' => 'boolean',
|
||||
'is_filterable' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, array{source: string}>
|
||||
*/
|
||||
public function sluggable(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -34,7 +34,7 @@ class SubactivityFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
|
|
25
phpstan.neon
25
phpstan.neon
|
@ -163,11 +163,6 @@ parameters:
|
|||
count: 1
|
||||
path: app/Providers/AuthServiceProvider.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Subactivity\\:\\:sluggable\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Subactivity.php
|
||||
|
||||
-
|
||||
message: "#^Method Database\\\\Factories\\\\ActivityFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
|
@ -198,32 +193,12 @@ parameters:
|
|||
count: 1
|
||||
path: database/factories/Payment/StatusFactory.php
|
||||
|
||||
-
|
||||
message: "#^Method Database\\\\Factories\\\\SubactivityFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: database/factories/SubactivityFactory.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy.*#"
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Phake\\\\Proxies\\\\VerifierProxy.*#"
|
||||
|
||||
-
|
||||
message: "#^Method Tests\\\\Feature\\\\Member\\\\StoreTest\\:\\:attributes\\(\\) has parameter \\$overwrites with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: tests/Feature/Member/StoreTest.php
|
||||
|
||||
-
|
||||
message: "#^Method Tests\\\\Feature\\\\Member\\\\StoreTest\\:\\:attributes\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: tests/Feature/Member/StoreTest.php
|
||||
|
||||
-
|
||||
message: "#^Method Tests\\\\Feature\\\\Member\\\\StoreTest\\:\\:defaults\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: tests/Feature/Member/StoreTest.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc tag @param has invalid value \\(\\<class\\-string\\> \\$class\\)\\: Unexpected token \"\\<\", expected type at offset 18$#"
|
||||
count: 1
|
||||
|
|
|
@ -211,6 +211,9 @@ class StoreTest extends TestCase
|
|||
->assertSessionHasErrors(['subscription_id' => 'Beitragsart ist erforderlich.']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function defaults(): array
|
||||
{
|
||||
$country = Country::factory()->create();
|
||||
|
|
|
@ -4,8 +4,15 @@ namespace Tests\Lib;
|
|||
|
||||
trait MergesAttributes
|
||||
{
|
||||
abstract public function defaults();
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
abstract public function defaults(): array;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $overwrites
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function attributes(?array $overwrites = []): array
|
||||
{
|
||||
$defaults = collect($this->defaults());
|
||||
|
|
Loading…
Reference in New Issue