• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aimeos / aimeos-base / 9a88e0a7-980e-437e-88ad-cb0e15106d32

07 Oct 2023 07:33AM UTC coverage: 88.407% (-0.3%) from 88.685%
9a88e0a7-980e-437e-88ad-cb0e15106d32

push

circleci

web-flow
[BUG] php 8.2 object type casting to int (#2)

1 of 1 new or added line in 1 file covered. (100.0%)

1693 of 1915 relevant lines covered (88.41%)

6.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/DB/Connection/Iface.php
1
<?php
2

3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2023
6
 * @package Base
7
 * @subpackage DB
8
 */
9

10

11
namespace Aimeos\Base\DB\Connection;
12

13

14
/**
15
 * Required functions for database connection objects.
16
 *
17
 * @package Base
18
 * @subpackage DB
19
 */
20
interface Iface
21
{
22
        /**
23
         * Initializes the DBAL connection object
24
         *
25
         * @param array $params Associative list of connection parameters
26
         */
27
        public function __construct( array $params );
28

29
        /**
30
         * Closes the connection to the database server
31
         *
32
         * @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining
33
         */
34
        public function close() : Iface;
35

36
        /**
37
         * Connects (or reconnects) to the database server
38
         *
39
         * @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining
40
         */
41
        public function connect() : Iface;
42

43
        /**
44
         * Creates a database statement.
45
         *
46
         * @param string $sql SQL statement, maybe with place holders
47
         * @return \Aimeos\Base\DB\Statement\Iface
48
         */
49
        public function create( string $sql ) : \Aimeos\Base\DB\Statement\Iface;
50

51
        /**
52
         * Escapes the value if necessary for direct inclusion in SQL statement.
53
         *
54
         * @param string|null $data Value to escape or null for no value
55
         * @return string Escaped string
56
         */
57
        public function escape( string $data = null ) : string;
58

59
        /**
60
         * Returns a quoted identifier for the passed name
61
         *
62
         * @param string $name Identifier name
63
         * @return string Quoted identifier
64
         * @throws \Aimeos\Base\DB\Exception If identifier name already contains a quote character
65
         */
66
        public function qi( string $name ) : string;
67

68
        /**
69
         * Returns the underlying connection object
70
         *
71
         * @return mixed Underlying connection object
72
         */
73
        public function getRawObject();
74

75
        /**
76
         * Checks if a transaction is currently running
77
         *
78
         * @return bool True if transaction is currently running, false if not
79
         */
80
        public function inTransaction() : bool;
81

82
        /**
83
         * Starts a transaction for this connection.
84
         *
85
         * Transactions can't be nested and a new transaction can only be started
86
         * if the previous transaction was committed or rolled back before.
87
         *
88
         * @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining
89
         */
90
        public function begin() : Iface;
91

92
        /**
93
         * Commits the changes done inside of the transaction to the storage.
94
         *
95
         * @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining
96
         */
97
        public function commit() : Iface;
98

99
        /**
100
         * Discards the changes done inside of the transaction.
101
         *
102
         * @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining
103
         */
104
        public function rollback() : Iface;
105

106
        /**
107
         * Deletes the records from the given table
108
         *
109
         * @param string $table Name of the table
110
         * @param array $conditions Key/value pairs of column names and value to compare with
111
         * @return \Aimeos\Base\DB\Result\Iface Result object
112
         */
113
        public function delete( string $table, array $conditions = [] ) : \Aimeos\Base\DB\Result\Iface;
×
114

115
        /**
116
         * Inserts a record into the given table
117
         *
118
         * @param string $table Name of the table
119
         * @param array $data Key/value pairs of column name/value to insert
120
         * @return \Aimeos\Base\DB\Result\Iface Result object
121
         */
122
        public function insert( string $table, array $data ) : \Aimeos\Base\DB\Result\Iface;
123

124
        /**
125
         * Executes a custom SQL query
126
         *
127
         * @param string $sql Custom SQL statement
128
         * @param array $params List of positional parameters
129
         * @return \Aimeos\Base\DB\Result\Iface Result object
130
         */
131
        public function query( string $sql, array $params = [] ) : \Aimeos\Base\DB\Result\Iface;
×
132

133
        /**
134
         * Updates the records from the given table
135
         *
136
         * @param string $table Name of the table
137
         * @param array $data Key/value pairs of column name/value to update
138
         * @param array $conditions Key/value pairs of column names and value to compare with
139
         * @return \Aimeos\Base\DB\Result\Iface Result object
140
         */
141
        public function update( string $table, array $data, array $conditions = [] ) : \Aimeos\Base\DB\Result\Iface;
×
142
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc