Skip to content

Commit 7977e3c

Browse files
Update php code style
1 parent 63e37e4 commit 7977e3c

26 files changed

+3
-134
lines changed

Event/AbstractMessageEvent.php

-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public function __construct(RawMessage $message, SmsEnvelope $envelope)
4444

4545
/**
4646
* Get the message.
47-
*
48-
* @return RawMessage
4947
*/
5048
public function getMessage(): RawMessage
5149
{
@@ -64,8 +62,6 @@ public function setMessage(RawMessage $message): void
6462

6563
/**
6664
* Get the envelope.
67-
*
68-
* @return SmsEnvelope
6965
*/
7066
public function getEnvelope(): SmsEnvelope
7167
{

Event/MessageResultEvent.php

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ public function __construct(RawMessage $message, SmsEnvelope $envelope, Result $
4141

4242
/**
4343
* Get the result.
44-
*
45-
* @return Result
4644
*/
4745
public function getResult(): Result
4846
{

Exception/TransportResultException.php

-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public function __construct(Result $result, $code = 0)
4040

4141
/**
4242
* Get the transport result.
43-
*
44-
* @return Result
4543
*/
4644
public function getResult(): Result
4745
{
@@ -52,8 +50,6 @@ public function getResult(): Result
5250
* Build the exception message.
5351
*
5452
* @param Result $result The transport result
55-
*
56-
* @return string
5753
*/
5854
private function buildMessage(Result $result): string
5955
{

Exception/UnsupportedHostException.php

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public function __construct(Dsn $dsn)
4848
*
4949
* @param string $host The host
5050
* @param array $map The map
51-
*
52-
* @return string
5351
*/
5452
public static function buildMessage(string $host, array $map): string
5553
{

Messenger/SendSmsMessage.php

-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ public function __construct(RawMessage $message, SmsEnvelope $envelope = null)
4545

4646
/**
4747
* Get the message.
48-
*
49-
* @return RawMessage
5048
*/
5149
public function getMessage(): RawMessage
5250
{
@@ -55,8 +53,6 @@ public function getMessage(): RawMessage
5553

5654
/**
5755
* Get the envelope.
58-
*
59-
* @return null|SmsEnvelope
6056
*/
6157
public function getEnvelope(): ?SmsEnvelope
6258
{

Mime/Phone.php

-6
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ public function __construct(string $phone)
7373

7474
/**
7575
* Get the phone.
76-
*
77-
* @return string
7876
*/
7977
public function getPhone(): string
8078
{
@@ -83,8 +81,6 @@ public function getPhone(): string
8381

8482
/**
8583
* Convert the phone into a string.
86-
*
87-
* @return string
8884
*/
8985
public function toString(): string
9086
{
@@ -95,8 +91,6 @@ public function toString(): string
9591
* Get the encoded phone.
9692
*
9793
* @throws
98-
*
99-
* @return string
10094
*/
10195
public function getEncodedPhone(): string
10296
{

Mime/Sms.php

-6
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public function from($phone): self
3737

3838
/**
3939
* Get the from phone.
40-
*
41-
* @return null|Phone
4240
*/
4341
public function getFrom(): ?Phone
4442
{
@@ -95,8 +93,6 @@ public function text(string $body): self
9593

9694
/**
9795
* Get the text.
98-
*
99-
* @return null|string
10096
*/
10197
public function getText(): ?string
10298
{
@@ -191,8 +187,6 @@ private function getPhonesFromListHeader(string $name): array
191187
* Get the phone form the header.
192188
*
193189
* @param string $name The header name
194-
*
195-
* @return null|Phone
196190
*/
197191
private function getPhoneFromListHeader(string $name): ?Phone
198192
{

SentMessage.php

-12
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public function __construct(RawMessage $message, SmsEnvelope $envelope, Result $
5959

6060
/**
6161
* Get the message.
62-
*
63-
* @return RawMessage
6462
*/
6563
public function getMessage(): RawMessage
6664
{
@@ -69,8 +67,6 @@ public function getMessage(): RawMessage
6967

7068
/**
7169
* Get the original message.
72-
*
73-
* @return RawMessage
7470
*/
7571
public function getOriginalMessage(): RawMessage
7672
{
@@ -79,8 +75,6 @@ public function getOriginalMessage(): RawMessage
7975

8076
/**
8177
* Get the envelope.
82-
*
83-
* @return SmsEnvelope
8478
*/
8579
public function getEnvelope(): SmsEnvelope
8680
{
@@ -89,8 +83,6 @@ public function getEnvelope(): SmsEnvelope
8983

9084
/**
9185
* Convert the message into a string.
92-
*
93-
* @return string
9486
*/
9587
public function toString(): string
9688
{
@@ -99,8 +91,6 @@ public function toString(): string
9991

10092
/**
10193
* Convert the message to iterable parts.
102-
*
103-
* @return iterable
10494
*/
10595
public function toIterable(): iterable
10696
{
@@ -109,8 +99,6 @@ public function toIterable(): iterable
10999

110100
/**
111101
* Get the transport result.
112-
*
113-
* @return Result
114102
*/
115103
public function getResult(): Result
116104
{

SmsEnvelope.php

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ public function setFrom(Phone $from): void
5555

5656
/**
5757
* Get the from phone.
58-
*
59-
* @return Phone
6058
*/
6159
public function getFrom(): Phone
6260
{

SmsSenderInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ public function send(RawMessage $message, SmsEnvelope $envelope = null): void;
3333

3434
/**
3535
* Check if the transport has a required from phone.
36-
*
37-
* @return bool
3836
*/
3937
public function hasRequiredFrom(): bool;
4038
}

Tests/Exception/TransportResultExceptionTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public function testBuildMessage(): void
4343
"\n",
4444
PHP_EOL,
4545
<<<'EOF'
46-
Unable to send an SMS for recipients:
47-
- +100: Error message (error_code)
48-
EOF
46+
Unable to send an SMS for recipients:
47+
- +100: Error message (error_code)
48+
EOF
4949
);
5050

5151
static::assertSame($expectedMessage, $ex->getMessage());

Tests/Transport/DsnTest.php

-6
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ final class DsnTest extends TestCase
2424
{
2525
/**
2626
* @dataProvider fromStringProvider
27-
*
28-
* @param string $string
29-
* @param Dsn $dsn
3027
*/
3128
public function testFromString(string $string, Dsn $dsn): void
3229
{
@@ -73,9 +70,6 @@ public function testGetOption(): void
7370

7471
/**
7572
* @dataProvider invalidDsnProvider
76-
*
77-
* @param string $dsn
78-
* @param string $exceptionMessage
7973
*/
8074
public function testInvalidDsn(string $dsn, string $exceptionMessage): void
8175
{

Tests/Transport/NullTransportFactoryTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ public function incompleteDsnProvider(): iterable
6262

6363
/**
6464
* @dataProvider incompleteDsnProvider
65-
*
66-
* @param Dsn $dsn
6765
*/
6866
public function testIncompleteDsnException(Dsn $dsn): void
6967
{

Tests/Transport/RoundRobinTransportTest.php

-7
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ public function getRequiredFromData(): array
159159

160160
/**
161161
* @dataProvider getRequiredFromData
162-
*
163-
* @param bool $expectedValue
164-
* @param bool $requiredFrom
165162
*/
166163
public function testHasRequiredFrom(bool $expectedValue, bool $requiredFrom): void
167164
{
@@ -177,10 +174,6 @@ public function testHasRequiredFrom(bool $expectedValue, bool $requiredFrom): vo
177174
}
178175

179176
/**
180-
* @param RoundRobinTransport $transport
181-
* @param int $cursor
182-
* @param array $deadTransports
183-
*
184177
* @throws
185178
*/
186179
private function assertTransports(RoundRobinTransport $transport, int $cursor, array $deadTransports): void

Tests/TransportFactoryTestCase.php

-10
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ public function incompleteDsnProvider(): iterable
6363

6464
/**
6565
* @dataProvider supportsProvider
66-
*
67-
* @param Dsn $dsn
68-
* @param bool $supports
6966
*/
7067
public function testSupports(Dsn $dsn, bool $supports): void
7168
{
@@ -76,9 +73,6 @@ public function testSupports(Dsn $dsn, bool $supports): void
7673

7774
/**
7875
* @dataProvider createProvider
79-
*
80-
* @param Dsn $dsn
81-
* @param TransportInterface $transport
8276
*/
8377
public function testCreate(Dsn $dsn, TransportInterface $transport): void
8478
{
@@ -89,8 +83,6 @@ public function testCreate(Dsn $dsn, TransportInterface $transport): void
8983

9084
/**
9185
* @dataProvider unsupportedSchemeProvider
92-
*
93-
* @param Dsn $dsn
9486
*/
9587
public function testUnsupportedSchemeException(Dsn $dsn): void
9688
{
@@ -102,8 +94,6 @@ public function testUnsupportedSchemeException(Dsn $dsn): void
10294

10395
/**
10496
* @dataProvider incompleteDsnProvider
105-
*
106-
* @param Dsn $dsn
10797
*/
10898
public function testIncompleteDsnException(Dsn $dsn): void
10999
{

Transport.php

-8
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public function __construct(iterable $factories)
5757
* @param null|EventDispatcherInterface $dispatcher The event dispatcher
5858
* @param null|HttpClientInterface $client The custom http client
5959
* @param null|LoggerInterface $logger The logger
60-
*
61-
* @return TransportInterface
6260
*/
6361
public static function fromDsn(
6462
string $dsn,
@@ -75,8 +73,6 @@ public static function fromDsn(
7573
* Create the transport from the dsn string.
7674
*
7775
* @param string $dsn The dsn
78-
*
79-
* @return TransportInterface
8076
*/
8177
public function fromString(string $dsn): TransportInterface
8278
{
@@ -101,8 +97,6 @@ public function fromString(string $dsn): TransportInterface
10197
* Create the transport from the dsn instance.
10298
*
10399
* @param Dsn $dsn The dsn instance
104-
*
105-
* @return TransportInterface
106100
*/
107101
public function fromDsnObject(Dsn $dsn): TransportInterface
108102
{
@@ -139,8 +133,6 @@ private function createFromDsns(array $dsns): array
139133
* @param null|EventDispatcherInterface $dispatcher The event dispatcher
140134
* @param null|HttpClientInterface $client The http client
141135
* @param null|LoggerInterface $logger The logger
142-
*
143-
* @return iterable
144136
*/
145137
private static function getDefaultFactories(
146138
EventDispatcherInterface $dispatcher = null,

Transport/AbstractResultItem.php

-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public function __construct(Phone $recipient, array $data)
4444

4545
/**
4646
* Get the recipient.
47-
*
48-
* @return Phone
4947
*/
5048
public function getRecipient(): Phone
5149
{
@@ -54,8 +52,6 @@ public function getRecipient(): Phone
5452

5553
/**
5654
* Get the data.
57-
*
58-
* @return array
5955
*/
6056
public function getData(): array
6157
{

Transport/AbstractTransport.php

-4
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ public function __construct(EventDispatcherInterface $dispatcher = null, LoggerI
6666
/**
6767
* Sets the maximum number of messages to send per second (0 to disable).
6868
*
69-
* @param float $rate
70-
*
7169
* @return static
7270
*/
7371
public function setMaxPerSecond(float $rate): self
@@ -140,8 +138,6 @@ abstract protected function doSend(SentMessage $message): void;
140138

141139
/**
142140
* Get the logger.
143-
*
144-
* @return LoggerInterface
145141
*/
146142
protected function getLogger(): LoggerInterface
147143
{

Transport/AbstractTransportFactory.php

-4
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ public function __construct(
6161
* @param Dsn $dsn The dsn instance
6262
*
6363
* @throws IncompleteDsnException When user is not set
64-
*
65-
* @return string
6664
*/
6765
protected function getUser(Dsn $dsn): string
6866
{
@@ -79,8 +77,6 @@ protected function getUser(Dsn $dsn): string
7977
* @param Dsn $dsn The dsn instance
8078
*
8179
* @throws IncompleteDsnException When password is not set
82-
*
83-
* @return string
8480
*/
8581
protected function getPassword(Dsn $dsn): string
8682
{

0 commit comments

Comments
 (0)