Skip to content

Commit 69ed7f5

Browse files
authored
Merge pull request #21 from kenjis/add-strict_types
refactor: add strict_types
2 parents b9df900 + fff9dff commit 69ed7f5

40 files changed

Lines changed: 149 additions & 71 deletions

.php-cs-fixer.dist.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use CodeIgniter\CodingStandard\CodeIgniter4;
46
use Nexus\CsConfig\Factory;
57
use PhpCsFixer\Finder;
@@ -13,7 +15,10 @@
1315
->exclude('build')
1416
->append([__FILE__]);
1517

16-
$overrides = [];
18+
$overrides = [
19+
'declare_strict_types' => true,
20+
'void_return' => true,
21+
];
1722

1823
$options = [
1924
'finder' => $finder,

src/BaseJob.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue;
46

57
abstract class BaseJob

src/Commands/Generators/JobGenerator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands\Generators;
46

57
use CodeIgniter\CLI\BaseCommand;

src/Commands/QueueClear.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;

src/Commands/QueueFailed.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;

src/Commands/QueueFlush.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;

src/Commands/QueueForget.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;

src/Commands/QueuePublish.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;
@@ -13,10 +15,7 @@ class QueuePublish extends BaseCommand
1315
protected $name = 'queue:publish';
1416
protected $description = 'Publish QueueJob config file into the current application.';
1517

16-
/**
17-
* @return void
18-
*/
19-
public function run(array $params)
18+
public function run(array $params): void
2019
{
2120
$source = service('autoloader')->getNamespace('CodeIgniter\\Queue')[0];
2221

src/Commands/QueueRetry.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;

src/Commands/QueueStop.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CodeIgniter\Queue\Commands;
46

57
use CodeIgniter\CLI\BaseCommand;

0 commit comments

Comments
 (0)