protected function transform(DocumentInterface $document, $entity, $skip = null)
    {
        $entityMethods = get_class_methods($entity);
        $documentMethods = get_class_methods($document);
        if ($skip === null) {
            $skip = $this->getCopySkipFields();
        }

        foreach ($entityMethods as $method) {
            if (strpos($method, 'get') !== 0) {
                continue;
            }
            $property = substr($method, 3);
            if (in_array(lcfirst($property), $skip)) {
                continue;
            }
            $setter = 'set' . $property;
            if (in_array($setter, $documentMethods)) {
                $document->{$setter}($entity->{$method}());
            }
        }
    }