WIP: List static methods when requested

WIP-incremental-parsing
Hugo Thunnissen 2 years ago
parent 98e88d45ac
commit f8bf0b611a

@ -122,6 +122,13 @@
(phpinspect--class-methods class))
methods))
(cl-defmethod phpinspect--class-get-static-method-list ((class phpinspect--class))
(let ((methods))
(maphash (lambda (key method)
(push method methods))
(phpinspect--class-static-methods class))
methods))
(cl-defmethod phpinspect--class-update-static-method ((class phpinspect--class)
(method phpinspect--function))
(let ((existing (gethash (phpinspect--function-name-symbol method)

@ -212,7 +212,9 @@ accompanied by all of its enclosing tokens."
(when class
(phpinspect--log "Retrieved class index, starting method collection %s (%s)"
project-root class-fqn)
(phpinspect--class-get-method-list class)))))
(if static
(phpinspect--class-get-static-method-list class)
(phpinspect--class-get-method-list class))))))
(defmacro phpinspect-find-function-in-list (method-name list)
(let ((break-sym (gensym))
@ -677,7 +679,9 @@ resolve types of function argument variables."
(let ((class (phpinspect-get-or-create-cached-project-class
(phpinspect-project-root)
class-name)))
(when class (phpinspect--class-variables class))))
;; TODO return static variables/constants when static is set
(when class
(phpinspect--class-variables class))))
(defun phpinspect--get-methods-for-class
(resolvecontext buffer-classes class &optional static)

Loading…
Cancel
Save