Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 - Fixed implicitly nullable parameter issue in BaseMessage Model #207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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
Loading