Skip to content

Commit 4f8f1ae

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent 753dbdd commit 4f8f1ae

34 files changed

+118
-74
lines changed

src/BaseClient.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Google\Protobuf\Internal\Message;

src/BidiStreamingCall.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
class BidiStreamingCall extends StreamingCall

src/ClientStreamingCall.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Grpc\StatusCode;

src/ConfigProvider.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\GrpcClient\Listener\RegisterProtocolListener;

src/DataFormatter.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Rpc\Context;

src/Exception/GrpcClientException.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient\Exception;
1314

1415
use RuntimeException;

src/GrpcClient.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Coroutine\Channel\Pool as ChannelPool;

src/GrpcNormalizer.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Contract\NormalizerInterface;

src/GrpcPacker.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Contract\PackerInterface;

src/GrpcTransporter.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Grpc\StatusCode;

src/Listener/RegisterProtocolListener.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient\Listener;
1314

1415
use Hyperf\Event\Contract\ListenerInterface;

src/Request.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Google\Protobuf\Internal\Message;

src/ServerStreamingCall.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Grpc\StatusCode;

src/Status.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
final class Status

src/StreamingCall.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\GrpcClient;
1314

1415
use Hyperf\Grpc\Parser;

tests/BaseClientTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\GrpcClient;
1314

1415
use Grpc\UserReply;

tests/GPBMetadata/Grpc.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313

1414
namespace GPBMetadata;
1515

