Skip to content
Merged
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
13 changes: 2 additions & 11 deletions src/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@

class Key
{
/** @var string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate */
private $keyMaterial;
/** @var string */
private $algorithm;

/**
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial
* @param string $algorithm
*/
public function __construct(
$keyMaterial,
string $algorithm
private $keyMaterial,
private string $algorithm
) {
if (
!\is_string($keyMaterial)
Expand All @@ -38,10 +33,6 @@ public function __construct(
if (empty($algorithm)) {
throw new InvalidArgumentException('Algorithm must not be empty');
}

// TODO: Remove in PHP 8.0 in favor of class constructor property promotion
$this->keyMaterial = $keyMaterial;
$this->algorithm = $algorithm;
}

/**
Expand Down
Loading