Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
"phpstan/phpstan": "^2.1",
"squizlabs/php_codesniffer": "^3.10",
"symfony/var-dumper": "^7.3",
"phpbench/phpbench": "^1.4"
"phpbench/phpbench": "^1.4",
"slevomat/coding-standard": "^8.15"
},
"config": {
"bin-dir": "bin",
"allow-plugins": {
"infection/extension-installer": true
"infection/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"process-timeout": 0
},
Expand Down Expand Up @@ -82,7 +84,6 @@
"bin/phpbench run benchmarks --report=aggregate"
],
"all": [
"@csfix",
"@cscheck",
"@analyze",
"@phpmd",
Expand Down
214 changes: 212 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
<?xml version="1.0"?>
<ruleset name="Phauthentic">
<config name="installed_paths" value="vendor/slevomat/coding-standard"/>
<arg name="tab-width" value="4"/>
<rule ref="PSR12">
<exclude name="Squiz.WhiteSpace.OperatorSpacing.SpacingAfter"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
</rule>

<!-- SlevomatCodingStandard -->
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature" minLineLength="120" minParametersCount="2"/>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/>
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment"/>
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>

<file>./src</file>
<file>./tests/Unit</file>
<exclude-pattern>*.TestCode</exclude-pattern>
Expand Down
14 changes: 4 additions & 10 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;

/**
*
*/
class Application
{
public const VERSION = '1.3.1';
Expand Down Expand Up @@ -271,13 +268,10 @@ public function getContainer(): ContainerBuilder
return $this->containerBuilder;
}

/**
* @param ProgressBarHandler $progressbar
* @param VerboseHandler $verbose
* @return HandlersLocator
*/
private function setUpEventHandlersLocator(ProgressBarHandler $progressbar, VerboseHandler $verbose): HandlersLocator
{
private function setUpEventHandlersLocator(
ProgressBarHandler $progressbar,
VerboseHandler $verbose
): HandlersLocator {
return new HandlersLocator([
SourceFilesFound::class => [
$progressbar,
Expand Down
7 changes: 0 additions & 7 deletions src/Business/Churn/ChangeCounter/ChangeCounterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@

use InvalidArgumentException;

/**
*
*/
class ChangeCounterFactory
{
/**
* @param string $type
* @return ChangeCounterInterface
*/
public function create(string $type): ChangeCounterInterface
{
return match ($type) {
Expand Down
3 changes: 0 additions & 3 deletions src/Business/Churn/ChangeCounter/GitChangeCounter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

use Phauthentic\CognitiveCodeAnalysis\CognitiveAnalysisException;

/**
*
*/
class GitChangeCounter implements ChangeCounterInterface
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Business/Churn/ChurnCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use Phauthentic\CognitiveCodeAnalysis\Business\CodeCoverage\CoverageReportReaderInterface;
use Phauthentic\CognitiveCodeAnalysis\Business\Cognitive\CognitiveMetricsCollection;

/**
*
*/
class ChurnCalculator
{
/**
Expand Down
4 changes: 1 addition & 3 deletions src/Business/Churn/Exporter/CsvExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Phauthentic\CognitiveCodeAnalysis\Business\Churn\Exporter;

use Phauthentic\CognitiveCodeAnalysis\CognitiveAnalysisException;

/**
* CsvExporter for Churn metrics.
*/
Expand All @@ -25,7 +23,7 @@ class CsvExporter extends AbstractExporter
/**
* @param array<string, array<string, mixed>> $classes
* @param string $filename
* @throws CognitiveAnalysisException
* @throws \Phauthentic\CognitiveCodeAnalysis\CognitiveAnalysisException
*/
public function export(array $classes, string $filename): void
{
Expand Down
3 changes: 0 additions & 3 deletions src/Business/Churn/Exporter/DataExporterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

namespace Phauthentic\CognitiveCodeAnalysis\Business\Churn\Exporter;

/**
*
*/
interface DataExporterInterface
{
/**
Expand Down
Loading