for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OkayBueno\Repositories\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
/**
* Class MakeBaseCommand
* @package OkayBueno\Repositories\Commands
*/
class MakeBaseCommand extends Command
{
protected $filesystem;
protected $composer;
* @param Filesystem $filesystem
public function __construct(
Filesystem $filesystem
)
parent::__construct();
$this->filesystem = $filesystem;
$this->composer = app()['composer'];
app
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->composer = /** @scrutinizer ignore-call */ app()['composer'];
}
* @param $path
protected function makeDirectory( $path )
if ( !$this->filesystem->isDirectory( $path ) )
$this->filesystem->makeDirectory( $path, 0775, true, true);
* @return array|mixed|string
protected function findDefaultImplementation()
$implementationBindings = config( 'repositories.bindings' );
config
$implementationBindings = /** @scrutinizer ignore-call */ config( 'repositories.bindings' );
$filtered = array_filter( $implementationBindings, function( $k ) {
return $k === 'default';
});
$default = array_keys($filtered);
$default = is_array( $default ) ? $default[0] : $default;
is_array($default)
true
return $default ? $default : 'eloquent';