@param ReflectionProperty $property

@return string
777724
private static function determineRequestFieldName(ReflectionProperty $property): string
    {
        $fieldName = ModelUtil::camelCaseToSnakeCase($property->getName());

        if (isset(static::$fieldNameOverrideMap[$fieldName])) {
            return static::$fieldNameOverrideMap[$fieldName];
        } else {
            return $fieldName;
        }
    }
56959
protected function getPropertyKey(ReflectionProperty $property)
    {
        $static = $property->isStatic() ? ' static' : '';
        if ($property->isPublic()) {
            return 'public' . $static . ' ' . $property->getName();
        }
        if ($property->isProtected()) {
            return 'protected' . $static . ' ' . $property->getName();
        }
        if ($property->isPrivate()) {
            return 'private' . $static . ' ' . $property->getName();
        }
    }
637143
protected function evaluateJoinColumnAnnotations(\ReflectionProperty $property)
    {
        $joinColumns = [];

        /** @var ORM\JoinColumn $joinColumnAnnotation */
        if ($joinColumnAnnotation = $this->reader->getPropertyAnnotation($property, ORM\JoinColumn::class)) {
            $joinColumns[] = $this->joinColumnToArray($joinColumnAnnotation, strtolower($property->getName()));
        } elseif ($joinColumnsAnnotation = $this->reader->getPropertyAnnotation($property, ORM\JoinColumns::class)) {
            foreach ($joinColumnsAnnotation->value as $joinColumnAnnotation) {
                $joinColumns[] = $this->joinColumnToArray($joinColumnAnnotation, strtolower($property->getName()));
            }
        }

        return $joinColumns;
    }
528175
private static function getProperty(Prophet $prophet, $property)
    {
        $reflection = new \ReflectionProperty($prophet, $property);
        $reflection->setAccessible(true);
        return $reflection->getValue($prophet);
    }
793885
public function getPropertyTypes(\ReflectionProperty $property) : array
    {
        $docComment = $property->getDocComment();

        if ($docComment === false) {
            return [];
        }

        if (preg_match('/@var\s+(\S+)/', $docComment, $matches) !== 1) {
            return [];
        }

        return explode('|', $matches[1]);
    }
624572
protected function resolveSetter(\ReflectionProperty $property)
    {
        $name  = $property->getName();
        $class = $property->getDeclaringClass();

        $setter = 'set' . ucfirst($name);

        if ($class->hasMethod($setter) && $class->getMethod($setter)->isPublic()) {
            return $setter;
        }
    }
1212310
public function getPropertyValue($property) {

        if (FALSE !== strstr($property, '.')) {
            $property = explode('.', $property);
        } else {
            $property = [$property];
        }

        if (count($property) == 1) {
            return $this
                ->getProperty($property[0])
                ->getValue($this->instance);
        }

        $classMapper = $this;
        foreach ($property as $item) {
            $value = $classMapper
                ->getProperty($item)
                ->getValue($classMapper->instance);

            if (is_object($value)) {
                $classMapper = $classMapper::createFromInstance($value);
            }
        }

        return $value;
    }
871727
private function createValueExposure($property): string
    {
        if ($property->readValueFilter) {
            $exposure = \sprintf('$data[\'%s\'] = %s;', $property->exposeAs, $property->readValueFilter);
        } elseif ($property->isScalarType()) {
            $exposure = \sprintf('$data[\'%s\'] = (%s) $value;', $property->exposeAs, $property->type);
        } elseif ($property->isMixedCollectionType()) {
            $exposure = \sprintf('$data[\'%s\'] = $value;', $property->exposeAs);
        } elseif ($property->isCollection()) {
            $template = <<<STRING
\$collection = [];
    foreach (\$value as \$key => \$val) {
        \$collection[\$key] = {reader}
    }
    \$data['{exposeAs}'] = \$collection;
STRING;
            if ($property->isScalarCollectionType()) {
                $reader = \sprintf('(%s) $val;', $property->getTypeOfCollection());
            } else {
                $reader = '$this->serializer->normalize($val, $context);';
            }

            $exposure = \strtr($template, [
                '{reader}' => $reader,
                '{exposeAs}' => $property->exposeAs,
            ]);
        } else {
            $exposure = \sprintf('$data[\'%s\'] = $this->serializer->normalize($value, $context);', $property->exposeAs);
        }

        if (!$this->configuration->isMaxDepthCheckEnabled()) {
            return $exposure;
        }

        $maxDepthWrap = <<<STRING
if (!\$context->isMaxDepthAchieve(\$this->classMetadata->{locatePropertyAt}['{propertyName}'])) {
        {exposure}
    }
STRING;

        return \strtr($maxDepthWrap, [
            '{exposure}' => $exposure,
            '{propertyName}' => $property->name,
            '{locatePropertyAt}' => $property instanceof PropertyMetadata ? 'propertyMetadata' : 'methodMetadata',
        ]);
    }
