Skip to content

Commit

Permalink
Merge pull request #137 from ker0x/feature/php-73
Browse files Browse the repository at this point in the history
[n/a] add PHP 7.3 to travis, fix CS
  • Loading branch information
ker0x authored Feb 14, 2019
2 parents 96f7a99 + aaac92e commit 7f2fabf
Show file tree
Hide file tree
Showing 50 changed files with 183 additions and 183 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cache:
php:
- 7.1
- 7.2
- 7.3

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Messenger library follows [SemVer](http://semver.org/).

**Changelog** (since [`3.1.0`](https://github.com/ker0x/messenger/compare/3.1.0...3.1.1))

- 3.1.0 (2018-10)
- 3.1.1 (2018-12)
- Method `addQuickReply` will no longer thrown an exception if no quick replies were previously set (Thanks to @Khodl)
- Add new tests for QuickReplies
- Update `phpunit/phpunit` version to `7.4`.
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
},
"require-dev": {
"phpunit/phpunit": "^7.4",
"friendsofphp/php-cs-fixer": "^2.5",
"codacy/coverage": "^1.4"
"friendsofphp/php-cs-fixer": "^2.5"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Insights.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Insights extends AbstractApi implements InsightsInterface
{
/**
* @param array $metrics
* @param null|int $since
* @param null|int $until
* @param int|null $since
* @param int|null $until
*
* @throws \Kerox\Messenger\Exception\MessengerException
*
Expand Down
2 changes: 1 addition & 1 deletion src/Event/EventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EventFactory
public static function create(array $payload): AbstractEvent
{
foreach (array_keys($payload) as $key) {
if (array_key_exists($key, self::EVENTS)) {
if (\array_key_exists($key, self::EVENTS)) {
$className = self::EVENTS[$key];
if (isset($payload['message']['is_echo'])) {
$className = MessageEchoEvent::class;
Expand Down
4 changes: 2 additions & 2 deletions src/Messenger.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Messenger
* @param string $verifyToken
* @param string $pageToken
* @param string $apiVersion
* @param null|\GuzzleHttp\ClientInterface $client
* @param \GuzzleHttp\ClientInterface|null $client
*/
public function __construct(
string $appSecret,
Expand Down Expand Up @@ -81,7 +81,7 @@ public function send(): Send
}

/**
* @param null|\Psr\Http\Message\ServerRequestInterface $request
* @param \Psr\Http\Message\ServerRequestInterface|null $request
*
* @return \Kerox\Messenger\Api\Webhook
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Callback/AccountLinking.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AccountLinking
protected $status;

/**
* @var null|string
* @var string|null
*/
protected $authorizationCode;

Expand Down Expand Up @@ -45,7 +45,7 @@ public function hasAuthorizationCode(): bool
}

/**
* @return null|string
* @return string|null
*/
public function getAuthorizationCode(): ?string
{
Expand Down
8 changes: 4 additions & 4 deletions src/Model/Callback/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class Message
protected $sequence;

/**
* @var null|string
* @var string|null
*/
protected $text;

/**
* @var null|string
* @var string|null
*/
protected $quickReply;

Expand Down Expand Up @@ -79,7 +79,7 @@ public function getSequence(): int
}

/**
* @return null|string
* @return string|null
*/
public function getText(): ?string
{
Expand All @@ -95,7 +95,7 @@ public function hasText(): bool
}

/**
* @return null|string
* @return string|null
*/
public function getQuickReply(): ?string
{
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Callback/MessageEcho.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ class MessageEcho extends Message
protected $isEcho;

/**
* @var null|int
* @var int|null
*/
protected $appId;

/**
* @var null|string
* @var string|null
*/
protected $metadata;

/**
* MessageEcho constructor.
*
* @param bool $isEcho
* @param null|int $appId
* @param int|null $appId
* @param string $messageId
* @param int $sequence
* @param string|null $metadata
Expand Down Expand Up @@ -59,15 +59,15 @@ public function isEcho(): bool
}

/**
* @return null|int
* @return int|null
*/
public function getAppId(): ?int
{
return $this->appId;
}

/**
* @return null|string
* @return string|null
*/
public function getMetadata(): ?string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Callback/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ public function getPaymentCredential(): PaymentCredential
}

/**
* @return null|string
* @return string|null
*/
public function getCurrency(): ?string
{
return $this->amount['currency'] ?? null;
}

/**
* @return null|string
* @return string|null
*/
public function getAmount(): ?string
{
Expand Down
16 changes: 8 additions & 8 deletions src/Model/Callback/Payment/PaymentCredential.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ class PaymentCredential
protected $chargeId;

/**
* @var null|string
* @var string|null
*/
protected $tokenizedCard;

/**
* @var null|string
* @var string|null
*/
protected $tokenizedCvv;

/**
* @var null|string
* @var string|null
*/
protected $tokenExpiryMonth;

/**
* @var null|string
* @var string|null
*/
protected $tokenExpiryYear;

Expand Down Expand Up @@ -87,31 +87,31 @@ public function getChargeId(): string
}

/**
* @return null|string
* @return string|null
*/
public function getTokenizedCard(): ?string
{
return $this->tokenizedCard;
}

/**
* @return null|string
* @return string|null
*/
public function getTokenizedCvv(): ?string
{
return $this->tokenizedCvv;
}

/**
* @return null|string
* @return string|null
*/
public function getTokenExpiryMonth(): ?string
{
return $this->tokenExpiryMonth;
}

/**
* @return null|string
* @return string|null
*/
public function getTokenExpiryYear(): ?string
{
Expand Down
12 changes: 6 additions & 6 deletions src/Model/Callback/Payment/RequestedUserInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ class RequestedUserInfo
protected $contactName;

/**
* @var null|string
* @var string|null
*/
protected $contactEmail;

/**
* @var null|string
* @var string|null
*/
protected $contactPhone;

Expand All @@ -33,8 +33,8 @@ class RequestedUserInfo
*
* @param \Kerox\Messenger\Model\Common\Address $shippingAddress
* @param string $contactName
* @param null|string $contactEmail
* @param null|string $contactPhone
* @param string|null $contactEmail
* @param string|null $contactPhone
*/
public function __construct(
Address $shippingAddress,
Expand Down Expand Up @@ -65,15 +65,15 @@ public function getContactName(): string
}

/**
* @return null|string
* @return string|null
*/
public function getContactEmail(): ?string
{
return $this->contactEmail;
}

/**
* @return null|string
* @return string|null
*/
public function getContactPhone(): ?string
{
Expand Down
6 changes: 3 additions & 3 deletions src/Model/Callback/PolicyEnforcement.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class PolicyEnforcement
protected $action;

/**
* @var null|string
* @var string|null
*/
protected $reason;

/**
* PolicyEnforcement constructor.
*
* @param string $action
* @param null|string $reason
* @param string|null $reason
*/
public function __construct(string $action, ?string $reason = null)
{
Expand All @@ -37,7 +37,7 @@ public function getAction(): string
}

/**
* @return null|string
* @return string|null
*/
public function getReason(): ?string
{
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Callback/Postback.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ class Postback
protected $title;

/**
* @var null|string
* @var string|null
*/
protected $payload;

/**
* @var null|\Kerox\Messenger\Model\Callback\Referral
* @var \Kerox\Messenger\Model\Callback\Referral|null
*/
protected $referral;

/**
* Postback constructor.
*
* @param string $title
* @param null|string $payload
* @param string|null $payload
* @param \Kerox\Messenger\Model\Callback\Referral $referral
*/
public function __construct(string $title, ?string $payload = null, ?Referral $referral = null)
Expand All @@ -52,7 +52,7 @@ public function hasPayload(): bool
}

/**
* @return null|string
* @return string|null
*/
public function getPayload(): ?string
{
Expand All @@ -68,7 +68,7 @@ public function hasReferral(): bool
}

/**
* @return null|\Kerox\Messenger\Model\Callback\Referral
* @return \Kerox\Messenger\Model\Callback\Referral|null
*/
public function getReferral(): ?Referral
{
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Callback/PreCheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ public function getShippingAddress(): Address
}

/**
* @return null|string
* @return string|null
*/
public function getCurrency(): ?string
{
return $this->amount['currency'] ?? null;
}

/**
* @return null|string
* @return string|null
*/
public function getAmount(): ?string
{
Expand Down
Loading

0 comments on commit 7f2fabf

Please sign in to comment.