protected function assignPrimaryTitle(array & $mappers)
    {
        $fieldsWithHeader = array_filter($mappers, function ($mapper) {
            return $mapper->field->isHeader;
        });

        if (count($fieldsWithHeader) == 0) {
            $found = false;

            foreach ($mappers as $mapper) {
                if ($found) {
                    $mapper->field->isHeader = false;
                    continue;
                }
  
                if ($this->isPrimaryHeader($mapper->field) && (! array_key_exists('is-header', $mapper->meta) || $mapper->meta['is-header'])) {
                    $found = true;
                    $mapper->field->isHeader = true;
                }
            }
        }

        return $this;
    }