for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Database\Factories;
use App\Models\PhpVersion;
use Illuminate\Database\Eloquent\Factories\Factory;
class PhpVersionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = PhpVersion::class;
* Define the model's default state.
* @return array
public function definition()
return [
'version_number' => $this->faker->randomElement(['5.6', '7.0', '7.1', '7.2']),
'default' => 'false',
];
}
public function default()
return $this->state(function (array $attributes) {
$attributes
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
return $this->state(function (/** @scrutinizer ignore-unused */ array $attributes) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
'default' => true,
});
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.