@@ -35,14 +35,21 @@ class ClickHouseConnection implements \Doctrine\DBAL\Driver\Connection
35
35
/**
36
36
* Connection constructor
37
37
*
38
- * @param string $username The username to use when connecting.
39
- * @param string $password The password to use when connecting.
38
+ * @param string $username The username to use when connecting.
39
+ * @param string $password The password to use when connecting.
40
40
* @param string $host
41
41
* @param int $port
42
42
* @param string $database
43
+ * @param AbstractPlatform $platform
43
44
*/
44
- public function __construct ($ username = 'default ' , $ password = '' , $ host = 'localhost ' , $ port = 8123 , $ database = 'default ' , AbstractPlatform $ platform = null )
45
- {
45
+ public function __construct (
46
+ $ username = 'default ' ,
47
+ $ password = '' ,
48
+ $ host = 'localhost ' ,
49
+ $ port = 8123 ,
50
+ $ database = 'default ' ,
51
+ AbstractPlatform $ platform
52
+ ) {
46
53
$ this ->smi2CHClient = new Smi2CHClient ([
47
54
'host ' => $ host ,
48
55
'port ' => $ port ,
@@ -59,7 +66,7 @@ public function __construct($username = 'default', $password = '', $host = 'loca
59
66
*/
60
67
public function prepare ($ prepareString )
61
68
{
62
- if (! $ this ->smi2CHClient ) {
69
+ if (!$ this ->smi2CHClient ) {
63
70
throw new \Exception ('ClickHouse\Client was not initialized ' );
64
71
}
65
72
@@ -71,7 +78,7 @@ public function prepare($prepareString)
71
78
*/
72
79
public function query ()
73
80
{
74
- $ args = func_get_args ();
81
+ $ args = \ func_get_args ();
75
82
$ stmt = $ this ->prepare ($ args [0 ]);
76
83
$ stmt ->execute ();
77
84
@@ -83,7 +90,7 @@ public function query()
83
90
*/
84
91
public function quote ($ input , $ type = \PDO ::PARAM_STR )
85
92
{
86
- if (\PDO ::PARAM_INT == $ type ) {
93
+ if (\PDO ::PARAM_INT === $ type ) {
87
94
return $ input ;
88
95
}
89
96
@@ -148,5 +155,4 @@ public function errorInfo()
148
155
{
149
156
throw new \LogicException ('You need to implement ClickHouseConnection::errorInfo() ' );
150
157
}
151
-
152
- }
158
+ }
0 commit comments