for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dennis\Seeder\Generator;
/**
* Class MethodNameGenerator
*
* @package Dennis\Seeder\Generator
*/
class MethodNameGenerator implements \Dennis\Seeder\Generator
{
* @var \Dennis\Seeder\Faker $faker
protected $faker;
* MethodNameGenerator constructor.
public function __construct(\Dennis\Seeder\Faker $faker)
$this->faker = $faker;
}
* @return mixed|void
integer|string|null
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
public function generate($parameter)
if (is_numeric($parameter)) {
return (int) $parameter;
if ($this->faker->guessProviderName($parameter)) {
$parameter = $this->faker->guessProviderName($parameter);
$parameter
try {
$this->faker->get($parameter);
return self::PREFIX . ucfirst($parameter) . self::SUFFIX;
} catch (\Dennis\Seeder\Provider\NotFoundException $exception) {
return null;
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.