protected function retrieveIndexOfFieldDescriptor(
        FieldDescriptorInterface $fieldDescriptor,
        array $fieldDescriptors
    ) {
        foreach ($fieldDescriptors as $index => $other) {
            if ($fieldDescriptor->compare($other)) {
                return $index;
            }
        }

        return false;
    }