Code Duplication    Length = 12-12 lines in 2 locations

src/DB/DbService.php 2 locations

@@ 116-127 (lines=12) @@
113
	 * @param int $fetchmode
114
	 * @return array|mixed
115
	 */
116
	public function row( $query, $params = null, $fetchmode = \PDO::FETCH_ASSOC )
117
	{
118
		$this->queryInit( $query, $params );
119
120
		if ( $this->lastStatement === self::QUERY_TYPE_EXPLAIN )
121
			return $this->sQuery->fetchAll( \PDO::FETCH_ASSOC );
122
123
		$result = $this->sQuery->fetch( $fetchmode );
124
		$this->sQuery->closeCursor(); // Frees up the connection to the server so that other SQL statements may be issued,
125
126
		return $result;
127
	}
128
129
	/**
130
	 * @param string $query
@@ 134-145 (lines=12) @@
131
	 * @param array $params
132
	 * @return mixed|array
133
	 */
134
	public function single( $query, $params = null )
135
	{
136
		$this->queryInit( $query, $params );
137
138
		if ( $this->lastStatement === self::QUERY_TYPE_EXPLAIN )
139
			return $this->sQuery->fetchAll( \PDO::FETCH_ASSOC );
140
141
		$result = $this->sQuery->fetchColumn();
142
		$this->sQuery->closeCursor(); // Frees up the connection to the server so that other SQL statements may be issued
143
144
		return $result;
145
	}
146
147
148
	/**