PluginProbe
Media Cloud Sync / 1.4.1
Media Cloud Sync v1.4.1
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 1.2.9 All 35 releases
← All changes | includes/sdk/google/google/auth/src/Middleware/SimpleMiddleware.php +6 -6 1.1.11.4.1 View file →
@@ -14,12 +14,12 @@
14 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 15 * See the License for the specific language governing permissions and
16 16 * limitations under the License.
17 17 */
18 -namespace Dudlewebs\WPMCS\Google\Auth\Middleware;
18 +namespace Dudlewebs\WPMCS\GCP\Google\Auth\Middleware;
19 19
20 -use Dudlewebs\WPMCS\GuzzleHttp\Psr7\Query;
21 -use Dudlewebs\WPMCS\Psr\Http\Message\RequestInterface;
20 +use Dudlewebs\WPMCS\GCP\GuzzleHttp\Psr7\Query;
21 +use Dudlewebs\WPMCS\GCP\Psr\Http\Message\RequestInterface;
22 22 /**
23 23 * SimpleMiddleware is a Guzzle Middleware that implements Google's Simple API
24 24 * access.
25 25 *
@@ -43,9 +43,9 @@
43 43 {
44 44 if (!isset($config['key'])) {
45 45 throw new \InvalidArgumentException('requires a key to have been set');
46 46 }
47 - $this->config = array_merge(['key' => null], $config);
47 + $this->config = \array_merge(['key' => null], $config);
48 48 }
49 49 /**
50 50 * Updates the request query with the developer key if auth is set to simple.
51 51 *
@@ -70,15 +70,15 @@
70 70 * @return \Closure
71 71 */
72 72 public function __invoke(callable $handler)
73 73 {
74 - return function (RequestInterface $request, array $options) use ($handler) {
74 + return function (RequestInterface $request, array $options) use($handler) {
75 75 // Requests using "auth"="scoped" will be authorized.
76 76 if (!isset($options['auth']) || $options['auth'] !== 'simple') {
77 77 return $handler($request, $options);
78 78 }
79 79 $query = Query::parse($request->getUri()->getQuery());
80 - $params = array_merge($query, $this->config);
80 + $params = \array_merge($query, $this->config);
81 81 $uri = $request->getUri()->withQuery(Query::build($params));
82 82 $request = $request->withUri($uri);
83 83 return $handler($request, $options);
84 84 };