@param     $diff
@param int $offset

@return \ViKon\Diff\DiffGroup[]
331014
private function buildGroups($diff, $offset = 2) {
        $groups = [];

        for ($i = 0; $i < count($diff); $i++) {
            if (!$diff[$i] instanceof UnmodifiedEntry) {
                $group = new DiffGroup();

                // Beginning offset
                for ($j = $i - 1; $j >= $i - $offset && $j >= 0; $j--) {
                    if ($diff[$j] instanceof UnmodifiedEntry) {
                        $group->addEntry($diff[$j], true);
                    }
                }

                for (; $i < count($diff) && !$diff[$i] instanceof UnmodifiedEntry; $i++) {
                    $group->addEntry($diff[$i]);
                }

                // Ending offset
                for ($j = $i; $j <= $i + $offset - 1 && $j < count($diff); $j++) {
                    if ($diff[$j] instanceof UnmodifiedEntry) {
                        $group->addEntry($diff[$j]);
                    }
                }

                $groups[] = $group;
            }
        }

        return $groups;
    }
821516
public function offsetGet($offset)
    {
        if (!isset($this->values[$offset])) {
            $this->values[$offset] = $this->dependencies[$offset]($this);
        }

        return $this->values[$offset];
    }
624818
public function checkIgnoreDiffKeys(array $diff) {
    $result = [];
    $rules = $this->getRules();

    foreach ($diff as $config_key) {
      $ignore_key = FALSE;
      foreach ($rules as $rule) {
        if ($this->applyRule($config_key, $rule)) {
          // If any of rules are suitable - ignore changes for this config key.
          $ignore_key = TRUE;
        }
      }
      $result[$config_key] = $ignore_key;
    }

    // If at least one of the keys has FALSE - return FALSE.
    // This mean that we have changes, that can't be ignored.
    return !in_array(FALSE, $result);
  }
1294933
protected function setHeader(int $offset): array
    {
        $header = $this->seekRow($offset);
        if (false === $header || [] === $header) {
            throw new Exception(sprintf('The header record does not exist or is empty at offset: `%s`', $offset));
        }

        if (0 === $offset) {
            return $this->removeBOM($header, mb_strlen($this->getInputBOM()), $this->enclosure);
        }

        return $header;
    }
1365018
public function offsetGet($offset)
    {
        if (!isset($this->container[$offset])) {
            $this->container[$offset] = new self();
        }

        return $this->container[$offset];
    }
157579
private function updateDiffTable(TableDiff $diff)
    {
        foreach (array_keys($this->paramMap) as $param) {
            if (!empty($diff->{$param})) {
                return $diff;
            }
        }

        return false;
    }
1339533
private function getChangedIndexes($tableName, TableDiff $diff)
    {
        /** @var $index \Doctrine\DBAL\Schema\Index */
        foreach ($diff->changedIndexes as $index) {
            $this->addMessage($tableName, sprintf('invalid index on `%s`', implode(', ', $index->getUnquotedColumns())));
        }
    }
934562
protected static function _getDiff(array $a, array $b) {

		self::$_lDiff = [
			'$set' => [],
			'$unset' => [],
		];

		self::_getDiffRecursion($a, $b);

		self::$_lDiff['$set'] = array_map(function ($v) {
			if ($v === []) {
				return new stdClass();
			}
			return $v;
		}, self::$_lDiff['$set']);

		self::$_lDiff = array_filter(self::$_lDiff);

		return self::$_lDiff;
	}
662860
public function getChangelog($diff = null)
    {
        if (!$diff) {
            return $this->data['changelog'];
        }

        $diffLog = [];
        foreach ((array)$this->data['changelog'] as $version => $changelog) {
            preg_match("/[\w\-\.]+/", $version, $cleanVersion);

            if (!$cleanVersion || version_compare($diff, $cleanVersion[0], '>=')) {
                continue;
            }

            $diffLog[$version] = $changelog;
        }

        return $diffLog;
    }
681156
public function offsetGet($offset)
    {
        if ($this->items === null) {
            $this->fillItems();
        }

        return $this->items[$offset];
    }
71312
public function offset($offset = 0)
	{
		if (is_null($this->offset))
		{
			$this->offset = new QueryElement('OFFSET', (int) $offset);
		}

		return $this;
	}
1013450
protected function offsetIsAllowed($offset)
    {
        return (is_null($offset) || (((string)(int)$offset) == $offset) || is_int($offset));
    }
1346424
public function adjustDiff(TableDiff $tableDiff)
    {
        /** @var IgnoredChange $ignoredChange */
        foreach ($this->ignoredChanges as $ignoredChange) {
            $alterName = $ignoredChange->getAlteration();

            // Array like 'changedColumns', 'changedIndexes', or 'changedForeignKeys'
            $schemaUpdateType = $tableDiff->$alterName;

            if (empty($schemaUpdateType)) {
                continue;
            }

            $this->checkChangedProperties($tableDiff, $schemaUpdateType, $alterName, $ignoredChange);
        }

        return $this->updateDiffTable($tableDiff);
    }
941490
private function findDiff($new)
    {
        $old = $this->oldValues;
        $diff = [];

        foreach ($new as $key => $value) {
            if (!isset($old[$key]) || $old[$key] !== $new[$key]) {
                $diff[$key] = $value;
            }
        }

        return $diff;
    }
1028894
public function offsetGet($offset) {

		return isset($this->values[$offset]) ? $this->values[$offset] : NULL;

	}
1273525
public function increment($key, $offset = 1)
    {
        $key = $this->_key($key);

        return xcache_inc($key, $offset);
    }
332484
protected function & getArrayByReference(&$offset)
    {
        $offset = explode(self::SEPARATOR, $offset);

        if (count($offset) > 1) {
            $arr = &$this->getFromArray($this->storage, array_slice($offset, 0, -1), false);
        } else {
            $arr = &$this->storage;
        }

        $offset = array_slice($offset, -1);
        $offset = reset($offset);

        return $arr;
    }