for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BeyondCode\LaravelPackageTools\Commands;
use Illuminate\Support\Str;
class MakeMigration extends GeneratorCommand
{
protected $type = 'Migration';
protected function getStub()
return __DIR__.'/stubs/migration.stub';
}
protected function qualifyClass($name)
return $this->rootNamespace() . '\\..\\database\\migrations\\' . $name;
protected function replaceClass($stub, $name)
$stub = str_replace('CreateDummiesTable', $this->getClassName($stub, $name), $stub);
return str_replace('dummies', $this->option('create', 'table_name'), $stub);
protected function getClassName($stub, $name)
$stub
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$class = str_replace($this->getNamespace($name).'\\', '', $name);
return ucfirst(Str::camel($class));
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.