Skip to content

Commit 65cf83f

Browse files
#185 - Run quality tools
1 parent 843bb22 commit 65cf83f

18 files changed

Lines changed: 28 additions & 11 deletions

src/CleverAgeProcessBundle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function build(ContainerBuilder $container): void
3434
$container->addCompilerPass(new CheckSerializerCompilerPass());
3535
}
3636

37+
#[\Override]
3738
public function getPath(): string
3839
{
3940
return \dirname(__DIR__);

src/Configuration/ProcessConfiguration.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,7 @@ public function getDependencyGroups(): array
112112
if (null === $this->dependencyGroups) {
113113
$this->dependencyGroups = [];
114114
foreach ($this->getTaskConfigurations() as $taskConfiguration) {
115-
$isInBranch = false;
116-
foreach ($this->dependencyGroups as $branch) {
117-
if (\in_array($taskConfiguration->getCode(), $branch, true)) {
118-
$isInBranch = true;
119-
break;
120-
}
121-
}
122-
115+
$isInBranch = array_any($this->dependencyGroups, static fn ($branch) => \in_array($taskConfiguration->getCode(), $branch, true));
123116
if (!$isInBranch) {
124117
$dependencies = $this->buildDependencies($taskConfiguration);
125118
$dependencies = $this->sortDependencies($dependencies);

src/Configuration/TaskConfiguration.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ public function getOutputs(): array
112112
return $this->outputs;
113113
}
114114

115-
/**
116-
* @deprecated Use getErrorOutputs method instead
117-
*/
115+
#[\Deprecated(message: 'Use getErrorOutputs method instead')]
118116
public function getErrors(): array
119117
{
120118
@trigger_error('Deprecated method, use getErrorOutputs instead', \E_USER_DEPRECATED);

src/Filesystem/CsvFile.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ public function __construct(
5656
/**
5757
* Will return a resource if the file was created using a resource.
5858
*/
59+
#[\Override]
5960
public function getFilePath(): string
6061
{
6162
return $this->filePath;
6263
}
6364

65+
#[\Override]
6466
protected function getResourceName(): string
6567
{
6668
return "CSV file '{$this->filePath}'";

src/Logger/TaskProcessor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
class TaskProcessor extends AbstractProcessor
1919
{
20+
#[\Override]
2021
public function __invoke(LogRecord $record): LogRecord
2122
{
2223
$record = parent::__invoke($record);

src/Logger/TransformerProcessor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
class TransformerProcessor extends AbstractProcessor
1919
{
20+
#[\Override]
2021
public function __invoke(LogRecord $record): LogRecord
2122
{
2223
$record = parent::__invoke($record);

src/Task/File/Csv/AbstractCsvTask.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525
abstract class AbstractCsvTask extends AbstractCsvResourceTask
2626
{
27+
#[\Override]
2728
protected function initFile(ProcessState $state): void
2829
{
2930
if ($this->csv instanceof CsvResource) {
@@ -41,6 +42,7 @@ protected function initFile(ProcessState $state): void
4142
);
4243
}
4344

45+
#[\Override]
4446
protected function configureOptions(OptionsResolver $resolver): void
4547
{
4648
parent::configureOptions($resolver);

src/Task/File/Csv/CsvReaderTask.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ protected function getHeaders(ProcessState $state, array $options): ?array
8282
return $options['headers'];
8383
}
8484

85+
#[\Override]
8586
protected function configureOptions(OptionsResolver $resolver): void
8687
{
8788
parent::configureOptions($resolver);

src/Task/File/Csv/CsvSplitterTask.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424
class CsvSplitterTask extends InputCsvReaderTask
2525
{
26+
#[\Override]
2627
public function execute(ProcessState $state): void
2728
{
2829
$options = $this->getOptions($state);
@@ -49,6 +50,7 @@ public function execute(ProcessState $state): void
4950
* return true if the task has a next element
5051
* return false if the task has terminated it's iteration.
5152
*/
53+
#[\Override]
5254
public function next(ProcessState $state): bool
5355
{
5456
if (!$this->csv instanceof CsvResource) {
@@ -64,6 +66,7 @@ public function next(ProcessState $state): bool
6466
return !$endOfFile;
6567
}
6668

69+
#[\Override]
6770
public function finalize(ProcessState $state): void
6871
{
6972
if ($this->csv instanceof CsvResource) {
@@ -100,6 +103,7 @@ protected function splitCsv(CsvResource $csv, int $maxLines): string
100103
return $tmpFilePath;
101104
}
102105

106+
#[\Override]
103107
protected function configureOptions(OptionsResolver $resolver): void
104108
{
105109
parent::configureOptions($resolver);

src/Task/File/Csv/CsvWriterTask.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function proceed(ProcessState $state): void
4343
$state->setOutput($this->csv->getFilePath());
4444
}
4545

46+
#[\Override]
4647
protected function configureOptions(OptionsResolver $resolver): void
4748
{
4849
parent::configureOptions($resolver);

0 commit comments

Comments
 (0)