TysonAndre / phan

Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Other
0 stars 0 forks source link

Optimize PostOrderAnalysisVisitor->analyzeMethodWithArgumentTypes #149

Open TysonAndre opened 6 years ago

TysonAndre commented 6 years ago
  1. Check for isInternal/hasNode first
  2. Abstract the checks for 0 parameters (if (\count($original_parameter_list) === 0) {) into a single method. Additionally, certain scalars and final classes don't need to be replaced with more specific types (?int, string, float in real types (and possibly phpdoc), arrayshape in phpdoc, etc) Memoize the result based on that