Skip to content

Commit

Permalink
Declare strict types
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 5, 2024
1 parent a98afa2 commit e1fe7db
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@
'return_assignment' => false,
'comment_to_phpdoc' => false,
'general_phpdoc_annotation_remove' => [
'annotations' => ['author', 'copyright', 'throws'],
'annotations' => ['author', 'copyright'],
],

// fn => without curly brackets is less readable,
// also prevent bounding of unwanted variables for GC
'use_arrow_functions' => false,

// TODO disable too strict rules for now
'declare_strict_types' => false,
'general_phpdoc_annotation_remove' => false,
'php_unit_data_provider_static' => false,
'php_unit_strict' => false,
'phpdoc_to_comment' => false,
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/CASMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockAcquireException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/FlockMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use Eloquent\Liberator\Liberator;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/LockMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockAcquireException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/MemcachedMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockReleaseException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/MutexConcurrencyTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use Eloquent\Liberator\Liberator;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/MutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use Eloquent\Liberator\Liberator;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/PHPRedisMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockAcquireException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/PgAdvisoryLockMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\mutex\PgAdvisoryLockMutex;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/PredisMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockAcquireException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/RedisMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockAcquireException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/SpinlockMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\ExecutionOutsideLockException;
Expand Down
2 changes: 2 additions & 0 deletions tests/mutex/TransactionalMutexTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\mutex;

use malkusch\lock\exception\LockAcquireException;
Expand Down
2 changes: 2 additions & 0 deletions tests/util/DoubleCheckedLockingTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\util;

use malkusch\lock\mutex\Mutex;
Expand Down
2 changes: 2 additions & 0 deletions tests/util/LoopTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\util;

use malkusch\lock\exception\TimeoutException;
Expand Down
2 changes: 2 additions & 0 deletions tests/util/PcntlTimeoutTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace malkusch\lock\Tests\util;

use malkusch\lock\exception\DeadlineException;
Expand Down

0 comments on commit e1fe7db

Please sign in to comment.