Skip to content

Fix styling

Fix styling #12

Triggered via push July 29, 2024 15:45
Status Failure
Total duration 28s
Artifacts

phpstan.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 warning
phpstan: database/factories/WorkflowTransitionFactory.php#L17
Method Squarebit\Workflows\Database\Factories\WorkflowTransitionFactory::definition() should return array<model property of Squarebit\Workflows\Models\WorkflowTransition, mixed> but returns array<string, int>.
phpstan: src/Models/Workflow.php#L49
Method Squarebit\Workflows\Models\Workflow::allStatuses() return type with generic class Illuminate\Support\Collection does not specify its types: TKey, TValue
phpstan: src/Models/Workflow.php#L53
Parameter #1 $callback of method Illuminate\Support\Collection<(int|string),Illuminate\Database\Eloquent\Model>::each() expects callable(Illuminate\Database\Eloquent\Model, int|string): mixed, Closure(Squarebit\Workflows\Models\WorkflowTransition): Illuminate\Support\Collection<int|string, mixed> given.
phpstan: src/Models/WorkflowModelStatus.php#L38
Type Squarebit\Workflows\Contracts\Workflowable in generic type Illuminate\Database\Eloquent\Relations\MorphTo<Squarebit\Workflows\Contracts\Workflowable, Squarebit\Workflows\Models\WorkflowModelStatus> in PHPDoc tag @return is not subtype of template type TRelatedModel of Illuminate\Database\Eloquent\Model of class Illuminate\Database\Eloquent\Relations\MorphTo.
phpstan: src/Models/WorkflowModelStatus.php#L40
Method Squarebit\Workflows\Models\WorkflowModelStatus::model() should return Illuminate\Database\Eloquent\Relations\MorphTo<Squarebit\Workflows\Contracts\Workflowable, Squarebit\Workflows\Models\WorkflowModelStatus> but returns Illuminate\Database\Eloquent\Relations\MorphTo<Illuminate\Database\Eloquent\Model, Squarebit\Workflows\Models\WorkflowModelStatus>.
phpstan: src/Models/WorkflowModelStatus.php#L59
Method Squarebit\Workflows\Models\WorkflowModelStatus::scopeInStatus() has parameter $query with generic class Illuminate\Database\Eloquent\Builder but does not specify its types: TModelClass
phpstan: src/Models/WorkflowModelStatus.php#L59
Method Squarebit\Workflows\Models\WorkflowModelStatus::scopeInStatus() return type with generic class Illuminate\Database\Eloquent\Builder does not specify its types: TModelClass
phpstan: src/Models/WorkflowModelStatus.php#L61
Parameter #1 $column of method Illuminate\Database\Eloquent\Builder<Illuminate\Database\Eloquent\Model>::where() expects array<int|model property of Illuminate\Database\Eloquent\Model, mixed>|(Closure(Illuminate\Database\Eloquent\Builder): Illuminate\Database\Eloquent\Builder)|(Closure(Illuminate\Database\Eloquent\Builder): void)|Illuminate\Contracts\Database\Query\Expression|model property of Illuminate\Database\Eloquent\Model, 'workflow_status_id' given.
phpstan: src/Models/WorkflowStatus.php#L26
Access to an undefined property Squarebit\Workflows\Models\WorkflowStatus::$code.
phpstan
Process completed with exit code 1.
phpstan
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/