mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 18:13:09 +00:00
Cleanup pass based on prior PRs (#21)
* Updates to stub generation * More idiomatic fixes from PHP team * Moved tests from src/tests -> tests, got rid of extension-only tests * fixed up test paths, regenerated arginfo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\Auth;
|
||||
|
||||
use AWS\CRT\NativeResource as NativeResource;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\Auth;
|
||||
|
||||
use AWS\CRT\NativeResource as NativeResource;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\Auth;
|
||||
|
||||
/**
|
||||
|
||||
+5
-2
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT;
|
||||
|
||||
use AWS\CRT\Internal\Extension;
|
||||
@@ -102,7 +105,7 @@ final class CRT {
|
||||
* @param object $elg Pointer to the event loop group to release
|
||||
*/
|
||||
function event_loop_group_release($elg) {
|
||||
return self::$impl->aws_crt_event_loop_group_release($elg);
|
||||
self::$impl->aws_crt_event_loop_group_release($elg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\HTTP;
|
||||
|
||||
use AWS\CRT\Internal\Encoding;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\HTTP;
|
||||
|
||||
use AWS\CRT\NativeResource;
|
||||
@@ -12,6 +15,7 @@ abstract class Message extends NativeResource {
|
||||
private $headers;
|
||||
|
||||
public function __construct($method, $path, $query = [], $headers = []) {
|
||||
parent::__construct();
|
||||
$this->method = $method;
|
||||
$this->path = $path;
|
||||
$this->query = $query;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\HTTP;
|
||||
|
||||
use AWS\CRT\IO\InputStream;
|
||||
@@ -10,7 +13,7 @@ class Request extends Message {
|
||||
public function __construct($method, $path, $query = [], $headers = [], $body_stream = null) {
|
||||
parent::__construct($method, $path, $query, $headers);
|
||||
if (!is_null($body_stream) && !($body_stream instanceof InputStream)) {
|
||||
throw \InvalidArgumentException('body_stream must be an ' . InputStream::class);
|
||||
throw InvalidArgumentException('body_stream must be an instance of ' . InputStream::class);
|
||||
}
|
||||
$this->body_stream = $body_stream;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\HTTP;
|
||||
|
||||
class Response extends Message {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\IO;
|
||||
|
||||
use AWS\CRT\NativeResource as NativeResource;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\IO;
|
||||
|
||||
use AWS\CRT\NativeResource as NativeResource;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\Internal;
|
||||
|
||||
final class Encoding {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT\Internal;
|
||||
|
||||
use \RuntimeException;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT;
|
||||
|
||||
use AWS\CRT\CRT as CRT;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0.
|
||||
*/
|
||||
namespace AWS\CRT;
|
||||
|
||||
final class Options {
|
||||
|
||||
Reference in New Issue
Block a user