@@ -152,7 +152,7 @@ public static function parseKey(array $jwk): ?Key
152
152
* @param string $oid the OID string
153
153
* @return string the binary DER-encoded OID
154
154
*/
155
- private static function encodeOID ($ oid )
155
+ private static function encodeOID (string $ oid ): string
156
156
{
157
157
$ octets = explode ('. ' , $ oid );
158
158
@@ -229,7 +229,7 @@ private static function ecJwkToPem($oid, $x, $y)
229
229
* @param string $value the value to encode
230
230
* @return string the encoded object
231
231
*/
232
- private static function encodeDER ($ type , $ value )
232
+ private static function encodeDER (int $ type , string $ value ): string
233
233
{
234
234
$ tag_header = 0 ;
235
235
if ($ type === self ::$ asn1Sequence ) {
@@ -255,7 +255,7 @@ private static function encodeDER($type, $value)
255
255
*
256
256
* @uses encodeLength
257
257
*/
258
- private static function createPemFromModulusAndExponent ($ n , $ e )
258
+ private static function createPemFromModulusAndExponent (string $ n , string $ e ): string
259
259
{
260
260
$ modulus = JWT ::urlsafeB64Decode ($ n );
261
261
$ publicExponent = JWT ::urlsafeB64Decode ($ e );
@@ -301,7 +301,7 @@ private static function createPemFromModulusAndExponent($n, $e)
301
301
* @param int $length
302
302
* @return string
303
303
*/
304
- private static function encodeLength ($ length )
304
+ private static function encodeLength (int $ length ): string
305
305
{
306
306
if ($ length <= 0x7F ) {
307
307
return \chr ($ length );
0 commit comments