* @param mixed $value */
($value, int $min, int $max, int $fallback)
| 2174 | * @param mixed $value |
| 2175 | */ |
| 2176 | private static function boundedInt($value, int $min, int $max, int $fallback): int |
| 2177 | { |
| 2178 | if (!is_int($value) && !is_float($value) && !is_string($value)) { |
| 2179 | return $fallback; |
| 2180 | } |
| 2181 | $n = (int)$value; |
| 2182 | if ($n < $min) { |
| 2183 | return $min; |
| 2184 | } |
| 2185 | if ($n > $max) { |
| 2186 | return $max; |
| 2187 | } |
| 2188 | return $n; |
| 2189 | } |
| 2190 | |
| 2191 | private static function crossSourceEncryptedError( |
| 2192 | McpOpsContext $ctx, |
no outgoing calls
no test coverage detected