48909
protected function getProperty($reflectionObject, $entity, $name)
    {
        $property = $reflectionObject->getProperty($name);
        $property->setAccessible(true);
        return $property->getValue($entity);
    }
377286
private function dumpProperty($object, \ReflectionProperty $property, int $level): string
    {
        if ($property->isStatic()) {
            return '';
        }

        if (
            !($object instanceof \stdClass)
            && strpos($property->getDocComment(), '@invisible') !== false
        ) {
            //Memory loop while reading doc comment for stdClass variables?
            //Report a PHP bug about treating comment INSIDE property declaration as doc comment.
            return '';
        }

        //Property access level
        $access = $this->getAccess($property);

        //To read private and protected properties
        $property->setAccessible(true);

        if ($object instanceof \stdClass) {
            $name = $this->style->apply($property->getName(), 'dynamic');
        } else {
            //Property name includes access level
            $name = $property->getName() . $this->style->apply(':' . $access, 'access', $access);
        }

        return $this->dumpValue($property->getValue($object), $name, $level + 1);
    }
886738
private function findPropertyFromReference(&$property) : PropertyDefinition
    {
        $traceLevel = $this->propertyDefinitionTraceLevel;

        foreach ($this->propertyReferenceMap as $name => &$propertyReference) {
            if (ReferenceComparer::areEqual($property, $propertyReference)) {

                return $this->properties[$name];
            }
        }

        $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $traceLevel + 1)[$traceLevel];
        throw new InvalidPropertyDefinitionException($this->class, $trace['file'], $trace['line']);
    }
270118
private function getColumnAnnotation($reflectionProperty)
    {
        $columnAnnotation = $this->getReader()->getPropertyAnnotation($reflectionProperty, Column::class);
        if (null === $columnAnnotation) {
            return null;
        }

        return $columnAnnotation->type;
    }
925817
public function getPropertyMapper($property)
    {
        if( !$this->propertyMapper ) {
            throw new NoPropertyMapperSet();
        }
        $refl = new ReflectionClass($this->propertyMapper);
        return $refl->newInstance($property);
    }
203647
private function parseMetadataProperty(\ReflectionProperty $property)
    {
        $metadata = array();
        $tag = '@var';
        $docComment = $property->getDocComment();
        $occurence = (int) substr_count($docComment, $tag);

        if (1 < $occurence) {
            throw new \RuntimeException(sprintf('"@var" tag is not unique for "%s->%s"', $property->getDeclaringClass()->getName(), $property->getName()));
        }

        $metadata['attribute'] = $property->getName();

        // Grep type and optional namespaces
        preg_match('#@var\h+([a-zA-Z0-9\\\\_]+)(?:\h+\[([a-zA-Z0-9\\\\\s,_]+)\]\h*|.*)\v#', $docComment, $captured);

        if (!empty($captured)) {

            // Format var metadata
            $metadata['type'] = $captured[1];

            if (isset($captured[2])) {
                $metadata['mappedClass'] = trim($captured[2]);
            }
        }

        return $metadata;
    }
588959
public static function fetchProperty($object, $property)
    {
        $refl = new \ReflectionObject($object);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue($object);
    }
450353
protected function getFieldByProperty($property)
    {
        foreach ($this->getFields() as $key => $annotatedField) {
            if ($property === $key) {
                return $annotatedField;
            }
        }

        return null;
    }
633937
public function &__get($property)
    {
        if (isset($this->{'_'.$property})) {
            if ($property == 'filepath' && empty($this->_filepath)) {
                $this->_filepath = self::$_locators[$this->_type]->findPath($this);
            }

            if ($property == 'classname' && empty($this->_classname)) {
                $this->_classname = self::$_locators[$this->_type]->findClass($this);
            }

            return $this->{'_'.$property};
        }
    }