Passed
Push — master ( 78ff77...606203 )
by Aimeos
04:53
created

None   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 9
dl 0
loc 78
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A rollback() 0 3 1
A getRawObject() 0 3 1
A connect() 0 3 1
A begin() 0 3 1
A commit() 0 3 1
A create() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Metaways Infosystems GmbH, 2014
6
 * @copyright Aimeos (aimeos.org), 2015-2022
7
 * @package MW
8
 * @subpackage DB
9
 */
10
11
12
namespace Aimeos\Base\DB\Connection;
13
14
15
/**
16
 * Dummy database connection class.
17
 *
18
 * @package MW
19
 * @subpackage DB
20
 */
21
class None
22
	extends \Aimeos\Base\DB\Connection\Base
23
	implements \Aimeos\Base\DB\Connection\Iface
24
{
25
	/**
26
	 * Connects (or reconnects) to the database server
27
	 *
28
	 * @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining
29
	 */
30
	public function connect() : Iface
31
	{
32
		throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' );
33
	}
34
35
36
	/**
37
	 * Creates a database statement.
38
	 *
39
	 * Throws an exception because there is no implementation available.
40
	 *
41
	 * @param string $sql SQL statement, maybe with place holders
42
	 * @throws \Aimeos\Base\DB\Exception
43
	 */
44
	public function create( string $sql ) : \Aimeos\Base\DB\Statement\Iface
45
	{
46
		throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' );
47
	}
48
49
50
	/**
51
	 * Returns the underlying connection object
52
	 *
53
	 * Throws an exception because there is no implementation available.
54
	 *
55
	 * @throws \Aimeos\Base\DB\Exception
56
	 */
57
	public function getRawObject()
58
	{
59
		throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' );
60
	}
61
62
63
	/**
64
	 * Starts a transaction for this connection.
65
	 *
66
	 * Throws an exception because there is no implementation available.
67
	 *
68
	 * @throws \Aimeos\Base\DB\Exception
69
	 */
70
	public function begin() : Iface
71
	{
72
		throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' );
73
	}
74
75
76
	/**
77
	 * Commits the changes done inside of the transaction to the storage.
78
	 *
79
	 * Throws an exception because there is no implementation available.
80
	 *
81
	 * @throws \Aimeos\Base\DB\Exception
82
	 */
83
	public function commit() : Iface
84
	{
85
		throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' );
86
	}
87
88
89
	/**
90
	 * Discards the changes done inside of the transaction.
91
	 *
92
	 * Throws an exception because there is no implementation available.
93
	 *
94
	 * @throws \Aimeos\Base\DB\Exception
95
	 */
96
	public function rollback() : Iface
97
	{
98
		throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' );
99
	}
100
}
101