Skip to content

Commit 9c18112

Browse files
committed
type-safety use of in_array()
1 parent 4bee7c4 commit 9c18112

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/triagens/ArangoDb/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ public function setStatus($status)
539539
self::STATUS_LOADED,
540540
self::STATUS_BEING_UNLOADED,
541541
self::STATUS_DELETED
542-
]
542+
], true
543543
)
544544
) {
545545
throw new ClientException('Invalid status used for collection');

lib/triagens/ArangoDb/ConnectionOptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,15 @@ private function validate()
393393

394394
if (isset($this->_values[self::OPTION_AUTH_TYPE]) && !in_array(
395395
$this->_values[self::OPTION_AUTH_TYPE],
396-
self::getSupportedAuthTypes()
396+
self::getSupportedAuthTypes(), true
397397
)
398398
) {
399399
throw new ClientException('unsupported authorization method');
400400
}
401401

402402
if (isset($this->_values[self::OPTION_CONNECTION]) && !in_array(
403403
$this->_values[self::OPTION_CONNECTION],
404-
self::getSupportedConnectionTypes()
404+
self::getSupportedConnectionTypes(), true
405405
)
406406
) {
407407
throw new ClientException(

lib/triagens/ArangoDb/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public function getAll($options = [])
455455

456456
if ($includeInternals === true) {
457457
foreach ($this as $key => $value) {
458-
if ($key[0] === '_' && 0 !== strpos($key, '__') && !in_array($key, $nonInternals)) {
458+
if ($key[0] === '_' && 0 !== strpos($key, '__') && !in_array($key, $nonInternals, true)) {
459459
$data[$key] = $value;
460460
}
461461
}

0 commit comments

Comments
 (0)