*/ class StabilityFilter { /** * Checks if any of the provided package names in the given stability match the configured acceptable stability and flags * * @param int[] $acceptableStabilities array of stability => BasePackage::STABILITY_* value * @phpstan-param array $acceptableStabilities * @param int[] $stabilityFlags an array of package name => BasePackage::STABILITY_* value * @phpstan-param array $stabilityFlags * @param string[] $names The package name(s) to check for stability flags * @param string $stability one of 'stable', 'RC', 'beta', 'alpha' or 'dev' * @return bool true if any package name is acceptable */ public static function isPackageAcceptable( array $acceptableStabilities, array $stabilityFlags, array $names, string $stability, ): bool { foreach ($names as $name) { // allow if package matches the package-specific stability flag if (isset($stabilityFlags[$name])) { if (BasePackage::$stabilities[$stability] <= $stabilityFlags[$name]) { return true; } } elseif (isset($acceptableStabilities[$stability])) { // allow if package matches the global stability requirement and has no exception return true; } } return false; } } __halt_compiler();----SIGNATURE:----DCFMMoWXG8szrPm9UB8X7sDGs5xGJQ1H1/1Y3OR9Iy5bpl79I96ocJFihWK3/+Sseqn5FM5MP+fiwT5En/7gau22JTrF8d47i5y73l8P8Oz3xqjZVplEwMiX99b47eO88g6dthGTjE41FHk6fNoLOLoiVnMkz+6BBKyaZXvgoFqfr/tjzOZgIXp/L/ev6ptmVksgfl52KJtKAkZeDv50I98kN+QlNei/Jo9XYiv2LE6Jg3niC7oiuZJU5gn3ld/wn4h1FJrIgZwnLE5pv2W1Hqk6hWyqid+bij7J/XCzuvhkfdfizIOWmRGch26iaT8emgaXY+PHkY7D5FnO3F4V2uxJZ4LwMGHk0fmCxZdrPBo8ibkwF+BveeEhfre07WGjZqIh1g/l8uy0aaMw9oMvoJ5DN+NptgtfF4dyJZQbPnDSQjznRqOTByBa3/9E9cFD5V6rUQ18m8NWH6RyVa1JqybHQBVTp9BRdyosbrcW6ueRPC9bImlNGMt8ikKNFjWCCWcIs8z6zmvEGlSwSDGT/6zyN93gcpTyqB5/7vCz7isKHScNP6wdoj1Clv337vBOz1uQj2bwS9f+kYew/xFwGamz0FdxWYcZ5Ig8PPNnEXckCmLlJg1qoO2F9FzNvussHP1kbFTVuwDkKarirtB2AzlpuOPov0ieA0IRbBJaCZw=----ATTACHMENT:----MTYxMTU0NDU0NDA2Mzk2MSAyOTkwMzAxNjIzODA2MDA4IDY5MTc0NjIzNTA2ODYzMTk=