← All changes
|
includes/sdk/google/google/gax/src/ServiceAddressTrait.php
+4
-4
1.2.4
→
1.4.1
View file →
| @@ -29,9 +29,9 @@ | ||
| 29 | 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 | 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 31 | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | 32 | */ |
| 33 | -namespace Dudlewebs\WPMCS\Google\ApiCore; | |
| 33 | +namespace Dudlewebs\WPMCS\GCP\Google\ApiCore; | |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Provides helper methods for service address handling. |
| 37 | 37 | * |
| @@ -48,13 +48,13 @@ | ||
| 48 | 48 | * @throws ValidationException |
| 49 | 49 | */ |
| 50 | 50 | private static function normalizeServiceAddress(string $apiEndpoint) |
| 51 | 51 | { |
| 52 | - $components = explode(':', $apiEndpoint); | |
| 53 | - if (count($components) == 2) { | |
| 52 | + $components = \explode(':', $apiEndpoint); | |
| 53 | + if (\count($components) == 2) { | |
| 54 | 54 | // Port is included in service address |
| 55 | 55 | return [$components[0], $components[1]]; |
| 56 | - } elseif (count($components) == 1) { | |
| 56 | + } elseif (\count($components) == 1) { | |
| 57 | 57 | // Port is not included - append default port |
| 58 | 58 | return [$components[0], self::$defaultPort]; |
| 59 | 59 | } else { |
| 60 | 60 | throw new ValidationException("Invalid apiEndpoint: {$apiEndpoint}"); |