src/Converter/MappingConverter.php
public function convert($item)
    {
        foreach ($this->mappings as $mapping) {
            if (!empty($mapping['from']) && !empty($mapping['to'])) {
                $item = Vale::set($item, $mapping['to'], Vale::get($item, $mapping['from']));
                if ($mapping['remove']) {
                    $item = Vale::remove($item, $mapping['from']);
                }
            } elseif (!empty($mapping['to'])) {
                $item = Vale::set([], $mapping['to'], $item);
            } elseif (!empty($mapping['from'])) {
                $item = Vale::get($item, $mapping['from']);
            }
        }

        return $item;
    }
public function convert($item)
    {
        foreach ($this->mappings as $mapping) {
            if (!empty($mapping['from']) && !empty($mapping['to'])) {
                $item = Vale::set($item, $mapping['to'], Vale::get($item, $mapping['from']));
                if ($mapping['remove']) {
                    $item = Vale::remove($item, $mapping['from']);
                }
            } elseif (!empty($mapping['to'])) {
                $item = Vale::set([], $mapping['to'], $item);
            } elseif (!empty($mapping['from'])) {
                $item = Vale::get($item, $mapping['from']);
            }
        }

        return $item;
    }
@param mixed $item

@return mixed