PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.21
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.21
1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 All 166 releases
woocommerce-pos / vendor_prefixed / sentry / sentry / src / Integration / RequestFetcher.php

RequestFetcher.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.21, at vendor_prefixed/sentry/sentry/src/Integration/RequestFetcher.php

29 lines 732 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare (strict_types=1);
4 namespace WCPOS\Vendor\Sentry\Integration;
5
6 use WCPOS\Vendor\GuzzleHttp\Psr7\ServerRequest;
7 use WCPOS\Vendor\Psr\Http\Message\ServerRequestInterface;
8 /**
9 * Default implementation for RequestFetcherInterface. Creates a request object
10 * from the PHP superglobals.
11 */
12 final class RequestFetcher implements RequestFetcherInterface
13 {
14 /**
15 * {@inheritdoc}
16 */
17 public function fetchRequest() : ?ServerRequestInterface
18 {
19 if (!isset($_SERVER['REQUEST_METHOD']) || \PHP_SAPI === 'cli') {
20 return null;
21 }
22 try {
23 return ServerRequest::fromGlobals();
24 } catch (\InvalidArgumentException $e) {
25 return null;
26 }
27 }
28 }
29