Skip to content

Commit

Permalink
Format code by the latest cs-fixer. (#6617)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo authored Mar 23, 2024
1 parent 753dbdd commit 4f8f1ae
Show file tree
Hide file tree
Showing 34 changed files with 118 additions and 74 deletions.
1 change: 1 addition & 0 deletions src/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Google\Protobuf\Internal\Message;
Expand Down
1 change: 1 addition & 0 deletions src/BidiStreamingCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

class BidiStreamingCall extends StreamingCall
Expand Down
1 change: 1 addition & 0 deletions src/ClientStreamingCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Grpc\StatusCode;
Expand Down
1 change: 1 addition & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\GrpcClient\Listener\RegisterProtocolListener;
Expand Down
1 change: 1 addition & 0 deletions src/DataFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Rpc\Context;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/GrpcClientException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient\Exception;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions src/GrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Coroutine\Channel\Pool as ChannelPool;
Expand Down
1 change: 1 addition & 0 deletions src/GrpcNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Contract\NormalizerInterface;
Expand Down
1 change: 1 addition & 0 deletions src/GrpcPacker.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Contract\PackerInterface;
Expand Down
1 change: 1 addition & 0 deletions src/GrpcTransporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Grpc\StatusCode;
Expand Down
1 change: 1 addition & 0 deletions src/Listener/RegisterProtocolListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient\Listener;

use Hyperf\Event\Contract\ListenerInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Google\Protobuf\Internal\Message;
Expand Down
1 change: 1 addition & 0 deletions src/ServerStreamingCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Grpc\StatusCode;
Expand Down
1 change: 1 addition & 0 deletions src/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

final class Status
Expand Down
1 change: 1 addition & 0 deletions src/StreamingCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\GrpcClient;

use Hyperf\Grpc\Parser;
Expand Down
1 change: 1 addition & 0 deletions tests/BaseClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\GrpcClient;

use Grpc\UserReply;
Expand Down
4 changes: 3 additions & 1 deletion tests/GPBMetadata/Grpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@

namespace GPBMetadata;

use Google\Protobuf\Internal\DescriptorPool;

class Grpc
{
public static $is_initialized = false;

public static function initOnce()
{
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
$pool = DescriptorPool::getGeneratedPool();

if (static::$is_initialized == true) {
return;
Expand Down
4 changes: 3 additions & 1 deletion tests/GPBMetadata/RouteGuide.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@

namespace GPBMetadata;

use Google\Protobuf\Internal\DescriptorPool;

class RouteGuide
{
public static $is_initialized = false;

public static function initOnce()
{
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
$pool = DescriptorPool::getGeneratedPool();

if (static::$is_initialized == true) {
return;
Expand Down
Binary file modified tests/GPBMetadata/User.php
Binary file not shown.
1 change: 1 addition & 0 deletions tests/GoUserServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\GrpcClient;

use Hyperf\Context\ApplicationContext;
Expand Down
12 changes: 7 additions & 5 deletions tests/Grpc/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
namespace Grpc;

use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\Message;
use GPBMetadata\Grpc;

/**
* Generated from protobuf message <code>grpc.Info</code>.
*/
class Info extends \Google\Protobuf\Internal\Message
class Info extends Message
{
/**
* Generated from protobuf field <code>int32 id = 1;</code>.
Expand All @@ -36,13 +38,13 @@ class Info extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
* @var int $id
* @var string $name
* }
* @var int $id
* @var string $name
* }
*/
public function __construct($data = null)
{
\GPBMetadata\Grpc::initOnce();
Grpc::initOnce();
parent::__construct($data);
}

Expand Down
18 changes: 10 additions & 8 deletions tests/Grpc/UserReply.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
namespace Grpc;

use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\Message;
use GPBMetadata\Grpc;

/**
* Generated from protobuf message <code>grpc.UserReply</code>.
*/
class UserReply extends \Google\Protobuf\Internal\Message
class UserReply extends Message
{
/**
* Generated from protobuf field <code>string message = 1;</code>.
Expand All @@ -36,13 +38,13 @@ class UserReply extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
* @var string $message
* @var \Grpc\Info $info
* }
* @var string $message
* @var Info $info
* }
*/
public function __construct($data = null)
{
\GPBMetadata\Grpc::initOnce();
Grpc::initOnce();
parent::__construct($data);
}

Expand Down Expand Up @@ -70,7 +72,7 @@ public function setMessage($var)

/**
* Generated from protobuf field <code>.grpc.Info info = 2;</code>.
* @return \Grpc\Info
* @return Info
*/
public function getInfo()
{
Expand All @@ -79,12 +81,12 @@ public function getInfo()

/**
* Generated from protobuf field <code>.grpc.Info info = 2;</code>.
* @param \Grpc\Info $var
* @param Info $var
* @return $this
*/
public function setInfo($var)
{
GPBUtil::checkMessage($var, \Grpc\Info::class);
GPBUtil::checkMessage($var, Info::class);
$this->info = $var;

return $this;
Expand Down
1 change: 1 addition & 0 deletions tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\GrpcClient;

use Grpc\Info;
Expand Down
1 change: 1 addition & 0 deletions tests/RouteGuideClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license /~https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace HyperfTest\GrpcClient;

use Hyperf\Context\ApplicationContext;
Expand Down
22 changes: 12 additions & 10 deletions tests/Routeguide/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
namespace Routeguide;

use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\Message;
use GPBMetadata\RouteGuide;

/**
* A feature names something at a given point.
* If a feature could not be named, the name is empty.
*
* Generated from protobuf message <code>routeguide.Feature</code>
*/
class Feature extends \Google\Protobuf\Internal\Message
class Feature extends Message
{
/**
* The name of the feature.
Expand All @@ -43,15 +45,15 @@ class Feature extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
* @var string $name
* The name of the feature
* @var \Routeguide\Point $location
* The point where the feature is detected.
* }
* @var string $name
* The name of the feature
* @var Point $location
* The point where the feature is detected.
* }
*/
public function __construct($data = null)
{
\GPBMetadata\RouteGuide::initOnce();
RouteGuide::initOnce();
parent::__construct($data);
}

Expand Down Expand Up @@ -85,7 +87,7 @@ public function setName($var)
* The point where the feature is detected.
*
* Generated from protobuf field <code>.routeguide.Point location = 2;</code>
* @return \Routeguide\Point
* @return Point
*/
public function getLocation()
{
Expand All @@ -96,12 +98,12 @@ public function getLocation()
* The point where the feature is detected.
*
* Generated from protobuf field <code>.routeguide.Point location = 2;</code>
* @param \Routeguide\Point $var
* @param Point $var
* @return $this
*/
public function setLocation($var)
{
GPBUtil::checkMessage($var, \Routeguide\Point::class);
GPBUtil::checkMessage($var, Point::class);
$this->location = $var;

return $this;
Expand Down
12 changes: 7 additions & 5 deletions tests/Routeguide/Point.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
namespace Routeguide;

use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\Internal\Message;
use GPBMetadata\RouteGuide;

/**
* Points are represented as latitude-longitude pairs in the E7 representation
Expand All @@ -23,7 +25,7 @@
*
* Generated from protobuf message <code>routeguide.Point</code>
*/
class Point extends \Google\Protobuf\Internal\Message
class Point extends Message
{
/**
* Generated from protobuf field <code>int32 latitude = 1;</code>.
Expand All @@ -41,13 +43,13 @@ class Point extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
* @var int $latitude
* @var int $longitude
* }
* @var int $latitude
* @var int $longitude
* }
*/
public function __construct($data = null)
{
\GPBMetadata\RouteGuide::initOnce();
RouteGuide::initOnce();
parent::__construct($data);
}

Expand Down
Loading

0 comments on commit 4f8f1ae

Please sign in to comment.