src/Commands/Install/Development.php
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output)
{
// Bind the input and output for later use in other methods.
$this->io = new SymfonyStyle($input, $output);
Avoid variables with short names like $io. Configured minimum length is 3. Open
Open
protected $io;
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The method enable_debug_mode is not named in camelCase. Open
Open
protected function enable_debug_mode()
{
$path_to_file = $this->install_directory . '/.env';
$file_contents = file_get_contents($path_to_file);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method resolve_executables is not named in camelCase. Open
Open
protected function resolve_executables()
{
foreach ($this->executables as $exeutable => $path) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method check_php_extensions is not named in camelCase. Open
Open
protected function check_php_extensions()
{
$required_ext = ['intl', 'gd', 'PDO', 'curl', 'mbstring', 'dom', 'xml', 'zip', 'bz2'];
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method resolve_paths is not named in camelCase. Open
Open
protected function resolve_paths(string $path)
{
// Extract the pathinfo() for the path
$path_info = pathinfo($path);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method clone_repository is not named in camelCase. Open
Open
protected function clone_repository(string $repository, string $path)
{
$git = new GitWrapper($this->executables['git']);
$git->setTimeout(300);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method publish_assets is not named in camelCase. Open
Open
protected function publish_assets()
{
chdir($this->install_directory);
$this->runCommand($this->executables['php'] . ' artisan vendor:publish --force --all');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method install_dependencies is not named in camelCase. Open
Open
protected function install_dependencies()
{
chdir($this->install_directory);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method generate_encryption_key is not named in camelCase. Open
Open
protected function generate_encryption_key()
{
chdir($this->install_directory);
$this->runCommandWithOutput($this->executables['php'] . ' artisan key:generate', 'Encryption');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}