src/Micrometa/Infrastructure/Factory/ProfiledNamesFactory.php
protected static function createProfiledNameFromString($name, $profile)
    {
        // If the name is invalid
        if (!strlen(trim($name))) {
            throw new InvalidArgumentException(
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME_STR,
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME
            );
        }

        return (object)[
            'name'    => trim($name),
            'profile' => trim($profile) ?: null,
        ];
    }
protected static function createProfiledNameFromString($name, $profile)
    {
        // If the name is invalid
        if (!strlen(trim($name))) {
            throw new InvalidArgumentException(
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME_STR,
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME
            );
        }

        return (object)[
            'name'    => trim($name),
            'profile' => trim($profile) ?: null,
        ];
    }
protected static function createProfiledNameFromString ( $ name , $ profile ) { // If the name is invalid if ( ! strlen ( trim ( $ name ) ) ) { throw new InvalidArgumentException ( InvalidArgumentException :: INVALID_TYPE_PROPERTY_NAME_STR , InvalidArgumentException :: INVALID_TYPE_PROPERTY_NAME ) ; } return ( object ) [ 'name' => trim ( $ name ) , 'profile' => trim ( $ profile ) ? : null , ] ; }
Create a profiled name from string arguments

@param string $name                 Name
@param string|boolean|null $profile Profile

@return \stdClass Profiled name
@throws InvalidArgumentException If the name is invalid
Create a profiled name from string arguments