Code Duplication    Length = 7-7 lines in 2 locations

lib/private/Setup/AbstractDatabase.php 1 location

@@ 68-74 (lines=7) @@
65
66
	public function validate($config) {
67
		$errors = array();
68
		if(empty($config['dbuser']) && empty($config['dbname'])) {
69
			$errors[] = $this->trans->t("%s enter the database username and name.", array($this->dbprettyname));
70
		} else if(empty($config['dbuser'])) {
71
			$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
72
		} else if(empty($config['dbname'])) {
73
			$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
74
		}
75
		if(substr_count($config['dbname'], '.') >= 1) {
76
			$errors[] = $this->trans->t("%s you may not use dots in the database name", array($this->dbprettyname));
77
		}

lib/private/Setup/OCI.php 1 location

@@ 57-63 (lines=7) @@
54
55
	public function validate($config) {
56
		$errors = array();
57
		if (empty($config['dbuser']) && empty($config['dbname'])) {
58
			$errors[] = $this->trans->t("%s enter the database username and name.", array($this->dbprettyname));
59
		} else if (empty($config['dbuser'])) {
60
			$errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
61
		} else if (empty($config['dbname'])) {
62
			$errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
63
		}
64
		return $errors;
65
	}
66