for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cortex\Foundation\Console\Commands;
use Cortex\Foundation\Traits\ConsoleMakeModuleCommand;
use Illuminate\Foundation\Console\PolicyMakeCommand as BasePolicyMakeCommand;
class PolicyMakeCommand extends BasePolicyMakeCommand
{
use ConsoleMakeModuleCommand;
/**
* Replace the User model namespace.
*
* @param string $stub
* @return string
*/
protected function replaceUserNamespace($stub)
if (! $userModel = config('auth.providers.'.config('auth.guards.'.config('auth.defaults.guard').'.provider').'.model')) {
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.
return $stub;
}
return str_replace(
$this->rootNamespace().'User',
$userModel,
$stub
);
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.