modules/acm/src/APIHelper.php
public function normaliseExtension($data) {
    if (is_object($data)) {
      if (isset($data->extension)) {
        $data->extension = (object) $data->extension;
      }
    }
    elseif (is_array($data)) {
      if (isset($data['extension'])) {
        $data['extension'] = (object) $data['extension'];
      }
    }

    return $data;
  }
public function normaliseExtension($data) {
    if (is_object($data)) {
      if (isset($data->extension)) {
        $data->extension = (object) $data->extension;
      }
    }
    elseif (is_array($data)) {
      if (isset($data['extension'])) {
        $data['extension'] = (object) $data['extension'];
      }
    }

    return $data;
  }
public function normaliseExtension ( $ data ) { if ( is_object ( $ data ) ) { if ( isset ( $ data -> extension ) ) { $ data -> extension = ( object ) $ data -> extension ; } } elseif ( is_array ( $ data ) ) { if ( isset ( $ data [ 'extension' ] ) ) { $ data [ 'extension' ] = ( object ) $ data [ 'extension' ] ; } } return $ data ; }
Extensions must always be objects and not arrays.

@param mixed $data
Array/Object data.

@return array
Data in same type but with extension as object.
Extensions must always be objects and not arrays .