Code Duplication    Length = 7-8 lines in 2 locations

lib/private/legacy/util.php 2 locations

@@ 662-668 (lines=7) @@
659
		}
660
661
		// Check if server running on Windows platform
662
		if(OC_Util::runningOnWindows()) {
663
			$errors[] = [
664
				'error' => $l->t('Microsoft Windows Platform is not supported'),
665
				'hint' => $l->t('Running Nextcloud Server on the Microsoft Windows platform is not supported. We suggest you ' .
666
					'use a Linux server in a virtual machine if you have no option for migrating the server itself.')
667
			];
668
		}
669
670
		// Check if config folder is writable.
671
		if(!OC_Helper::isReadOnlyConfigEnabled()) {
@@ 725-732 (lines=8) @@
722
			}
723
		}
724
725
		if (!OC_Util::isSetLocaleWorking()) {
726
			$errors[] = array(
727
				'error' => $l->t('Setting locale to %s failed',
728
					array('en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/'
729
						. 'pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8')),
730
				'hint' => $l->t('Please install one of these locales on your system and restart your webserver.')
731
			);
732
		}
733
734
		// Contains the dependencies that should be checked against
735
		// classes = class_exists