Automattic\WooCommerce\Vendor\GraphQL\Utils
PhpDoc::nonEmptyOrNull
Method of the class: PhpDoc{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = PhpDoc::nonEmptyOrNull( $maybeEmptyString ): ?string;
- $maybeEmptyString(string) (required)
- .
PhpDoc::nonEmptyOrNull() PhpDoc::nonEmptyOrNull code WC 10.9.1
protected static function nonEmptyOrNull(string $maybeEmptyString): ?string
{
$trimmed = trim($maybeEmptyString);
return $trimmed === ''
? null
: $trimmed;
}