public function getInheritedElement()
    {
        /** @var ClassDescriptor|InterfaceDescriptor|null $associatedClass */
        $associatedClass = $this->getParent();

        if (($associatedClass instanceof ClassDescriptor || $associatedClass instanceof InterfaceDescriptor)
            && ($associatedClass->getParent() instanceof ClassDescriptor
                || $associatedClass->getParent() instanceof InterfaceDescriptor
            )
        ) {
            /** @var ClassDescriptor|InterfaceDescriptor $parentClass */
            $parentClass = $associatedClass->getParent();

            return $parentClass->getProperties()->get($this->getName());
        }

        return null;
    }
public function getInheritedElement()
    {
        /** @var ClassDescriptor|InterfaceDescriptor|null $associatedClass */
        $associatedClass = $this->getParent();

        if (($associatedClass instanceof ClassDescriptor || $associatedClass instanceof InterfaceDescriptor)
            && ($associatedClass->getParent() instanceof ClassDescriptor
                || $associatedClass->getParent() instanceof InterfaceDescriptor
            )
        ) {
            /** @var ClassDescriptor|InterfaceDescriptor $parentClass */
            $parentClass = $associatedClass->getParent();

            return $parentClass->getProperties()->get($this->getName());
        }

        return null;
    }
public function getInheritedElement ( ) { /** @var ClassDescriptor|InterfaceDescriptor|null $associatedClass */ $ associatedClass = $ this -> getParent ( ) ; if ( ( $ associatedClass instanceof ClassDescriptor || $ associatedClass instanceof InterfaceDescriptor ) && ( $ associatedClass -> getParent ( ) instanceof ClassDescriptor || $ associatedClass -> getParent ( ) instanceof InterfaceDescriptor ) ) { /** @var ClassDescriptor|InterfaceDescriptor $parentClass */ $ parentClass = $ associatedClass -> getParent ( ) ; return $ parentClass -> getProperties ( ) -> get ( $ this -> getName ( ) ) ; } return null ; }
Returns the property from which this one should inherit, if any.

@return PropertyDescriptor|null
Returns the property from which this one should inherit if any .