Code Duplication    Length = 14-14 lines in 2 locations

src/Darya/Database/Connection/MySql.php 1 location

@@ 367-380 (lines=14) @@
364
	 * 
365
	 * @return Error
366
	 */
367
	public function error()
368
	{
369
		$connectionError = $this->connectionError();
370
		
371
		if ($connectionError) {
372
			return $connectionError;
373
		}
374
		
375
		if ($this->lastResult && $this->lastResult->error) {
376
			return $this->lastResult->error;
377
		}
378
		
379
		return null;
380
	}
381
	
382
	/**
383
	 * Retrieve error information from the mysqli connection object.

src/Darya/Database/Connection/Sqlite.php 1 location

@@ 123-136 (lines=14) @@
120
	 * 
121
	 * @return Error
122
	 */
123
	public function error()
124
	{
125
		$connectionError = $this->connectionError();
126
		
127
		if ($connectionError) {
128
			return $connectionError;
129
		}
130
		
131
		if ($this->lastResult && $this->lastResult->error) {
132
			return $this->lastResult->error;
133
		}
134
		
135
		return null;
136
	}
137
	
138
	/**
139
	 * Retrieve error information from the PDO connection object.