Removes dots at the end of a configuration array

@param array $settings the array to transformed
@return array $settings the transformed array
347993
protected function removeDots(array $settings): array
    {
        $conf = [];
        foreach ($settings as $key => $value) {
            $conf[$this->removeDotAtTheEnd($key)] = \is_array($value) ? $this->removeDots($value) : $value;
        }
        return $conf;
    }
724415
public function resolve(array $settings = [])
    {
        return new XmlDriver(
            Arr::get($settings, 'paths'),
            Arr::get($settings, 'extension', XmlDriver::DEFAULT_FILE_EXTENSION)
        );
    }
537270
public function remove_setting( $setting ) {
		if ( ! $this->is_setting( $setting ) ) {
			return true;
		}

		$priority = $this->_setting_priority[ $setting ];
		unset( $this->_settings[ $priority ][ $setting ] );
		unset( $this->_setting_priority[ $setting ] );
		if ( empty( $this->_settings[ $priority ] ) ) {
			unset( $this->_settings[ $priority ] );
		}
		foreach ( $this->_groups as $group_priority => $groups ) {
			foreach ( $groups as $group => $settings ) {
				$key = array_search( $setting, $settings );
				if ( false !== $key ) {
					unset( $this->_groups[ $group_priority ][ $group ][ $key ] );
					if ( empty( $this->_groups[ $group_priority ][ $group ] ) ) {
						unset( $this->_groups[ $group_priority ][ $group ] );
						unset( $this->_group_priority[ $group ] );
						if ( empty( $this->_groups[ $group_priority ] ) ) {
							unset( $this->_groups[ $group_priority ] );
						}
					}
					break;
				}
			}
		}

		return true;
	}
1297101
public function remove_default_image_sizes($sizes = [])
    {
        $user_sizes_to_remove = \collect(Config::get('images.image_sizes'))
            ->filter(
                function ($value) {
                    return $value === false;
                }
            )
            ->all();

        $user_sizes_to_remove = \array_keys($user_sizes_to_remove);

        $sizes_to_remove = \array_merge($user_sizes_to_remove, self::DEFAULT_IMAGE_SIZES);

        if (\is_array(\current($sizes))) {
            $sizes = \array_keys($sizes);
        }

        return \array_diff($sizes, $sizes_to_remove);
    }
359591
public function filterConfig($filter, $settings = null)
    {
        if ($settings === null) {
            if (is_string($filter)) {
                return isset($this->_filters[$filter]) ? $this->_filters[$filter] : [];
            }
            if (is_array($filter)) {
                $result = [];
                foreach ($filter as $f) {
                    $result[$f] = $this->filterConfig($f);
                }
                return $result;
            }
        }
        $this->_filters[$filter] = array_map(
            [$this, '_replacePathConstants'],
            $settings
        );
    }
1340132
protected function combineSettings(array $settings)/*# : array */
    {
        return array_replace(
            $this->getBuilder()->getSettings(), // builder settings
            $this->getBuilder()->getDialect()->dialectSettings(), // dialect
            $settings,  // user settings
            $this->getSettings() // statement settings
        );
    }
1056630
public static function get( array $settings = [] ){
		$class_name = get_called_class();
		if( !isset(self::$instances[$class_name]) ){
			self::$instances[$class_name] = new $class_name($settings);
		}
		return self::$instances[$class_name];
	}
451225
public function make(Settings $settings) : string
    {
        $cacheKey = $this->getCacheKey($settings);

        if ($this->hasCachedData($cacheKey)) {
            return $this->getCachedData($cacheKey);
        }

        $settings->hasRequiredSettings();

        return $this->cacheData($cacheKey, $this->createOutput($settings));
    }
1090000
public function enqueue( $settings ) {
		$styles = $this->get_styles();

		if ( ! empty( $styles ) ) {
			$settings['styles'][] = [ 'css' => $styles ];
		}

		return $settings;
	}
1029240
private function setSettings($settings)
    {
        if ($settings) {
            foreach ($this->settings as $key => &$value) {
                if (!empty($settings->{$key}) && $settings->{$key}) {
                    $value = $settings->{$key};
                }
            }
        }
    }
1262584
public static function directories(array $patterns)
    {
        $patterns = array_map(function ($pattern) {
            return trim($pattern, '/');
        }, $patterns);

        foreach ($patterns as $pattern) {
            $patterns[] = Str::endsWith($pattern, '/*')
                ? Str::replaceLast('/*', '', $pattern)
                : $pattern.'/*';
        }

        asort($patterns);

        return array_values(array_unique($patterns));
    }
165615
protected function updateSettingsWithConsoleOptions($settings)
    {
        $directMapSettings = [
            'url', 'set', 'metadataPrefix', 'timeout', 'combineRecordsTag',
            'injectDate', 'injectId', 'injectSetName', 'injectSetSpec',
            'idSearch', 'idReplace', 'dateGranularity', 'harvestedIdLog',
            'badXMLLog', 'httpUser', 'httpPass', 'sslcapath', 'sslcafile',
            'sanitizeRegex',
        ];
        foreach ($directMapSettings as $setting) {
            if ($value = $this->opts->getOption($setting)) {
                $settings[$setting] = $value;
            }
        }
        $flagSettings = [
            'combineRecords' => ['combineRecords', true],
            'v' => ['verbose', true],
            'autosslca' => ['autosslca', true],
            'nosslverifypeer' => ['sslverifypeer', false],
            'sanitize' => ['sanitize', true],
        ];
        foreach ($flagSettings as $in => $details) {
            if ($this->opts->getOption($in)) {
                list($out, $val) = $details;
                $settings[$out] = $val;
            }
        }
        return $settings;
    }
755809
public function setToolSettings($settings = array())
    {

        $url = $this->getSetting('custom_system_setting_url');
        $service = new Service\ToolSettings($this, $url);
        $response = $service->set($settings);

        return $response;

    }
283203
private static function validateFilters($filters, $settings)
    {
        if (!is_array($filters)) {
            $filters = [$filters];
        }

        // Each fitler.
        foreach ($filters as $index => &$filter) {

            // Check this item.
            $filter = self::validateFilterItem($filter, $settings);

            // Remove if invalid.
            if (empty($filter)) {
                unset($filters[$index]);
            }
        }

        return $filters;
    }
212943
protected function storeDateSettings($settings)
    {
        // Set up start/end dates:
        $from = empty($settings['from'])
            ? $this->stateManager->loadDate() : $settings['from'];
        $until = empty($settings['until']) ? null : $settings['until'];
        $this->setStartDate($from);
        $this->setEndDate($until);
    }
1302031
protected function removeNumericAndEmpty(array &$matches)
    {
        foreach ($matches as $idx => $val) {
            if (is_int($idx) || '' === $val) {
                unset($matches[$idx]);
            }
        }
    }
835354
protected function buildPageSettings($settings)
    {
        if (empty($settings)) {
            return $settings;
        }

        $output = [];
        foreach ($settings as $setting) {
            $output[$setting->setting_key] = $setting->setting_value;
        }

        return $output;
    }