Skip to content

Commit 06862c1

Browse files
committed
code style changes
1 parent 49a0946 commit 06862c1

8 files changed

+49
-51
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"amphp/file": "v1.0.*"
3333
},
3434
"require-dev": {
35-
"php-service-bus/code-style-config": "v1.1.*",
35+
"php-service-bus/code-style-config": "v1.2.*",
3636
"phpunit/phpunit": "v8.4.*",
3737
"vimeo/psalm": "v3.7.*",
3838
"phpstan/phpstan": "v0.11.*"

composer.lock

+40-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AmpLock.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function id(): string
6262
public function release(): Promise
6363
{
6464
return call(
65-
function(): \Generator
65+
function (): \Generator
6666
{
6767
if (true === isset($this->releaser))
6868
{

src/FilesystemMutex.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(string $id, string $filePath)
5151
{
5252
$this->id = $id;
5353
$this->filePath = $filePath;
54-
$this->release = function(): \Generator
54+
$this->release = function (): \Generator
5555
{
5656
try
5757
{
@@ -79,7 +79,7 @@ public function __destruct()
7979
public function acquire(): Promise
8080
{
8181
return call(
82-
function(): \Generator
82+
function (): \Generator
8383
{
8484
try
8585
{

src/InMemoryMutex.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __destruct()
5151
public function acquire(): Promise
5252
{
5353
return call(
54-
function(): \Generator
54+
function (): \Generator
5555
{
5656
while (InMemoryMutexStorage::instance()->has($this->id))
5757
{
@@ -62,7 +62,7 @@ function(): \Generator
6262

6363
return new AmpLock(
6464
$this->id,
65-
function(): void
65+
function (): void
6666
{
6767
InMemoryMutexStorage::instance()->unlock($this->id);
6868
}

src/Storage/InMemoryMutexStorage.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ final class InMemoryMutexStorage
2020
/**
2121
* @psalm-var array<string, bool>
2222
*/
23-
private array
24-
25-
$localStorage = [];
23+
private array $localStorage = [];
2624

2725
private static ?self $instance;
2826

tests/FilesystemMutexTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function tearDown(): void
4242
public function acquire(): void
4343
{
4444
Loop::run(
45-
function(): \Generator
45+
function (): \Generator
4646
{
4747
$mutexFile = \sys_get_temp_dir() . '/mutex.test';
4848

tests/InMemoryMutexTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function tearDown(): void
4141
public function acquire(): void
4242
{
4343
Loop::run(
44-
function(): \Generator
44+
function (): \Generator
4545
{
4646
$mutex = new InMemoryMutex(__CLASS__);
4747
$promise = $mutex->acquire();

0 commit comments

Comments
 (0)