Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
os: [ubuntu-latest]
env: ['low', 'high']
name: PHP ${{ matrix.php }} Test ${{ matrix.env }} on ${{ matrix.os }}
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
fi;
if [ "$DEPENDENCIES" = 'low' ]; then
composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest
if [ "$PHP_VERSION" = '8' ] || [ "$PHP_VERSION" = '8.1' ] || [ "$PHP_VERSION" = '8.2' ] || [ "$PHP_VERSION" = '8.3' ]; then
if [ "$PHP_VERSION" = '8' ] || [ "$PHP_VERSION" = '8.1' ] || [ "$PHP_VERSION" = '8.2' ] || [ "$PHP_VERSION" = '8.3' ] || [ "$PHP_VERSION" = '8.4' ] || [ "$PHP_VERSION" = '8.5' ]; then
composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest --with-all-dependencies jms/serializer:^3.14
fi;
fi;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"doctrine/annotations": "^1.13"
},
"require-dev": {
"phpstan/phpstan": "^1.0",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5.23 || ^9.0"
},
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
parameters:
level: max
checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: false
paths:
- src
- tests
ignoreErrors:
- identifier: missingType.iterableValue

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
4 changes: 3 additions & 1 deletion src/Auth/IAuth.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Feech\SmsAero\Auth;


Expand All @@ -19,4 +21,4 @@ public function getPassword(): string;
* @return string
*/
public function getSign(): string;
}
}
2 changes: 1 addition & 1 deletion src/Client/ClientGuzzle.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ClientGuzzle implements IClient
*/
private $client;

public function __construct(IAuth $auth, ClientInterface $client = null)
public function __construct(IAuth $auth, ?ClientInterface $client = null)
{
$this->auth = $auth;

Expand Down
1 change: 1 addition & 0 deletions src/Dto/BalanceResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class BalanceResponse extends BaseResponse
* @var BalanceResult
* @JMS\Type("Feech\SmsAero\Dto\BalanceResult")
*/
#[JMS\Type('Feech\SmsAero\Dto\BalanceResult')]
public $data;
}
1 change: 1 addition & 0 deletions src/Dto/BalanceResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class BalanceResult
* @var float
* @JMS\Type("float")
*/
#[JMS\Type('float')]
public $balance;
}
2 changes: 2 additions & 0 deletions src/Dto/BaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ class BaseResponse
* @var boolean
* @JMS\Type("boolean")
*/
#[JMS\Type('boolean')]
public $success;

/**
* @var string|null
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $message;
}
1 change: 1 addition & 0 deletions src/Dto/FlashCallResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class FlashCallResponse extends BaseResponse
* @var FlashCallStatus|null
* @JMS\Type("Feech\SmsAero\Dto\FlashCallStatus")
*/
#[JMS\Type('Feech\SmsAero\Dto\FlashCallStatus')]
public $data;
}
9 changes: 9 additions & 0 deletions src/Dto/FlashCallStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,52 @@ class FlashCallStatus
* @var int
* @JMS\Type("int")
*/
#[JMS\Type('int')]
public $id;

/**
* @var int
* @JMS\Type("int")
*/
#[JMS\Type('int')]
public $status;

/**
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $code;

/**
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $phone;

/**
* @var float
* @JMS\Type("float")
*/
#[JMS\Type('float')]
public $cost;

/**
* @var int
* @JMS\Type("int")
* @JMS\SerializedName("timeCreate")
*/
#[JMS\Type('int')]
#[JMS\SerializedName('timeCreate')]
public $timeCreate;

/**
* @var int
* @JMS\Type("int")
* @JMS\SerializedName("timeUpdate")
*/
#[JMS\Type('int')]
#[JMS\SerializedName('timeUpdate')]
public $timeUpdate;
}
1 change: 1 addition & 0 deletions src/Dto/SendBulkMessageResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class SendBulkMessageResponse extends BaseResponse
* @var SmsMessageResult[]
* @JMS\Type("array<Feech\SmsAero\Dto\SmsMessageResult>")
*/
#[JMS\Type('array<Feech\SmsAero\Dto\SmsMessageResult>')]
public $data;
}
1 change: 1 addition & 0 deletions src/Dto/SendSingleMessageResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class SendSingleMessageResponse extends BaseResponse
* @var SmsMessageResult
* @JMS\Type("Feech\SmsAero\Dto\SmsMessageResult")
*/
#[JMS\Type('Feech\SmsAero\Dto\SmsMessageResult')]
public $data;
}
13 changes: 13 additions & 0 deletions src/Dto/SmsMessageResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,62 +20,75 @@ class SmsMessageResult
* @var int
* @JMS\Type("int")
*/
#[JMS\Type('int')]
public $id;

/**
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $from;

/**
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $number;

/**
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $text;

/**
* @var int
* @JMS\Type("int")
*/
#[JMS\Type('int')]
public $status;

/**
* @var string
* @JMS\Type("string")
* @JMS\SerializedName("extendStatus")
*/
#[JMS\Type('string')]
#[JMS\SerializedName('extendStatus')]
public $extendStatus;

/**
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $channel;

/**
* @var float
* @JMS\Type("float")
*/
#[JMS\Type('float')]
public $cost;

/**
* @var int
* @JMS\Type("int")
* @JMS\SerializedName("dateCreate")
*/
#[JMS\Type('int')]
#[JMS\SerializedName('dateCreate')]
public $dateCreate;

/**
* @var int
* @JMS\Type("int")
* @JMS\SerializedName("dateSend")
*/
#[JMS\Type('int')]
#[JMS\SerializedName('dateSend')]
public $dateSend;
}
6 changes: 6 additions & 0 deletions src/Dto/ViberNumberStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,31 @@ class ViberNumberStatus
* @var string
* @JMS\Type("string")
*/
#[JMS\Type('string')]
public $number;

/**
* @var int
* @JMS\Type("int")
*/
#[JMS\Type('int')]
public $status;

/**
* @var string
* @JMS\Type("string")
* @JMS\SerializedName("extendStatus")
*/
#[JMS\Type('string')]
#[JMS\SerializedName('extendStatus')]
public $extendStatus;

/**
* @var int
* @JMS\Type("int")
* @JMS\SerializedName("dateSend")
*/
#[JMS\Type('int')]
#[JMS\SerializedName('dateSend')]
public $dateSend;
}
4 changes: 2 additions & 2 deletions src/Dto/ViberSendRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static function toSingleNumber(
string $sign,
string $channel,
string $text,
string $marker = null
?string $marker = null
): self {
$request = new self();
$request->number = $number;
Expand All @@ -122,7 +122,7 @@ public static function toMultipleNumbers(
string $sign,
string $channel,
string $text,
string $marker = null
?string $marker = null
): self {
assert(count($numbers) > 0 && count($numbers) <= 50);

Expand Down
1 change: 1 addition & 0 deletions src/Dto/ViberSendResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class ViberSendResponse extends BaseResponse
* @var ViberStatus|null
* @JMS\Type("Feech\SmsAero\Dto\ViberStatus")
*/
#[JMS\Type('Feech\SmsAero\Dto\ViberStatus')]
public $data;
}
1 change: 1 addition & 0 deletions src/Dto/ViberStatisticResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class ViberStatisticResponse extends BaseResponse
* @var ViberNumberStatus[]
* @JMS\Type("array<Feech\SmsAero\Dto\ViberNumberStatus>")
*/
#[JMS\Type('array<Feech\SmsAero\Dto\ViberNumberStatus>')]
public $data;
}
Loading
Loading