public function map(ValueObject $value): SectionCreateData
    {
        if (!$value instanceof SectionCreateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . SectionCreateStruct::class);
        }

        return new SectionCreateData($value->identifier, $value->name);
    }
public function map(ValueObject $value): SectionCreateData
    {
        if (!$value instanceof SectionCreateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . SectionCreateStruct::class);
        }

        return new SectionCreateData($value->identifier, $value->name);
    }
public function map ( ValueObject $ value ) : SectionCreateData { if ( ! $ value instanceof SectionCreateStruct ) { throw new InvalidArgumentException ( 'value' , 'must be an instance of ' . SectionCreateStruct :: class ) ; } return new SectionCreateData ( $ value -> identifier , $ value -> name ) ; }
Maps given SectionCreateStruct object to a SectionCreateData object.

@param SectionCreateStruct|ValueObject $value

@return SectionCreateData

@throws InvalidArgumentException
Maps given SectionCreateStruct object to a SectionCreateData object .