Skip to content

Instantly share code, notes, and snippets.

@msjyoo
Created December 17, 2015 08:45
Show Gist options
  • Save msjyoo/58547c85e05f82ceb13c to your computer and use it in GitHub Desktop.
Save msjyoo/58547c85e05f82ceb13c to your computer and use it in GitHub Desktop.
  1. Run the Indexer
  2. The Indexer is a general fast-pass scanner that picks up low-hanging fruits like functions with PHPDoc or scalar expressions (addition of 2 numbers always return int etc.)
  3. The Indexer deals with the entire project
  4. And also the PHP stubs since that consists of PHPDoc only.
  5. Since most PHP code is documented with PHPDoc, this should pick up most things
  6. Then we get that data, and pass it onto the Interpreter
  7. The Interpreter only runs on a single file, and returns Lazy Types on unknown things that must be resolved later when we get more info
  8. But, since we have already indexed the codebase some information will be available e.g. return types from class functions etc.
  9. After that, we try to link all the results from the interpreter on individual files by linking them with each other.
  10. We have a complete graph!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment