From 97dfc243a86e62cf91d050b99a0c523bef345102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sun, 10 Nov 2024 17:28:05 +0100 Subject: [PATCH] Fix doc using wrong function name `a` instead of `getOne` --- docs/running_psalm/configuration.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/running_psalm/configuration.md b/docs/running_psalm/configuration.md index d00baae88d3..ab66fb19a10 100644 --- a/docs/running_psalm/configuration.md +++ b/docs/running_psalm/configuration.md @@ -444,10 +444,10 @@ Allows you to hard-code the number of threads Psalm will use (similar to `--thre maxStringLength="1000" > ``` -This setting controls the maximum length of literal strings that will be transformed into a literal string type during Psalm analysis. -Strings longer than this value (by default 1000 bytes) will be transformed in a generic `non-empty-string` type, instead. +This setting controls the maximum length of literal strings that will be transformed into a literal string type during Psalm analysis. +Strings longer than this value (by default 1000 bytes) will be transformed in a generic `non-empty-string` type, instead. -Please note that changing this setting might introduce unwanted side effects and those side effects won't be considered as bugs. +Please note that changing this setting might introduce unwanted side effects and those side effects won't be considered as bugs. #### maxShapedArraySize ```xml @@ -455,10 +455,10 @@ Please note that changing this setting might introduce unwanted side effects and maxShapedArraySize="100" > ``` -This setting controls the maximum size of shaped arrays that will be transformed into a shaped `array{key1: "value", key2: T}` type during Psalm analysis. -Arrays bigger than this value (100 by default) will be transformed in a generic `non-empty-array` type, instead. +This setting controls the maximum size of shaped arrays that will be transformed into a shaped `array{key1: "value", key2: T}` type during Psalm analysis. +Arrays bigger than this value (100 by default) will be transformed in a generic `non-empty-array` type, instead. -Please note that changing this setting might introduce unwanted side effects and those side effects won't be considered as bugs. +Please note that changing this setting might introduce unwanted side effects and those side effects won't be considered as bugs. #### restrictReturnTypes @@ -474,20 +474,20 @@ the inferred return type. This code: ```php function getOne(): int // declared type: int -{ +{ return 1; // inferred type: 1 (int literal) } ``` Will give this error: `LessSpecificReturnType - The inferred return type '1' for -a is more specific than the declared return type 'int'` +getOne is more specific than the declared return type 'int'` To fix the error, you should specify the more specific type in the doc-block: ```php /** * @return 1 */ -function getOne(): int -{ +function getOne(): int +{ return 1; } ```