Fix 'undefined variable' PHPStan L0 errors

Created on 19 October 2022, about 2 years ago
Updated 4 August 2024, 3 months ago

Problem/Motivation

PHPStan identified a few undefined variable errors, currently baselined.

Proposed resolution

Resolve errors, cleanup baseline.

🐛 Bug report
Status

Fixed

Version

10.0

Component
Base 

Last updated about 11 hours ago

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇭Switzerland berdir Switzerland

    Note: The code here wasn't quite as dead as it seemed. It's a copy from the parent:

        if (!empty($def['join_id'])) {
          $id = $def['join_id'];
        }
        else {
          $id = 'standard';
        }
    

    For EntityReverse, $def == $alias as there are two tables, this wasn't adjusted when it was originally copied from the parent. In practice, this never worked and it was never needed to use a different join plugin than standard, so removing it seems fine.

    Found this because I was trying to understand the copied code added in 🐛 Views doesn't recognize relationship to host Needs work

Production build 0.71.5 2024