Skip to content

Commit

Permalink
Fixed implicitly nullable parameter issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexscott64 committed Dec 18, 2024
1 parent 420f97d commit 32a4c13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/BaseMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function fromJSON( $json, $keepOriginal = false ) {
* @param stdClass $obj Message-like object
* @param CipherParams|null $cipherParams
*/
public static function fromEncoded( $obj, CipherParams $cipherParams = null ) {
public static function fromEncoded( $obj, ?CipherParams $cipherParams = null ) {
$class = get_called_class();

$msg = new $class();
Expand All @@ -138,7 +138,7 @@ public static function fromEncoded( $obj, CipherParams $cipherParams = null ) {
* @param array $objs Array of Message-Like objects
* @param CipherParams|null $cipherParams
*/
public static function fromEncodedArray( $objs, CipherParams $cipherParams = null ) {
public static function fromEncodedArray( $objs, ?CipherParams $cipherParams = null ) {
return array_map(
function( $obj ) use ($cipherParams) { return static::fromEncoded($obj, $cipherParams); },
$objs
Expand Down

0 comments on commit 32a4c13

Please sign in to comment.