public function isAccessibleFrom(string $class = null) : bool
    {
        switch ($this->accessibility) {
            case self::ACCESS_PUBLIC:
                return true;

            case self::ACCESS_PROTECTED:
                return $class && (is_a($class, $this->declaredClass, true) || is_a($this->declaredClass, $class, true));

            case self::ACCESS_PRIVATE:
                return $class === $this->declaredClass;
        }
    }