src/Entity/Reflection.php
private function _parseProperties($docComment, \ReflectionClass $reflectionClass)
    {
        $properties = [];
        foreach (Reflection\Annotation::parseProperties($docComment) as $definition) {

            try {
                $property = new Reflection\Property(
                    $definition[2],
                    $definition[3],
                    $this,
                    !$definition[1],
                    $definition[4]
                );
            } catch (Exception\PropertyException $e) {
                throw new Exception\ReflectionException(
                    $e->getMessage(),
                    $this->className,
                    $definition[0]
                );
            }

            // Prevent duplications
            if (isset($properties[$property->getName()])) {
                throw new Exception\ReflectionException(
                    "Duplicate property with name '" . $property->getName() . "'!",
                    $this->className,
                    $definition[0]
                );
            }

            // Prevent class property duplications
            if ($reflectionClass->hasProperty($property->getName())) {
                throw new Exception\ReflectionException(
                    "Property '" . $property->getName() . "' already defined as"
                    . " public property!",
                    $this->className,
                    $definition[0]
                );
            }

            $this->properties[$property->getName()] = $property;
        }
    }
private function _parseProperties($docComment, \ReflectionClass $reflectionClass)
    {
        $properties = [];
        foreach (Reflection\Annotation::parseProperties($docComment) as $definition) {

            try {
                $property = new Reflection\Property(
                    $definition[2],
                    $definition[3],
                    $this,
                    !$definition[1],
                    $definition[4]
                );
            } catch (Exception\PropertyException $e) {
                throw new Exception\ReflectionException(
                    $e->getMessage(),
                    $this->className,
                    $definition[0]
                );
            }

            // Prevent duplications
            if (isset($properties[$property->getName()])) {
                throw new Exception\ReflectionException(
                    "Duplicate property with name '" . $property->getName() . "'!",
                    $this->className,
                    $definition[0]
                );
            }

            // Prevent class property duplications
            if ($reflectionClass->hasProperty($property->getName())) {
                throw new Exception\ReflectionException(
                    "Property '" . $property->getName() . "' already defined as"
                    . " public property!",
                    $this->className,
                    $definition[0]
                );
            }

            $this->properties[$property->getName()] = $property;
        }
    }
private function _parseProperties ( $ docComment , \ ReflectionClass $ reflectionClass ) { $ properties = [ ] ; foreach ( Reflection \ Annotation :: parseProperties ( $ docComment ) as $ definition ) { try { $ property = new Reflection \ Property ( $ definition [ 2 ] , $ definition [ 3 ] , $ this , ! $ definition [ 1 ] , $ definition [ 4 ] ) ; } catch ( Exception \ PropertyException $ e ) { throw new Exception \ ReflectionException ( $ e -> getMessage ( ) , $ this -> className , $ definition [ 0 ] ) ; } // Prevent duplications if ( isset ( $ properties [ $ property -> getName ( ) ] ) ) { throw new Exception \ ReflectionException ( "Duplicate property with name '" . $ property -> getName ( ) . "'!" , $ this -> className , $ definition [ 0 ] ) ; } // Prevent class property duplications if ( $ reflectionClass -> hasProperty ( $ property -> getName ( ) ) ) { throw new Exception \ ReflectionException ( "Property '" . $ property -> getName ( ) . "' already defined as" . " public property!" , $ this -> className , $ definition [ 0 ] ) ; } $ this -> properties [ $ property -> getName ( ) ] = $ property ; } }
Parse properties from annotations

@param string           $docComment
@param \ReflectionClass $reflectionClass

@throws Exception\ReflectionException
Parse properties from annotations