Added new CS rules

Declare strict and no superfluous phpdoc
This commit is contained in:
Nyholm 2019-01-09 20:32:09 +01:00 committed by David Garcia
parent 6dff177387
commit dd7c1d2361
172 changed files with 411 additions and 263 deletions

View File

@ -18,9 +18,9 @@ return PhpCsFixer\Config::create()
'@Symfony' => true,
'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => false, // true
'declare_strict_types' => true,
'no_empty_phpdoc' => true,
'no_superfluous_phpdoc_tags' => false, // true
'no_superfluous_phpdoc_tags' => true,
'header_comment' => [
'commentType' => 'comment',
'header' => $header,

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -33,8 +35,6 @@ class Domain extends HttpApi
/**
* Returns a list of domains on the account.
*
* @param int $limit
* @param int $skip
*
* @return IndexResponse
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -22,9 +24,6 @@ class Event extends HttpApi
use Pagination;
/**
* @param string $domain
* @param array $params
*
* @return EventResponse
*/
public function get(string $domain, array $params = [])

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -51,9 +53,6 @@ abstract class HttpApi
}
/**
* @param ResponseInterface $response
* @param string $class
*
* @return mixed|ResponseInterface
*
* @throws \Exception
@ -197,8 +196,6 @@ abstract class HttpApi
* Prepare a set of key-value-pairs to be encoded as multipart/form-data.
*
* @param array $parameters Request parameters
*
* @return array
*/
private function createRequestBody(array $parameters): array
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -58,10 +60,8 @@ class Message extends HttpApi
}
/**
* @param string $domain
* @param array $recipients with all you send emails to. Including bcc and cc
* @param string $message Message filepath or content
* @param array $params
*
* @return SendResponse|ResponseInterface
*/
@ -94,8 +94,7 @@ class Message extends HttpApi
/**
* Get stored message.
*
* @param string $url
* @param bool $rawMessage if true we will use "Accept: message/rfc2822" header
* @param bool $rawMessage if true we will use "Accept: message/rfc2822" header
*
* @return ShowResponse|ResponseInterface
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -25,9 +27,6 @@ final class ReplaceUriPlugin implements Plugin
*/
private $uri;
/**
* @param UriInterface $uri
*/
public function __construct(UriInterface $uri)
{
$this->uri = $uri;

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -32,17 +34,14 @@ class RequestBuilder
/**
* Creates a new PSR-7 request.
*
* @param string $method
* @param string $uri
* @param array $headers
* @param array|string|null $body Request body. If body is an array we will send a as multipart stream request.
* If array, each array *item* MUST look like:
* array (
* 'content' => string|resource|StreamInterface,
* 'name' => string,
* 'filename'=> string (optional)
* 'headers' => array (optinal) ['header-name' => 'header-value']
* )
* @param array|string|null $body Request body. If body is an array we will send a as multipart stream request.
* If array, each array *item* MUST look like:
* array (
* 'content' => string|resource|StreamInterface,
* 'name' => string,
* 'filename'=> string (optional)
* 'headers' => array (optinal) ['header-name' => 'header-value']
* )
*
* @return RequestInterface
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -18,8 +20,6 @@ use Psr\Http\Message\ResponseInterface;
interface Hydrator
{
/**
* @return mixed
*
* @throws HydrationException
*/
public function hydrate(ResponseInterface $response, string $class);

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -55,9 +57,7 @@ class BatchMessage extends MessageBuilder
}
/**
* @param string $headerName
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $id
* @var string $full_name
@ -100,26 +100,34 @@ class BatchMessage extends MessageBuilder
if (empty($this->domain)) {
throw new RuntimeException('You must call BatchMessage::setDomain before sending messages.');
} elseif (empty($message['from'])) {
throw MissingRequiredParameter::create('from');
} elseif (empty($message['to'])) {
throw MissingRequiredParameter::create('to');
} elseif (empty($message['subject'])) {
throw MissingRequiredParameter::create('subject');
} elseif (empty($message['text']) && empty($message['html'])) {
throw MissingRequiredParameter::create('text" or "html');
} else {
$message['recipient-variables'] = json_encode($this->batchRecipientAttributes);
$response = $this->api->send($this->domain, $message);
$this->batchRecipientAttributes = [];
$this->counters['recipients']['to'] = 0;
$this->counters['recipients']['cc'] = 0;
$this->counters['recipients']['bcc'] = 0;
unset($this->message['to']);
$this->messageIds[] = $response->getId();
}
if (empty($message['from'])) {
throw MissingRequiredParameter::create('from');
}
if (empty($message['to'])) {
throw MissingRequiredParameter::create('to');
}
if (empty($message['subject'])) {
throw MissingRequiredParameter::create('subject');
}
if (empty($message['text']) && empty($message['html'])) {
throw MissingRequiredParameter::create('text" or "html');
}
$message['recipient-variables'] = json_encode($this->batchRecipientAttributes);
$response = $this->api->send($this->domain, $message);
$this->batchRecipientAttributes = [];
$this->counters['recipients']['to'] = 0;
$this->counters['recipients']['cc'] = 0;
$this->counters['recipients']['bcc'] = 0;
unset($this->message['to']);
$this->messageIds[] = $response->getId();
}
/**

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -55,13 +57,6 @@ class MessageBuilder
],
];
/**
* @param array $params
* @param string $key
* @param mixed $default
*
* @return mixed
*/
private function get(array $params, string $key, $default)
{
if (array_key_exists($key, $params)) {
@ -89,10 +84,7 @@ class MessageBuilder
}
/**
* @param string $address
* @param array $params {
*
* @var string $full_name
* @var string
* @var string $first
* @var string $last
* }
@ -108,9 +100,7 @@ class MessageBuilder
}
/**
* @param string $headerName
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $full_name
* @var string $first
@ -136,8 +126,7 @@ class MessageBuilder
}
/**
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $id If used with BatchMessage
* @var string $full_name
@ -158,8 +147,7 @@ class MessageBuilder
}
/**
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $id If used with BatchMessage
* @var string $full_name
@ -181,8 +169,7 @@ class MessageBuilder
}
/**
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $id If used with BatchMessage
* @var string $full_name
@ -204,8 +191,7 @@ class MessageBuilder
}
/**
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $id If used with BatchMessage
* @var string $full_name
@ -221,8 +207,7 @@ class MessageBuilder
}
/**
* @param string $address
* @param array $variables {
* @param array $variables {
*
* @var string $id If used with BatchMessage
* @var string $full_name
@ -244,10 +229,6 @@ class MessageBuilder
return $this;
}
/**
* @param string $headerName
* @param mixed $headerData
*/
public function addCustomHeader(string $headerName, $headerData): self
{
if (!preg_match('/^h:/i', $headerName)) {
@ -397,10 +378,6 @@ class MessageBuilder
return $this;
}
/**
* @param string $customName
* @param mixed $data
*/
public function addCustomData(string $customName, $data): self
{
$this->message['v:'.$customName] = json_encode($data);
@ -408,10 +385,6 @@ class MessageBuilder
return $this;
}
/**
* @param string $parameterName
* @param mixed $data
*/
public function addCustomParameter(string $parameterName, $data): self
{
if (isset($this->message[$parameterName])) {

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -17,7 +19,6 @@ interface ApiResponse
/**
* Create an API response object from the HTTP response from the API server.
*
* @param array $data
*
* @return self
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -37,8 +39,6 @@ abstract class AbstractDomainResponse implements ApiResponse
private $outboundDnsRecords;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -72,7 +72,6 @@ abstract class AbstractDomainResponse implements ApiResponse
}
/**
* @param Domain $domainInfo
* @param DnsRecord[] $rxRecords
* @param DnsRecord[] $txRecords
* @param string $message

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,8 +29,6 @@ final class ConnectionResponse implements ApiResponse
private $requireTLS;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -30,8 +32,6 @@ final class CreateCredentialResponse implements ApiResponse
}
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,8 +29,6 @@ final class CredentialResponse implements ApiResponse
private $items;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -35,8 +37,6 @@ final class CredentialResponseItem
private $login;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -50,10 +50,9 @@ final class CredentialResponseItem
}
/**
* @param int $sizeBytes
* @param \DateTime $createdAt
* @param string $mailbox
* @param string $login
* @param int $sizeBytes
* @param string $mailbox
* @param string $login
*/
private function __construct($sizeBytes, \DateTime $createdAt, $mailbox, $login)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -44,8 +46,6 @@ final class DeleteCredentialResponse implements ApiResponse
}
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -37,8 +39,6 @@ final class DeleteResponse implements ApiResponse
}
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -47,8 +49,6 @@ final class DnsRecord
private $cached;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -52,8 +54,6 @@ final class Domain
private $state;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -70,13 +70,12 @@ final class Domain
}
/**
* @param string $name
* @param string $smtpLogin
* @param string $smtpPassword
* @param bool $wildcard
* @param string $spamAction
* @param string $state
* @param \DateTime $createdAt
* @param string $name
* @param string $smtpLogin
* @param string $smtpPassword
* @param bool $wildcard
* @param string $spamAction
* @param string $state
*/
private function __construct($name, $smtpLogin, $smtpPassword, $wildcard, $spamAction, $state, \DateTime $createdAt)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,8 +29,6 @@ final class IndexResponse implements ApiResponse
private $items;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -32,8 +34,6 @@ final class ShowResponse implements ApiResponse
private $outboundDnsRecords;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -62,7 +62,6 @@ final class ShowResponse implements ApiResponse
}
/**
* @param Domain $domainInfo
* @param DnsRecord[] $rxRecords
* @param DnsRecord[] $txRecords
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -32,8 +34,6 @@ final class UpdateConnectionResponse implements ApiResponse
private $requireTLS;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -30,8 +32,6 @@ final class UpdateCredentialResponse implements ApiResponse
}
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -136,8 +138,6 @@ final class Event
}
/**
* @param array $data
*
* @return Event
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,7 +29,6 @@ final class EventResponse implements ApiResponse, PagingProvider
/**
* @param Event[] $items
* @param array $paging
*/
private function __construct(array $items, array $paging)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -24,8 +26,6 @@ final class CreateResponse implements ApiResponse
private $list;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -44,8 +46,6 @@ final class MailingList implements ApiResponse
private $createdAt;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -63,12 +63,11 @@ final class MailingList implements ApiResponse
/**
* MailingList constructor.
*
* @param string $name
* @param string $address
* @param string $accessLevel
* @param string $description
* @param int $membersCount
* @param \DateTime $createdAt
* @param string $name
* @param string $address
* @param string $accessLevel
* @param string $description
* @param int $membersCount
*/
private function __construct($name, $address, $accessLevel, $description, $membersCount, \DateTime $createdAt)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -34,7 +36,6 @@ final class CreateResponse implements ApiResponse
/**
* CreateMemberResponse constructor.
*
* @param Member $member
* @param string $message
*/
private function __construct(Member $member, $message)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -34,7 +36,6 @@ final class DeleteResponse implements ApiResponse
/**
* DeleteMemberResponse constructor.
*
* @param Member $member
* @param string $message
*/
private function __construct(Member $member, $message)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -23,8 +25,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
private $items;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -42,7 +42,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
/**
* @param Member[] $items
* @param array $paging
*/
private function __construct(array $items, array $paging)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -34,8 +36,6 @@ final class Member implements ApiResponse
private $subscribed;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -34,7 +36,6 @@ final class UpdateResponse implements ApiResponse
/**
* UpdateMemberResponse constructor.
*
* @param Member $member
* @param string $message
*/
private function __construct(Member $member, $message)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -23,8 +25,6 @@ final class PagesResponse implements ApiResponse, PagingProvider
private $items;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -42,7 +42,6 @@ final class PagesResponse implements ApiResponse, PagingProvider
/**
* @param MailingList[] $items
* @param array $paging
*/
private function __construct(array $items, array $paging)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -24,8 +26,6 @@ final class UpdateResponse implements ApiResponse
private $list;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -37,8 +39,6 @@ final class SendResponse implements ApiResponse
}
/**
* @param array $data
*
* @return SendResponse
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -103,8 +105,6 @@ final class ShowResponse implements ApiResponse
}
/**
* @param array $data
*
* @return ShowResponse
*/
public static function create(array $data)
@ -392,9 +392,6 @@ final class ShowResponse implements ApiResponse
return $this->messageHeaders;
}
/**
* @param array $messageHeaders
*/
private function setMessageHeaders(array $messageHeaders)
{
$this->messageHeaders = $messageHeaders;

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -22,7 +24,6 @@ final class Action
/**
* Action Named Constructor to build several Action DTOs provided by an Array.
*
* @param array $data
*
* @return Action[]
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -42,7 +44,6 @@ final class CreateResponse implements ApiResponse
* CreateResponse Private Constructor.
*
* @param string|null $message
* @param Route|null $route
*/
private function __construct($message = null, Route $route = null)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,8 +29,6 @@ final class DeleteResponse implements ApiResponse
private $error;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -36,8 +38,6 @@ final class ShowResponse implements ApiResponse
/**
* ShowResponse constructor.
*
* @param Route|null $route
*/
private function __construct(Route $route = null)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -28,8 +30,6 @@ final class UpdateResponse implements ApiResponse
private $route;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -42,7 +42,6 @@ final class UpdateResponse implements ApiResponse
/**
* @param string|null $message
* @param Route|null $route
*/
private function __construct($message = null, Route $route = null)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -47,7 +49,6 @@ final class Route
/**
* Route Named Constructor.
*
* @param array $data
*
* @return Route
*/

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -37,8 +39,6 @@ final class AllResponse implements ApiResponse
}
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -40,8 +42,6 @@ final class AllResponseItem
private $createdAt;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -60,7 +60,6 @@ final class AllResponseItem
* @param string $event
* @param string $totalCount
* @param \string[] $tags
* @param \DateTime $createdAt
*/
private function __construct($id, $event, $totalCount, array $tags, \DateTime $createdAt)
{

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -37,8 +39,6 @@ final class TotalResponse implements ApiResponse
private $stats;
/**
* @param \DateTime $start
* @param \DateTime $end
* @param string $resolution
* @param TotalResponseItem[] $stats
*/
@ -51,8 +51,6 @@ final class TotalResponse implements ApiResponse
}
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -40,8 +42,6 @@ final class TotalResponseItem
private $complained;
/**
* @param array $data
*
* @return self
*/
public static function create(array $data)
@ -55,13 +55,6 @@ final class TotalResponseItem
);
}
/**
* @param \DateTime $time
* @param array $accepted
* @param array $delivered
* @param array $failed
* @param array $complained
*/
private function __construct(\DateTime $time, array $accepted, array $delivered, array $failed, array $complained)
{
$this->time = $time;

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -39,8 +41,6 @@ abstract class BaseResponse implements ApiResponse
}
/**
* @param array $data
*
* @return BaseResponse
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -44,8 +46,6 @@ class Bounce
}
/**
* @param array $data
*
* @return Bounce
*/
public static function create(array $data)
@ -113,9 +113,6 @@ class Bounce
return $this->createdAt;
}
/**
* @param \DateTime $createdAt
*/
private function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,7 +29,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
/**
* @param Bounce[] $items
* @param array $paging
*/
private function __construct(array $items, array $paging)
{
@ -36,8 +37,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
}
/**
* @param array $data
*
* @return IndexResponse
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -34,8 +36,6 @@ class Complaint
}
/**
* @param array $data
*
* @return Complaint
*/
public static function create(array $data)
@ -65,9 +65,6 @@ class Complaint
return $this->createdAt;
}
/**
* @param \DateTime $createdAt
*/
private function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
@ -27,7 +29,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
/**
* @param Complaint[] $items
* @param array $paging
*/
private function __construct(array $items, array $paging)
{
@ -36,8 +37,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
}
/**
* @param array $data
*
* @return IndexResponse
*/
public static function create(array $data)

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*

Some files were not shown because too many files have changed in this diff Show More