Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove scalar typehint from AmazonSES constructor #43

Merged
merged 2 commits into from Aug 17, 2020

Conversation

stevecoug
Copy link
Collaborator

Closes #42

@@ -134,7 +134,7 @@ public function setSignatureVersion($signatureVersion)
* @param bool $verifyHost
* @param LoggerInterface|null $logger
*/
public function __construct($accessKey = null, $secretKey = null, $host = self::AWS_US_EAST_1, $verifyPeer = true, $verifyHost = true, LoggerInterface $logger = null, string $signatureVersion = SimpleEmailService::REQUEST_SIGNATURE_V4)
public function __construct($accessKey = null, $secretKey = null, $host = self::AWS_US_EAST_1, $verifyPeer = true, $verifyHost = true, LoggerInterface $logger = null, string $signatureVersion = 'v4')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was talking about scalar type hinting.

Can you please remove string in front of parameter?

public function __construct(. . . . . . .  string $signatureVersion = 'v4')
{
}

I think it should be like

public function __construct(. . . . . . .  $signatureVersion = SimpleEmailService::REQUEST_SIGNATURE_V4)           // <----- removed string as string is scalar type
{
}

For constant I think you can keep the constant as it was before.

  • Also it would be great if phpdoc block is updated.

@shahariaazam shahariaazam added bug and removed bug labels Aug 17, 2020
@shahariaazam shahariaazam merged commit 96a129e into master Aug 17, 2020
@shahariaazam
Copy link
Collaborator

Seems OK. Going to approve this. Thanks @stevecoug for your time. Much appreciated.

@shahariaazam shahariaazam deleted the sm/fix-scalar-typehint/issue-42 branch August 17, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backward Compatibility - Scalar type hinting is supported only from PHP >= 7.0
2 participants