Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Composer run action PHPUnit
uses: MayMeowHQ/composer-run-action@v1
uses: MayMeowHQ/composer-run-action@v4
with:
composer_script: 'test'


codesniffer:
cs-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Composer run action PHPC_CS
uses: MayMeowHQ/composer-run-action@v1
uses: MayMeowHQ/composer-run-action@v4
with:
composer_script: 'codesniffer'
composer_script: 'cs-check'

stan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Composer run action PHPStan
uses: MayMeowHQ/composer-run-action@v1
uses: MayMeowHQ/composer-run-action@v4
with:
composer_script: 'stan'

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
],
"require": {
"php": "7.4.*"
"php": "8.0.*",
"ext-openssl": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand All @@ -27,7 +28,7 @@
},
"scripts": {
"test": "phpunit tests",
"codesniffer": "phpcs --standard=PSR2 src",
"cs-check": "phpcs --standard=PSR2 src",
"stan": "phpstan analyse"
}
}
53 changes: 27 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker/devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/maymeow/php-ci-cd/php-ci-cd:7.4.16-cs-1
FROM ghcr.io/maymeow/php-ci-cd/php-ci-cd:8.0.11-cs

# arguments in docker-compose file
ARG user=vscode
Expand Down
6 changes: 2 additions & 4 deletions src/RSACryptoServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,10 @@ public function getFingerPrint(string $publicKey = null) : string
}

/**
* Returns RSA Parameters private key
*
* @return resource|string
* @return \OpenSSLAsymmetricKey|string
* @throws Exceptions\DecryptPrivateKeyException
*/
private function getPrivateKey()
private function getPrivateKey() : \OpenSSLAsymmetricKey|string
{
return $this->parameters->getPrivateKey();
}
Expand Down
4 changes: 2 additions & 2 deletions src/RSAParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public function generateKeys(?string $passphrase = null, ?array $configArgs = nu
}

/**
* @return resource|string
* @return string|\OpenSSLAsymmetricKey
* @throws DecryptPrivateKeyException
*/
public function getPrivateKey()
public function getPrivateKey() : \OpenSSLAsymmetricKey|string
{
if ($this->passphrase != null && $this->privateKey != null) {
$privateKeyResource = openssl_pkey_get_private($this->privateKey, $this->passphrase);
Expand Down