← All changes
|
includes/sdk/google/google/gax/src/ValidationTrait.php
+3
-3
1.0.3
→
1.4.2
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 | * @internal |
| 37 | 37 | */ |
| @@ -57,9 +57,9 @@ | ||
| 57 | 57 | } |
| 58 | 58 | private static function validateImpl($arr, $requiredKeys, $allowNull) |
| 59 | 59 | { |
| 60 | 60 | foreach ($requiredKeys as $requiredKey) { |
| 61 | - $valid = array_key_exists($requiredKey, $arr) && ($allowNull || !is_null($arr[$requiredKey])); | |
| 61 | + $valid = \array_key_exists($requiredKey, $arr) && ($allowNull || !\is_null($arr[$requiredKey])); | |
| 62 | 62 | if (!$valid) { |
| 63 | 63 | throw new ValidationException("Missing required argument {$requiredKey}"); |
| 64 | 64 | } |
| 65 | 65 | } |
| @@ -70,9 +70,9 @@ | ||
| 70 | 70 | * @throws ValidationException |
| 71 | 71 | */ |
| 72 | 72 | private static function validateFileExists(string $filePath) |
| 73 | 73 | { |
| 74 | - if (!file_exists($filePath)) { | |
| 74 | + if (!\file_exists($filePath)) { | |
| 75 | 75 | throw new ValidationException("Could not find specified file: {$filePath}"); |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | } |