Code Duplication    Length = 7-7 lines in 2 locations

lib/private/Setup/OCI.php 1 location

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

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
		}