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
13 changes: 7 additions & 6 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ jobs:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.4'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v4
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0

- name: Run PHPStan
run: composer test:types
Expand All @@ -35,16 +36,16 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.4'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v4
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0

- name: Run ECS
run: composer test:style
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php }}
php-version: '8.4'
coverage: none

- name: Setup problem matchers
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"larastan/larastan": "^3.9",
"nunomaduro/collision": "^7.10 || ^8.1.1",
"orchestra/testbench": "^10.8 || ^11.0",
"pestphp/pest": "^4.7",
"pestphp/pest-plugin-laravel": "^4.1",
"worksome/coding-style": "^4.0"
"pestphp/pest": "^4.7 || ^5.1",
"pestphp/pest-plugin-laravel": "^4.1 || ^5.0",
"worksome/coding-style": "^5.2"
},
"autoload": {
"psr-4": {
Expand Down
16 changes: 2 additions & 14 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Worksome\CodingStyle\WorksomeRectorConfig;

return static function (RectorConfig $rectorConfig): void {
WorksomeRectorConfig::setup($rectorConfig);

$rectorConfig->paths([
return WorksomeRectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

// Define extra rule sets to be applied
$rectorConfig->sets([
// SetList::DEAD_CODE,
]);

// Register extra a single rules
// $rectorConfig->rule(ClassOnObjectRector::class);
};
10 changes: 5 additions & 5 deletions src/Generator/GeneratorFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
class GeneratorFile
{
public function __construct(
private string $path,
private int $size,
private string $url,
private int $count,
private string $mimeType,
private readonly string $path,
private readonly int $size,
private readonly string $url,
private readonly int $count,
private readonly string $mimeType,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/Mutations/CreateExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
class CreateExport
{
public function __construct(
private CreateExportService $createExportService,
private ExportValidator $exportValidator,
private readonly CreateExportService $createExportService,
private readonly ExportValidator $exportValidator,
) {
}

Expand Down
2 changes: 0 additions & 2 deletions src/Processor/EloquentProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ abstract class EloquentProcessor implements ProcessorDriver

/**
* Additional data fields to be included for each record in the export.
*
* @return array
*/
public function additional($item): array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Processor/ProcessorData.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class ProcessorData
{
public function __construct(
private array $data,
private string $type,
private readonly array $data,
private readonly string $type,
) {
}

Expand Down
3 changes: 1 addition & 2 deletions src/Processor/ProcessorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ProcessorRepository
private array $processors = [];

public function __construct(
private Container $container,
private readonly Container $container,
) {
}

Expand All @@ -30,7 +30,6 @@ public function get(string $processor): ProcessorDriver
}

/**
* @param string $processorName
* @param class-string<ProcessorDriver> $processorClass
*/
public function register(string $processorName, string $processorClass): void
Expand Down
16 changes: 8 additions & 8 deletions src/Services/CreateExportDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
class CreateExportDTO
{
public function __construct(
private int $userId,
private int $accountId,
private string $accountType,
private string $type,
private string $generatorType,
private array $deliveries,
private array $args,
private int|null $impersonatorId = null,
private readonly int $userId,
private readonly int $accountId,
private readonly string $accountType,
private readonly string $type,
private readonly string $generatorType,
private readonly array $deliveries,
private readonly array $args,
private readonly int|null $impersonatorId = null,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Services/UpdateExportDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
class UpdateExportDTO
{
public function __construct(
private Export $export,
private GeneratorFile $generatorFile,
private readonly Export $export,
private readonly GeneratorFile $generatorFile,
) {
}

Expand Down
Loading