Skip to content

Commit

Permalink
Merge pull request #101 from worksome/feature/coding-style
Browse files Browse the repository at this point in the history
style: apply fixes from ECS
  • Loading branch information
owenvoke authored Oct 14, 2024
2 parents d98e4f6 + 12f99aa commit 1fd8841
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/Enums/ExportResponseStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
final class ExportResponseStatus extends Enum
{
public const SUCCESS = 'success';

public const ERROR = 'error';
}
1 change: 1 addition & 0 deletions src/Enums/ExportStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
final class ExportStatus extends Enum
{
public const AWAITING = 'awaiting';

public const COMPLETED = 'completed';
}
1 change: 1 addition & 0 deletions src/Generator/CsvDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function generate(ProcessorData $processorData): GeneratorFile
Carbon::now()->format('Y-m-d'),
Str::random(40)
);

return $this->saveToStorage($filename, $csv, $processorData);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Processor/ProcessorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function get(string $processor): ProcessorDriver
{
if (! isset($this->processors[$processor])) {
throw new InvalidProcessorException(
sprintf("The processor [%s] is not registered!", $processor)
sprintf('The processor [%s] is not registered!', $processor)
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Services/CreateExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function run(): Export
'dateTo' => $dateTo,
'dateFrom' => $dateFrom,
]
)
),
]);
}
}
2 changes: 1 addition & 1 deletion tests/Fake/FakeProcessorWithOptionalDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function optional($item): array
{
return [
['Compliance UK' => 'applies'],
['Compliance US' => 'none']
['Compliance US' => 'none'],
];
}
}
20 changes: 10 additions & 10 deletions tests/Feature/Processor/EloquentProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@
}

expect($data[0])->toBe([
"User ID" => "1",
"name" => "User One",
"Is Admin" => "1",
"Compliance UK" => "applies",
"Compliance US" => "none"
'User ID' => '1',
'name' => 'User One',
'Is Admin' => '1',
'Compliance UK' => 'applies',
'Compliance US' => 'none',
]);

expect($data[1])->toBe([
"User ID" => "2",
"name" => "User Two",
"Is Admin" => "0",
"Compliance UK" => "applies",
"Compliance US" => "none"
'User ID' => '2',
'name' => 'User Two',
'Is Admin' => '0',
'Compliance UK' => 'applies',
'Compliance US' => 'none',
]);
});
2 changes: 1 addition & 1 deletion tests/Feature/Processor/ProcessorDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

it('can retrieve the data', function () {
$processorData = new ProcessorData([
'foo' => 'Bar'
'foo' => 'Bar',
], 'randomstuff');

expect($processorData->getData())->toBe([
Expand Down

0 comments on commit 1fd8841

Please sign in to comment.