16+
use Google\Protobuf\Internal\DescriptorPool;
17+
1618
class Grpc
1719
{
1820
public static $is_initialized = false;
1921

2022
public static function initOnce()
2123
{
22-
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
24+
$pool = DescriptorPool::getGeneratedPool();
2325

2426
if (static::$is_initialized == true) {
2527
return;

tests/GPBMetadata/RouteGuide.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313

1414
namespace GPBMetadata;
1515

16+
use Google\Protobuf\Internal\DescriptorPool;
17+
1618
class RouteGuide
1719
{
1820
public static $is_initialized = false;
1921

2022
public static function initOnce()
2123
{
22-
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
24+
$pool = DescriptorPool::getGeneratedPool();
2325

2426
if (static::$is_initialized == true) {
2527
return;

tests/GPBMetadata/User.php

20 Bytes
Binary file not shown.

tests/GoUserServiceTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\GrpcClient;
1314

1415
use Hyperf\Context\ApplicationContext;

tests/Grpc/Info.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
namespace Grpc;
1515

1616
use Google\Protobuf\Internal\GPBUtil;
17+
use Google\Protobuf\Internal\Message;
18+
use GPBMetadata\Grpc;
1719

1820
/**
1921
* Generated from protobuf message <code>grpc.Info</code>.
2022
*/
21-
class Info extends \Google\Protobuf\Internal\Message
23+
class Info extends Message
2224
{
2325
/**
2426
* Generated from protobuf field <code>int32 id = 1;</code>.
@@ -36,13 +38,13 @@ class Info extends \Google\Protobuf\Internal\Message
3638
* @param array $data {
3739
* Optional. Data for populating the Message object.
3840
*
39-
* @var int $id
40-
* @var string $name
41-
* }
41+
* @var int $id
42+
* @var string $name
43+
* }
4244
*/
4345
public function __construct($data = null)
4446
{
45-
\GPBMetadata\Grpc::initOnce();
47+
Grpc::initOnce();
4648
parent::__construct($data);
4749
}
4850

tests/Grpc/UserReply.php

+10-8
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
namespace Grpc;
1515

1616
use Google\Protobuf\Internal\GPBUtil;
17+
use Google\Protobuf\Internal\Message;
18+
use GPBMetadata\Grpc;
1719

1820
/**
1921
* Generated from protobuf message <code>grpc.UserReply</code>.
2022
*/
21-
class UserReply extends \Google\Protobuf\Internal\Message
23+
class UserReply extends Message
2224
{
2325
/**
2426
* Generated from protobuf field <code>string message = 1;</code>.
@@ -36,13 +38,13 @@ class UserReply extends \Google\Protobuf\Internal\Message
3638
* @param array $data {
3739
* Optional. Data for populating the Message object.
3840
*
39-
* @var string $message
40-
* @var \Grpc\Info $info
41-
* }
41+
* @var string $message
42+
* @var Info $info
43+
* }
4244
*/
4345
public function __construct($data = null)
4446
{
45-
\GPBMetadata\Grpc::initOnce();
47+
Grpc::initOnce();
4648
parent::__construct($data);
4749
}
4850

@@ -70,7 +72,7 @@ public function setMessage($var)
7072

7173
/**
7274
* Generated from protobuf field <code>.grpc.Info info = 2;</code>.
73-
* @return \Grpc\Info
75+
* @return Info
7476
*/
7577
public function getInfo()
7678
{
@@ -79,12 +81,12 @@ public function getInfo()
7981

8082
/**
8183
* Generated from protobuf field <code>.grpc.Info info = 2;</code>.
82-
* @param \Grpc\Info $var
84+
* @param Info $var
8385
* @return $this
8486
*/
8587
public function setInfo($var)
8688
{
87-
GPBUtil::checkMessage($var, \Grpc\Info::class);
89+
GPBUtil::checkMessage($var, Info::class);
8890
$this->info = $var;
8991

9092
return $this;

tests/RequestTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\GrpcClient;
1314

1415
use Grpc\Info;

tests/RouteGuideClientTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\GrpcClient;
1314

1415
use Hyperf\Context\ApplicationContext;

tests/Routeguide/Feature.php

+12-10
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
namespace Routeguide;
1515

1616
use Google\Protobuf\Internal\GPBUtil;
17+
use Google\Protobuf\Internal\Message;
18+
use GPBMetadata\RouteGuide;
1719

1820
/**
1921
* A feature names something at a given point.
2022
* If a feature could not be named, the name is empty.
2123
*
2224
* Generated from protobuf message <code>routeguide.Feature</code>
2325
*/
24-
class Feature extends \Google\Protobuf\Internal\Message
26+
class Feature extends Message
2527
{
2628
/**
2729
* The name of the feature.
@@ -43,15 +45,15 @@ class Feature extends \Google\Protobuf\Internal\Message
4345
* @param array $data {
4446
* Optional. Data for populating the Message object.
4547
*
46-
* @var string $name
47-
* The name of the feature
48-
* @var \Routeguide\Point $location
49-
* The point where the feature is detected.
50-
* }
48+
* @var string $name
49+
* The name of the feature
50+
* @var Point $location
51+
* The point where the feature is detected.
52+
* }
5153
*/
5254
public function __construct($data = null)
5355
{
54-
\GPBMetadata\RouteGuide::initOnce();
56+
RouteGuide::initOnce();
5557
parent::__construct($data);
5658
}
5759

@@ -85,7 +87,7 @@ public function setName($var)
8587
* The point where the feature is detected.
8688
*
8789
* Generated from protobuf field <code>.routeguide.Point location = 2;</code>
88-
* @return \Routeguide\Point
90+
* @return Point
8991
*/
9092
public function getLocation()
9193
{
@@ -96,12 +98,12 @@ public function getLocation()
9698
* The point where the feature is detected.
9799
*
98100
* Generated from protobuf field <code>.routeguide.Point location = 2;</code>
99-
* @param \Routeguide\Point $var
101+
* @param Point $var
100102
* @return $this
101103
*/
102104
public function setLocation($var)
103105
{
104-
GPBUtil::checkMessage($var, \Routeguide\Point::class);
106+
GPBUtil::checkMessage($var, Point::class);
105107
$this->location = $var;
106108

107109
return $this;

tests/Routeguide/Point.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
namespace Routeguide;
1515

1616
use Google\Protobuf\Internal\GPBUtil;
17+
use Google\Protobuf\Internal\Message;
18+
use GPBMetadata\RouteGuide;
1719

1820
/**
1921
* Points are represented as latitude-longitude pairs in the E7 representation
@@ -23,7 +25,7 @@
2325
*
2426
* Generated from protobuf message <code>routeguide.Point</code>
2527
*/
26-
class Point extends \Google\Protobuf\Internal\Message
28+
class Point extends Message
2729
{
2830
/**
2931
* Generated from protobuf field <code>int32 latitude = 1;</code>.
@@ -41,13 +43,13 @@ class Point extends \Google\Protobuf\Internal\Message
4143
* @param array $data {
4244
* Optional. Data for populating the Message object.
4345
*
44-
* @var int $latitude
45-
* @var int $longitude
46-
* }
46+
* @var int $latitude
47+
* @var int $longitude
48+
* }
4749
*/
4850
public function __construct($data = null)
4951
{
50-
\GPBMetadata\RouteGuide::initOnce();
52+
RouteGuide::initOnce();
5153
parent::__construct($data);
5254
}
5355

0 commit comments

Comments
 (0)