src/Adapter/Goodby/Interpreter.php
private function checkRowConsistency(array $row)
    {

        // query whether or not strict mode is enabled
        if ($this->isNotStrict()) {
            return;
        }

        // count the number of columns
        $current = count($row);

        // if the row consistency has not been set, set it
        if ($this->rowConsistency === null) {
            $this->rowConsistency = $current;
        }

        // check row consistency
        if ($current !== $this->rowConsistency) {
            throw new StrictViolationException(sprintf('Column size should be %u, but %u columns given', $this->rowConsistency, $current));
        }

        // set the new row consistency
        $this->rowConsistency = $current;
    }
private function checkRowConsistency(array $row)
    {

        // query whether or not strict mode is enabled
        if ($this->isNotStrict()) {
            return;
        }

        // count the number of columns
        $current = count($row);

        // if the row consistency has not been set, set it
        if ($this->rowConsistency === null) {
            $this->rowConsistency = $current;
        }

        // check row consistency
        if ($current !== $this->rowConsistency) {
            throw new StrictViolationException(sprintf('Column size should be %u, but %u columns given', $this->rowConsistency, $current));
        }

        // set the new row consistency
        $this->rowConsistency = $current;
    }
Check if the column count is consistent with comparing other rows.

@param array $row The row that has to be processed

@return void
@throws \Goodby\CSV\Export\Standard\Exception\StrictViolationException Is thrown, if row consistency check fails