for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\Streams\Platform\Addon\Console\Command;
use Anomaly\Streams\Platform\Support\Parser;
use Illuminate\Filesystem\Filesystem;
/**
* Class ScaffoldTheme
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
*/
class ScaffoldTheme
{
* Copy these theme folders.
* @var array
protected $copy = [
'fonts',
'js',
'scss',
'views',
];
* The addon path.
* @var string
private $path;
* Create a new ScaffoldTheme instance.
* @param $path
public function __construct($path)
$this->path = $path;
}
* Handle the command.
* @param Parser $parser
$parser
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param Filesystem $filesystem
public function handle(Filesystem $filesystem)
foreach ($this->copy as $copy) {
$filesystem->copyDirectory(
base_path('vendor/anomaly/streams-platform/resources/stubs/addons/resources/' . $copy),
"{$this->path}/resources/" . $copy
);
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.