diff --git a/.travis.yml b/.travis.yml index 79557462..40f6484b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,19 +3,12 @@ language: php matrix: fast_finish: true include: - - php: 7.2 + - php: 7.4 env: - DEPENDENCIES="" - EXECUTE_CS_CHECK=true - TEST_COVERAGE=true - - php: 7.2 - env: - - DEPENDENCIES="--prefer-lowest --prefer-stable" - - php: 7.3 - env: - - DEPENDENCIES="" - - TEST_COVERAGE=true - - php: 7.3 + - php: 7.4 env: - DEPENDENCIES="--prefer-lowest --prefer-stable" diff --git a/LICENSE b/LICENSE index 70b8a476..788f1789 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2018-2018, Alexander Miertsch -Copyright (c) 2018-2018, Sascha-Oliver Prolic +Copyright (c) 2014-2020, Alexander Miertsch +Copyright (c) 2015-2020, Sascha-Oliver Prolic All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index f1341062..35c9384d 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To establish a consistent code quality, please provide unit tests for all your c | 5.x | EOL | >= 5.5 | EOL | | 6.x | Maintained | >= 5.5 | 3 Dec 2017 | | 7.x | Latest | >= 7.1 | active | -| 8.x | Development | >= 7.2 | active | +| 8.x | Development | >= 7.4 | active | ## License diff --git a/composer.json b/composer.json index 3e08ecdf..d281698a 100644 --- a/composer.json +++ b/composer.json @@ -17,16 +17,16 @@ ], "prefer-stable": true, "require": { - "php": "^7.2", + "php": "^7.4", "ext-json": "*", "ramsey/uuid": "^3.8" }, "require-dev": { "amphp/amp": "^2.1.2", - "phpspec/prophecy": "^1.7.2", - "phpunit/phpunit": "^8.2.2", "doctrine/instantiator": "^1.1", "php-coveralls/php-coveralls": "^2.1", + "phpspec/prophecy": "^1.7.2", + "phpunit/phpunit": "^8.2.2", "prooph/php-cs-fixer-config": "^0.3", "sebastian/object-enumerator": "^3.0.3" }, diff --git a/src/AllCheckpoint.php b/src/AllCheckpoint.php index 7822801d..3e4cbcc7 100644 --- a/src/AllCheckpoint.php +++ b/src/AllCheckpoint.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/AllEventsSlice.php b/src/AllEventsSlice.php index 9d681422..06948921 100644 --- a/src/AllEventsSlice.php +++ b/src/AllEventsSlice.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,16 +15,12 @@ class AllEventsSlice { - /** @var ReadDirection */ - private $readDirection; - /** @var Position */ - private $fromPosition; - /** @var Position */ - private $nextPosition; + private ReadDirection $readDirection; + private Position $fromPosition; + private Position $nextPosition; /** @var ResolvedEvent[] */ - private $events; - /** @var bool */ - private $isEndOfStream; + private array $events; + private bool $isEndOfStream; /** * @internal diff --git a/src/Async/CatchUpSubscriptionDropped.php b/src/Async/CatchUpSubscriptionDropped.php index eddee356..1bd42765 100644 --- a/src/Async/CatchUpSubscriptionDropped.php +++ b/src/Async/CatchUpSubscriptionDropped.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/ClientAuthenticationFailedEventArgs.php b/src/Async/ClientAuthenticationFailedEventArgs.php index b86ef86f..a10c3fab 100644 --- a/src/Async/ClientAuthenticationFailedEventArgs.php +++ b/src/Async/ClientAuthenticationFailedEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,10 +17,8 @@ class ClientAuthenticationFailedEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var string */ - private $reason; + private EventStoreConnection $connection; + private string $reason; public function __construct(EventStoreConnection $connection, string $reason) { diff --git a/src/Async/ClientClosedEventArgs.php b/src/Async/ClientClosedEventArgs.php index 5165f117..fc56ce57 100644 --- a/src/Async/ClientClosedEventArgs.php +++ b/src/Async/ClientClosedEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,10 +17,8 @@ class ClientClosedEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var string */ - private $reason; + private EventStoreConnection $connection; + private string $reason; public function __construct(EventStoreConnection $connection, string $reason) { diff --git a/src/Async/ClientConnectionEventArgs.php b/src/Async/ClientConnectionEventArgs.php index 304ecb08..a13e1d90 100644 --- a/src/Async/ClientConnectionEventArgs.php +++ b/src/Async/ClientConnectionEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,10 +18,8 @@ class ClientConnectionEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var EndPoint */ - private $remoteEndPoint; + private EventStoreConnection $connection; + private EndPoint $remoteEndPoint; public function __construct(EventStoreConnection $connection, EndPoint $remoteEndPoint) { diff --git a/src/Async/ClientErrorEventArgs.php b/src/Async/ClientErrorEventArgs.php index 426f9f74..9f9fcb2e 100644 --- a/src/Async/ClientErrorEventArgs.php +++ b/src/Async/ClientErrorEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,10 +18,8 @@ class ClientErrorEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var Throwable */ - private $exception; + private EventStoreConnection $connection; + private Throwable $exception; public function __construct(EventStoreConnection $connection, Throwable $exception) { diff --git a/src/Async/ClientReconnectingEventArgs.php b/src/Async/ClientReconnectingEventArgs.php index 5ff7fe03..711de5fa 100644 --- a/src/Async/ClientReconnectingEventArgs.php +++ b/src/Async/ClientReconnectingEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,8 +17,7 @@ class ClientReconnectingEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; + private EventStoreConnection $connection; public function __construct(EventStoreConnection $connection) { diff --git a/src/Async/EventAppearedOnCatchupSubscription.php b/src/Async/EventAppearedOnCatchupSubscription.php index 4876a9e6..a5753034 100644 --- a/src/Async/EventAppearedOnCatchupSubscription.php +++ b/src/Async/EventAppearedOnCatchupSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventAppearedOnPersistentSubscription.php b/src/Async/EventAppearedOnPersistentSubscription.php index 58824ddf..309d3250 100644 --- a/src/Async/EventAppearedOnPersistentSubscription.php +++ b/src/Async/EventAppearedOnPersistentSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventAppearedOnSubscription.php b/src/Async/EventAppearedOnSubscription.php index f776683b..3ba98db4 100644 --- a/src/Async/EventAppearedOnSubscription.php +++ b/src/Async/EventAppearedOnSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventStoreAllCatchUpSubscription.php b/src/Async/EventStoreAllCatchUpSubscription.php index 71f88afe..b37bd770 100644 --- a/src/Async/EventStoreAllCatchUpSubscription.php +++ b/src/Async/EventStoreAllCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventStoreCatchUpSubscription.php b/src/Async/EventStoreCatchUpSubscription.php index 78279c92..ebaefebd 100644 --- a/src/Async/EventStoreCatchUpSubscription.php +++ b/src/Async/EventStoreCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventStoreConnection.php b/src/Async/EventStoreConnection.php index 34f13a98..b96688df 100644 --- a/src/Async/EventStoreConnection.php +++ b/src/Async/EventStoreConnection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,6 +14,7 @@ namespace Prooph\EventStore\Async; use Amp\Promise; +use Closure; use Prooph\EventStore\AllEventsSlice; use Prooph\EventStore\CatchUpSubscriptionSettings; use Prooph\EventStore\ConditionalWriteResult; @@ -241,17 +242,17 @@ public function connectToPersistentSubscriptionAsync( ?UserCredentials $userCredentials = null ): Promise; - public function onConnected(callable $handler): ListenerHandler; + public function onConnected(Closure $handler): ListenerHandler; - public function onDisconnected(callable $handler): ListenerHandler; + public function onDisconnected(Closure $handler): ListenerHandler; - public function onReconnecting(callable $handler): ListenerHandler; + public function onReconnecting(Closure $handler): ListenerHandler; - public function onClosed(callable $handler): ListenerHandler; + public function onClosed(Closure $handler): ListenerHandler; - public function onErrorOccurred(callable $handler): ListenerHandler; + public function onErrorOccurred(Closure $handler): ListenerHandler; - public function onAuthenticationFailed(callable $handler): ListenerHandler; + public function onAuthenticationFailed(Closure $handler): ListenerHandler; public function detach(ListenerHandler $handler): void; } diff --git a/src/Async/EventStorePersistentSubscription.php b/src/Async/EventStorePersistentSubscription.php index 434d2baf..48cc0f8b 100644 --- a/src/Async/EventStorePersistentSubscription.php +++ b/src/Async/EventStorePersistentSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventStoreStreamCatchUpSubscription.php b/src/Async/EventStoreStreamCatchUpSubscription.php index 5e261998..a1b58496 100644 --- a/src/Async/EventStoreStreamCatchUpSubscription.php +++ b/src/Async/EventStoreStreamCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/EventStoreTransaction.php b/src/Async/EventStoreTransaction.php index 0bc7faaf..3607bfab 100644 --- a/src/Async/EventStoreTransaction.php +++ b/src/Async/EventStoreTransaction.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,16 +21,11 @@ class EventStoreTransaction { - /** @var int */ - private $transactionId; - /** @var UserCredentials|null */ - private $userCredentials; - /** @var EventStoreTransactionConnection */ - private $connection; - /** @var bool */ - private $isRolledBack; - /** @var bool */ - private $isCommitted; + private int $transactionId; + private ?UserCredentials $userCredentials; + private EventStoreTransactionConnection $connection; + private bool $isRolledBack; + private bool $isCommitted; public function __construct( int $transactionId, diff --git a/src/Async/Internal/EventHandler.php b/src/Async/Internal/EventHandler.php index 52c035bb..a80a4bd1 100644 --- a/src/Async/Internal/EventHandler.php +++ b/src/Async/Internal/EventHandler.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,6 +13,7 @@ namespace Prooph\EventStore\Async\Internal; +use Closure; use Prooph\EventStore\Async\ClientAuthenticationFailedEventArgs; use Prooph\EventStore\Async\ClientClosedEventArgs; use Prooph\EventStore\Async\ClientConnectionEventArgs; @@ -24,7 +25,7 @@ class EventHandler { /** @var SplObjectStorage[] */ - private $handlers; + private array $handlers; public function __construct() { @@ -86,32 +87,32 @@ public function authenticationFailed(ClientAuthenticationFailedEventArgs $args): } } - public function whenConnected(callable $handler): ListenerHandler + public function whenConnected(Closure $handler): ListenerHandler { return $this->attach($handler, 'connected'); } - public function whenDisconnected(callable $handler): ListenerHandler + public function whenDisconnected(Closure $handler): ListenerHandler { return $this->attach($handler, 'disconnected'); } - public function whenReconnecting(callable $handler): ListenerHandler + public function whenReconnecting(Closure $handler): ListenerHandler { return $this->attach($handler, 'reconnecting'); } - public function whenClosed(callable $handler): ListenerHandler + public function whenClosed(Closure $handler): ListenerHandler { return $this->attach($handler, 'closed'); } - public function whenErrorOccurred(callable $handler): ListenerHandler + public function whenErrorOccurred(Closure $handler): ListenerHandler { return $this->attach($handler, 'errorOccurred'); } - public function whenAuthenticationFailed(callable $handler): ListenerHandler + public function whenAuthenticationFailed(Closure $handler): ListenerHandler { return $this->attach($handler, 'authenticationFailed'); } @@ -123,7 +124,7 @@ public function detach(ListenerHandler $handler): void } } - private function attach(callable $handler, string $eventName): ListenerHandler + private function attach(Closure $handler, string $eventName): ListenerHandler { $handler = new ListenerHandler($handler); diff --git a/src/Async/Internal/EventStoreTransactionConnection.php b/src/Async/Internal/EventStoreTransactionConnection.php index 9fbfedba..491f46dd 100644 --- a/src/Async/Internal/EventStoreTransactionConnection.php +++ b/src/Async/Internal/EventStoreTransactionConnection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/LiveProcessingStartedOnCatchUpSubscription.php b/src/Async/LiveProcessingStartedOnCatchUpSubscription.php index a10e6eb5..c2a1087a 100644 --- a/src/Async/LiveProcessingStartedOnCatchUpSubscription.php +++ b/src/Async/LiveProcessingStartedOnCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/PersistentSubscriptionDropped.php b/src/Async/PersistentSubscriptionDropped.php index 80df7411..bc88d62a 100644 --- a/src/Async/PersistentSubscriptionDropped.php +++ b/src/Async/PersistentSubscriptionDropped.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/PersistentSubscriptions/PersistentSubscriptionsManager.php b/src/Async/PersistentSubscriptions/PersistentSubscriptionsManager.php index 157d871a..3c8a46cf 100644 --- a/src/Async/PersistentSubscriptions/PersistentSubscriptionsManager.php +++ b/src/Async/PersistentSubscriptions/PersistentSubscriptionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/Projections/ProjectionsManager.php b/src/Async/Projections/ProjectionsManager.php index 62c9a9d1..97879684 100644 --- a/src/Async/Projections/ProjectionsManager.php +++ b/src/Async/Projections/ProjectionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/Projections/QueryManager.php b/src/Async/Projections/QueryManager.php index 470808be..0b18de3f 100644 --- a/src/Async/Projections/QueryManager.php +++ b/src/Async/Projections/QueryManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Async/UserManagement/UsersManager.php b/src/Async/UserManagement/UsersManager.php index 7b3ddb00..b48bbdf7 100644 --- a/src/Async/UserManagement/UsersManager.php +++ b/src/Async/UserManagement/UsersManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/CatchUpSubscriptionDropped.php b/src/CatchUpSubscriptionDropped.php index a680da50..a43dc165 100644 --- a/src/CatchUpSubscriptionDropped.php +++ b/src/CatchUpSubscriptionDropped.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/CatchUpSubscriptionSettings.php b/src/CatchUpSubscriptionSettings.php index a97e06d0..c5f2deb2 100644 --- a/src/CatchUpSubscriptionSettings.php +++ b/src/CatchUpSubscriptionSettings.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,26 +21,19 @@ class CatchUpSubscriptionSettings /** * The maximum amount of events to cache when processing from a live subscription. * Going above this value will drop the subscription. - * - * @var int */ - private $maxLiveQueueSize; + private int $maxLiveQueueSize; /** * The number of events to read per batch when reading the history. - * - * @var int */ - private $readBatchSize; + private int $readBatchSize; - /** @var bool */ - private $verboseLogging; + private bool $verboseLogging; - /** @var bool */ - private $resolveLinkTos; + private bool $resolveLinkTos; - /** @var string */ - private $subscriptionName; + private string $subscriptionName; public function __construct( int $maxLiveQueueSize, diff --git a/src/ClientAuthenticationFailedEventArgs.php b/src/ClientAuthenticationFailedEventArgs.php index 1725c520..75671299 100644 --- a/src/ClientAuthenticationFailedEventArgs.php +++ b/src/ClientAuthenticationFailedEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,10 +15,8 @@ class ClientAuthenticationFailedEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var string */ - private $reason; + private EventStoreConnection $connection; + private string $reason; public function __construct(EventStoreConnection $connection, string $reason) { diff --git a/src/ClientClosedEventArgs.php b/src/ClientClosedEventArgs.php index 3fbca406..0cd34b93 100644 --- a/src/ClientClosedEventArgs.php +++ b/src/ClientClosedEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,10 +15,8 @@ class ClientClosedEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var string */ - private $reason; + private EventStoreConnection $connection; + private string $reason; public function __construct(EventStoreConnection $connection, string $reason) { diff --git a/src/ClientConnectionEventArgs.php b/src/ClientConnectionEventArgs.php index 00261d9a..d97572e4 100644 --- a/src/ClientConnectionEventArgs.php +++ b/src/ClientConnectionEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,10 +15,8 @@ class ClientConnectionEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var EndPoint */ - private $remoteEndPoint; + private EventStoreConnection $connection; + private EndPoint $remoteEndPoint; public function __construct(EventStoreConnection $connection, EndPoint $remoteEndPoint) { diff --git a/src/ClientErrorEventArgs.php b/src/ClientErrorEventArgs.php index bf192d61..b98ebd3a 100644 --- a/src/ClientErrorEventArgs.php +++ b/src/ClientErrorEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,10 +17,8 @@ class ClientErrorEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; - /** @var Throwable */ - private $exception; + private EventStoreConnection $connection; + private Throwable $exception; public function __construct(EventStoreConnection $connection, Throwable $exception) { diff --git a/src/ClientReconnectingEventArgs.php b/src/ClientReconnectingEventArgs.php index b6417859..dc93c304 100644 --- a/src/ClientReconnectingEventArgs.php +++ b/src/ClientReconnectingEventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,8 +15,7 @@ class ClientReconnectingEventArgs implements EventArgs { - /** @var EventStoreConnection */ - private $connection; + private EventStoreConnection $connection; public function __construct(EventStoreConnection $connection) { diff --git a/src/Common/SystemConsumerStrategies.php b/src/Common/SystemConsumerStrategies.php index aeccde96..55622354 100644 --- a/src/Common/SystemConsumerStrategies.php +++ b/src/Common/SystemConsumerStrategies.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Common/SystemEventTypes.php b/src/Common/SystemEventTypes.php index 9d2dbbf5..a4e23e80 100644 --- a/src/Common/SystemEventTypes.php +++ b/src/Common/SystemEventTypes.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Common/SystemMetadata.php b/src/Common/SystemMetadata.php index 0873020c..05320216 100644 --- a/src/Common/SystemMetadata.php +++ b/src/Common/SystemMetadata.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Common/SystemRoles.php b/src/Common/SystemRoles.php index 0632178e..9fdc86b8 100644 --- a/src/Common/SystemRoles.php +++ b/src/Common/SystemRoles.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Common/SystemStreams.php b/src/Common/SystemStreams.php index 4713aa60..a6d27dbb 100644 --- a/src/Common/SystemStreams.php +++ b/src/Common/SystemStreams.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ConditionalWriteResult.php b/src/ConditionalWriteResult.php index 24bbdbab..9a4b85d6 100644 --- a/src/ConditionalWriteResult.php +++ b/src/ConditionalWriteResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,12 +17,9 @@ class ConditionalWriteResult { - /** @var ConditionalWriteStatus */ - private $status; - /** @var int|null */ - private $nextExpectedVersion; - /** @var Position|null */ - private $logPosition; + private ConditionalWriteStatus $status; + private ?int $nextExpectedVersion; + private ?Position $logPosition; private function __construct() { diff --git a/src/ConditionalWriteStatus.php b/src/ConditionalWriteStatus.php index 253ac828..311e0ff5 100644 --- a/src/ConditionalWriteStatus.php +++ b/src/ConditionalWriteStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -27,8 +27,8 @@ class ConditionalWriteStatus public const VERSION_MISMATCH = 1; public const STREAM_DELETED = 2; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/DeleteResult.php b/src/DeleteResult.php index e765b5f7..891ac47e 100644 --- a/src/DeleteResult.php +++ b/src/DeleteResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,8 +15,7 @@ class DeleteResult { - /** @var Position */ - private $logPosition; + private Position $logPosition; public function __construct(Position $logPosition) { diff --git a/src/EndPoint.php b/src/EndPoint.php index 5438ffa7..8a15cd32 100644 --- a/src/EndPoint.php +++ b/src/EndPoint.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,10 +15,8 @@ class EndPoint { - /** @var string */ - private $host; - /** @var int */ - private $port; + private string $host; + private int $port; public function __construct(string $host, int $port) { diff --git a/src/EventAppearedOnCatchupSubscription.php b/src/EventAppearedOnCatchupSubscription.php index 3b7e071b..6912eab5 100644 --- a/src/EventAppearedOnCatchupSubscription.php +++ b/src/EventAppearedOnCatchupSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventAppearedOnPersistentSubscription.php b/src/EventAppearedOnPersistentSubscription.php index b22630d3..b6d4d65b 100644 --- a/src/EventAppearedOnPersistentSubscription.php +++ b/src/EventAppearedOnPersistentSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventAppearedOnSubscription.php b/src/EventAppearedOnSubscription.php index 8569984a..c85f75a9 100644 --- a/src/EventAppearedOnSubscription.php +++ b/src/EventAppearedOnSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventArgs.php b/src/EventArgs.php index 05f72a52..b9ff7cb5 100644 --- a/src/EventArgs.php +++ b/src/EventArgs.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventData.php b/src/EventData.php index af8a3306..c80149e8 100644 --- a/src/EventData.php +++ b/src/EventData.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,16 +18,11 @@ */ class EventData { - /** @var EventId */ - private $eventId; - /** @var string */ - private $eventType; - /** @var bool */ - private $isJson; - /** @var string */ - private $data; - /** @var string */ - private $metaData; + private EventId $eventId; + private string $eventType; + private bool $isJson; + private string $data; + private string $metaData; public function __construct(?EventId $eventId, string $eventType, bool $isJson, string $data = '', string $metaData = '') { diff --git a/src/EventId.php b/src/EventId.php index 17559be4..aa0adf71 100644 --- a/src/EventId.php +++ b/src/EventId.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,8 +18,7 @@ class EventId { - /** @var UuidInterface */ - private $uuid; + private UuidInterface $uuid; public static function generate(): EventId { diff --git a/src/EventReadResult.php b/src/EventReadResult.php index 2480029d..25b2eb12 100644 --- a/src/EventReadResult.php +++ b/src/EventReadResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,17 +15,13 @@ class EventReadResult { - /** @var EventReadStatus */ - private $status; + private EventReadStatus $status; - /** @var string */ - private $stream; + private string $stream; - /** @var int */ - private $eventNumber; + private int $eventNumber; - /** @var ResolvedEvent|null */ - private $event; + private ?ResolvedEvent $event; /** @internal */ public function __construct(EventReadStatus $status, string $stream, int $eventNumber, ?ResolvedEvent $event) diff --git a/src/EventReadStatus.php b/src/EventReadStatus.php index 8f9a190b..1439dbc2 100644 --- a/src/EventReadStatus.php +++ b/src/EventReadStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,8 +29,8 @@ class EventReadStatus public const NO_STREAM = 2; public const STREAM_DELETED = 3; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/EventStoreAllCatchUpSubscription.php b/src/EventStoreAllCatchUpSubscription.php index 05c9f425..877a397b 100644 --- a/src/EventStoreAllCatchUpSubscription.php +++ b/src/EventStoreAllCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStoreCatchUpSubscription.php b/src/EventStoreCatchUpSubscription.php index 4339db15..54069bd5 100644 --- a/src/EventStoreCatchUpSubscription.php +++ b/src/EventStoreCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStoreConnection.php b/src/EventStoreConnection.php index 3e71d7af..b0c5c516 100644 --- a/src/EventStoreConnection.php +++ b/src/EventStoreConnection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStorePersistentSubscription.php b/src/EventStorePersistentSubscription.php index 33a60d23..a821339c 100644 --- a/src/EventStorePersistentSubscription.php +++ b/src/EventStorePersistentSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStoreStreamCatchUpSubscription.php b/src/EventStoreStreamCatchUpSubscription.php index 1d964998..e8c1361f 100644 --- a/src/EventStoreStreamCatchUpSubscription.php +++ b/src/EventStoreStreamCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStoreSubscription.php b/src/EventStoreSubscription.php index 245c6a3f..53f4bfd4 100644 --- a/src/EventStoreSubscription.php +++ b/src/EventStoreSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,14 +15,10 @@ abstract class EventStoreSubscription { - /** @var bool */ - private $isSubscribedToAll; - /** @var string */ - private $streamId; - /** @var int */ - private $lastCommitPosition; - /** @var int|null */ - private $lastEventNumber; + private bool $isSubscribedToAll; + private string $streamId; + private int $lastCommitPosition; + private ?int $lastEventNumber; public function __construct(string $streamId, int $lastCommitPosition, ?int $lastEventNumber) { diff --git a/src/EventStoreTransaction.php b/src/EventStoreTransaction.php index 2b03ed9d..005a2438 100644 --- a/src/EventStoreTransaction.php +++ b/src/EventStoreTransaction.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,16 +17,11 @@ class EventStoreTransaction { - /** @var int */ - private $transactionId; - /** @var UserCredentials|null */ - private $userCredentials; - /** @var EventStoreTransactionConnection */ - private $connection; - /** @var bool */ - private $isRolledBack; - /** @var bool */ - private $isCommitted; + private int $transactionId; + private ?UserCredentials $userCredentials; + private EventStoreTransactionConnection $connection; + private bool $isRolledBack; + private bool $isCommitted; public function __construct( int $transactionId, diff --git a/src/Exception/AccessDenied.php b/src/Exception/AccessDenied.php index de6e4e68..c5d5508b 100644 --- a/src/Exception/AccessDenied.php +++ b/src/Exception/AccessDenied.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/CannotEstablishConnection.php b/src/Exception/CannotEstablishConnection.php index 8e30aac8..f68597c2 100644 --- a/src/Exception/CannotEstablishConnection.php +++ b/src/Exception/CannotEstablishConnection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ConnectionClosed.php b/src/Exception/ConnectionClosed.php index 107bb4e4..faacad8b 100644 --- a/src/Exception/ConnectionClosed.php +++ b/src/Exception/ConnectionClosed.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/EventStoreConnectionException.php b/src/Exception/EventStoreConnectionException.php index 830897e3..194f25d1 100644 --- a/src/Exception/EventStoreConnectionException.php +++ b/src/Exception/EventStoreConnectionException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/EventStoreException.php b/src/Exception/EventStoreException.php index 7936c2dd..5fa35dc6 100644 --- a/src/Exception/EventStoreException.php +++ b/src/Exception/EventStoreException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 6c8a238e..30c42cc6 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/InvalidOperationException.php b/src/Exception/InvalidOperationException.php index 21e9ab09..2dedc7b0 100644 --- a/src/Exception/InvalidOperationException.php +++ b/src/Exception/InvalidOperationException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/InvalidTransaction.php b/src/Exception/InvalidTransaction.php index 1bd4e16e..ea5b6d53 100644 --- a/src/Exception/InvalidTransaction.php +++ b/src/Exception/InvalidTransaction.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/JsonException.php b/src/Exception/JsonException.php index 452371fa..e91bf133 100644 --- a/src/Exception/JsonException.php +++ b/src/Exception/JsonException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/MaxQueueSizeLimitReached.php b/src/Exception/MaxQueueSizeLimitReached.php index 61a2bcac..f0fd1b66 100644 --- a/src/Exception/MaxQueueSizeLimitReached.php +++ b/src/Exception/MaxQueueSizeLimitReached.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/MaximumSubscribersReached.php b/src/Exception/MaximumSubscribersReached.php index 9430e685..0f561275 100644 --- a/src/Exception/MaximumSubscribersReached.php +++ b/src/Exception/MaximumSubscribersReached.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/NotAuthenticated.php b/src/Exception/NotAuthenticated.php index 21727b7d..45ef70af 100644 --- a/src/Exception/NotAuthenticated.php +++ b/src/Exception/NotAuthenticated.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ObjectDisposed.php b/src/Exception/ObjectDisposed.php index b2a36ca5..5286c21e 100644 --- a/src/Exception/ObjectDisposed.php +++ b/src/Exception/ObjectDisposed.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/OperationTimedOut.php b/src/Exception/OperationTimedOut.php index f205cee0..fa9af1a2 100644 --- a/src/Exception/OperationTimedOut.php +++ b/src/Exception/OperationTimedOut.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/OutOfRangeException.php b/src/Exception/OutOfRangeException.php index 170729b2..f85d7fbb 100644 --- a/src/Exception/OutOfRangeException.php +++ b/src/Exception/OutOfRangeException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/PersistentSubscriptionCommandFailed.php b/src/Exception/PersistentSubscriptionCommandFailed.php index 780f1793..477830ee 100644 --- a/src/Exception/PersistentSubscriptionCommandFailed.php +++ b/src/Exception/PersistentSubscriptionCommandFailed.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/PersistentSubscriptionDeleted.php b/src/Exception/PersistentSubscriptionDeleted.php index bbebddbe..7587aff2 100644 --- a/src/Exception/PersistentSubscriptionDeleted.php +++ b/src/Exception/PersistentSubscriptionDeleted.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ProjectionCommandConflict.php b/src/Exception/ProjectionCommandConflict.php index 36cc81c8..9f236b32 100644 --- a/src/Exception/ProjectionCommandConflict.php +++ b/src/Exception/ProjectionCommandConflict.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ProjectionCommandFailed.php b/src/Exception/ProjectionCommandFailed.php index e0d5c01c..7c7e809c 100644 --- a/src/Exception/ProjectionCommandFailed.php +++ b/src/Exception/ProjectionCommandFailed.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/RetriesLimitReached.php b/src/Exception/RetriesLimitReached.php index 1b0cb9ce..a467ae55 100644 --- a/src/Exception/RetriesLimitReached.php +++ b/src/Exception/RetriesLimitReached.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index 9ffe8e43..16502051 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ServerError.php b/src/Exception/ServerError.php index d969546c..6e8bba5c 100644 --- a/src/Exception/ServerError.php +++ b/src/Exception/ServerError.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/StreamDeleted.php b/src/Exception/StreamDeleted.php index 1a0e991b..73ae26f7 100644 --- a/src/Exception/StreamDeleted.php +++ b/src/Exception/StreamDeleted.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/Timeout.php b/src/Exception/Timeout.php index b035cc41..44f8ddb4 100644 --- a/src/Exception/Timeout.php +++ b/src/Exception/Timeout.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UnexpectedCommand.php b/src/Exception/UnexpectedCommand.php index fcead0bd..6d250f9e 100644 --- a/src/Exception/UnexpectedCommand.php +++ b/src/Exception/UnexpectedCommand.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UnexpectedOperationResult.php b/src/Exception/UnexpectedOperationResult.php index 115431df..ddcceef8 100644 --- a/src/Exception/UnexpectedOperationResult.php +++ b/src/Exception/UnexpectedOperationResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UnexpectedValueException.php b/src/Exception/UnexpectedValueException.php index b410ef39..59206b6b 100644 --- a/src/Exception/UnexpectedValueException.php +++ b/src/Exception/UnexpectedValueException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UserCommandConflict.php b/src/Exception/UserCommandConflict.php index 2abd9c5c..e70bbac1 100644 --- a/src/Exception/UserCommandConflict.php +++ b/src/Exception/UserCommandConflict.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UserCommandFailed.php b/src/Exception/UserCommandFailed.php index 95dafaf4..7bbd8e8c 100644 --- a/src/Exception/UserCommandFailed.php +++ b/src/Exception/UserCommandFailed.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/WrongExpectedVersion.php b/src/Exception/WrongExpectedVersion.php index c6741197..ab9dc433 100644 --- a/src/Exception/WrongExpectedVersion.php +++ b/src/Exception/WrongExpectedVersion.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ExpectedVersion.php b/src/ExpectedVersion.php index f74f41a5..87b9dfcf 100644 --- a/src/ExpectedVersion.php +++ b/src/ExpectedVersion.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/ConnectToPersistentSubscriptions.php b/src/Internal/ConnectToPersistentSubscriptions.php index 431c4d42..2d4c7a73 100644 --- a/src/Internal/ConnectToPersistentSubscriptions.php +++ b/src/Internal/ConnectToPersistentSubscriptions.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Consts.php b/src/Internal/Consts.php index a84fda42..30b730d4 100644 --- a/src/Internal/Consts.php +++ b/src/Internal/Consts.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/DropData.php b/src/Internal/DropData.php index 10c900b5..df9de6de 100644 --- a/src/Internal/DropData.php +++ b/src/Internal/DropData.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,10 +19,8 @@ /** @internal */ class DropData { - /** @var SubscriptionDropReason */ - private $reason; - /** @var Throwable|null */ - private $error; + private SubscriptionDropReason $reason; + private ?Throwable $error; public function __construct(SubscriptionDropReason $reason, ?Throwable $error) { diff --git a/src/Internal/EventHandler.php b/src/Internal/EventHandler.php index 45100467..5f4c6917 100644 --- a/src/Internal/EventHandler.php +++ b/src/Internal/EventHandler.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,6 +13,7 @@ namespace Prooph\EventStore\Internal; +use Closure; use Prooph\EventStore\ClientAuthenticationFailedEventArgs; use Prooph\EventStore\ClientClosedEventArgs; use Prooph\EventStore\ClientConnectionEventArgs; @@ -24,7 +25,7 @@ class EventHandler { /** @var SplObjectStorage[] */ - private $handlers; + private array $handlers; public function __construct() { @@ -86,32 +87,32 @@ public function authenticationFailed(ClientAuthenticationFailedEventArgs $args): } } - public function whenConnected(callable $handler): ListenerHandler + public function whenConnected(Closure $handler): ListenerHandler { return $this->attach($handler, 'connected'); } - public function whenDisconnected(callable $handler): ListenerHandler + public function whenDisconnected(Closure $handler): ListenerHandler { return $this->attach($handler, 'disconnected'); } - public function whenReconnecting(callable $handler): ListenerHandler + public function whenReconnecting(Closure $handler): ListenerHandler { return $this->attach($handler, 'reconnecting'); } - public function whenClosed(callable $handler): ListenerHandler + public function whenClosed(Closure $handler): ListenerHandler { return $this->attach($handler, 'closed'); } - public function whenErrorOccurred(callable $handler): ListenerHandler + public function whenErrorOccurred(Closure $handler): ListenerHandler { return $this->attach($handler, 'errorOccurred'); } - public function whenAuthenticationFailed(callable $handler): ListenerHandler + public function whenAuthenticationFailed(Closure $handler): ListenerHandler { return $this->attach($handler, 'authenticationFailed'); } @@ -123,7 +124,7 @@ public function detach(ListenerHandler $handler): void } } - private function attach(callable $handler, string $eventName): ListenerHandler + private function attach(Closure $handler, string $eventName): ListenerHandler { $handler = new ListenerHandler($handler); diff --git a/src/Internal/EventStoreTransactionConnection.php b/src/Internal/EventStoreTransactionConnection.php index 6095562e..73ab2bc0 100644 --- a/src/Internal/EventStoreTransactionConnection.php +++ b/src/Internal/EventStoreTransactionConnection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/PersistentEventStoreSubscription.php b/src/Internal/PersistentEventStoreSubscription.php index e44eb7e3..65a8d2ce 100644 --- a/src/Internal/PersistentEventStoreSubscription.php +++ b/src/Internal/PersistentEventStoreSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,8 +20,7 @@ /** @internal */ class PersistentEventStoreSubscription extends EventStoreSubscription { - /** @var ConnectToPersistentSubscriptions */ - private $subscriptionOperation; + private ConnectToPersistentSubscriptions $subscriptionOperation; public function __construct( ConnectToPersistentSubscriptions $subscriptionOperation, diff --git a/src/Internal/PersistentSubscriptionCreateResult.php b/src/Internal/PersistentSubscriptionCreateResult.php index 62a7bb3c..ec978ab2 100644 --- a/src/Internal/PersistentSubscriptionCreateResult.php +++ b/src/Internal/PersistentSubscriptionCreateResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,8 +15,7 @@ class PersistentSubscriptionCreateResult { - /** @var PersistentSubscriptionCreateStatus */ - private $status; + private PersistentSubscriptionCreateStatus $status; /** @internal */ public function __construct(PersistentSubscriptionCreateStatus $status) diff --git a/src/Internal/PersistentSubscriptionCreateStatus.php b/src/Internal/PersistentSubscriptionCreateStatus.php index b3468505..34023eda 100644 --- a/src/Internal/PersistentSubscriptionCreateStatus.php +++ b/src/Internal/PersistentSubscriptionCreateStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -28,8 +28,8 @@ class PersistentSubscriptionCreateStatus public const ALREADY_EXISTS = 1; public const FAILURE = 2; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/Internal/PersistentSubscriptionDeleteResult.php b/src/Internal/PersistentSubscriptionDeleteResult.php index 5a61820b..8a38ecfd 100644 --- a/src/Internal/PersistentSubscriptionDeleteResult.php +++ b/src/Internal/PersistentSubscriptionDeleteResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,8 +15,7 @@ class PersistentSubscriptionDeleteResult { - /** @var PersistentSubscriptionDeleteStatus */ - private $status; + private PersistentSubscriptionDeleteStatus $status; /** @internal */ public function __construct(PersistentSubscriptionDeleteStatus $status) diff --git a/src/Internal/PersistentSubscriptionDeleteStatus.php b/src/Internal/PersistentSubscriptionDeleteStatus.php index b7898f74..07be5563 100644 --- a/src/Internal/PersistentSubscriptionDeleteStatus.php +++ b/src/Internal/PersistentSubscriptionDeleteStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,8 +26,8 @@ class PersistentSubscriptionDeleteStatus public const SUCCESS = 0; public const FAILURE = 1; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/Internal/PersistentSubscriptionUpdateResult.php b/src/Internal/PersistentSubscriptionUpdateResult.php index 0d396ba3..2ba4cb15 100644 --- a/src/Internal/PersistentSubscriptionUpdateResult.php +++ b/src/Internal/PersistentSubscriptionUpdateResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,8 +15,7 @@ class PersistentSubscriptionUpdateResult { - /** @var PersistentSubscriptionUpdateStatus */ - private $status; + private PersistentSubscriptionUpdateStatus $status; /** @internal */ public function __construct(PersistentSubscriptionUpdateStatus $status) diff --git a/src/Internal/PersistentSubscriptionUpdateStatus.php b/src/Internal/PersistentSubscriptionUpdateStatus.php index f4b4f260..5d2eae26 100644 --- a/src/Internal/PersistentSubscriptionUpdateStatus.php +++ b/src/Internal/PersistentSubscriptionUpdateStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -28,8 +28,8 @@ class PersistentSubscriptionUpdateStatus public const NOT_FOUND = 1; public const FAILURE = 2; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/Internal/ResolvedEvent.php b/src/Internal/ResolvedEvent.php index fae47786..b8c578e6 100644 --- a/src/Internal/ResolvedEvent.php +++ b/src/Internal/ResolvedEvent.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ListenerHandler.php b/src/ListenerHandler.php index 3989a92e..e3ea88f9 100644 --- a/src/ListenerHandler.php +++ b/src/ListenerHandler.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,16 +15,15 @@ class ListenerHandler { - /** @var callable */ - private $listener; + private Closure $listener; /** @internal */ - public function __construct(callable $listener) + public function __construct(Closure $listener) { $this->listener = $listener; } - public function callback(): callable + public function callback(): Closure { return $this->listener; } diff --git a/src/LiveProcessingStartedOnCatchUpSubscription.php b/src/LiveProcessingStartedOnCatchUpSubscription.php index 0d106f4c..e60aa76d 100644 --- a/src/LiveProcessingStartedOnCatchUpSubscription.php +++ b/src/LiveProcessingStartedOnCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/PersistentSubscriptionDropped.php b/src/PersistentSubscriptionDropped.php index b7f786cc..7aa810d0 100644 --- a/src/PersistentSubscriptionDropped.php +++ b/src/PersistentSubscriptionDropped.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/PersistentSubscriptionNakEventAction.php b/src/PersistentSubscriptionNakEventAction.php index 9c4c89dc..da48df2a 100644 --- a/src/PersistentSubscriptionNakEventAction.php +++ b/src/PersistentSubscriptionNakEventAction.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -36,8 +36,8 @@ class PersistentSubscriptionNakEventAction // Stop the subscription public const STOP = 4; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/PersistentSubscriptionResolvedEvent.php b/src/PersistentSubscriptionResolvedEvent.php index a5fd5607..66e4b6d1 100644 --- a/src/PersistentSubscriptionResolvedEvent.php +++ b/src/PersistentSubscriptionResolvedEvent.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,10 +18,8 @@ /** @internal */ class PersistentSubscriptionResolvedEvent implements InternalResolvedEvent { - /** @var int|null */ - private $retryCount; - /** @var ResolvedEvent */ - private $event; + private ?int $retryCount; + private ResolvedEvent $event; public function __construct(ResolvedEvent $event, ?int $retryCount) { diff --git a/src/PersistentSubscriptionSettings.php b/src/PersistentSubscriptionSettings.php index 57ad641e..27aeb123 100644 --- a/src/PersistentSubscriptionSettings.php +++ b/src/PersistentSubscriptionSettings.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,68 +21,55 @@ class PersistentSubscriptionSettings implements JsonSerializable { /** * Tells the subscription to resolve link events. - * @var bool */ - private $resolveLinkTos; + private bool $resolveLinkTos; /** * Start the subscription from the position-of the event in the stream. * If the value is set to `-1` that the subscription should start from * where the stream is when the subscription is first connected. - * @var int */ - private $startFrom; + private int $startFrom; /** * Tells the backend to measure timings on the clients so statistics will contain histograms of them. - * @var bool */ - private $extraStatistics; + private bool $extraStatistics; /** * The amount of time the system should try to checkpoint after. - * @var int */ - private $checkPointAfterMilliseconds; + private int $checkPointAfterMilliseconds; /** * The size of the live buffer (in memory) before resorting to paging. - * @var int */ - private $liveBufferSize; + private int $liveBufferSize; /** * The size of the read batch when in paging mode. - * @var int */ - private $readBatchSize; + private int $readBatchSize; /** * The number of messages that should be buffered when in paging mode. - * @var int */ - private $bufferSize; + private int $bufferSize; /** * The maximum number of messages not checkpointed before forcing a checkpoint. - * @var int */ - private $maxCheckPointCount; + private int $maxCheckPointCount; /** * Sets the number of times a message should be retried before considered a bad message. - * @var int */ - private $maxRetryCount; + private int $maxRetryCount; /** * Sets the maximum number of allowed subscribers. - * @var int */ - private $maxSubscriberCount; + private int $maxSubscriberCount; /** * Sets the timeout for a client before the message will be retried. - * @var int */ - private $messageTimeoutMilliseconds; + private int $messageTimeoutMilliseconds; /** * The minimum number of messages to write a checkpoint for. - * @var int */ - private $minCheckPointCount; - /** @var string */ - private $namedConsumerStrategy; + private int $minCheckPointCount; + private string $namedConsumerStrategy; private const INT_32_MAX = 2147483647; diff --git a/src/PersistentSubscriptionSettingsBuilder.php b/src/PersistentSubscriptionSettingsBuilder.php index d14668b4..c4192833 100644 --- a/src/PersistentSubscriptionSettingsBuilder.php +++ b/src/PersistentSubscriptionSettingsBuilder.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,68 +20,55 @@ class PersistentSubscriptionSettingsBuilder { /** * Tells the subscription to resolve link events. - * @var bool */ - private $resolveLinkTos = false; + private bool $resolveLinkTos = false; /** * Start the subscription from the position-of the event in the stream. * If the value is set to `-1` that the subscription should start from * where the stream is when the subscription is first connected. - * @var int */ - private $startFrom = -1; + private int $startFrom = -1; /** * Tells the backend to measure timings on the clients so statistics will contain histograms of them. - * @var bool */ - private $extraStatistics = false; + private bool $extraStatistics = false; /** * The amount of time the system should try to checkpoint after. - * @var int */ - private $checkPointAfterMilliseconds = 2000; + private int $checkPointAfterMilliseconds = 2000; /** * The size of the live buffer (in memory) before resorting to paging. - * @var int */ - private $liveBufferSize = 500; + private int $liveBufferSize = 500; /** * The size of the read batch when in paging mode. - * @var int */ - private $readBatchSize = 20; + private int $readBatchSize = 20; /** * The number of messages that should be buffered when in paging mode. - * @var int */ - private $bufferSize = 500; + private int $bufferSize = 500; /** * The maximum number of messages not checkpointed before forcing a checkpoint. - * @var int */ - private $maxCheckPointCount = 1000; + private int $maxCheckPointCount = 1000; /** * Sets the number of times a message should be retried before considered a bad message. - * @var int */ - private $maxRetryCount = 10; + private int $maxRetryCount = 10; /** * Sets the maximum number of allowed subscribers. - * @var int */ - private $maxSubscriberCount = 0; + private int $maxSubscriberCount = 0; /** * Sets the timeout for a client before the message will be retried. - * @var int */ - private $messageTimeoutMilliseconds = 30000; + private int $messageTimeoutMilliseconds = 30000; /** * The minimum number of messages to write a checkpoint for. - * @var int */ - private $minCheckPointCount = 10; - /** @var string */ - private $namedConsumerStrategy = SystemConsumerStrategies::ROUND_ROBIN; + private int $minCheckPointCount = 10; + private string $namedConsumerStrategy = SystemConsumerStrategies::ROUND_ROBIN; /** @internal */ public function __construct() diff --git a/src/PersistentSubscriptions/PersistentSubscriptionConfigDetails.php b/src/PersistentSubscriptions/PersistentSubscriptionConfigDetails.php index c943f6b1..d312e850 100644 --- a/src/PersistentSubscriptions/PersistentSubscriptionConfigDetails.php +++ b/src/PersistentSubscriptions/PersistentSubscriptionConfigDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,34 +16,20 @@ /** @internal */ final class PersistentSubscriptionConfigDetails { - /** @var bool */ - private $resolveLinktos; - /** @var int */ - private $startFrom; - /** @var int */ - private $messageTimeoutMilliseconds; - /** @var bool */ - private $extraStatistics; - /** @var int */ - private $maxRetryCount; - /** @var int */ - private $liveBufferSize; - /** @var int */ - private $bufferSize; - /** @var int */ - private $readBatchSize; - /** @var int */ - private $checkPointAfterMilliseconds; - /** @var int */ - private $minCheckPointCount; - /** @var int */ - private $maxCheckPointCount; - /** @var int */ - private $maxSubscriberCount; - /** @var string */ - private $namedConsumerStrategy; - /** @var bool */ - private $preferRoundRobin; + private bool $resolveLinktos; + private int $startFrom; + private int $messageTimeoutMilliseconds; + private bool $extraStatistics; + private int $maxRetryCount; + private int $liveBufferSize; + private int $bufferSize; + private int $readBatchSize; + private int $checkPointAfterMilliseconds; + private int $minCheckPointCount; + private int $maxCheckPointCount; + private int $maxSubscriberCount; + private string $namedConsumerStrategy; + private bool $preferRoundRobin; private function __construct() { diff --git a/src/PersistentSubscriptions/PersistentSubscriptionConnectionDetails.php b/src/PersistentSubscriptions/PersistentSubscriptionConnectionDetails.php index abd69e01..7ab94408 100644 --- a/src/PersistentSubscriptions/PersistentSubscriptionConnectionDetails.php +++ b/src/PersistentSubscriptions/PersistentSubscriptionConnectionDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,20 +16,13 @@ /** @internal */ final class PersistentSubscriptionConnectionDetails { - /** @var string */ - private $from; - /** @var string */ - private $username; - /** @var float */ - private $averageItemsPerSecond; - /** @var int */ - private $totalItemsProcessed; - /** @var int */ - private $countSinceLastMeasurement; - /** @var int */ - private $availableSlots; - /** @var int */ - private $inFlightMessages; + private string $from; + private string $username; + private float $averageItemsPerSecond; + private int $totalItemsProcessed; + private int $countSinceLastMeasurement; + private int $availableSlots; + private int $inFlightMessages; private function __construct() { diff --git a/src/PersistentSubscriptions/PersistentSubscriptionDetails.php b/src/PersistentSubscriptions/PersistentSubscriptionDetails.php index 449e2c13..60827243 100644 --- a/src/PersistentSubscriptions/PersistentSubscriptionDetails.php +++ b/src/PersistentSubscriptions/PersistentSubscriptionDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,49 +17,33 @@ final class PersistentSubscriptionDetails { /** - * @var PersistentSubscriptionConfigDetails * * Only populated when retrieved via PersistentSubscriptionsManager::describe() method. */ - private $config; + private PersistentSubscriptionConfigDetails $config; /** * @var PersistentSubscriptionConfigDetails[] * * Only populated when retrieved via PersistentSubscriptionsManager::describe() method. */ - private $connections = []; - - /** @var string */ - private $eventStreamId; - /** @var string */ - private $groupName; - /** @var string */ - private $status; - /** @var float */ - private $averageItemsPerSecond; - /** @var int */ - private $totalItemsProcessed; - /** @var int */ - private $countSinceLastMeasurement; - /** @var int */ - private $lastProcessedEventNumber; - /** @var int */ - private $lastKnownEventNumber; - /** @var int */ - private $readBufferCount; - /** @var int */ - private $liveBufferCount; - /** @var int */ - private $retryBufferCount; - /** @var int */ - private $totalInFlightMessages; - /** @var int */ - private $connectionCount; - /** @var string */ - private $parkedMessageUri; - /** @var string */ - private $getMessagesUri; + private array $connections = []; + + private string $eventStreamId; + private string $groupName; + private string $status; + private float $averageItemsPerSecond; + private int $totalItemsProcessed; + private int $countSinceLastMeasurement; + private int $lastProcessedEventNumber; + private int $lastKnownEventNumber; + private int $readBufferCount; + private int $liveBufferCount; + private int $retryBufferCount; + private int $totalInFlightMessages; + private int $connectionCount; + private string $parkedMessageUri; + private string $getMessagesUri; private function __construct() { diff --git a/src/PersistentSubscriptions/PersistentSubscriptionsManager.php b/src/PersistentSubscriptions/PersistentSubscriptionsManager.php index 0d8e7a6f..4ecbf3f4 100644 --- a/src/PersistentSubscriptions/PersistentSubscriptionsManager.php +++ b/src/PersistentSubscriptions/PersistentSubscriptionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Position.php b/src/Position.php index 8e1989dd..4fbf87b0 100644 --- a/src/Position.php +++ b/src/Position.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,10 +20,8 @@ */ class Position { - /** @var int */ - private $commitPosition; - /** @var int */ - private $preparePosition; + private int $commitPosition; + private int $preparePosition; /** @internal */ public function __construct(int $commitPosition, int $preparePosition) diff --git a/src/Projections/ProjectionDetails.php b/src/Projections/ProjectionDetails.php index d795fc21..b3ef0b4e 100644 --- a/src/Projections/ProjectionDetails.php +++ b/src/Projections/ProjectionDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,56 +15,31 @@ final class ProjectionDetails { - /** @var int */ - private $coreProcessingTime; - /** @var int */ - private $version; - /** @var int */ - private $epoch; - /** @var string */ - private $effectiveName; - /** @var int */ - private $writesInProgress; - /** @var int */ - private $readsInProgress; - /** @var int */ - private $partitionsCached; - /** @var string */ - private $status; - /** @var string|null */ - private $stateReason; - /** @var string */ - private $name; - /** @var string */ - private $mode; - /** @var string */ - private $position; - /** @var float */ - private $progress; - /** @var string|null */ - private $lastCheckpoint; - /** @var int */ - private $eventsProcessedAfterRestart; - /** @var string */ - private $statusUrl; - /** @var string */ - private $stateUrl; - /** @var string */ - private $resultUrl; - /** @var string */ - private $queryUrl; - /** @var string */ - private $enableCommandUrl; - /** @var string */ - private $disableCommandUrl; - /** @var string|null */ - private $checkpointStatus; - /** @var int */ - private $bufferedEvents; - /** @var int */ - private $writePendingEventsBeforeCheckpoint; - /** @var int */ - private $writePendingEventsAfterCheckpoint; + private int $coreProcessingTime; + private int $version; + private int $epoch; + private string $effectiveName; + private int $writesInProgress; + private int $readsInProgress; + private int $partitionsCached; + private string $status; + private ?string $stateReason; + private string $name; + private string $mode; + private string $position; + private float $progress; + private ?string $lastCheckpoint; + private int $eventsProcessedAfterRestart; + private string $statusUrl; + private string $stateUrl; + private string $resultUrl; + private string $queryUrl; + private string $enableCommandUrl; + private string $disableCommandUrl; + private ?string $checkpointStatus; + private int $bufferedEvents; + private int $writePendingEventsBeforeCheckpoint; + private int $writePendingEventsAfterCheckpoint; public function __construct( int $coreProcessingTime, diff --git a/src/Projections/ProjectionsManager.php b/src/Projections/ProjectionsManager.php index bc6d31b1..3ef0ed95 100644 --- a/src/Projections/ProjectionsManager.php +++ b/src/Projections/ProjectionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projections/QueryManager.php b/src/Projections/QueryManager.php index 00483650..b27b943f 100644 --- a/src/Projections/QueryManager.php +++ b/src/Projections/QueryManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/RawStreamMetadataResult.php b/src/RawStreamMetadataResult.php index 47df895f..9b2e1742 100644 --- a/src/RawStreamMetadataResult.php +++ b/src/RawStreamMetadataResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,14 +17,10 @@ class RawStreamMetadataResult { - /** @var string */ - private $stream; - /** @var bool */ - private $isStreamDeleted; - /** @var int */ - private $metastreamVersion; - /** @var string */ - private $streamMetadata; + private string $stream; + private bool $isStreamDeleted; + private int $metastreamVersion; + private string $streamMetadata; public function __construct(string $stream, bool $isStreamDeleted, int $metastreamVersion, string $streamMetadata) { diff --git a/src/ReadDirection.php b/src/ReadDirection.php index c456e27c..e767057a 100644 --- a/src/ReadDirection.php +++ b/src/ReadDirection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,8 +25,8 @@ class ReadDirection public const FORWARD = 0; public const BACKWARD = 1; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/RecordedEvent.php b/src/RecordedEvent.php index eac322dc..202a3cb8 100644 --- a/src/RecordedEvent.php +++ b/src/RecordedEvent.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,22 +17,14 @@ class RecordedEvent { - /** @var string */ - protected $eventStreamId; - /** @var int */ - protected $eventNumber; - /** @var EventId */ - protected $eventId; - /** @var string */ - protected $eventType; - /** @var bool */ - protected $isJson; - /** @var string */ - protected $data; - /** @var string */ - protected $metadata; - /** @var DateTimeImmutable */ - protected $created; + protected string $eventStreamId; + protected int $eventNumber; + protected EventId $eventId; + protected string $eventType; + protected bool $isJson; + protected string $data; + protected string $metadata; + protected DateTimeImmutable $created; /** @internal */ public function __construct( diff --git a/src/ResolvedEvent.php b/src/ResolvedEvent.php index 1199a625..0b8c5368 100644 --- a/src/ResolvedEvent.php +++ b/src/ResolvedEvent.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,30 +23,25 @@ class ResolvedEvent implements InternalResolvedEvent /** * If this ResolvedEvent is a link, this will contain the linked event. * If this ResolvedEvent is a simple event without link, the event will be here. - * @var RecordedEvent|null */ - private $event; + private ?RecordedEvent $event; /** * If this ResolvedEvent is a link, this will contain the link. Otherwise it will be empty. - * @var RecordedEvent|null */ - private $link; + private ?RecordedEvent $link; /** * Returns the event that was read or which triggered the subscription. * If this ResolvedEvent is a link, this will contain the link. Otherwise it will be the event. - * @var RecordedEvent|null */ - private $originalEvent; + private ?RecordedEvent $originalEvent; /** * Indicates whether this ResolvedEvent is a resolved link event. - * @var bool */ - private $isResolved; + private bool $isResolved; /** * The logical position of the OriginalEvent - * @var Position|null */ - private $originalPosition; + private ?Position $originalPosition; /** @internal */ public function __construct(?RecordedEvent $event, ?RecordedEvent $link, ?Position $originalPosition) diff --git a/src/SliceReadStatus.php b/src/SliceReadStatus.php index 53e1c7cf..e80a095b 100644 --- a/src/SliceReadStatus.php +++ b/src/SliceReadStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -27,8 +27,8 @@ class SliceReadStatus public const STREAM_NOT_FOUND = 1; public const STREAM_DELETED = 2; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/StreamAcl.php b/src/StreamAcl.php index 2fbd5b78..72853dbb 100644 --- a/src/StreamAcl.php +++ b/src/StreamAcl.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,31 +22,31 @@ class StreamAcl * Roles and users permitted to read the stream * @var string[] */ - private $readRoles; + private array $readRoles; /** * Roles and users permitted to write to the stream * @var string[] */ - private $writeRoles; + private array $writeRoles; /** * Roles and users permitted to delete the stream * @var string[] */ - private $deleteRoles; + private array $deleteRoles; /** * Roles and users permitted to read stream metadata * @var string[] */ - private $metaReadRoles; + private array $metaReadRoles; /** * Roles and users permitted to write stream metadata * @var string[] */ - private $metaWriteRoles; + private array $metaWriteRoles; public function __construct( array $readRoles = [], diff --git a/src/StreamEventsSlice.php b/src/StreamEventsSlice.php index 7fcfc209..071fd15a 100644 --- a/src/StreamEventsSlice.php +++ b/src/StreamEventsSlice.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,22 +15,15 @@ class StreamEventsSlice { - /** @var SliceReadStatus */ - private $status; - /** @var string */ - private $stream; - /** @var int */ - private $fromEventNumber; - /** @var ReadDirection */ - private $readDirection; + private SliceReadStatus $status; + private string $stream; + private int $fromEventNumber; + private ReadDirection $readDirection; /** @var ResolvedEvent[] */ - private $events; - /** @var int */ - private $nextEventNumber; - /** @var int */ - private $lastEventNumber; - /** @var bool */ - private $isEndOfStream; + private array $events; + private int $nextEventNumber; + private int $lastEventNumber; + private bool $isEndOfStream; /** @internal */ public function __construct( diff --git a/src/StreamMetadata.php b/src/StreamMetadata.php index 532a1c48..99f5220f 100644 --- a/src/StreamMetadata.php +++ b/src/StreamMetadata.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,40 +23,34 @@ class StreamMetadata implements JsonSerializable { /** * The maximum number of events allowed in the stream. - * @var int|null */ - private $maxCount; + private ?int $maxCount; /** * The maximum age in seconds for events allowed in the stream. - * @var int|null */ - private $maxAge; + private ?int $maxAge; /** * The event number from which previous events can be scavenged. * This is used to implement soft-deletion of streams. - * @var int|null */ - private $truncateBefore; + private ?int $truncateBefore; /** * The amount of time in seconds for which the stream head is cachable. - * @var int|null */ - private $cacheControl; + private ?int $cacheControl; /** * The access control list for the stream. - * @var StreamAcl|null */ - private $acl; + private ?StreamAcl $acl; /** * key => value pairs of custom metadata - * @var array */ - private $customMetadata; + private array $customMetadata; public function __construct( ?int $maxCount = null, diff --git a/src/StreamMetadataBuilder.php b/src/StreamMetadataBuilder.php index 6c23a619..acee7555 100644 --- a/src/StreamMetadataBuilder.php +++ b/src/StreamMetadataBuilder.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,18 +25,12 @@ class StreamMetadataBuilder private $truncateBefore; /** @var int|null*/ private $cacheControl; - /** @var array */ - private $aclRead; - /** @var array */ - private $aclWrite; - /** @var array */ - private $aclDelete; - /** @var array */ - private $aclMetaRead; - /** @var array */ - private $aclMetaWrite; - /** @var array */ - private $customMetadata; + private array $aclRead; + private array $aclWrite; + private array $aclDelete; + private array $aclMetaRead; + private array $aclMetaWrite; + private array $customMetadata; public function __construct( ?int $maxCount = null, diff --git a/src/StreamMetadataResult.php b/src/StreamMetadataResult.php index 8da34b06..e7a8b3fc 100644 --- a/src/StreamMetadataResult.php +++ b/src/StreamMetadataResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,14 +17,10 @@ class StreamMetadataResult { - /** @var string */ - private $stream; - /** @var bool */ - private $isStreamDeleted; - /** @var int */ - private $metastreamVersion; - /** @var StreamMetadata */ - private $streamMetadata; + private string $stream; + private bool $isStreamDeleted; + private int $metastreamVersion; + private StreamMetadata $streamMetadata; /** @internal */ public function __construct( diff --git a/src/StreamPosition.php b/src/StreamPosition.php index d812f601..99c2c1ba 100644 --- a/src/StreamPosition.php +++ b/src/StreamPosition.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/SubscriptionDropReason.php b/src/SubscriptionDropReason.php index 110f62b5..41030b64 100644 --- a/src/SubscriptionDropReason.php +++ b/src/SubscriptionDropReason.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -47,8 +47,8 @@ class SubscriptionDropReason public const UNKNOWN = 100; public const NOT_FOUND = 11; - private $name; - private $value; + private string $name; + private int $value; private function __construct(string $name) { diff --git a/src/SubscriptionDropped.php b/src/SubscriptionDropped.php index 6b596e08..623aafa4 100644 --- a/src/SubscriptionDropped.php +++ b/src/SubscriptionDropped.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/SystemSettings.php b/src/SystemSettings.php index f14cf1ec..573dc681 100644 --- a/src/SystemSettings.php +++ b/src/SystemSettings.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,15 +22,13 @@ class SystemSettings implements JsonSerializable { /** * Default access control list for new user streams. - * @var StreamAcl|null */ - private $userStreamAcl; + private ?StreamAcl $userStreamAcl; /** * Default access control list for new system streams. - * @var StreamAcl|null */ - private $systemStreamAcl; + private ?StreamAcl $systemStreamAcl; public static function default(): SystemSettings { diff --git a/src/Transport/Http/EndpointExtensions.php b/src/Transport/Http/EndpointExtensions.php index 61521717..ba83ed99 100644 --- a/src/Transport/Http/EndpointExtensions.php +++ b/src/Transport/Http/EndpointExtensions.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Transport/Http/HttpMethod.php b/src/Transport/Http/HttpMethod.php index 8da0f4cd..3d48260c 100644 --- a/src/Transport/Http/HttpMethod.php +++ b/src/Transport/Http/HttpMethod.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Transport/Http/HttpStatusCode.php b/src/Transport/Http/HttpStatusCode.php index 3762a1bd..a299b383 100644 --- a/src/Transport/Http/HttpStatusCode.php +++ b/src/Transport/Http/HttpStatusCode.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/UserCredentials.php b/src/UserCredentials.php index cd182c60..11fd0533 100644 --- a/src/UserCredentials.php +++ b/src/UserCredentials.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,10 +17,8 @@ class UserCredentials { - /** @var string */ - private $username; - /** @var string */ - private $password; + private string $username; + private string $password; public function __construct(string $username, string $password) { diff --git a/src/UserManagement/ChangePasswordDetails.php b/src/UserManagement/ChangePasswordDetails.php index 8a5a8e35..e268c1f1 100644 --- a/src/UserManagement/ChangePasswordDetails.php +++ b/src/UserManagement/ChangePasswordDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,10 +19,8 @@ /** @internal */ class ChangePasswordDetails implements JsonSerializable { - /** @var string */ - private $currentPassword; - /** @var string */ - private $newPassword; + private string $currentPassword; + private string $newPassword; public function __construct(string $currentPassword, string $newPassword) { diff --git a/src/UserManagement/RelLink.php b/src/UserManagement/RelLink.php index df1d64d6..6659f1ab 100644 --- a/src/UserManagement/RelLink.php +++ b/src/UserManagement/RelLink.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,10 +15,8 @@ class RelLink { - /** @var string */ - private $href; - /** @var string */ - private $rel; + private string $href; + private string $rel; public function __construct(string $href, string $rel) { diff --git a/src/UserManagement/ResetPasswordDetails.php b/src/UserManagement/ResetPasswordDetails.php index c1320b16..8389245e 100644 --- a/src/UserManagement/ResetPasswordDetails.php +++ b/src/UserManagement/ResetPasswordDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,8 +19,7 @@ /** @internal */ class ResetPasswordDetails implements JsonSerializable { - /** @var string */ - private $newPassword; + private string $newPassword; public function __construct(string $newPassword) { diff --git a/src/UserManagement/UserCreationInformation.php b/src/UserManagement/UserCreationInformation.php index 38af18d3..dd8d67a3 100644 --- a/src/UserManagement/UserCreationInformation.php +++ b/src/UserManagement/UserCreationInformation.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,14 +18,11 @@ final class UserCreationInformation implements JsonSerializable { - /** @var string */ - private $loginName; - /** @var string */ - private $fullName; + private string $loginName; + private string $fullName; /** @var string[] */ - private $groups; - /** @var string */ - private $password; + private array $groups; + private string $password; public function __construct(string $loginName, string $fullName, array $groups, string $password) { diff --git a/src/UserManagement/UserDetails.php b/src/UserManagement/UserDetails.php index 0177ab65..37dfd2f5 100644 --- a/src/UserManagement/UserDetails.php +++ b/src/UserManagement/UserDetails.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,18 +20,14 @@ /** @internal */ final class UserDetails { - /** @var string */ - private $loginName; - /** @var string */ - private $fullName; + private string $loginName; + private string $fullName; /** @var string[] */ - private $groups = []; - /** @var DateTimeImmutable */ - private $dateLastUpdated; - /** @var bool */ - private $disabled; + private array $groups = []; + private DateTimeImmutable $dateLastUpdated; + private bool $disabled; /** @var RelLink[] */ - private $links = []; + private array $links = []; private function __construct() { diff --git a/src/UserManagement/UserUpdateInformation.php b/src/UserManagement/UserUpdateInformation.php index 9a10b8d9..55dc9370 100644 --- a/src/UserManagement/UserUpdateInformation.php +++ b/src/UserManagement/UserUpdateInformation.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,10 +19,9 @@ /** @internal */ class UserUpdateInformation implements JsonSerializable { - /** @var string */ - private $fullName; + private string $fullName; /** @var string[] */ - private $groups; + private array $groups; public function __construct(string $fullName, array $groups) { diff --git a/src/UserManagement/UsersManager.php b/src/UserManagement/UsersManager.php index abcbb155..dd60af6f 100644 --- a/src/UserManagement/UsersManager.php +++ b/src/UserManagement/UsersManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Util/DateTime.php b/src/Util/DateTime.php index 029d8745..b0b93aff 100644 --- a/src/Util/DateTime.php +++ b/src/Util/DateTime.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Util/Guid.php b/src/Util/Guid.php index 68d19cee..9f8646ae 100644 --- a/src/Util/Guid.php +++ b/src/Util/Guid.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,8 +19,7 @@ class Guid { - /** @var UuidFactory */ - private static $factory; + private UuidFactory $factory; public static function generate(): UuidInterface { diff --git a/src/Util/Json.php b/src/Util/Json.php index 5447145c..861283b5 100644 --- a/src/Util/Json.php +++ b/src/Util/Json.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/WriteResult.php b/src/WriteResult.php index 7377f94e..a922d1f0 100644 --- a/src/WriteResult.php +++ b/src/WriteResult.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2019 Alexander Miertsch - * (c) 2015-2019 Sascha-Oliver Prolic + * (c) 2014-2020 Alexander Miertsch + * (c) 2015-2020 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,10 +15,8 @@ class WriteResult { - /** @var int */ - private $nextExpectedVersion; - /** @var Position */ - private $logPosition; + private int $nextExpectedVersion; + private Position $logPosition; public function __construct(int $nextExpectedVersion, Position $logPosition) {