psalm: AfterMethodCallAnalysisInterface don't triger methods in else block.

$DB->get_records_sql is not trigering in else and if blocks, but it works in other locations.

Is this possible that it is fault of the psalm or am I doing something wrong?

    else { // Show only items that have not been checked off.
            $groupingsql = checklist_class::get_grouping_sql($USER->id, $checklist->course, 'i.');
            $dateitems = $DB->get_records_sql("SELECT i.* FROM {checklist_item} i
                                                 JOIN {checklist_check} c ON c.item = i.id
                                                WHERE i.checklist = ? AND i.duetime > 0 AND c.userid = ? AND usertimestamp = 0
                                                  AND $groupingsql
                                                ORDER BY i.duetime", array($checklist->id, $USER->id));
        }

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15

Most upvoted comments

Can you commit psalm-autoload.php too please?

Issue number 5000 🎉