MCPcopy Create free account
hub / github.com/error311/FileRise / boundedInt

Method boundedInt

src/FileRise/Domain/McpCoreOpsService.php:2176–2189  ·  view source on GitHub ↗

* @param mixed $value */

($value, int $min, int $max, int $fallback)

Source from the content-addressed store, hash-verified

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,

Callers 4

opListFoldersMethod · 0.95
opListFilesFullMethod · 0.95
opListFilesFastMethod · 0.95
opReadFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected