Skip to content

Commit

Permalink
Fix out-of-date explanation.
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Nov 30, 2020
1 parent c3f0a51 commit 9a095e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/contributing/how_psalm_works.md
Expand Up @@ -64,7 +64,7 @@ Somewhere in `FunctionLikeAnalyzer::analyze` we create a new [`StatementsAnalyze

At each line the `Context` object may or may not be manipulated. At branching points (if statements, loops, ternary etc) the `Context` object is cloned and then, at the end of the branch, Psalm figures out how to resolve the changes and update the uncloned `Context` object.

Each PhpParser node is then abused, adding a property called `inferredType` which Psalm uses for type analysis.
The `NodeDataProvider` stores a type for each PhpParser node.

After all the statements have been analysed we gather up all the return types and compare to the given return type.

Expand Down

0 comments on commit 9a095e4

Please sign in to comment.