public function toArray( callable $valueConverter = null ): array {
		$operations = [];

		foreach ( $this->getOperations() as $key => $diffOp ) {
			$operations[$key] = $diffOp->toArray( $valueConverter );
		}

		return [
			'type' => $this->getType(),
			'isassoc' => $this->isAssociative,
			'operations' => $operations
		];
	}
public function toArray( callable $valueConverter = null ): array {
		$operations = [];

		foreach ( $this->getOperations() as $key => $diffOp ) {
			$operations[$key] = $diffOp->toArray( $valueConverter );
		}

		return [
			'type' => $this->getType(),
			'isassoc' => $this->isAssociative,
			'operations' => $operations
		];
	}
public function toArray ( callable $ valueConverter = null ) : array { $ operations = [ ] ; foreach ( $ this -> getOperations ( ) as $ key => $ diffOp ) { $ operations [ $ key ] = $ diffOp -> toArray ( $ valueConverter ) ; } return [ 'type' => $ this -> getType ( ) , 'isassoc' => $ this -> isAssociative , 'operations' => $ operations ] ; }
Returns the Diff in array form where nested DiffOps are also turned into their array form.

@see  DiffOp::toArray

@since 0.5

@param callable|null $valueConverter optional callback used to convert any
complex values to arrays.

@return array
Returns the Diff in array form where nested DiffOps are also turned into their array form .