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
9 changes: 5 additions & 4 deletions .github/workflows/code_samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
strategy:
matrix:
php:
- "8.3"
- "8.4" # Upper supported version
- "8.3" # Lower supported version
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -46,11 +47,11 @@ jobs:
- name: Run PHPStan analysis
run: composer phpstan

- name: Deptrac
- name: Run Deptrac analysis
run: composer deptrac

- name: Run rector
run: vendor/bin/rector process --dry-run --ansi
- name: Run Rector check
run: composer check-rector

code-samples-inclusion-check:
name: Check code samples inclusion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ProductSuggestionNormalizer implements
/**
* @return array<string, string|null>
*/
public function normalize($object, string $format = null, array $context = []): array
public function normalize($object, ?string $format = null, array $context = []): array
{
/** @var \App\Search\Model\Suggestion\ProductSuggestion $object */
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

final class AssignSectionDenormalizer extends AbstractActionDenormalizer
{
protected function supportsActionName(string $actionName, string $format = null): bool
protected function supportsActionName(string $actionName, ?string $format = null): bool
{
return $actionName === AssignSection::TYPE;
}
Expand All @@ -22,7 +22,7 @@ protected function supportsActionName(string $actionName, string $format = null)
*
* @return \App\Migrations\Action\AssignSection
*/
public function denormalize($data, string $type, string $format = null, array $context = []): AssignSection
public function denormalize($data, string $type, ?string $format = null, array $context = []): AssignSection
{
Assert::keyExists($data, 'value');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class ReplaceNameStepNormalizer extends AbstractStepNormalizer
{
protected function normalizeStep(
StepInterface $object,
string $format = null,
?string $format = null,
array $context = []
): array {
assert($object instanceof ReplaceNameStep);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

final class ValueDenormalizer implements DenormalizerInterface
{
public function denormalize($data, string $class, string $format = null, array $context = []): mixed
public function denormalize($data, string $class, ?string $format = null, array $context = []): mixed
{
if (isset($data['x']) && isset($data['y'])) {
// Support for old format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class ValueNormalizer implements NormalizerInterface
/**
* @return array<?float, ?float>
*/
public function normalize($object, string $format = null, array $context = []): array
public function normalize($object, ?string $format = null, array $context = []): array
{
return [
$object->getX(),
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@
"fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots",
"check-cs": "@fix-cs --dry-run",
"phpstan": "phpstan analyse",
"deptrac": "deptrac analyse"
"deptrac": "deptrac analyse",
"check-rector": "rector process --dry-run --ansi"
},
"scripts-descriptions": {
"fix-cs": "Automatically fixes code style in all files",
"check-cs": "Run code style checker for all files",
"phpstan": "Run static code analysis",
"deptrac": "Run Deptrac architecture testing"
"deptrac": "Run Deptrac architecture testing",
"check-rector": "Check for code refactoring opportunities"
},
"config": {
"allow-plugins": false
Expand Down
Loading