Showing 24 of 24 total issues
AbstractStrategy
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractStrategy
{
const EVENT_TIMING_PRE = 'pre';
const EVENT_TIMING_POST = 'post';
- Create a ticketCreate a ticket
Manager
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Manager implements EventSubscriberInterface
{
/**
* instance
*
- Create a ticketCreate a ticket
Function resolveMappings
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function resolveMappings(array $mappings)
{
$translatedMap = array();
/** @var MapEntity $map */
foreach ($mappings as $map) {
- Read upRead up
- Create a ticketCreate a ticket
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
File AbstractStrategy.php
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* AbstractStrategy.php
*
* PHP Version 5
- Create a ticketCreate a ticket
Function isIgnored
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function isIgnored($entry)
{
$entry = $this->normalizeEntry($entry);
if ($this->hasEntry($entry)) {
return true;
- Read upRead up
- Create a ticketCreate a ticket
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 resolveMappings
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resolveMappings(array $mappings)
{
$translatedMap = array();
/** @var MapEntity $map */
foreach ($mappings as $map) {
- Create a ticketCreate a ticket
Method copy
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function copy($srcPath, $destPath, $override = false)
{
$srcPath = $this->normalizePath($srcPath);
$destPath = $this->normalizePath($destPath);
- Create a ticketCreate a ticket
Function createDelegates
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function createDelegates()
{
try {
/** @var Mapping\MapEntity $map */
foreach ($this->getMappingsArray() as $map) {
- Read upRead up
- Create a ticketCreate a ticket
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 checkDeployment
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function checkDeployment(Event $event)
{
$root = Config::getInstance()->getMagentoRootDir();
$deployedPackages = Manager::getInstance()->getDeployedPackages();
$errors = 0;
- Read upRead up
- Create a ticketCreate a ticket
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 getOverwrites
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected static function getOverwrites()
{
if (null === self::$overwrites) {
$overwriteConfig = Config::getInstance()
->getDeployStrategyOverwrite();
- Read upRead up
- Create a ticketCreate a ticket
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 getElementPaths
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getElementPaths(\SimpleXMLElement $element)
{
$type = $element->getName();
$typeAttributes = $element->attributes();
$name = $typeAttributes[self::NAME_ATTRIBUTE];
- Read upRead up
- Create a ticketCreate a ticket
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 parseMappings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function parseMappings()
{
$map = array();
/** @var $package SimpleXMLElement */
- Read upRead up
- Create a ticketCreate a ticket
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 checkDeployment
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkDeployment(Event $event)
{
$root = Config::getInstance()->getMagentoRootDir();
$deployedPackages = Manager::getInstance()->getDeployedPackages();
$errors = 0;
- Create a ticketCreate a ticket
Method getElementPaths
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getElementPaths(\SimpleXMLElement $element)
{
$type = $element->getName();
$typeAttributes = $element->attributes();
$name = $typeAttributes[self::NAME_ATTRIBUTE];
- Create a ticketCreate a ticket
Method createDelegates
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function createDelegates()
{
try {
/** @var Mapping\MapEntity $map */
foreach ($this->getMappingsArray() as $map) {
- Create a ticketCreate a ticket
Method parseMappings
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseMappings()
{
$map = array();
$file = $this->getModmanFileObject();
- Create a ticketCreate a ticket
Function copy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function copy($srcPath, $destPath, $override = false)
{
$srcPath = $this->normalizePath($srcPath);
$destPath = $this->normalizePath($destPath);
- Read upRead up
- Create a ticketCreate a ticket
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 getRelativePath
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getRelativePath($from, $to)
{
$from = $this->getPathParts($from);
$to = $this->getPathParts($to);
- Read upRead up
- Create a ticketCreate a ticket
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 remove
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function remove($path)
{
if (false === file_exists($path)) {
if (is_link($path)) {
unlink($path);
- Read upRead up
- Create a ticketCreate a ticket
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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
PackageInterface $package,
SplFileInfo $sourceDir,
SplFileInfo $destDir,
$action,
Composer $composer,
- Create a ticketCreate a ticket