public function validate(): bool
    {
        // The number of columns
        $numberOfColumns = null;

        // Reset the errors
        $this->errors = [];

        // Check that there are rows in the data
        if (0 >= count($this->data)) {
            $message        = 'There are no rows in the table';
            $this->errors[] = $message;

            return false;
        }

        // Check that all rows have the same number of columns
        foreach ($this->data as $row) {
            $found = count($row);

            if (null === $numberOfColumns) {
                $numberOfColumns = $found;
            }

            if ($numberOfColumns !== $found) {
                $message = sprintf(
                    'The number of columns mismatches. First row has %s columns while column %s has %s.',
                    $numberOfColumns,
                    key($row),
                    $found
                );
                $this->errors[] = $message;
            }
        }

        return 0 < count($this->errors) ? false : true;
    }