getConstantStrings example

if ($constant === false) {
                return [];
            }

            $constantValue = $constant->getValueExpression();
            if (!$constantValue instanceof String_) {
                return [];
            }

            $propType = $scope->getType($propertyNameValueExpr);
            if ($propType->getConstantStrings() === []) {
                return [];
            }

            return [
                RuleErrorBuilder::message(sprintf(
                    '%s.%s association has a configured autoload===true, this is forbidden for platform integrations',
                    $constantValue->value,
                    $propType->getConstantStrings()[0]->getValue()
                ))->build(),
            ];
        }

        
Home | Imprint | This part of the site doesn't use cookies.