Passed
Push — develop ( bc0387...6879d5 )
by nguereza
03:17
created
src/Driver/Driver.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  *
61 61
  * @package Platine\Database\Driver
62 62
  */
63
-class Driver
64
-{
63
+class Driver {
65 64
 
66 65
     /**
67 66
      * The driver default date format
@@ -126,8 +125,7 @@  discard block
 block discarded – undo
126 125
      * Class constructor
127 126
      * @param Connection $connection
128 127
      */
129
-    public function __construct(Connection $connection)
130
-    {
128
+    public function __construct(Connection $connection) {
131 129
         $this->connection = $connection;
132 130
     }
133 131
 
@@ -454,8 +452,7 @@  discard block
 block discarded – undo
454 452
      * @return mixed
455 453
      *
456 454
      */
457
-    protected function value($value)
458
-    {
455
+    protected function value($value) {
459 456
         if (is_numeric($value)) {
460 457
             return $value;
461 458
         }
Please login to merge, or discard this patch.
src/Driver/SQLite.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * Class SQLite
55 55
  * @package Platine\Database\Driver
56 56
  */
57
-class SQLite extends Driver
58
-{
57
+class SQLite extends Driver {
59 58
 
60 59
     /**
61 60
      * @inheritdoc
Please login to merge, or discard this patch.
src/Driver/SQLServer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * Class SQLServer
54 54
  * @package Platine\Database\Driver
55 55
  */
56
-class SQLServer extends Driver
57
-{
56
+class SQLServer extends Driver {
58 57
 
59 58
     /**
60 59
      * @inheritdoc
Please login to merge, or discard this patch.
src/Driver/MySQL.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * Class MySQL
53 53
  * @package Platine\Database\Driver
54 54
  */
55
-class MySQL extends Driver
56
-{
55
+class MySQL extends Driver {
57 56
 
58 57
     /**
59 58
      * @inheritdoc
Please login to merge, or discard this patch.
src/Driver/PostgreSQL.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * Class PostgreSQL
54 54
  * @package Platine\Database\Driver
55 55
  */
56
-class PostgreSQL extends Driver
57
-{
56
+class PostgreSQL extends Driver {
58 57
 
59 58
     /**
60 59
      * @inheritDoc
Please login to merge, or discard this patch.
src/ResultSet.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * Class ResultSet
55 55
  * @package Platine\Database
56 56
  */
57
-class ResultSet
58
-{
57
+class ResultSet {
59 58
 
60 59
     /**
61 60
      * The PDOStatement instance
@@ -67,16 +66,14 @@  discard block
 block discarded – undo
67 66
      * Class constructor
68 67
      * @param PDOStatement $statement
69 68
      */
70
-    public function __construct(PDOStatement $statement)
71
-    {
69
+    public function __construct(PDOStatement $statement) {
72 70
         $this->statement = $statement;
73 71
     }
74 72
 
75 73
     /**
76 74
      * Destructor of the class
77 75
      */
78
-    public function __desctruct()
79
-    {
76
+    public function __desctruct() {
80 77
         $this->statement->closeCursor();
81 78
     }
82 79
 
@@ -124,8 +121,7 @@  discard block
 block discarded – undo
124 121
      * @param callable $callable
125 122
      * @return mixed
126 123
      */
127
-    public function get(callable $callable = null)
128
-    {
124
+    public function get(callable $callable = null) {
129 125
         $result = $this->statement->fetch();
130 126
         $this->statement->closeCursor();
131 127
         if ($callable !== null) {
@@ -140,8 +136,7 @@  discard block
 block discarded – undo
140 136
      *
141 137
      * @return mixed
142 138
      */
143
-    public function next()
144
-    {
139
+    public function next() {
145 140
         return $this->statement->fetch();
146 141
     }
147 142
 
@@ -149,8 +144,7 @@  discard block
 block discarded – undo
149 144
      * Close the cursor
150 145
      * @return mixed
151 146
      */
152
-    public function flush()
153
-    {
147
+    public function flush() {
154 148
         return $this->statement->closeCursor();
155 149
     }
156 150
 
@@ -160,8 +154,7 @@  discard block
 block discarded – undo
160 154
      *
161 155
      * @return mixed
162 156
      */
163
-    public function column(int $col = 0)
164
-    {
157
+    public function column(int $col = 0) {
165 158
         return $this->statement->fetchColumn($col);
166 159
     }
167 160
 
Please login to merge, or discard this patch.
src/Schema.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * Class Schema
54 54
  * @package Platine\Database
55 55
  */
56
-class Schema
57
-{
56
+class Schema {
58 57
 
59 58
     /**
60 59
      * The Connection instance
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
      * Class constructor
85 84
      * @param Connection $connection
86 85
      */
87
-    public function __construct(Connection $connection)
88
-    {
86
+    public function __construct(Connection $connection) {
89 87
         $this->connection = $connection;
90 88
     }
91 89
 
Please login to merge, or discard this patch.
src/Connection.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                     $attr['port'] = $port;
188 188
                 }
189 189
                 
190
-                if ($driverName === 'mysql'){
190
+                if ($driverName === 'mysql') {
191 191
                     //Make MySQL using standard quoted identifier
192 192
                     $commands[] = 'SET SQL_MODE=ANSI_QUOTES';
193 193
                     
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 
592 592
         return preg_replace_callback(
593 593
             '/\?/',
594
-            function () use ($driver, &$params) {
594
+            function() use ($driver, &$params) {
595 595
                 $param = array_shift($params);
596 596
                 $param = is_object($param) ? get_class($param) : $param;
597 597
                 if (is_int($param) || is_float($param)) {
Please login to merge, or discard this patch.
Braces   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
  * Class Connection
65 65
  * @package Platine\Database
66 66
  */
67
-class Connection
68
-{
67
+class Connection {
69 68
 
70 69
     /**
71 70
      * The PDO instance
@@ -131,8 +130,7 @@  discard block
 block discarded – undo
131 130
      * @param Logger $logger
132 131
      * @throws ConnectionException
133 132
      */
134
-    public function __construct(array $config = [], ?Logger $logger = null)
135
-    {
133
+    public function __construct(array $config = [], ?Logger $logger = null) {
136 134
         $this->logger = $logger ? $logger : new Logger(new NullLogger());
137 135
         
138 136
         $defaultConfig = [
@@ -187,7 +185,7 @@  discard block
 block discarded – undo
187 185
                     $attr['port'] = $port;
188 186
                 }
189 187
                 
190
-                if ($driverName === 'mysql'){
188
+                if ($driverName === 'mysql') {
191 189
                     //Make MySQL using standard quoted identifier
192 190
                     $commands[] = 'SET SQL_MODE=ANSI_QUOTES';
193 191
                     
@@ -501,8 +499,7 @@  discard block
 block discarded – undo
501 499
      * @return mixed
502 500
      * @throws QueryException
503 501
      */
504
-    public function exec(string $sql, array $params = [])
505
-    {
502
+    public function exec(string $sql, array $params = []) {
506 503
         return $this->execute($this->prepare($sql, $params));
507 504
     }
508 505
 
@@ -532,8 +529,7 @@  discard block
 block discarded – undo
532 529
      * @return mixed
533 530
      * @throws QueryException
534 531
      */
535
-    public function column(string $sql, array $params = [])
536
-    {
532
+    public function column(string $sql, array $params = []) {
537 533
         $prepared = $this->prepare($sql, $params);
538 534
         $this->execute($prepared);
539 535
 
Please login to merge, or discard this patch.