Skip to content

[Insight] Logical operators should be avoided - in Service/TenantResolver.php, line 128 #36

@StephenGillCoop

Description

@StephenGillCoop

in Service/TenantResolver.php, line 128

The or operator does not have the same precedence as ||.
This could lead to unexpected behavior, use || instead.

    public function needStartScreen()
    {
        /** @var MultiTenantUserInterface $user */
        $user = $this->token->getToken()->getUser();
        return ($this->strategy == self::STRATEGY_FIXED_SUBDOMAIN and !$user->getActiveTenant())
            or ($this->strategy == self::STRATEGY_TENANT_AWARE_SUBDOMAIN and !$this->isSubdomain());
    }

    /**
     * @return Tenant
     */

Posted from SensioLabsInsight

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions