message example

if ($type->getClassName() !== StorableFlow::class) {
            return [];
        }

        $class = $scope->getClassReflection();
        if ($class === null || $class->isSubclassOf(FlowStorer::class)) {
            return [];
        }

        return [
            RuleErrorBuilder::message('Using Shopware::getStore, outside storer classes, is not allowed. Use getData instead')->build(),
        ];
    }
}
$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(),
            ];
        }

        return [];
    }
}
return [];
        }

        \assert($node->expr->class instanceof Node\Name);
        $exceptionClass = $node->expr->class->toString();

        if (\in_array($exceptionClass, self::VALID_EXCEPTION_CLASSES, true)) {
            return [];
        }

        return [
            RuleErrorBuilder::message('Throwing new exceptions within classes are not allowed. Please use domain exception pattern. See https://github.com/shopware/platform/blob/v6.4.20.0/adr/2022-02-24-domain-exceptions.md')->build(),
        ];
    }

    /** * @return list<RuleError> */
    private function validateDomainExceptionClass(Node\Expr\StaticCall $node, Scope $scope): array
    {
        \assert($node->class instanceof Node\Name);
        $exceptionClass = $node->class->toString();

        

    public function RFCNumber()
    {
        return $this->rfcNumber;
    }

    /** * @return string */
    public function __toString(): string
    {
        return $this->message() . " rfc: " .  $this->rfcNumber . "internal code: " . strval(static::CODE);
    }
}
Home | Imprint | This part of the site doesn't use cookies.