original_string: private function validateParentId($parentId) : array
      {
          if (!empty($parentId)) {
              if (is_array($parentId)) {
                  if (count($parentId) != count($parentId, COUNT_RECURSIVE)) {
                      throw new JsonParserException(
                          'Error assigning parentId to a CSV file! $parentId array cannot be multidimensional.',
                          [
                              'parentId' => $parentId
                          ]
                      );
                  }
              } else {
                  $parentId = ['JSON_parentId' => $parentId];
              }
          } else {
              $parentId = [];
          }
          $result = [];
          foreach ($parentId as $key => $value) {
              $result[$this->structure->getParentTargetName($key)] = $value;
          }
          return $result;
      }
code: private function validateParentId($parentId) : array
      {
          if (!empty($parentId)) {
              if (is_array($parentId)) {
                  if (count($parentId) != count($parentId, COUNT_RECURSIVE)) {
                      throw new JsonParserException(
                          'Error assigning parentId to a CSV file! $parentId array cannot be multidimensional.',
                          [
                              'parentId' => $parentId
                          ]
                      );
                  }
              } else {
                  $parentId = ['JSON_parentId' => $parentId];
              }
          } else {
              $parentId = [];
          }
          $result = [];
          foreach ($parentId as $key => $value) {
              $result[$this->structure->getParentTargetName($key)] = $value;
          }
          return $result;
      }
code_tokens: private function validateParentId ( $ parentId ) : array { if ( ! empty ( $ parentId ) ) { if ( is_array ( $ parentId ) ) { if ( count ( $ parentId ) != count ( $ parentId , COUNT_RECURSIVE ) ) { throw new JsonParserException ( 'Error assigning parentId to a CSV file! $parentId array cannot be multidimensional.' , [ 'parentId' => $ parentId ] ) ; } } else { $ parentId = [ 'JSON_parentId' => $ parentId ] ; } } else { $ parentId = [ ] ; } $ result = [ ] ; foreach ( $ parentId as $ key => $ value ) { $ result [ $ this -> structure -> getParentTargetName ( $ key ) ] = $ value ; } return $ result ; }
docstring: Ensure the parentId array is not multidimensional
  
  @param string|array $parentId
  @return array
  @throws JsonParserException
docstring_tokens: Ensure the parentId array is not multidimensional