PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/s3/Aws/IdempotencyTokenMiddleware.php +4 -4 1.2.12 → 1.4.2 View file →
@@ -21,9 +21,9 @@
21 21 *
22 22 * One of following functions needs to be available
23 23 * in order to generate random bytes used for UUID
24 24 * (SDK will attempt to utilize function in following order):
25 - * - random_bytes (requires PHP 7.0 or above)
25 + * - random_bytes (requires PHP 7.0 or above)
26 26 * - openssl_random_pseudo_bytes (requires 'openssl' module enabled)
27 27 * - mcrypt_create_iv (requires 'mcrypt' module enabled)
28 28 *
29 29 * You may also supply a custom bytes generator as an optional second
@@ -33,21 +33,21 @@
33 33 * @param callable|null $bytesGenerator
34 34 *
35 35 * @return callable
36 36 */
37 - public static function wrap(Service $service, callable $bytesGenerator = null)
37 + public static function wrap(Service $service, ?callable $bytesGenerator = null)
38 38 {
39 39 return function (callable $handler) use($service, $bytesGenerator) {
40 40 return new self($handler, $service, $bytesGenerator);
41 41 };
42 42 }
43 - public function __construct(callable $nextHandler, Service $service, callable $bytesGenerator = null)
43 + public function __construct(callable $nextHandler, Service $service, ?callable $bytesGenerator = null)
44 44 {
45 45 $this->bytesGenerator = $bytesGenerator ?: $this->findCompatibleRandomSource();
46 46 $this->service = $service;
47 47 $this->nextHandler = $nextHandler;
48 48 }
49 - public function __invoke(CommandInterface $command, RequestInterface $request = null)
49 + public function __invoke(CommandInterface $command, ?RequestInterface $request = null)
50 50 {
51 51 $handler = $this->nextHandler;
52 52 if ($this->bytesGenerator) {
53 53 $operation = $this->service->getOperation($command->getName());