{"record":{"id":"31f3ce00e6005431","repo":"Intervention/image","slug":"invalid-value-for-alignment","errorCode":null,"errorMessage":"Invalid value for alignment","messagePattern":"Invalid value for alignment","errorType":"exception","errorClass":"Intervention\\Image\\Exceptions\\InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Typography/Font.php","lineNumber":229,"sourceCode":"     */\n    public function alignmentHorizontal(): Alignment\n    {\n        return $this->alignmentHorizontal;\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see FontInterface::setAlignmentHorizontal()\n     *\n     * @throws InvalidArgumentException\n     */\n    public function setAlignmentHorizontal(string|Alignment $alignment): FontInterface\n    {\n        try {\n            $this->alignmentHorizontal = is_string($alignment) ? Alignment::from($alignment) : $alignment;\n        } catch (ValueError | TypeError) {\n            throw new InvalidArgumentException('Invalid value for alignment');\n        }\n\n        return $this;\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see FontInterface::alignmentVertical()\n     */\n    public function alignmentVertical(): Alignment\n    {\n        return $this->alignmentVertical;\n    }\n\n    /**\n     * {@inheritdoc}\n     *","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Typography/Font.php#L211-L247","documentation":"Error \"Invalid value for alignment\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Typography/Font.php:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the accepted alignment values: 'left', 'center', 'right'","Normalize user input (lowercase, trim) before calling align()","Reject invalid alignment strings at the validation layer"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}