CS adjustments

This commit is contained in:
terrafrost 2024-08-03 11:11:29 -05:00
parent 10075ea57e
commit 42ecb34430
61 changed files with 240 additions and 240 deletions

View File

@ -30,14 +30,14 @@ abstract class AsymmetricKey
/**
* Precomputed Zero
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected static $zero;
/**
* Precomputed One
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected static $one;
@ -51,14 +51,14 @@ abstract class AsymmetricKey
/**
* Hash function
*
* @var \phpseclib3\Crypt\Hash
* @var Hash
*/
protected $hash;
/**
* HMAC function
*
* @var \phpseclib3\Crypt\Hash
* @var Hash
*/
private $hmac;
@ -130,7 +130,7 @@ abstract class AsymmetricKey
*
* @param string $key
* @param string $password optional
* @return \phpseclib3\Crypt\Common\PublicKey|\phpseclib3\Crypt\Common\PrivateKey
* @return PublicKey|PrivateKey
*/
public static function load($key, $password = false)
{
@ -531,7 +531,7 @@ abstract class AsymmetricKey
/**
* Integer to Octet String
*
* @param \phpseclib3\Math\BigInteger $v
* @param BigInteger $v
* @return string
*/
private function int2octets($v)
@ -551,7 +551,7 @@ abstract class AsymmetricKey
* Bit String to Integer
*
* @param string $in
* @return \phpseclib3\Math\BigInteger
* @return BigInteger
*/
protected function bits2int($in)
{

View File

@ -697,7 +697,7 @@ abstract class PKCS8 extends PKCS
$decoded = self::preParse($key);
$r = ASN1::asn1map($decoded[0], ASN1\Maps\EncryptedPrivateKeyInfo::MAP);
$r = ASN1::asn1map($decoded[0], Maps\EncryptedPrivateKeyInfo::MAP);
if (!is_array($r)) {
throw new \RuntimeException('Unable to parse using EncryptedPrivateKeyInfo map');
}
@ -707,7 +707,7 @@ abstract class PKCS8 extends PKCS
if (!$decoded) {
throw new \RuntimeException('Unable to decode BER');
}
$r['encryptionAlgorithm']['parameters'] = ASN1::asn1map($decoded[0], ASN1\Maps\PBES2params::MAP);
$r['encryptionAlgorithm']['parameters'] = ASN1::asn1map($decoded[0], Maps\PBES2params::MAP);
$kdf = &$r['encryptionAlgorithm']['parameters']['keyDerivationFunc'];
switch ($kdf['algorithm']) {

View File

@ -49,8 +49,8 @@ abstract class Raw
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @param BigInteger $r
* @param BigInteger $s
* @return string
*/
public static function save(BigInteger $r, BigInteger $s)

View File

@ -35,7 +35,7 @@ abstract class StreamCipher extends SymmetricKey
* Default Constructor.
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
* @return \phpseclib3\Crypt\Common\StreamCipher
* @return StreamCipher
*/
public function __construct()
{

View File

@ -1079,7 +1079,7 @@ abstract class SymmetricKey
*
* @see self::setPassword()
* @param int $n
* @param \phpseclib3\Crypt\Hash $hashObj
* @param Hash $hashObj
* @param string $i
* @param string $d
* @param int $count

View File

@ -49,7 +49,7 @@ abstract class DH extends AsymmetricKey
/**
* DH prime
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $prime;
@ -58,14 +58,14 @@ abstract class DH extends AsymmetricKey
*
* Prime divisor of p-1
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $base;
/**
* Public Key
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $publicKey;
@ -243,7 +243,7 @@ abstract class DH extends AsymmetricKey
*
* @param Parameters $params
* @param int $length optional
* @return DH\PrivateKey
* @return PrivateKey
*/
public static function createKey(Parameters $params, $length = 0)
{

View File

@ -89,10 +89,10 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $prime
* @param \phpseclib3\Math\BigInteger $base
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Math\BigInteger $publicKey
* @param BigInteger $prime
* @param BigInteger $base
* @param BigInteger $privateKey
* @param BigInteger $publicKey
* @param string $password optional
* @param array $options optional
* @return string
@ -112,9 +112,9 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $prime
* @param \phpseclib3\Math\BigInteger $base
* @param \phpseclib3\Math\BigInteger $publicKey
* @param BigInteger $prime
* @param BigInteger $base
* @param BigInteger $publicKey
* @param array $options optional
* @return string
*/

View File

@ -40,7 +40,7 @@ final class PrivateKey extends DH
/**
* Returns the public key
*
* @return DH\PublicKey
* @return PublicKey
*/
public function getPublicKey()
{

View File

@ -53,7 +53,7 @@ abstract class DSA extends AsymmetricKey
/**
* DSA Prime P
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $p;
@ -62,21 +62,21 @@ abstract class DSA extends AsymmetricKey
*
* Prime divisor of p-1
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $q;
/**
* DSA Group Generator G
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $g;
/**
* DSA public key value y
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $y;
@ -99,7 +99,7 @@ abstract class DSA extends AsymmetricKey
*
* @param int $L
* @param int $N
* @return \phpseclib3\Crypt\DSA|bool
* @return DSA|bool
*/
public static function createParameters($L = 2048, $N = 224)
{
@ -179,7 +179,7 @@ abstract class DSA extends AsymmetricKey
* Returns the private key, from which the publickey can be extracted
*
* @param int[] ...$args
* @return DSA\PrivateKey
* @return PrivateKey
*/
public static function createKey(...$args)
{

View File

@ -65,10 +65,10 @@ abstract class OpenSSH extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param array $options optional
* @return string
*/
@ -99,11 +99,11 @@ abstract class OpenSSH extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param \phpseclib3\Math\BigInteger $x
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param BigInteger $x
* @param string $password optional
* @param array $options optional
* @return string

View File

@ -77,9 +77,9 @@ abstract class PKCS1 extends Progenitor
/**
* Convert DSA parameters to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @return string
*/
public static function saveParameters(BigInteger $p, BigInteger $q, BigInteger $g)
@ -100,11 +100,11 @@ abstract class PKCS1 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param \phpseclib3\Math\BigInteger $x
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param BigInteger $x
* @param string $password optional
* @param array $options optional
* @return string
@ -128,10 +128,10 @@ abstract class PKCS1 extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @return string
*/
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)

View File

@ -99,11 +99,11 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param \phpseclib3\Math\BigInteger $x
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param BigInteger $x
* @param string $password optional
* @param array $options optional
* @return string
@ -124,10 +124,10 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param array $options optional
* @return string
*/

View File

@ -68,11 +68,11 @@ abstract class PuTTY extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param \phpseclib3\Math\BigInteger $x
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param BigInteger $x
* @param string $password optional
* @param array $options optional
* @return string
@ -92,10 +92,10 @@ abstract class PuTTY extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @return string
*/
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)

View File

@ -56,11 +56,11 @@ abstract class Raw
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param \phpseclib3\Math\BigInteger $x
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @param BigInteger $x
* @param string $password optional
* @return string
*/
@ -72,10 +72,10 @@ abstract class Raw
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @return string
*/
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)

View File

@ -114,10 +114,10 @@ abstract class XML
*
* See https://www.w3.org/TR/xmldsig-core/#sec-DSAKeyValue
*
* @param \phpseclib3\Math\BigInteger $p
* @param \phpseclib3\Math\BigInteger $q
* @param \phpseclib3\Math\BigInteger $g
* @param \phpseclib3\Math\BigInteger $y
* @param BigInteger $p
* @param BigInteger $q
* @param BigInteger $g
* @param BigInteger $y
* @return string
*/
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)

View File

@ -51,8 +51,8 @@ abstract class ASN1
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @param BigInteger $r
* @param BigInteger $s
* @return string
*/
public static function save(BigInteger $r, BigInteger $s)

View File

@ -55,8 +55,8 @@ abstract class SSH2
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @param BigInteger $r
* @param BigInteger $s
* @return string
*/
public static function save(BigInteger $r, BigInteger $s)

View File

@ -28,7 +28,7 @@ final class PrivateKey extends DSA implements Common\PrivateKey
/**
* DSA secret exponent x
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $x;

View File

@ -70,7 +70,7 @@ abstract class EC extends AsymmetricKey
/**
* Curve
*
* @var \phpseclib3\Crypt\EC\BaseCurves\Base
* @var EC\BaseCurves\Base
*/
protected $curve;
@ -100,7 +100,7 @@ abstract class EC extends AsymmetricKey
*
* Used for deterministic ECDSA
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $q;
@ -112,7 +112,7 @@ abstract class EC extends AsymmetricKey
* public key. But the x is different depending on which side of the equal sign
* you're on. It's less ambiguous if you do dA * base point = (x, y)-coordinate.
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $x;
@ -134,7 +134,7 @@ abstract class EC extends AsymmetricKey
* Create public / private key pair.
*
* @param string $curve
* @return \phpseclib3\Crypt\EC\PrivateKey
* @return PrivateKey
*/
public static function createKey($curve)
{

View File

@ -32,7 +32,7 @@ abstract class Base
/**
* Finite Field Integer factory
*
* @var \phpseclib3\Math\FiniteField\Integer
* @var FiniteField\Integer
*/
protected $factory;
@ -47,7 +47,7 @@ abstract class Base
}
/**
* Converts a BigInteger to a \phpseclib3\Math\FiniteField\Integer integer
* Converts a BigInteger to a FiniteField\Integer integer
*
* @return object
*/
@ -147,7 +147,7 @@ abstract class Base
/**
* Returns the Order
*
* @return \phpseclib3\Math\BigInteger
* @return BigInteger
*/
public function getOrder()
{

View File

@ -35,7 +35,7 @@ class Binary extends Base
/**
* Binary Field Integer factory
*
* @var \phpseclib3\Math\BinaryField
* @var BinaryField
*/
protected $factory;
@ -305,7 +305,7 @@ class Binary extends Base
/**
* Returns the modulo
*
* @return \phpseclib3\Math\BigInteger
* @return BigInteger
*/
public function getModulo()
{

View File

@ -39,7 +39,7 @@ class Montgomery extends Base
/**
* Prime Field Integer factory
*
* @var \phpseclib3\Math\PrimeField
* @var PrimeField
*/
protected $factory;

View File

@ -483,7 +483,7 @@ class Prime extends Base
/**
* Returns the modulo
*
* @return \phpseclib3\Math\BigInteger
* @return BigInteger
*/
public function getModulo()
{
@ -493,7 +493,7 @@ class Prime extends Base
/**
* Returns the a coefficient
*
* @return \phpseclib3\Math\PrimeField\Integer
* @return PrimeInteger
*/
public function getA()
{
@ -503,7 +503,7 @@ class Prime extends Base
/**
* Returns the a coefficient
*
* @return \phpseclib3\Math\PrimeField\Integer
* @return PrimeInteger
*/
public function getB()
{

View File

@ -133,7 +133,7 @@ class TwistedEdwards extends Base
/**
* Returns the a coefficient
*
* @return \phpseclib3\Math\PrimeField\Integer
* @return PrimeInteger
*/
public function getA()
{
@ -143,7 +143,7 @@ class TwistedEdwards extends Base
/**
* Returns the a coefficient
*
* @return \phpseclib3\Math\PrimeField\Integer
* @return PrimeInteger
*/
public function getD()
{
@ -171,7 +171,7 @@ class TwistedEdwards extends Base
/**
* Returns the affine point
*
* @return \phpseclib3\Math\PrimeField\Integer[]
* @return PrimeField\Integer[]
*/
public function convertToAffine(array $p)
{
@ -189,7 +189,7 @@ class TwistedEdwards extends Base
/**
* Returns the modulo
*
* @return \phpseclib3\Math\BigInteger
* @return BigInteger
*/
public function getModulo()
{

View File

@ -183,7 +183,7 @@ trait Common
* If the key contains an implicit curve phpseclib needs the curve
* to be explicitly provided
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
*/
public static function setImplicitCurve(BaseCurve $curve)
{
@ -195,7 +195,7 @@ trait Common
* on the curve parameters
*
* @param array $params
* @return \phpseclib3\Crypt\EC\BaseCurves\Base|false
* @return BaseCurve|false
*/
protected static function loadCurveByParam(array $params)
{
@ -269,7 +269,7 @@ trait Common
* Supports both compressed and uncompressed points
*
* @param string $str
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @return object[]
*/
public static function extractPoint($str, BaseCurve $curve)
@ -335,7 +335,7 @@ trait Common
* Encode Parameters
*
* @todo Maybe at some point this could be moved to __toString() for each of the curves?
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param bool $returnArray optional
* @param array $options optional
* @return string|false

View File

@ -130,7 +130,7 @@ abstract class JWK extends Progenitor
/**
* Return the array superstructure for an EC public key
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @return array
*/
@ -155,7 +155,7 @@ abstract class JWK extends Progenitor
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param array $options optional
* @return string
@ -170,8 +170,8 @@ abstract class JWK extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
* @param BigInteger $privateKey
* @param Ed25519 $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional

View File

@ -71,7 +71,7 @@ abstract class MontgomeryPrivate
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve
* @param MontgomeryCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @return string
*/
@ -83,8 +83,8 @@ abstract class MontgomeryPrivate
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve
* @param BigInteger $privateKey
* @param MontgomeryCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional

View File

@ -60,7 +60,7 @@ abstract class MontgomeryPublic
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve
* @param MontgomeryCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @return string
*/

View File

@ -134,7 +134,7 @@ abstract class OpenSSH extends Progenitor
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param array $options optional
* @return string
@ -171,8 +171,8 @@ abstract class OpenSSH extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
* @param BigInteger $privateKey
* @param Ed25519 $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional

View File

@ -162,8 +162,8 @@ abstract class PKCS1 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BigInteger $privateKey
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional

View File

@ -161,7 +161,7 @@ abstract class PKCS8 extends Progenitor
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param array $options optional
* @return string
@ -192,8 +192,8 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BigInteger $privateKey
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional

View File

@ -84,8 +84,8 @@ abstract class PuTTY extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BigInteger $privateKey
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional
@ -121,7 +121,7 @@ abstract class PuTTY extends Progenitor
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField[] $publicKey
* @return string
*/

View File

@ -171,7 +171,7 @@ abstract class XML
* Extract points from an XML document
*
* @param \DOMXPath $xpath
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @return object[]
*/
private static function extractPointRFC4050(\DOMXPath $xpath, BaseCurve $curve)
@ -199,7 +199,7 @@ abstract class XML
* on the curve parameters
*
* @param \DomXPath $xpath
* @return \phpseclib3\Crypt\EC\BaseCurves\Base|false
* @return BaseCurve|false
*/
private static function loadCurveByParam(\DOMXPath $xpath)
{
@ -279,7 +279,7 @@ abstract class XML
* on the curve parameters
*
* @param \DomXPath $xpath
* @return \phpseclib3\Crypt\EC\BaseCurves\Base|false
* @return BaseCurve|false
*/
private static function loadCurveByParamRFC4050(\DOMXPath $xpath)
{
@ -366,7 +366,7 @@ abstract class XML
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param array $options optional
* @return string
@ -407,7 +407,7 @@ abstract class XML
/**
* Encode Parameters
*
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
* @param BaseCurve $curve
* @param string $pre
* @param array $options optional
* @return string|false

View File

@ -81,7 +81,7 @@ abstract class libsodium
/**
* Convert an EC public key to the appropriate format
*
* @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
* @param Ed25519 $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @return string
*/
@ -93,8 +93,8 @@ abstract class libsodium
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $privateKey
* @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve
* @param BigInteger $privateKey
* @param Ed25519 $curve
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
* @param string $secret optional
* @param string $password optional

View File

@ -51,8 +51,8 @@ abstract class ASN1
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @param BigInteger $r
* @param BigInteger $s
* @return string
*/
public static function save(BigInteger $r, BigInteger $s)

View File

@ -52,8 +52,8 @@ abstract class IEEE
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @param BigInteger $r
* @param BigInteger $s
* @param string $curve
* @param int $length
* @return string

View File

@ -66,8 +66,8 @@ abstract class SSH2
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @param BigInteger $r
* @param BigInteger $s
* @param string $curve
* @return string
*/

View File

@ -159,7 +159,7 @@ class Hash
* umac cipher object
*
* @see self::hash()
* @var \phpseclib3\Crypt\AES
* @var AES
*/
private $c;

View File

@ -10,7 +10,7 @@
* <?php
* include 'vendor/autoload.php';
*
* $private = \phpseclib3\Crypt\RSA::createKey();
* $private = Crypt\RSA::createKey();
* $public = $private->getPublicKey();
*
* $plaintext = 'terrafrost';
@ -26,7 +26,7 @@
* <?php
* include 'vendor/autoload.php';
*
* $private = \phpseclib3\Crypt\RSA::createKey();
* $private = Crypt\RSA::createKey();
* $public = $private->getPublicKey();
*
* $plaintext = 'terrafrost';
@ -180,7 +180,7 @@ abstract class RSA extends AsymmetricKey
/**
* Hash function for the Mask Generation Function
*
* @var \phpseclib3\Crypt\Hash
* @var Hash
*/
protected $mgfHash;
@ -194,21 +194,21 @@ abstract class RSA extends AsymmetricKey
/**
* Modulus (ie. n)
*
* @var \phpseclib3\Math\BigInteger
* @var Math\BigInteger
*/
protected $modulus;
/**
* Modulus length
*
* @var \phpseclib3\Math\BigInteger
* @var Math\BigInteger
*/
protected $k;
/**
* Exponent (ie. e or d)
*
* @var \phpseclib3\Math\BigInteger
* @var Math\BigInteger
*/
protected $exponent;
@ -252,7 +252,7 @@ abstract class RSA extends AsymmetricKey
/**
* Public Exponent
*
* @var \phpseclib3\Math\BigInteger
* @var Math\BigInteger
*/
protected $publicExponent;
@ -297,7 +297,7 @@ abstract class RSA extends AsymmetricKey
*
* The public key can be extracted from the private key
*
* @return RSA\PrivateKey
* @return PrivateKey
* @param int $bits
*/
public static function createKey($bits = 2048)
@ -510,7 +510,7 @@ abstract class RSA extends AsymmetricKey
*
* See {@link http://tools.ietf.org/html/rfc3447#section-4.1 RFC3447#section-4.1}.
*
* @param bool|\phpseclib3\Math\BigInteger $x
* @param bool|Math\BigInteger $x
* @param int $xLen
* @return bool|string
*/
@ -532,7 +532,7 @@ abstract class RSA extends AsymmetricKey
* See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}.
*
* @param string $x
* @return \phpseclib3\Math\BigInteger
* @return Math\BigInteger
*/
protected function os2ip($x)
{
@ -703,7 +703,7 @@ abstract class RSA extends AsymmetricKey
{
$new = clone $this;
// \phpseclib3\Crypt\Hash supports algorithms that PKCS#1 doesn't support. md5-96 and sha1-96, for example.
// Crypt\Hash supports algorithms that PKCS#1 doesn't support. md5-96 and sha1-96, for example.
switch (strtolower($hash)) {
case 'md2':
case 'md5':
@ -738,7 +738,7 @@ abstract class RSA extends AsymmetricKey
{
$new = clone $this;
// \phpseclib3\Crypt\Hash supports algorithms that PKCS#1 doesn't support. md5-96 and sha1-96, for example.
// Crypt\Hash supports algorithms that PKCS#1 doesn't support. md5-96 and sha1-96, for example.
switch (strtolower($hash)) {
case 'md2':
case 'md5':

View File

@ -90,9 +90,9 @@ abstract class JWK extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -124,8 +124,8 @@ abstract class JWK extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @param array $options optional
* @return string
*/

View File

@ -174,9 +174,9 @@ abstract class MSBLOB
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -211,8 +211,8 @@ abstract class MSBLOB
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @return string
*/
public static function savePublicKey(BigInteger $n, BigInteger $e)

View File

@ -90,8 +90,8 @@ abstract class OpenSSH extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @param array $options optional
* @return string
*/
@ -112,9 +112,9 @@ abstract class OpenSSH extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients

View File

@ -102,9 +102,9 @@ abstract class PKCS1 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -142,8 +142,8 @@ abstract class PKCS1 extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @return string
*/
public static function savePublicKey(BigInteger $n, BigInteger $e)

View File

@ -88,9 +88,9 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -108,8 +108,8 @@ abstract class PKCS8 extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @param array $options optional
* @return string
*/

View File

@ -154,9 +154,9 @@ abstract class PSS extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -177,8 +177,8 @@ abstract class PSS extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @param array $options optional
* @return string
*/

View File

@ -85,9 +85,9 @@ abstract class PuTTY extends Progenitor
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -110,8 +110,8 @@ abstract class PuTTY extends Progenitor
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @return string
*/
public static function savePublicKey(BigInteger $n, BigInteger $e)

View File

@ -138,9 +138,9 @@ abstract class Raw
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -173,8 +173,8 @@ abstract class Raw
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @return array
*/
public static function savePublicKey(BigInteger $n, BigInteger $e)

View File

@ -123,9 +123,9 @@ abstract class XML
/**
* Convert a private key to the appropriate format.
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param \phpseclib3\Math\BigInteger $d
* @param BigInteger $n
* @param BigInteger $e
* @param BigInteger $d
* @param array $primes
* @param array $exponents
* @param array $coefficients
@ -157,8 +157,8 @@ abstract class XML
/**
* Convert a public key to the appropriate format
*
* @param \phpseclib3\Math\BigInteger $n
* @param \phpseclib3\Math\BigInteger $e
* @param BigInteger $n
* @param BigInteger $e
* @return string
*/
public static function savePublicKey(BigInteger $n, BigInteger $e)

View File

@ -51,7 +51,7 @@ final class PrivateKey extends RSA implements Common\PrivateKey
/**
* Private Exponent
*
* @var \phpseclib3\Math\BigInteger
* @var BigInteger
*/
protected $privateExponent;
@ -60,7 +60,7 @@ final class PrivateKey extends RSA implements Common\PrivateKey
*
* See {@link http://tools.ietf.org/html/rfc3447#section-5.1.2 RFC3447#section-5.1.2}.
*
* @return bool|\phpseclib3\Math\BigInteger
* @return bool|BigInteger
*/
private function rsadp(BigInteger $c)
{
@ -75,7 +75,7 @@ final class PrivateKey extends RSA implements Common\PrivateKey
*
* See {@link http://tools.ietf.org/html/rfc3447#section-5.2.1 RFC3447#section-5.2.1}.
*
* @return bool|\phpseclib3\Math\BigInteger
* @return bool|BigInteger
*/
private function rsasp1(BigInteger $m)
{
@ -88,8 +88,8 @@ final class PrivateKey extends RSA implements Common\PrivateKey
/**
* Exponentiate
*
* @param \phpseclib3\Math\BigInteger $x
* @return \phpseclib3\Math\BigInteger
* @param BigInteger $x
* @return BigInteger
*/
protected function exponentiate(BigInteger $x)
{
@ -169,10 +169,10 @@ final class PrivateKey extends RSA implements Common\PrivateKey
* Protects against timing attacks by employing RSA Blinding.
* Returns $x->modPow($this->exponents[$i], $this->primes[$i])
*
* @param \phpseclib3\Math\BigInteger $x
* @param \phpseclib3\Math\BigInteger $r
* @param BigInteger $x
* @param BigInteger $r
* @param int $i
* @return \phpseclib3\Math\BigInteger
* @return BigInteger
*/
private function blind(BigInteger $x, BigInteger $r, $i)
{

View File

@ -35,8 +35,8 @@ final class PublicKey extends RSA implements Common\PublicKey
/**
* Exponentiate
*
* @param \phpseclib3\Math\BigInteger $x
* @return \phpseclib3\Math\BigInteger
* @param BigInteger $x
* @return BigInteger
*/
private function exponentiate(BigInteger $x)
{
@ -48,8 +48,8 @@ final class PublicKey extends RSA implements Common\PublicKey
*
* See {@link http://tools.ietf.org/html/rfc3447#section-5.2.2 RFC3447#section-5.2.2}.
*
* @param \phpseclib3\Math\BigInteger $s
* @return bool|\phpseclib3\Math\BigInteger
* @param BigInteger $s
* @return bool|BigInteger
*/
private function rsavp1($s)
{
@ -405,8 +405,8 @@ final class PublicKey extends RSA implements Common\PublicKey
*
* See {@link http://tools.ietf.org/html/rfc3447#section-5.1.1 RFC3447#section-5.1.1}.
*
* @param \phpseclib3\Math\BigInteger $m
* @return bool|\phpseclib3\Math\BigInteger
* @param BigInteger $m
* @return bool|BigInteger
*/
private function rsaep($m)
{

View File

@ -140,7 +140,7 @@ class ANSI
/**
* Default Constructor.
*
* @return \phpseclib3\File\ANSI
* @return ANSI
*/
public function __construct()
{

View File

@ -34,7 +34,7 @@ class Element
* Constructor
*
* @param string $encoded
* @return \phpseclib3\File\ASN1\Element
* @return Element
*/
public function __construct($encoded)
{

View File

@ -272,7 +272,7 @@ class X509
/**
* Default Constructor.
*
* @return \phpseclib3\File\X509
* @return X509
*/
public function __construct()
{
@ -1390,7 +1390,7 @@ class X509
* @param string $signatureAlgorithm
* @param string $signature
* @param string $signatureSubject
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
* @throws UnsupportedAlgorithmException if the algorithm is unsupported
* @return bool
*/
private function validateSignatureHelper($publicKeyAlgorithm, $publicKey, $signatureAlgorithm, $signature, $signatureSubject)
@ -2972,7 +2972,7 @@ class X509
* Identify signature algorithm from key settings
*
* @param PrivateKey $key
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
* @throws UnsupportedAlgorithmException if the algorithm is unsupported
* @return array
*/
private static function identifySignatureAlgorithm(PrivateKey $key)

View File

@ -162,7 +162,7 @@ class BigInteger implements \JsonSerializable
* If the second parameter - $base - is negative, then it will be assumed that the number's are encoded using
* two's compliment. The sole exception to this is -10, which is treated the same as 10 is.
*
* @param string|int|BigInteger\Engines\Engine $x Base-10 number or base-$base number if $base set.
* @param string|int|Engine $x Base-10 number or base-$base number if $base set.
* @param int $base
*/
public function __construct($x = 0, $base = 10)
@ -171,7 +171,7 @@ class BigInteger implements \JsonSerializable
if ($x instanceof self::$mainEngine) {
$this->value = clone $x;
} elseif ($x instanceof BigInteger\Engines\Engine) {
} elseif ($x instanceof Engine) {
$this->value = new static("$x");
$this->value->setPrecision($x->getPrecision());
} else {

View File

@ -2101,7 +2101,7 @@ class SFTP extends SSH2
* @param callable|null $progressCallback
* @throws \UnexpectedValueException on receipt of unexpected packets
* @throws \BadFunctionCallException if you're uploading via a callback and the callback function is invalid
* @throws \phpseclib3\Exception\FileNotFoundException if you're uploading via a file and the file doesn't exist
* @throws FileNotFoundException if you're uploading via a file and the file doesn't exist
* @return bool
*/
public function put($remote_file, $data, $mode = self::SOURCE_STRING, $start = -1, $local_start = -1, $progressCallback = null)

View File

@ -1523,7 +1523,7 @@ class SSH2
* @param string|bool $kexinit_payload_server optional
* @throws \UnexpectedValueException on receipt of unexpected packets
* @throws \RuntimeException on other errors
* @throws \phpseclib3\Exception\NoSupportedAlgorithmsException when none of the algorithms phpseclib has loaded are compatible
* @throws NoSupportedAlgorithmsException when none of the algorithms phpseclib has loaded are compatible
*/
private function key_exchange($kexinit_payload_server = false)
{
@ -2576,7 +2576,7 @@ class SSH2
* Login with an ssh-agent provided key
*
* @param string $username
* @param \phpseclib3\System\SSH\Agent $agent
* @param Agent $agent
* @return bool
*/
private function ssh_agent_login($username, Agent $agent)
@ -2601,7 +2601,7 @@ class SSH2
* by sending dummy SSH_MSG_IGNORE messages.}
*
* @param string $username
* @param \phpseclib3\Crypt\Common\PrivateKey $privatekey
* @param PrivateKey $privatekey
* @return bool
* @throws \RuntimeException on connection error
*/
@ -5171,7 +5171,7 @@ class SSH2
*
* @return string|false
* @throws \RuntimeException on badly formatted keys
* @throws \phpseclib3\Exception\NoSupportedAlgorithmsException when the key isn't in a supported format
* @throws NoSupportedAlgorithmsException when the key isn't in a supported format
*/
public function getServerPublicHostKey()
{

View File

@ -111,8 +111,8 @@ class Agent
/**
* Default Constructor
*
* @return \phpseclib3\System\SSH\Agent
* @throws \phpseclib3\Exception\BadConfigurationException if SSH_AUTH_SOCK cannot be found
* @return Agent
* @throws BadConfigurationException if SSH_AUTH_SOCK cannot be found
* @throws \RuntimeException on connection errors
*/
public function __construct($address = null)
@ -237,7 +237,7 @@ class Agent
/**
* Request agent forwarding of remote server
*
* @param \phpseclib3\Net\SSH2 $ssh
* @param SSH2 $ssh
* @return bool
*/
private function request_forwarding(SSH2 $ssh)
@ -258,7 +258,7 @@ class Agent
* open to give the SSH Agent an opportunity
* to take further action. i.e. request agent forwarding
*
* @param \phpseclib3\Net\SSH2 $ssh
* @param SSH2 $ssh
*/
public function registerChannelOpen(SSH2 $ssh)
{

View File

@ -113,7 +113,7 @@ class Identity implements PrivateKey
*
* Called by \phpseclib3\System\SSH\Agent::requestIdentities()
*
* @param \phpseclib3\Crypt\Common\PublicKey $key
* @param PublicKey $key
*/
public function withPublicKey(PublicKey $key)
{
@ -267,7 +267,7 @@ class Identity implements PrivateKey
* @param string $message
* @return string
* @throws \RuntimeException on connection errors
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
* @throws UnsupportedAlgorithmException if the algorithm is unsupported
*/
public function sign($message)
{

View File

@ -140,7 +140,7 @@ class SSH2UnitTest extends PhpseclibTestCase
public function testGetConnectionByResourceId()
{
$ssh = new SSH2('localhost');
$this->assertSame($ssh, \phpseclib3\Net\SSH2::getConnectionByResourceId($ssh->getResourceId()));
$this->assertSame($ssh, SSH2::getConnectionByResourceId($ssh->getResourceId()));
}
public function testGetResourceId()
@ -384,7 +384,7 @@ class SSH2UnitTest extends PhpseclibTestCase
}
/**
* @return \phpseclib3\Net\SSH2
* @return SSH2
*/
protected function createSSHMock()
{

View File

@ -1,12 +1,12 @@
<?php
/** @var iterable<SplFileInfo> $files */
$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(__DIR__));
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__));
foreach ($files as $file) {
if ($file->getExtension() === 'php' && $file->getPathname() !== __FILE__) {
$fileContents = file_get_contents($file->getPathname());
if ($fileContents === false) {
throw new \RuntimeException('file_get_contents() failed: ' . $file->getPathname());
throw new RuntimeException('file_get_contents() failed: ' . $file->getPathname());
}
$patternToReplacementMap = [
'~ function setUpBeforeClass\(\)~' => ' function setUpBeforeClass(): void',
@ -25,7 +25,7 @@ foreach ($files as $file) {
$fileContents
);
if (file_put_contents($file->getPathname(), $updatedFileContents) === false) {
throw new \RuntimeException('file_put_contents() failed: ' . $file->getPathname());
throw new RuntimeException('file_put_contents() failed: ' . $file->getPathname());
}
}
}

View File

@ -1,12 +1,12 @@
<?php
/** @var iterable<SplFileInfo> $files */
$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(__DIR__));
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__));
foreach ($files as $file) {
if ($file->getExtension() === 'php' && $file->getPathname() !== __FILE__) {
$fileContents = file_get_contents($file->getPathname());
if ($fileContents === false) {
throw new \RuntimeException('file_get_contents() failed: ' . $file->getPathname());
throw new RuntimeException('file_get_contents() failed: ' . $file->getPathname());
}
$patternToReplacementMap = [
'~ function assertMatchesRegularExpression\(\$pattern, \$string, \$message = \'\'\)~' => ' function _assertMatchesRegularExpression(string $pattern, string $string, string $message = \'\')',
@ -17,7 +17,7 @@ foreach ($files as $file) {
$fileContents
);
if (file_put_contents($file->getPathname(), $updatedFileContents) === false) {
throw new \RuntimeException('file_put_contents() failed: ' . $file->getPathname());
throw new RuntimeException('file_put_contents() failed: ' . $file->getPathname());
}
}
}