Completed
Push — master ( 7ae271...1d9f92 )
by Ron
01:09
created
src/FakePDO.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function prepare($statement, $options = NULL) {
40 40
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
41
-		return $this->invokeEventHandler($methodName, array($statement, $options), function () {
41
+		return $this->invokeEventHandler($methodName, array($statement, $options), function() {
42 42
 			return new FakePDOStatement($this->getEventHandler());
43 43
 		});
44 44
 	}
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function beginTransaction() {
50 50
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
51
-		return $this->invokeEventHandler($methodName, array(), function () {
51
+		return $this->invokeEventHandler($methodName, array(), function() {
52 52
 			$inTransaction = $this->inTransaction();
53
-			if($inTransaction) {
53
+			if ($inTransaction) {
54 54
 				return false;
55 55
 			} else {
56 56
 				$this->inTransaction = true;
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function commit() {
66 66
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
67
-		return $this->invokeEventHandler($methodName, array(), function () {
67
+		return $this->invokeEventHandler($methodName, array(), function() {
68 68
 			$inTransaction = $this->inTransaction();
69
-			if($inTransaction) {
69
+			if ($inTransaction) {
70 70
 				$this->inTransaction = false;
71 71
 				return true;
72 72
 			} else {
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function rollback() {
82 82
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
83
-		return $this->invokeEventHandler($methodName, array(), function () {
83
+		return $this->invokeEventHandler($methodName, array(), function() {
84 84
 			$inTransaction = $this->inTransaction();
85
-			if($inTransaction) {
85
+			if ($inTransaction) {
86 86
 				$this->inTransaction = false;
87 87
 				return true;
88 88
 			} else {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function inTransaction() {
98 98
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
99
-		return $this->invokeEventHandler($methodName, array(), function () {
99
+		return $this->invokeEventHandler($methodName, array(), function() {
100 100
 			return $this->inTransaction;
101 101
 		});
102 102
 	}
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
 	 */
108 108
 	public function getAttribute($attribute) {
109 109
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
110
-		return $this->invokeEventHandler($methodName, array($attribute), function ($attribute) {
110
+		return $this->invokeEventHandler($methodName, array($attribute), function($attribute) {
111 111
 			$attribute = json_encode($attribute);
112
-			if(array_key_exists($attribute, $this->attributes)) {
112
+			if (array_key_exists($attribute, $this->attributes)) {
113 113
 				return $this->attributes[$attribute];
114 114
 			}
115 115
 			return null;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function setAttribute($attribute, $value) {
125 125
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
126
-		return $this->invokeEventHandler($methodName, array($attribute, $value), function ($attribute, $value) {
126
+		return $this->invokeEventHandler($methodName, array($attribute, $value), function($attribute, $value) {
127 127
 			$attribute = json_encode($attribute);
128 128
 			$this->attributes[$attribute] = $value;
129 129
 			return true;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public function exec($statement) {
138 138
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
139
-		return $this->invokeEventHandler($methodName, array($statement), function () {
139
+		return $this->invokeEventHandler($methodName, array($statement), function() {
140 140
 			return 1;
141 141
 		});
142 142
 	}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function query($statement, ?int $fetchMode = null, ...$fetchModeArgs) {
149 149
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
150
-		return $this->invokeEventHandler($methodName, array($statement), function () {
150
+		return $this->invokeEventHandler($methodName, array($statement), function() {
151 151
 			return new FakePDOStatement($this->getEventHandler());
152 152
 		});
153 153
 	}
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function lastInsertId($name = null) {
160 160
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
161
-		return $this->invokeEventHandler($methodName, array($name), function () {
161
+		return $this->invokeEventHandler($methodName, array($name), function() {
162 162
 			return null;
163 163
 		});
164 164
 	}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function errorCode() {
170 170
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
171
-		return $this->invokeEventHandler($methodName, array(), function () {
171
+		return $this->invokeEventHandler($methodName, array(), function() {
172 172
 			return null;
173 173
 		});
174 174
 	}
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	public function errorInfo() {
180 180
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
181
-		return $this->invokeEventHandler($methodName, array(), function () {
181
+		return $this->invokeEventHandler($methodName, array(), function() {
182 182
 			return [0, 0, 0];
183 183
 		});
184 184
 	}
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	public function quote($string, $parameter_type = PDO::PARAM_STR) {
192 192
 		$methodName = $this->methodNameGeneratorA->getQualifiedMethodName(__FUNCTION__);
193
-		return $this->invokeEventHandler($methodName, array($string, $parameter_type), function ($string) {
193
+		return $this->invokeEventHandler($methodName, array($string, $parameter_type), function($string) {
194 194
 			return $string;
195 195
 		});
196 196
 	}
Please login to merge, or discard this patch.