Make all model constructors private (#512)

This commit is contained in:
Tobias Nyholm 2019-01-06 08:14:07 +01:00 committed by GitHub
parent e32031f671
commit 7020c01cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -126,7 +126,7 @@ final class Event
* @param string $id * @param string $id
* @param float $timestamp * @param float $timestamp
*/ */
public function __construct($event, $id, $timestamp) private function __construct($event, $id, $timestamp)
{ {
$this->event = $event; $this->event = $event;
$this->id = $id; $this->id = $id;

View File

@ -29,7 +29,7 @@ final class EventResponse implements ApiResponse, PagingProvider
* @param Event[] $items * @param Event[] $items
* @param array $paging * @param array $paging
*/ */
public function __construct(array $items, array $paging) private function __construct(array $items, array $paging)
{ {
$this->items = $items; $this->items = $items;
$this->paging = $paging; $this->paging = $paging;

View File

@ -29,7 +29,7 @@ final class IndexResponse implements ApiResponse, PagingProvider
* @param Tag[] $items * @param Tag[] $items
* @param array $paging * @param array $paging
*/ */
public function __construct(array $items, array $paging) private function __construct(array $items, array $paging)
{ {
$this->items = $items; $this->items = $items;
$this->paging = $paging; $this->paging = $paging;

View File

@ -37,7 +37,7 @@ final class Tag
* @param \DateTime $firstSeen * @param \DateTime $firstSeen
* @param \DateTime $lastSeen * @param \DateTime $lastSeen
*/ */
public function __construct($tag, $description, \DateTime $firstSeen = null, \DateTime $lastSeen = null) private function __construct($tag, $description, \DateTime $firstSeen = null, \DateTime $lastSeen = null)
{ {
$this->tag = $tag; $this->tag = $tag;
$this->description = $description; $this->description = $description;

View File

@ -32,7 +32,7 @@ abstract class BaseResponse implements ApiResponse
* @param array $webhook * @param array $webhook
* @param string $message * @param string $message
*/ */
public function __construct(array $webhook, $message) private function __construct(array $webhook, $message)
{ {
$this->webhook = $webhook; $this->webhook = $webhook;
$this->message = $message; $this->message = $message;

View File

@ -24,7 +24,7 @@ class ShowResponse implements ApiResponse
/** /**
* @param array $webhook * @param array $webhook
*/ */
public function __construct(array $webhook) private function __construct(array $webhook)
{ {
$this->webhook = $webhook; $this->webhook = $webhook;
} }