Showing 18 of 18 total issues
Method main
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function main()
{
$this->log("Formatting file {$this->file}");
$tmp = tempnam(dirname($this->file), 'tmp');
Function main
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function main()
{
$fmt = " %-22s %s\n";
`phing -h`;
- 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 main
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function main()
{
$fmt = " %-22s %s\n";
`phing -h`;
Function main
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function main()
{
// GreenCape first, so entries get overwritten if provided by Joomla
$repos = array(
'greencape/joomla-legacy',
- 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 setData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function setData($data)
{
foreach ($data as $file => $lines)
{
if (!file_exists($file))
- 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 main
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function main()
{
$this->log("Formatting file {$this->file}");
$tmp = tempnam(dirname($this->file), 'tmp');
- 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 findClassDeclaration
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function findClassDeclaration($code)
{
$result = [];
$identifier = '([\S]+)';
Method getTarball
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getTarball()
{
$versions = json_decode(file_get_contents($this->versionFile), true);
$requested = $this->version;
Method main
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function main()
{
// GreenCape first, so entries get overwritten if provided by Joomla
$repos = array(
'greencape/joomla-legacy',
Method generateDiagramSource
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function generateDiagramSource($code)
{
$namespace = $this->findNamespace($code);
$uses = $this->findUseStatements($code);
$classes = $this->findClassDeclaration($code);
Method handleReports
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function handleReports(\PHP_CodeCoverage $coverage)
{
if ($this->clover)
{
$this->log("Generating code coverage report in Clover XML format ...");
Function generateDiagramSource
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function generateDiagramSource($code)
{
$namespace = $this->findNamespace($code);
$uses = $this->findUseStatements($code);
$classes = $this->findClassDeclaration($code);
- 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 getFileSetFiles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getFileSetFiles()
{
if (count($this->fileSets) == 0 && count($this->fileLists) == 0)
{
throw new \BuildException("Need either nested fileset or nested filelist to iterate through");
- 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 getTarball
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getTarball()
{
$versions = json_decode(file_get_contents($this->versionFile), true);
$requested = $this->version;
- 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 findClassDeclaration
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function findClassDeclaration($code)
{
$result = [];
$identifier = '([\S]+)';
- 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 filterContainers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function filterContainers($availableContainers)
{
if ($this->state !== null)
{
$filteredContainers = 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 findUseStatements
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function findUseStatements($code)
{
$uses = [];
$identifier = '([\S]+)';
- 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 findBestMatch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function findBestMatch($pattern, $path, $version)
{
$bestVersion = '0';
$bestFile = null;
foreach (glob("$path/*") as $filename)
- 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"