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

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

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

@param SectionUpdateStruct|ValueObject $value

@return SectionUpdateData

@throws InvalidArgumentException
Maps given SectionUpdateStruct object to a SectionUpdateData object .