diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b0ff73e..d8cef7c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1215,26 +1215,11 @@ parameters: count: 1 path: src/PubNub/Endpoints/MessageCount.php - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:channels\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:channels\\(\\) has parameter \\$channel with no type specified\\.$#" count: 1 path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:count\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:count\\(\\) has parameter \\$count with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:createResponse\\(\\) has invalid return type PubNub\\\\Endpoints\\\\MessagePersistance\\\\PNPublishResult\\.$#" count: 1 @@ -1250,66 +1235,6 @@ parameters: count: 1 path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:end\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:end\\(\\) has parameter \\$end with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeMessageActions\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeMessageActions\\(\\) has parameter \\$includeMessageActions with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeMessageType\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeMessageType\\(\\) has parameter \\$includeMessageType with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeMeta\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeMeta\\(\\) has parameter \\$includeMeta with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:includeUuid\\(\\) has parameter \\$includeUuid with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:start\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:start\\(\\) has parameter \\$start with no type specified\\.$#" - count: 1 - path: src/PubNub/Endpoints/MessagePersistance/FetchMessages.php - - message: "#^Method PubNub\\\\Endpoints\\\\MessagePersistance\\\\FetchMessages\\:\\:validateParams\\(\\) has no return type specified\\.$#" count: 1 @@ -3370,26 +3295,6 @@ parameters: count: 1 path: src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php - - - message: "#^Method PubNub\\\\Models\\\\Consumer\\\\MessagePersistence\\\\PNFetchMessagesItemResult\\:\\:setActions\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php - - - - message: "#^Method PubNub\\\\Models\\\\Consumer\\\\MessagePersistence\\\\PNFetchMessagesItemResult\\:\\:setMessageType\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php - - - - message: "#^Method PubNub\\\\Models\\\\Consumer\\\\MessagePersistence\\\\PNFetchMessagesItemResult\\:\\:setMetadata\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php - - - - message: "#^Method PubNub\\\\Models\\\\Consumer\\\\MessagePersistence\\\\PNFetchMessagesItemResult\\:\\:setUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php - - message: "#^Unsafe usage of new static\\(\\)\\.$#" count: 1 @@ -5100,546 +5005,6 @@ parameters: count: 1 path: tests/PubNubTestCase.php - - - message: "#^Method PubNubFeatures\\\\PubNubContext\\:\\:after\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/PubNubFeatures/PubNubContext.php - - - - message: "#^Method PubNubFeatures\\\\PubNubContext\\:\\:before\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/PubNubFeatures/PubNubContext.php - - - - message: "#^Access to an undefined property AccessManagerContext\\:\\:\\$error\\.$#" - count: 11 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Access to an undefined property AccessManagerContext\\:\\:\\$result\\.$#" - count: 3 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Call to method ttl\\(\\) on an unknown class PubNubFeatures\\\\Access\\\\GrantToken\\.$#" - count: 2 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:aToken\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:anErrorIsReturned\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:denyResourcePermissionGet\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionDelete\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionGet\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionJoin\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionManage\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionRead\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionUpdate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantPatternPermissionWrite\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionDelete\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionGet\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionJoin\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionManage\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionRead\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionUpdate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:grantResourcePermissionWrite\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iAttemptToGrantATokenSpecifyingThosePermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iGetConfirmationThatTokenHasBeenRevoked\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iGrantATokenSpecifyingThosePermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iHaveAKeysetWithAccessManagerEnabled\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iHaveAKnownTokenContainingAnAuthorizedUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iHaveAKnownTokenContainingUuidPatternPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iHaveAKnownTokenContainingUuidResourcePermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iParseTheToken\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:iRevokeAToken\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theAuthorizedUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theAuthorizedUuid\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelGroupPatternAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelGroupPatternAccessPermissions\\(\\) has parameter \\$channelGroup with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelGroupResourceAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelGroupResourceAccessPermissions\\(\\) has parameter \\$channelGroup with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelPatternAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelPatternAccessPermissions\\(\\) has parameter \\$channel with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelResourceAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theChannelResourceAccessPermissions\\(\\) has parameter \\$channel with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailLocationIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailLocationIs\\(\\) has parameter \\$detailLocation with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailLocationTypeIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailLocationTypeIs\\(\\) has parameter \\$detailLocationType with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailMessageIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailMessageIs\\(\\) has parameter \\$detailMessage with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorDetailMessageIsNotEmpty\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorMessageIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorMessageIs\\(\\) has parameter \\$errorMessage with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorServiceIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorServiceIs\\(\\) has parameter \\$service with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorSourceIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorSourceIs\\(\\) has parameter \\$source with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorStatusCodeIs\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theErrorStatusCodeIs\\(\\) has parameter \\$statusCode with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theParsedTokenOutputContainsTheAuthorizedUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theParsedTokenOutputContainsTheAuthorizedUuid\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenContainsTheAuthorizedUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenContainsTheAuthorizedUuid\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenContainsTheTtl\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenContainsTheTtl\\(\\) has parameter \\$ttl with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenDoesNotContainAnAuthorizedUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelGroupPatternAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelGroupPatternAccessPermissions\\(\\) has parameter \\$channelGroup with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelGroupResourceAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelGroupResourceAccessPermissions\\(\\) has parameter \\$channelGroup with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelPatternAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelPatternAccessPermissions\\(\\) has parameter \\$channel with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelResourceAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasChannelResourceAccessPermissions\\(\\) has parameter \\$channel with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasUuidPatternAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasUuidPatternAccessPermissions\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasUuidResourceAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenHasUuidResourceAccessPermissions\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenString\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTokenString\\(\\) has parameter \\$token with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTtl\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theTtl\\(\\) has parameter \\$ttl with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theUuidPatternAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theUuidPatternAccessPermissions\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theUuidResourceAccessPermissions\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:theUuidResourceAccessPermissions\\(\\) has parameter \\$uuid with no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionDelete\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionGet\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionJoin\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionManage\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionRead\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionUpdate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenPatternPermissionWrite\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionDelete\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionGet\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionJoin\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionManage\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionRead\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionUpdate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method AccessManagerContext\\:\\:tokenResourcePermissionWrite\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^PHPDoc tag @var contains unknown class PubNubFeatures\\\\Access\\\\GrantToken\\.$#" - count: 2 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$context has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$origin has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$pattern has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$pnConfig has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$pubnub has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$resource has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Property AccessManagerContext\\:\\:\\$token has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/AccessManagerContext.php - - - - message: "#^Method TimeContext\\:\\:iReceiveSuccessfulResponse\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/TimeContext.php - - - - message: "#^Method TimeContext\\:\\:iRequestCurrentTime\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/features/bootstrap/TimeContext.php - - - - message: "#^Property TimeContext\\:\\:\\$response has no type specified\\.$#" - count: 1 - path: tests/features/bootstrap/TimeContext.php - - message: "#^Method Tests\\\\Functional\\\\AddChannelToChannelGroupExposed\\:\\:buildParams\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -8130,11 +7495,6 @@ parameters: count: 1 path: tests/integrational/SubscribeSignalTest.php - - - message: "#^Call to an undefined method Tests\\\\Integrational\\\\PublishThread\\:\\:start\\(\\)\\.$#" - count: 1 - path: tests/integrational/SubscribeTest.php - - message: "#^Class Tests\\\\Integrational\\\\PublishThread constructor invoked with 2 parameters, 1 required\\.$#" count: 1 diff --git a/src/PubNub/Endpoints/History.php b/src/PubNub/Endpoints/History.php index b3149e9..4b262a1 100644 --- a/src/PubNub/Endpoints/History.php +++ b/src/PubNub/Endpoints/History.php @@ -100,10 +100,10 @@ public function includeTimetoken($includeTimetoken) } /** - * @param bool $includeTimetoken + * @param bool $includeCustomMessageType * @return $this */ - public function includeCustomMessageType($includeCustomMessageType) + public function includeCustomMessageType(bool $includeCustomMessageType) { $this->includeCustomMessageType = $includeCustomMessageType; diff --git a/src/PubNub/Endpoints/MessagePersistance/FetchMessages.php b/src/PubNub/Endpoints/MessagePersistance/FetchMessages.php index 90c2ae6..27d8223 100644 --- a/src/PubNub/Endpoints/MessagePersistance/FetchMessages.php +++ b/src/PubNub/Endpoints/MessagePersistance/FetchMessages.php @@ -45,7 +45,7 @@ class FetchMessages extends Endpoint 'includeCustomMessageType' => 'include_custom_message_type', ]; - public function channels(...$channel) + public function channels(...$channel): self { if (is_array($channel[0])) { $this->channels = $channel[0]; @@ -57,49 +57,49 @@ public function channels(...$channel) return $this; } - public function start($start) + public function start(int $start): self { $this->start = $start; return $this; } - public function end($end) + public function end(int $end): self { $this->end = $end; return $this; } - public function count($count) + public function count(int $count): self { $this->count = $count; return $this; } - public function includeMeta($includeMeta) + public function includeMeta(bool $includeMeta): self { $this->includeMeta = $includeMeta; return $this; } - public function includeUuid($includeUuid) + public function includeUuid(bool $includeUuid): self { $this->includeUuid = $includeUuid; return $this; } - public function includeMessageType($includeMessageType) + public function includeMessageType(bool $includeMessageType): self { $this->includeMessageType = $includeMessageType; return $this; } - public function includeCustomMessageType($includeCustomMessageType) + public function includeCustomMessageType(bool $includeCustomMessageType): self { $this->includeCustomMessageType = $includeCustomMessageType; return $this; } - public function includeMessageActions($includeMessageActions) + public function includeMessageActions(bool $includeMessageActions): self { $this->includeMessageActions = $includeMessageActions; return $this; @@ -125,6 +125,7 @@ protected function customParams() { $params = []; foreach ($this->customParamMapping as $customParam => $requestParam) { + // @phpstan-ignore-next-line if (isset($this->$customParam) && !is_null($this->$customParam)) { if (strpos($customParam, 'include') === 0) { $params[$requestParam] = $this->$customParam ? 'true' : 'false'; diff --git a/src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php b/src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php index 1514d4e..7ea0b0e 100644 --- a/src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php +++ b/src/PubNub/Models/Consumer/MessagePersistence/PNFetchMessagesItemResult.php @@ -19,31 +19,31 @@ public function __construct(mixed $message, string $timetoken) $this->timetoken = $timetoken; } - public function setMetadata(mixed $metadata) + public function setMetadata(mixed $metadata): self { $this->metadata = $metadata; return $this; } - public function setActions(mixed $actions) + public function setActions(mixed $actions): self { $this->actions = $actions; return $this; } - public function setUuid(string $uuid) + public function setUuid(string $uuid): self { $this->uuid = $uuid; return $this; } - public function setMessageType(string $messageType) + public function setMessageType(string $messageType): self { $this->messageType = $messageType; return $this; } - public function setCustomMessageType(string $customMessageType) + public function setCustomMessageType(string $customMessageType): self { $this->customMessageType = $customMessageType; return $this; diff --git a/tests/Acceptance/CustomMessageType/CustomMessageTypeContext.php b/tests/Acceptance/CustomMessageType/CustomMessageTypeContext.php index 5d1990f..dcd0b92 100644 --- a/tests/Acceptance/CustomMessageType/CustomMessageTypeContext.php +++ b/tests/Acceptance/CustomMessageType/CustomMessageTypeContext.php @@ -29,7 +29,7 @@ class CustomMessageTypeContext extends PubNubContext implements Context private PubNub $pubnub; private PNConfiguration $config; private string $channelName; - private $response; + private mixed $response; public function __construct() @@ -40,7 +40,7 @@ public function __construct() /** * @Given the demo keyset */ - public function theDemoKeyset() + public function theDemoKeyset(): void { $this->config->setOrigin("localhost:8090") ->setSecure(false) @@ -53,7 +53,7 @@ public function theDemoKeyset() /** * @Given the demo keyset with enabled storage */ - public function theDemoKeysetWithEnabledStorage() + public function theDemoKeysetWithEnabledStorage(): void { $this->config->setOrigin("localhost:8090") ->setSecure(false) @@ -66,7 +66,7 @@ public function theDemoKeysetWithEnabledStorage() /** * @When I fetch message history for :channelName channel */ - public function iFetchMessageHistoryForChannel($channelName) + public function iFetchMessageHistoryForChannel(string $channelName): void { $this->channelName = $channelName; try { @@ -81,7 +81,7 @@ public function iFetchMessageHistoryForChannel($channelName) /** * @When I fetch message history with :attribute set to :value for :channelName channel */ - public function iFetchMessageHistoryWithSetToForChannel($attribute, $value, $channelName) + public function iFetchMessageHistoryWithSetToForChannel(string $attribute, string $value, string $channelName): void { $this->channelName = $channelName; $builder = $this->pubnub->fetchMessages()->channels($this->channelName); @@ -98,7 +98,7 @@ public function iFetchMessageHistoryWithSetToForChannel($attribute, $value, $cha /** * @Then history response contains messages with :messageType1 and :messageType2 message types */ - public function historyResponseContainsMessagesWithAndMessageTypes($messageType1, $messageType2) + public function historyResponseContainsMessagesWithAndMessageTypes(string $messageType1, string $messageType2): void { $messages = $this->response->getChannels()[$this->channelName]; assert((int)$messages[0]->getMessageType() === (int)$messageType1); @@ -106,19 +106,19 @@ public function historyResponseContainsMessagesWithAndMessageTypes($messageType1 } /** - * @Then history response contains messages with :customMessageType1 and :customMessageType2 types + * @Then history response contains messages with :customType1 and :customType2 types */ - public function historyResponseContainsMessagesWithAndTypes($customMessageType1, $customMessageType2) + public function historyResponseContainsMessagesWithAndTypes(string $customType1, string $customType2): void { $messages = $this->response->getChannels()[$this->channelName]; - assert($messages[0]->getCustomMessageType() === $customMessageType1); - assert($messages[1]->getCustomMessageType() === $customMessageType2); + assert($messages[0]->getCustomMessageType() === $customType1); + assert($messages[1]->getCustomMessageType() === $customType2); } /** * @Then history response contains messages without customMessageType */ - public function historyResponseContainsMessagesWithoutCustommessagetype() + public function historyResponseContainsMessagesWithoutCustommessagetype(): void { foreach ($this->response->getChannels()[$this->channelName] as $message) { assert(is_null($message->getCustomMessageType())); @@ -128,7 +128,7 @@ public function historyResponseContainsMessagesWithoutCustommessagetype() /** * @When I publish message with :customMessageType customMessageType */ - public function iPublishMessageWithCustommessagetype($customMessageType) + public function iPublishMessageWithCustommessagetype(string $customMessageType): void { try { $this->response = $this->pubnub->publish() @@ -144,7 +144,7 @@ public function iPublishMessageWithCustommessagetype($customMessageType) /** * @Then I receive a successful response */ - public function iReceiveASuccessfulResponse() + public function iReceiveASuccessfulResponse(): void { assert($this->response instanceof PNPublishResult || $this->response instanceof PNSignalResult || $this->response instanceof PNFetchMessagesResult); @@ -153,7 +153,7 @@ public function iReceiveASuccessfulResponse() /** * @Then I receive an error response */ - public function iReceiveAnErrorResponse() + public function iReceiveAnErrorResponse(): void { assert($this->response instanceof PubNubServerException); } @@ -161,7 +161,7 @@ public function iReceiveAnErrorResponse() /** * @When I send a signal with :customMessageType customMessageType */ - public function iSendASignalWithCustommessagetype($customMessageType) + public function iSendASignalWithCustommessagetype(string $customMessageType): void { try { $this->response = $this->pubnub->signal() diff --git a/tests/Acceptance/PubNubContext.php b/tests/Acceptance/PubNubContext.php index baa2d0f..b8c7b4e 100644 --- a/tests/Acceptance/PubNubContext.php +++ b/tests/Acceptance/PubNubContext.php @@ -8,7 +8,7 @@ class PubNubContext { /** @BeforeScenario */ - public function before(BeforeScenarioScope $scope) + public function before(BeforeScenarioScope $scope): void { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); @@ -23,7 +23,7 @@ public function before(BeforeScenarioScope $scope) } /** @AfterScenario */ - public function after(AfterScenarioScope $scope) + public function after(AfterScenarioScope $scope): void { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 7bb69b5..3400bd9 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,7 +11,7 @@ //phpcs:ignore PSR1.Classes.ClassDeclaration class Thread { - public function start() + public function start(): void { } }