You are here

protected function JsonapiHelper::isNumericArray in Entity Share 8

Check if a array is numeric.

Parameters

array $array: The array to check.

Return value

bool TRUE if the array is numeric. FALSE in case of associative array.

1 call to JsonapiHelper::isNumericArray()
JsonapiHelper::prepareData in modules/entity_share_client/src/Service/JsonapiHelper.php
Uniformize JSON data in case of single value.

File

modules/entity_share_client/src/Service/JsonapiHelper.php, line 515

Class

JsonapiHelper
Class JsonapiHelper.

Namespace

Drupal\entity_share_client\Service

Code

protected function isNumericArray(array $array) {
  foreach ($array as $a => $b) {
    if (!is_int($a)) {
      return FALSE;
    }
  }
  return TRUE;
}