] ?? null; if ( ! $this->order instanceof Order ) { $this->order = null; } $this->bn_code = (string) ( $data['bn_code'] ?? '' ); $this->insufficient_funding_tries = (int) ( $data['insufficient_funding_tries'] ?? '' ); $this->funding_source = $data['funding_source'] ?? null; if ( ! is_string( $this->funding_source ) ) { $this->funding_source = null; } $this->checkout_form = $data['checkout_form'] ?? array(); } /** * Converts given SessionHandler object into an array. * * @param SessionHandler $obj The object to convert. * @return array */ private static function make_array( SessionHandler $obj ): array { return array( 'order' => $obj->order, 'bn_code' => $obj->bn_code, 'insufficient_funding_tries' => $obj->insufficient_funding_tries, 'funding_source' => $obj->funding_source, 'checkout_form' => $obj->checkout_form, ); } }