Showing 11 of 11 total issues
Function includeConfigDir
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function includeConfigDir($configDir)
{
$fileMapping = $this->package->getFilemapping();
$finder = new Finder();
if (!is_null($configDir) && !empty($configDir)) {
- 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 getSpecFromZip
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getSpecFromZip($packagesDir, $zipFileName = null)
{
$jsonManager = new JsonManager($packagesDir);
$packages = array();
- 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
Package
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Package
{
/**
* Version name.
*
Method execute
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(InputInterface $input, OutputInterface $output)
{
$filePath = $input->getArgument('file');
if (!file_exists($filePath)) {
Method execute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(InputInterface $input, OutputInterface $output)
{
$tempDir = $input->getArgument('temp_dir');
$targetDir = $input->getArgument('target');
$packageDir = $input->getArgument('package_dir');
Method includeConfigDir
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function includeConfigDir($configDir)
{
$fileMapping = $this->package->getFilemapping();
$finder = new Finder();
if (!is_null($configDir) && !empty($configDir)) {
Function copyFiles
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function copyFiles(array $file, $rollback = false)
{
$fileSystem = new Filesystem();
$dir = FilesManager::NEW_FILES_DIR;
if ($rollback) {
- 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 createJsonContentFrom
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function createJsonContentFrom($schema, array $arguments)
{
$decodedSchema = json_decode($schema, true);
$fileMapping = $this->getFileContent($arguments['version'].'.txt', $arguments['target']);
$jsonContent = array();
- 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 execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function execute(InputInterface $input, OutputInterface $output)
{
$filePath = $input->getArgument('file');
if (!file_exists($filePath)) {
- 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 generateParameters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function generateParameters($commandLine, array $arguments)
{
if (isset($arguments['comparePath']) && !empty($arguments['comparePath'])) {
$commandLine .= ' -d '.$arguments['comparePath'];
}
- 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 copyFilesToTemp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function copyFilesToTemp()
{
$fileSystem = new Filesystem();
$fileMapping = $this->includeConfigDir($this->package->getInclude());
if (empty($fileMapping)) {
- 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"