for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Modules\Core\Console\Installers;
use Illuminate\Console\Command;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Filesystem\Filesystem;
use Modules\Core\Services\Composer;
class Installer
{
/**
* @var array
*/
protected $scripts = [];
* @param Filesystem $finder
* @param Application $app
* @param Composer $composer
public function __construct(Application $app, Filesystem $finder, Composer $composer)
$this->finder = $finder;
finder
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
$this->app = $app;
app
$this->composer = $composer;
composer
}
* @param array $scripts
* @return $this
public function stack(array $scripts)
$this->scripts = $scripts;
return $this;
* Fire install scripts
* @param Command $command
* @return bool
public function install(Command $command)
foreach ($this->scripts as $script) {
try {
$this->app->make($script)->fire($command);
} catch (\Exception $e) {
$command->error($e->getMessage());
return false;
return true;
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: