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, '@Symfony' => true,
'strict_param' => true, 'strict_param' => true,
'array_syntax' => ['syntax' => 'short'], 'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => false, // true 'declare_strict_types' => true,
'no_empty_phpdoc' => true, 'no_empty_phpdoc' => true,
'no_superfluous_phpdoc_tags' => false, // true 'no_superfluous_phpdoc_tags' => true,
'header_comment' => [ 'header_comment' => [
'commentType' => 'comment', 'commentType' => 'comment',
'header' => $header, 'header' => $header,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
/* /*
* Copyright (C) 2013 Mailgun * 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 array $recipients with all you send emails to. Including bcc and cc
* @param string $message Message filepath or content * @param string $message Message filepath or content
* @param array $params
* *
* @return SendResponse|ResponseInterface * @return SendResponse|ResponseInterface
*/ */
@ -94,8 +94,7 @@ class Message extends HttpApi
/** /**
* Get stored message. * 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 * @return ShowResponse|ResponseInterface
*/ */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
/* /*
* Copyright (C) 2013 Mailgun * Copyright (C) 2013 Mailgun
* *
@ -55,9 +57,7 @@ class BatchMessage extends MessageBuilder
} }
/** /**
* @param string $headerName * @param array $variables {
* @param string $address
* @param array $variables {
* *
* @var string $id * @var string $id
* @var string $full_name * @var string $full_name
@ -100,26 +100,34 @@ class BatchMessage extends MessageBuilder
if (empty($this->domain)) { if (empty($this->domain)) {
throw new RuntimeException('You must call BatchMessage::setDomain before sending messages.'); 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 <?php
declare(strict_types=1);
/* /*
* Copyright (C) 2013 Mailgun * Copyright (C) 2013 Mailgun
* *

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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