MailPoet\EmailEditor\Validator\Schema
One_Of_Schema::nullable()
Sets the schema as nullable.
Method of the class: One_Of_Schema{}
No Hooks.
Return
null
. Nothing (null).
Usage
$One_Of_Schema = new One_Of_Schema(); $One_Of_Schema->nullable(): self;
One_Of_Schema::nullable() One Of Schema::nullable code WC 9.8.1
public function nullable(): self { $null = array( 'type' => 'null' ); $one_of = $this->schema['oneOf']; $value = in_array( $null, $one_of, true ) ? $one_of : array_merge( $one_of, array( $null ) ); return $this->update_schema_property( 'oneOf', $value ); }