Skip to content

Commit dd39d4a

Browse files
committed
fixed spacing
1 parent ff17dd5 commit dd39d4a

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

flight/database/SimplePdo.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ public function fetchAll(string $sql, array $params = []): array
247247
*
248248
* @param string $sql
249249
* @param array<int|string,mixed> $params
250+
*
250251
* @return array<int,mixed>
251252
*/
252253
public function fetchColumn(string $sql, array $params = []): array
@@ -262,6 +263,7 @@ public function fetchColumn(string $sql, array $params = []): array
262263
*
263264
* @param string $sql
264265
* @param array<int|string,mixed> $params
266+
*
265267
* @return array<string|int,mixed>
266268
*/
267269
public function fetchPairs(string $sql, array $params = []): array
@@ -280,7 +282,9 @@ public function fetchPairs(string $sql, array $params = []): array
280282
* });
281283
*
282284
* @param callable $callback
285+
*
283286
* @return mixed The return value of the callback
287+
*
284288
* @throws \Throwable
285289
*/
286290
public function transaction(callable $callback)
@@ -310,6 +314,7 @@ public function transaction(callable $callback)
310314
*
311315
* @param string $table
312316
* @param array<string,mixed>|array<int,array<string,mixed>> $data Single row or array of rows
317+
*
313318
* @return string Last insert ID (for single insert or last row of bulk insert)
314319
*/
315320
public function insert(string $table, array $data): string
@@ -386,6 +391,7 @@ public function insert(string $table, array $data): string
386391
* @param array<string,mixed> $data
387392
* @param string $where - e.g., "id = ?"
388393
* @param array<int|string,mixed> $whereParams
394+
*
389395
* @return int Number of affected rows (rows where data actually changed)
390396
*/
391397
public function update(string $table, array $data, string $where, array $whereParams = []): int
@@ -415,6 +421,7 @@ public function update(string $table, array $data, string $where, array $wherePa
415421
* @param string $table
416422
* @param string $where - e.g., "id = ?"
417423
* @param array<int|string,mixed> $whereParams
424+
*
418425
* @return int Number of deleted rows
419426
*/
420427
public function delete(string $table, string $where, array $whereParams = []): int
@@ -423,5 +430,4 @@ public function delete(string $table, string $where, array $whereParams = []): i
423430
$stmt = $this->runQuery($sql, $whereParams);
424431
return $stmt->rowCount();
425432
}
426-
427-
}
433+
}

flight/net/Request.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -177,24 +177,24 @@ public function __construct(array $config = [])
177177
$base = '/'; // @codeCoverageIgnore
178178
}
179179
$config = [
180-
'url' => $url,
181-
'base' => $base,
182-
'method' => $this->getMethod(),
183-
'referrer' => $this->getVar('HTTP_REFERER'),
184-
'ip' => $this->getVar('REMOTE_ADDR'),
185-
'ajax' => $this->getVar('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest',
186-
'scheme' => $scheme,
180+
'url' => $url,
181+
'base' => $base,
182+
'method' => $this->getMethod(),
183+
'referrer' => $this->getVar('HTTP_REFERER'),
184+
'ip' => $this->getVar('REMOTE_ADDR'),
185+
'ajax' => $this->getVar('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest',
186+
'scheme' => $scheme,
187187
'user_agent' => $this->getVar('HTTP_USER_AGENT'),
188-
'type' => $this->getVar('CONTENT_TYPE'),
189-
'length' => intval($this->getVar('CONTENT_LENGTH', 0)),
190-
'query' => new Collection($_GET),
191-
'data' => new Collection($_POST),
192-
'cookies' => new Collection($_COOKIE),
193-
'files' => new Collection($_FILES),
194-
'secure' => $scheme === 'https',
195-
'accept' => $this->getVar('HTTP_ACCEPT'),
196-
'proxy_ip' => $this->getProxyIpAddress(),
197-
'host' => $this->getVar('HTTP_HOST'),
188+
'type' => $this->getVar('CONTENT_TYPE'),
189+
'length' => intval($this->getVar('CONTENT_LENGTH', 0)),
190+
'query' => new Collection($_GET),
191+
'data' => new Collection($_POST),
192+
'cookies' => new Collection($_COOKIE),
193+
'files' => new Collection($_FILES),
194+
'secure' => $scheme === 'https',
195+
'accept' => $this->getVar('HTTP_ACCEPT'),
196+
'proxy_ip' => $this->getProxyIpAddress(),
197+
'host' => $this->getVar('HTTP_HOST'),
198198
'servername' => $this->getVar('SERVER_NAME', ''),
199199
];
200200
}
@@ -463,7 +463,7 @@ public static function getScheme(): string
463463
*/
464464
public function negotiateContentType(array $supported): ?string
465465
{
466-
$accept = $this->header('Accept') ?? '';
466+
$accept = $this->header('Accept') ?: '';
467467
if ($accept === '') {
468468
return $supported[0];
469469
}

tests/SimplePdoTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,5 +444,4 @@ public function testFetchFieldReturnsFirstColumn(): void
444444
$id = $this->db->fetchField('SELECT id, name FROM users WHERE id = ?', [1]);
445445
$this->assertEquals(1, $id);
446446
}
447-
448447
}

0 commit comments

Comments
 (0)