src/Micrometa/Infrastructure/Factory/ProfiledNamesFactory.php
protected static function createProfiledNameFromObject($arg, &$profile)
    {
        // If the name is invalid
        if (!isset($arg->name)) {
            throw new InvalidArgumentException(
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME_STR,
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME
            );
        }

        if (isset($arg->profile)) {
            $profile = trim($arg->profile) ?: null;
        }

        return self::createProfiledNameFromString($arg->name, $profile);
    }
protected static function createProfiledNameFromObject($arg, &$profile)
    {
        // If the name is invalid
        if (!isset($arg->name)) {
            throw new InvalidArgumentException(
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME_STR,
                InvalidArgumentException::INVALID_TYPE_PROPERTY_NAME
            );
        }

        if (isset($arg->profile)) {
            $profile = trim($arg->profile) ?: null;
        }

        return self::createProfiledNameFromString($arg->name, $profile);
    }
protected static function createProfiledNameFromObject ( $ arg , & $ profile ) { // If the name is invalid if ( ! isset ( $ arg -> name ) ) { throw new InvalidArgumentException ( InvalidArgumentException :: INVALID_TYPE_PROPERTY_NAME_STR , InvalidArgumentException :: INVALID_TYPE_PROPERTY_NAME ) ; } if ( isset ( $ arg -> profile ) ) { $ profile = trim ( $ arg -> profile ) ? : null ; } return self :: createProfiledNameFromString ( $ arg -> name , $ profile ) ; }
Create a profiled name from an object argument

@param \stdClass $arg               Object argument
@param string|boolean|null $profile Profile

@return \stdClass Profiled name
@throws InvalidArgumentException If the name is missing
Create a profiled name from an object argument