Skip to content

Commit b544c70

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent 05389c8 commit b544c70

31 files changed

+44
-9
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"hyperf/server": "~3.1.0",
2020
"hyperf/support": "~3.1.0",
2121
"hyperf/utils": "~3.1.0",
22+
"jetbrains/phpstorm-attributes": "^1.0",
2223
"multiplex/socket": "^1.0",
2324
"swow/psr7-plus": "^1.0"
2425
},

src/Client.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\Contract\IdGeneratorInterface;
@@ -19,6 +20,7 @@
1920
use Hyperf\RpcClient\Exception\RequestException;
2021
use Hyperf\RpcMultiplex\Contract\DataFetcherInterface;
2122
use Hyperf\RpcMultiplex\Exception\InvalidArgumentException;
23+
use JetBrains\PhpStorm\ArrayShape;
2224
use Psr\Container\ContainerInterface;
2325

2426
class Client extends AbstractServiceClient
@@ -34,14 +36,16 @@ class Client extends AbstractServiceClient
3436

3537
private NormalizerInterface $normalizer;
3638

37-
/**
38-
* @param $options = [
39-
* 'service_interface' => '',
40-
* 'load_balancer' => 'random',
41-
* ]
42-
*/
43-
public function __construct(ContainerInterface $container, string $serviceName, string $protocol = 'jsonrpc-http', array $options = [])
44-
{
39+
public function __construct(
40+
ContainerInterface $container,
41+
string $serviceName,
42+
string $protocol = 'jsonrpc-http',
43+
#[ArrayShape([
44+
'service_interface' => 'string',
45+
'load_balancer' => 'string',
46+
])]
47+
array $options = []
48+
) {
4549
$this->serviceName = $serviceName;
4650
$this->protocol = $protocol;
4751
$this->setOptions($options);

src/ConfigProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\RpcMultiplex\Contract\HostReaderInterface;

src/Constant.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
class Constant

src/Contract/DataFetcherInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Contract;
1314

1415
use Hyperf\RpcClient\Exception\RequestException;

src/Contract/DnsResolverInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Contract;
1314

1415
interface DnsResolverInterface

src/Contract/HostReaderInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Contract;
1314

1415
use Hyperf\Contract\IPReaderInterface;

src/Contract/HttpMessageBuilderInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Contract;
1314

1415
use Psr\Http\Message\ServerRequestInterface;

src/CoreMiddleware.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Closure;

src/DataFormatter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\Codec\Json;

src/Exception/Handler/DefaultExceptionHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Exception\Handler;
1314

1415
use Hyperf\Contract\StdoutLoggerInterface;

src/Exception/InvalidArgumentException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Exception;
1314

1415
class InvalidArgumentException extends \InvalidArgumentException

src/Exception/NoAvailableNodesException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Exception;
1314

1415
use RuntimeException;

src/Exception/NotSupportException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Exception;
1314

1415
use RuntimeException;

src/HttpMessage/HostReader/NullHostReader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\HttpMessage\HostReader;
1314

1415
use Hyperf\RpcMultiplex\Contract\HostReaderInterface;

src/HttpMessageBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\Codec\Json;

src/Listener/RegisterProtocolListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Listener;
1314

1415
use Hyperf\Codec\Packer\PhpSerializerPacker;

src/Listener/RegisterServiceListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Listener;
1314

1415
use Hyperf\Event\Contract\ListenerInterface;

src/Packer/JsonPacker.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex\Packer;
1314

1415
use Hyperf\Codec\Json;

src/PathGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
class PathGenerator extends \Hyperf\Rpc\PathGenerator\PathGenerator

src/Socket.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Multiplex\Contract\IdGeneratorInterface;
1516
use Multiplex\Contract\PackerInterface;
1617
use Multiplex\Contract\SerializerInterface;
18+
use Multiplex\Socket\Client;
1719
use Psr\Container\ContainerInterface;
1820

19-
class Socket extends \Multiplex\Socket\Client
21+
class Socket extends Client
2022
{
2123
public function __construct(ContainerInterface $container)
2224
{

src/SocketFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\Collection\Arr;

src/TcpServer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\Collection\Arr;

src/Transporter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\RpcMultiplex;
1314

1415
use Hyperf\LoadBalancer\LoadBalancerInterface;

tests/Cases/AbstractTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Cases;
1314

1415
use Mockery;

tests/Cases/ChannelManagerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Cases;
1314

1415
use Hyperf\Coroutine\Coroutine;

tests/Cases/HttpMessageBuilderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Cases;
1314

1415
use Hyperf\Rpc\Context;

tests/Cases/SocketFactoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Cases;
1314

1415
use Hyperf\Coordinator\Constants;

tests/Cases/TcpServerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Cases;
1314

1415
use Hyperf\Config\Config;

tests/Cases/TransporterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Cases;
1314

1415
use Hyperf\LoadBalancer\LoadBalancerInterface;

tests/Stub/ContainerStub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\RpcMultiplex\Stub;
1314

1415
use Hyperf\Config\Config;

0 commit comments

Comments
 (0)