File ManagerCurrent Directory: wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Crypto/PolyfillLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: NeedsTrait.php <?php namespace Aws\Crypto\Polyfill; use Aws\Exception\CryptoPolyfillException; /** * Trait NeedsTrait */ trait NeedsTrait { /** * Preconditions, postconditions, and loop invariants are very * useful for safe programing. They also document the specifications. * This function is to help simplify the semantic burden of parsing * these constructions. * * Instead of constructions like * if (!(GOOD CONDITION)) { * throw new \Exception('condition not true'); * } * * you can write: * needs(GOOD CONDITION, 'condition not true'); * @param $condition * @param $errorMessage * @param null $exceptionClass */ public static function needs($condition, $errorMessage, $exceptionClass = null) { if (!$condition) { if (!$exceptionClass) { $exceptionClass = CryptoPolyfillException::class; } throw new $exceptionClass($errorMessage); } } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirAesGcm.phpFile6.80 KB Rename | Delete | EditByteArray.phpFile6.84 KB Rename | Delete | EditGmac.phpFile6.15 KB Rename | Delete | EditKey.phpFile1.69 KB Rename | Delete | EditNeedsTrait.phpFile1,017.00 B Rename | Delete | Edit