mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-21 20:16:03 +03:00
Added PHPStan test (#537)
* Added PHPStan test This will fix #536 * Somce code style updates
This commit is contained in:
parent
3b3e977995
commit
a1ca1a3b2f
@ -28,6 +28,10 @@ matrix:
|
||||
php: 7.3
|
||||
env: DEPENDENCIES="roave/backward-compatibility-check"
|
||||
script: ./vendor/bin/roave-backward-compatibility-check || true
|
||||
- name: PHPStan
|
||||
php: 7.2
|
||||
env: DEPENDENCIES="phpstan/phpstan phpstan/phpstan-webmozart-assert"
|
||||
script: ./vendor/bin/phpstan analyse src
|
||||
|
||||
before_install:
|
||||
- if [[ "$PREFER_COVERAGE" = true ]] && [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test-coverage" COVERAGE=true; fi
|
||||
|
5
phpstan.neon
Normal file
5
phpstan.neon
Normal file
@ -0,0 +1,5 @@
|
||||
parameters:
|
||||
level: 5
|
||||
|
||||
includes:
|
||||
- vendor/phpstan/phpstan-webmozart-assert/extension.neon
|
@ -34,7 +34,7 @@ abstract class HttpApi
|
||||
protected $httpClient;
|
||||
|
||||
/**
|
||||
* @var null|Hydrator
|
||||
* @var Hydrator|null
|
||||
*/
|
||||
protected $hydrator;
|
||||
|
||||
|
@ -25,7 +25,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||
final class Mailgun
|
||||
{
|
||||
/**
|
||||
* @var null|string
|
||||
* @var string|null
|
||||
*/
|
||||
private $apiKey;
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013 Mailgun
|
||||
*
|
||||
@ -26,16 +28,10 @@ final class CountryResponse implements ApiResponse
|
||||
*/
|
||||
private $tag;
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*/
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013 Mailgun
|
||||
*
|
||||
@ -26,16 +28,10 @@ final class DeviceResponse implements ApiResponse
|
||||
*/
|
||||
private $tag;
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*/
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013 Mailgun
|
||||
*
|
||||
@ -26,16 +28,10 @@ final class ProviderResponse implements ApiResponse
|
||||
*/
|
||||
private $tag;
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*/
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
Loading…
Reference in New Issue
Block a user