File Installer.php
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
Function modifyEnvFile
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public static function modifyEnvFile($file, $options, $io)
{
$handler = fopen($file, 'r+');
$toWrite = [];
$updatedVariables = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method modifyEnvFile
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function modifyEnvFile($file, $options, $io)
{
$handler = fopen($file, 'r+');
$toWrite = [];
$updatedVariables = [];
Method postInstall
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function postInstall(Event $event)
{
$io = $event->getIO();
$rootDir = self::getRootDir(__DIR__);
Method setFolderPermissions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setFolderPermissions($io)
{
$rootDir = self::getRootDir(__DIR__);
// Change the permissions on a path and output the results.
Function postInstall
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function postInstall(Event $event)
{
$io = $event->getIO();
$rootDir = self::getRootDir(__DIR__);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function copyTwitterBootstrapFiles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function copyTwitterBootstrapFiles($event)
{
$io = $event->getIO();
$rootDir = self::getRootDir(__DIR__);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setFolderPermissions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function setFolderPermissions($io)
{
$rootDir = self::getRootDir(__DIR__);
// Change the permissions on a path and output the results.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function copyDataCenterFiles
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function copyDataCenterFiles($event)
{
$io = $event->getIO();
$rootDir = self::getRootDir(__DIR__);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"