Skip to content

Commit e39bfb8

Browse files
committed
Codestyle fixes
1 parent 9f9ba18 commit e39bfb8

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

src/ApiSettings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
final class ApiSettings
88
{
99
/**
10-
* Create Pusher compatible version
10+
* Create Pusher compatible version.
1111
*
12-
* @param string $version
12+
* @param string $version
1313
* @return string
1414
*/
1515
public static function getVersion(string $version = ''): string
@@ -28,9 +28,9 @@ public static function getVersion(string $version = ''): string
2828
}
2929

3030
/**
31-
* Create WebSocket URL for given App ID
31+
* Create WebSocket URL for given App ID.
3232
*
33-
* @param string $appId
33+
* @param string $appId
3434
* @return string
3535
*/
3636
public static function createUrl(string $appId): string

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(string $app)
3131
}
3232

3333
/**
34-
* @param string $channel Channel to listen on
34+
* @param string $channel Channel to listen on
3535
* @param callable $listener Listener to call on new messages
3636
*/
3737
public function channel(string $channel, callable $listener)

src/CommandBus/Handler/SharedAppClientHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(SharedAppClientService $service)
2424
}
2525

2626
/**
27-
* @param SharedAppClientCommand $command
27+
* @param SharedAppClientCommand $command
2828
* @return PromiseInterface
2929
*/
3030
public function handle(SharedAppClientCommand $command): PromiseInterface

src/Event.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,9 @@ final class Event
1919
*/
2020
private $data;
2121

22-
public static function createFromMessage(array $message): self
23-
{
24-
return new self(
25-
$message['event'],
26-
json_decode($message['data'], true),
27-
isset($message['channel']) ? $message['channel'] : ''
28-
);
29-
}
30-
3122
/**
3223
* @param string $event
33-
* @param array $data
24+
* @param array $data
3425
* @param string $channel
3526
*/
3627
public function __construct(string $event, array $data, string $channel = '')
@@ -40,6 +31,15 @@ public function __construct(string $event, array $data, string $channel = '')
4031
$this->channel = $channel;
4132
}
4233

34+
public static function createFromMessage(array $message): self
35+
{
36+
return new self(
37+
$message['event'],
38+
json_decode($message['data'], true),
39+
isset($message['channel']) ? $message['channel'] : ''
40+
);
41+
}
42+
4343
/**
4444
* @return string
4545
*/

src/Service/SharedAppClientService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace ApiClients\Client\Pusher\Service;
44

55
use ApiClients\Client\Pusher\AsyncClient;
6-
use ApiClients\Foundation\Service\ServiceInterface;
76
use React\EventLoop\LoopInterface;
87
use React\Promise\CancellablePromiseInterface;
98
use function React\Promise\resolve;
@@ -30,7 +29,7 @@ public function __construct(LoopInterface $loop)
3029
}
3130

3231
/**
33-
* @param string|null $appId
32+
* @param string|null $appId
3433
* @return CancellablePromiseInterface
3534
*/
3635
public function share(string $appId): CancellablePromiseInterface
@@ -40,6 +39,7 @@ public function share(string $appId): CancellablePromiseInterface
4039
}
4140

4241
$this->apps[$appId] = AsyncClient::create($this->loop, $appId);
42+
4343
return resolve($this->apps[$appId]);
4444
}
4545
}

0 commit comments

Comments
 (0)