GitHub Action #2180
gh-action.yml
on: schedule
Develop
11s
Production
9s
Annotations
44 errors and 38 warnings
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php#L34
Method JBZoo\CIReportConverter\JUnit\TestCaseElement::setName does not have a return type, expecting void
Rule : MissingReturnType
File Path : /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php:34
Snippet : `public function setName()`
Docs : https://psalm.dev/050
Severity : error
Error Level: 2
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L38
JBZoo\PHPUnit\ExampleTest::testInValid
Failed asserting that false is true.
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:107
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:40
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L53
JBZoo\PHPUnit\ExampleTest::testFail
Some reason to fail
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:51
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:55
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L58
testEcho
Some echo output
|
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L80
JBZoo\PHPUnit\ExampleTest::testNotice
Undefined variable: aaa
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:82
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L90
testException
Some echo output
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L96
JBZoo\PHPUnit\ExampleTest::testCompareArrays
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 ()
+Array &0 (
+ 0 => 1
+)
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:197
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:98
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L101
JBZoo\PHPUnit\ExampleTest::testCompareString
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'132'
+'123'
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:197
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:103
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php#L24
Visibility must be declared on all constants if your project supports PHP 7.1 or later
Rule : PSR12.Properties.ConstantVisibility.NotFound
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php:24:5
Severity : warning
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php#L44
Opening brace should be on a new line
Rule : Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php:44:35
Severity : error
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php#L50
Expected 1 newline at end of file; 0 found
Rule : PSR2.Files.EndFileNewline.NoneFound
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php:50
Severity : error
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php#L26
Avoid unused parameters such as '$input'.
Rule : Unused Code Rules / UnusedFormalParameter / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedFormalParameter)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php:26
Docs : https://phpmd.org/rules/unusedcode.html#unusedformalparameter
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php#L26
Avoid unused parameters such as '$input'.
Rule : Unused Code Rules / UnusedFormalParameter / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedFormalParameter)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php:26
Docs : https://phpmd.org/rules/unusedcode.html#unusedformalparameter
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L24
The class Command has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13.
Rule : Design Rules / CouplingBetweenObjects / Priority: 2
PHP Mute : @SuppressWarnings(PHPMD.CouplingBetweenObjects)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:24
Docs : https://phpmd.org/rules/design.html#couplingbetweenobjects
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L29
The method configure() has 114 lines of code. Current threshold is set to 100. Avoid really long methods.
Rule : Code Size Rules / ExcessiveMethodLength / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.ExcessiveMethodLength)
Func : Povils\PHPMND\Console\Command->configure()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:29
Docs : https://phpmd.org/rules/codesize.html#excessivemethodlength
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L144
The method execute() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
Rule : Code Size Rules / CyclomaticComplexity / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.CyclomaticComplexity)
Func : Povils\PHPMND\Console\Command->execute()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:144
Docs : https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L144
The method execute() has an NPath complexity of 2736. The configured NPath complexity threshold is 200.
Rule : Code Size Rules / NPathComplexity / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.NPathComplexity)
Func : Povils\PHPMND\Console\Command->execute()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:144
Docs : https://phpmd.org/rules/codesize.html#npathcomplexity
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L256
Avoid unused private methods such as 'castToNumber'.
Rule : Unused Code Rules / UnusedPrivateMethod / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedPrivateMethod)
Func : Povils\PHPMND\Console\Command->castToNumber()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:256
Docs : https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L256
Avoid unused private methods such as 'castToNumber'.
Rule : Unused Code Rules / UnusedPrivateMethod / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedPrivateMethod)
Func : Povils\PHPMND\Console\Command->castToNumber()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:256
Docs : https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php#L49
Avoid excessively long variable names like $includeNumericStrings. Keep variable name length under 20.
Rule : Naming Rules / LongVariable / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.LongVariable)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php:49
Docs : https://phpmd.org/rules/naming.html#longvariable
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php#L121
Avoid excessively long variable names like $includeNumericStrings. Keep variable name length under 20.
Rule : Naming Rules / LongVariable / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.LongVariable)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php:121
Docs : https://phpmd.org/rules/naming.html#longvariable
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php#L34
Method JBZoo\CIReportConverter\JUnit\TestCaseElement::setName does not have a return type, expecting void
Rule : MissingReturnType
File Path : /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php:34
Snippet : `public function setName()`
Docs : https://psalm.dev/050
Severity : error
Error Level: 2
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php#L24
Visibility must be declared on all constants if your project supports PHP 7.1 or later
Rule : PSR12.Properties.ConstantVisibility.NotFound
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php:24:5
Severity : warning
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php#L44
Opening brace should be on a new line
Rule : Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php:44:35
Severity : error
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php#L50
Expected 1 newline at end of file; 0 found
Rule : PSR2.Files.EndFileNewline.NoneFound
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/JUnitXml.php:50
Severity : error
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php#L26
Avoid unused parameters such as '$input'.
Rule : Unused Code Rules / UnusedFormalParameter / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedFormalParameter)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php:26
Docs : https://phpmd.org/rules/unusedcode.html#unusedformalparameter
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php#L26
Avoid unused parameters such as '$input'.
Rule : Unused Code Rules / UnusedFormalParameter / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedFormalParameter)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Application.php:26
Docs : https://phpmd.org/rules/unusedcode.html#unusedformalparameter
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L24
The class Command has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13.
Rule : Design Rules / CouplingBetweenObjects / Priority: 2
PHP Mute : @SuppressWarnings(PHPMD.CouplingBetweenObjects)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:24
Docs : https://phpmd.org/rules/design.html#couplingbetweenobjects
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L29
The method configure() has 114 lines of code. Current threshold is set to 100. Avoid really long methods.
Rule : Code Size Rules / ExcessiveMethodLength / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.ExcessiveMethodLength)
Func : Povils\PHPMND\Console\Command->configure()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:29
Docs : https://phpmd.org/rules/codesize.html#excessivemethodlength
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L144
The method execute() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
Rule : Code Size Rules / CyclomaticComplexity / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.CyclomaticComplexity)
Func : Povils\PHPMND\Console\Command->execute()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:144
Docs : https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L144
The method execute() has an NPath complexity of 2736. The configured NPath complexity threshold is 200.
Rule : Code Size Rules / NPathComplexity / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.NPathComplexity)
Func : Povils\PHPMND\Console\Command->execute()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:144
Docs : https://phpmd.org/rules/codesize.html#npathcomplexity
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L256
Avoid unused private methods such as 'castToNumber'.
Rule : Unused Code Rules / UnusedPrivateMethod / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedPrivateMethod)
Func : Povils\PHPMND\Console\Command->castToNumber()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:256
Docs : https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php#L256
Avoid unused private methods such as 'castToNumber'.
Rule : Unused Code Rules / UnusedPrivateMethod / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.UnusedPrivateMethod)
Func : Povils\PHPMND\Console\Command->castToNumber()
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Command.php:256
Docs : https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php#L49
Avoid excessively long variable names like $includeNumericStrings. Keep variable name length under 20.
Rule : Naming Rules / LongVariable / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.LongVariable)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php:49
Docs : https://phpmd.org/rules/naming.html#longvariable
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php#L121
Avoid excessively long variable names like $includeNumericStrings. Keep variable name length under 20.
Rule : Naming Rules / LongVariable / Priority: 3
PHP Mute : @SuppressWarnings(PHPMD.LongVariable)
File Path: Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/povils/phpmnd/src/Console/Option.php:121
Docs : https://phpmd.org/rules/naming.html#longvariable
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L38
JBZoo\PHPUnit\ExampleTest::testInValid
Failed asserting that false is true.
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:107
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:40
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L53
JBZoo\PHPUnit\ExampleTest::testFail
Some reason to fail
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:51
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:55
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L58
testEcho
Some echo output
|
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L80
JBZoo\PHPUnit\ExampleTest::testNotice
Undefined variable: aaa
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:82
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L90
testException
Some echo output
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L96
JBZoo\PHPUnit\ExampleTest::testCompareArrays
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 ()
+Array &0 (
+ 0 => 1
+)
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:197
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:98
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L101
JBZoo\PHPUnit\ExampleTest::testCompareString
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'132'
+'123'
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/vendor/jbzoo/phpunit/src/functions/aliases.php:197
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:103
|
Production
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Production
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php#L42
Method JBZoo\CIReportConverter\JUnit\TestCaseElement::setClassname does not have a return type, expecting void
Rule : MissingReturnType
File Path : /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php:42
Snippet : `public function setClassname()`
Docs : https://psalm.dev/050
Severity : info
Error Level: -1
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElementSuppress.php#L42
Method JBZoo\CIReportConverter\JUnit\TestCaseElement::setClassname does not have a return type, expecting void
Rule : MissingReturnType
File Path : /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElementSuppress.php:42
Snippet : `public function setClassname()`
Docs : https://psalm.dev/050
Severity : suppress
Error Level: -2
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L85
JBZoo\PHPUnit\ExampleTest::testWarning
Some warning
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:87
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper.php#L16
Found 24 cloned lines in 3 files (34 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper.php:16-40
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper1.php:17-41
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper2.php:18-42
Code Fragment:
```
declare(strict_types=1);
namespace JBZoo\CIReportConverter;
use JBZoo\Utils\Str;
/**
* Class Helper
* @Package JBZoo\CIReportConverter
*/
class Helper
{
/**
* @param array $data
* @return string|null
*/
public static function descAsList(array $data): ?string
{
$result = Str::listToDescription($data, true);
if (null === $result) {
return null;
}
return "\n{$result}";
```
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php#L65
Found 14 cloned lines in 2 files (28 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php:65-79
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityInspectionsConverter.php:66-80
Code Fragment:
```
$this->renderSuite($sourceSuite);
$buffer = $this->tcLogger->getWriter();
if ($buffer instanceof Buffer) {
return implode('', $buffer->getBuffer());
}
return '';
}
/**
* @param SourceSuite $sourceSuite
*/
private function renderSuite(SourceSuite $sourceSuite): void
```
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php#L46
Found 12 cloned lines in 2 files (40 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php:46-58
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityInspectionsConverter.php:51-63
Code Fragment:
```
public function __construct(array $params = [], ?int $flowId = null, ?AbstractWriter $tcWriter = null)
{
$this->tcLogger = new TeamCity($tcWriter ?: new Buffer(), $flowId, $params);
}
/**
* @inheritdoc
*/
public function fromInternal(SourceSuite $sourceSuite): string
{
if ($this->flowId > 0) {
$this->tcLogger->setFlowId($this->flowId);
```
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpDependStatsTcConverter.php#L38
Found 11 cloned lines in 2 files (31 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpDependStatsTcConverter.php:38-49
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpMetricsStatsTcConverter.php:38-49
Code Fragment:
```
public function toInternalMetric(string $sourceCode): Metrics
{
$xmlAsArray = Xml::dom2Array(Xml::createDomDocument($sourceCode));
$attrs = data($xmlAsArray)->findArray('_children.0._attrs');
unset(
$attrs['generated'],
$attrs['pdepend']
);
return self::buildMetrics($attrs, new PhpDepend());
```
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php#L49
Found 8 cloned lines in 2 files (24 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php:49-57
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpMndConverter.php:49-57
Code Fragment:
```
$relFilename = $this->cleanFilepath($file['_attrs']['name'] ?? 'undefined');
$absFilename = $this->getFullPath($relFilename);
$suite = $sourceSuite->addSuite($relFilename);
$suite->file = $absFilename;
foreach ($file['_children'] as $errorNode) {
$error = data($errorNode['_attrs']);
```
|
Production:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php#L66
Found 0 cloned lines in 1 files (0 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php:66
Code Fragment: Not Found
|
Production:
src/IP.php#L81
File Path : src/IP.php:81:36
Snippet : `while (count($blocks) < 4) {`
Suggestions: Env::VAR_INT; FS::PERM_ALL_READ; Url::URL_JOIN_QUERY
|
Production:
src/IP.php#L137
File Path: src/IP.php:137
Snippet : `} elseif (($ipAddressLong & 0xC0000000) === 0x80000000) {`
|
Production:
src/IP.php#L139
File Path: src/IP.php:139
Snippet : `} elseif (($ipAddressLong & 0xE0000000) === 0xC0000000) {`
|
Production:
tests/CliTest.php#L107
File Path : tests/CliTest.php:107:44
Snippet : `isTrue(Cli::getNumberOfColumns() >= 80);`
Suggestions: Cli::DEFAULT_WIDTH; Url::PORT_HTTP
|
Production:
src/Timer.php#L49
File Path: src/Timer.php:49:56
Snippet : `return $time . ' ' . $unit . ($time === 1.0 ? '' : 's');`
|
Production:
src/Dates.php#L112
File Path: src/Dates.php:112:23
Snippet : `return $time > 10000;`
|
Production:
src/Dates.php#L212
File Path : src/Dates.php:212:23
Snippet : `if ($seconds < 2) {`
Suggestions: Env::VAR_BOOL; Cli::STDERR; FS::PERM_ALL_WRITE; Url::URL_JOIN_PATH
|
Production:
src/Http.php#L166
File Path : src/Http.php:166:45
Snippet : `if (count($exploded) === 2) {`
Suggestions: Env::VAR_BOOL; Cli::STDERR; FS::PERM_ALL_WRITE; Url::URL_JOIN_PATH
|
Develop
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Develop
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper.php#L16
Found 24 cloned lines in 3 files (34 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper.php:16-40
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper1.php:17-41
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Helper2.php:18-42
Code Fragment:
```
declare(strict_types=1);
namespace JBZoo\CIReportConverter;
use JBZoo\Utils\Str;
/**
* Class Helper
* @Package JBZoo\CIReportConverter
*/
class Helper
{
/**
* @param array $data
* @return string|null
*/
public static function descAsList(array $data): ?string
{
$result = Str::listToDescription($data, true);
if (null === $result) {
return null;
}
return "\n{$result}";
```
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php#L65
Found 14 cloned lines in 2 files (28 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php:65-79
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityInspectionsConverter.php:66-80
Code Fragment:
```
$this->renderSuite($sourceSuite);
$buffer = $this->tcLogger->getWriter();
if ($buffer instanceof Buffer) {
return implode('', $buffer->getBuffer());
}
return '';
}
/**
* @param SourceSuite $sourceSuite
*/
private function renderSuite(SourceSuite $sourceSuite): void
```
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php#L46
Found 12 cloned lines in 2 files (40 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityTestsConverter.php:46-58
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/TeamCityInspectionsConverter.php:51-63
Code Fragment:
```
public function __construct(array $params = [], ?int $flowId = null, ?AbstractWriter $tcWriter = null)
{
$this->tcLogger = new TeamCity($tcWriter ?: new Buffer(), $flowId, $params);
}
/**
* @inheritdoc
*/
public function fromInternal(SourceSuite $sourceSuite): string
{
if ($this->flowId > 0) {
$this->tcLogger->setFlowId($this->flowId);
```
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpDependStatsTcConverter.php#L38
Found 11 cloned lines in 2 files (31 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpDependStatsTcConverter.php:38-49
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpMetricsStatsTcConverter.php:38-49
Code Fragment:
```
public function toInternalMetric(string $sourceCode): Metrics
{
$xmlAsArray = Xml::dom2Array(Xml::createDomDocument($sourceCode));
$attrs = data($xmlAsArray)->findArray('_children.0._attrs');
unset(
$attrs['generated'],
$attrs['pdepend']
);
return self::buildMetrics($attrs, new PhpDepend());
```
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php#L49
Found 8 cloned lines in 2 files (24 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php:49-57
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/PhpMndConverter.php:49-57
Code Fragment:
```
$relFilename = $this->cleanFilepath($file['_attrs']['name'] ?? 'undefined');
$absFilename = $this->getFullPath($relFilename);
$suite = $sourceSuite->addSuite($relFilename);
$suite->file = $absFilename;
foreach ($file['_children'] as $errorNode) {
$error = data($errorNode['_attrs']);
```
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php#L66
Found 0 cloned lines in 1 files (0 tokens):
- /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/Converters/CheckStyleConverter.php:66
Code Fragment: Not Found
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php#L42
Method JBZoo\CIReportConverter\JUnit\TestCaseElement::setClassname does not have a return type, expecting void
Rule : MissingReturnType
File Path : /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElement.php:42
Snippet : `public function setClassname()`
Docs : https://psalm.dev/050
Severity : info
Error Level: -1
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElementSuppress.php#L42
Method JBZoo\CIReportConverter\JUnit\TestCaseElement::setClassname does not have a return type, expecting void
Rule : MissingReturnType
File Path : /Users/smetdenis/Work/projects/jbzoo-ci-report-converter/src/JUnit/TestCaseElementSuppress.php:42
Snippet : `public function setClassname()`
Docs : https://psalm.dev/050
Severity : suppress
Error Level: -2
|
Develop:
src/IP.php#L81
File Path : src/IP.php:81:36
Snippet : `while (count($blocks) < 4) {`
Suggestions: Env::VAR_INT; FS::PERM_ALL_READ; Url::URL_JOIN_QUERY
|
Develop:
src/IP.php#L137
File Path: src/IP.php:137
Snippet : `} elseif (($ipAddressLong & 0xC0000000) === 0x80000000) {`
|
Develop:
src/IP.php#L139
File Path: src/IP.php:139
Snippet : `} elseif (($ipAddressLong & 0xE0000000) === 0xC0000000) {`
|
Develop:
tests/CliTest.php#L107
File Path : tests/CliTest.php:107:44
Snippet : `isTrue(Cli::getNumberOfColumns() >= 80);`
Suggestions: Cli::DEFAULT_WIDTH; Url::PORT_HTTP
|
Develop:
src/Timer.php#L49
File Path: src/Timer.php:49:56
Snippet : `return $time . ' ' . $unit . ($time === 1.0 ? '' : 's');`
|
Develop:
src/Dates.php#L112
File Path: src/Dates.php:112:23
Snippet : `return $time > 10000;`
|
Develop:
src/Dates.php#L212
File Path : src/Dates.php:212:23
Snippet : `if ($seconds < 2) {`
Suggestions: Env::VAR_BOOL; Cli::STDERR; FS::PERM_ALL_WRITE; Url::URL_JOIN_PATH
|
Develop:
src/Http.php#L166
File Path : src/Http.php:166:45
Snippet : `if (count($exploded) === 2) {`
Suggestions: Env::VAR_BOOL; Cli::STDERR; FS::PERM_ALL_WRITE; Url::URL_JOIN_PATH
|
Develop:
Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php#L85
JBZoo\PHPUnit\ExampleTest::testWarning
Some warning
/Users/smetdenis/Work/projects/jbzoo-ci-report-converter/tests/ExampleTest.php:87
|