Skip to content

Commit 0a1e659

Browse files
authored
The dreaded formatting PR (#99)
* The dreaded formatting commit * Fix a few remaining tests * Apply hackfmt with applicable args
1 parent 395f442 commit 0a1e659

File tree

72 files changed

+9124
-9145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+9124
-9145
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
"userEnvProbe": "loginShell",
88

99
// Add the IDs of extensions you want installed when the container is created.
10-
"extensions": [
11-
"pranayagarwal.vscode-hack"
12-
],
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"pranayagarwal.vscode-hack"
14+
]
15+
}
16+
},
1317

1418
"mounts": [],
1519

.hhconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
hackfmt.line_width=120
2+
hackfmt.tabs=true
23
allowed_decl_fixme_codes=2053,3012,4045,4047,4341
34
allowed_fixme_codes_strict=2011,2049,2050,2053,2083,3012,3084,4027,4038,4045,4047,4104,4105,4106,4107,4108,4110,4128,4135,4188,4223,4240,4323,4341,4390,4401
4-
5-

bin/setup-devcontainer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ echo ""
3939

4040
# Install dependencies
4141
echo "Installing dependencies..."
42-
php composer.phar install
42+
php composer.phar install --ignore-platform-reqs
4343
echo ""
4444

src/AsyncMysql/AsyncMysqlClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function setPoolsConnectionLimit(int $_limit): void {}
2525
int $_tcp_timeout_micros = 0,
2626
string $_sni_server_name = '',
2727
string $_server_cert_extension = '',
28-
string $_server_cert_values = '',
28+
string $_server_cert_values = '',
2929
): Awaitable<\AsyncMysqlConnection> {
3030
return new AsyncMysqlConnection($host, $port, $dbname);
3131
}

src/AsyncMysql/AsyncMysqlClientStats.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99
<<__MockClass>>
1010
final class AsyncMysqlClientStats extends \AsyncMysqlClientStats {
1111

12-
/* HH_IGNORE_ERROR[3012] I don't want to call parent::construct */
13-
public function __construct() {}
12+
/* HH_IGNORE_ERROR[3012] I don't want to call parent::construct */
13+
public function __construct() {}
1414

15-
<<__Override>>
16-
public function ioEventLoopMicrosAvg(): float {
17-
return 0.0;
18-
}
19-
<<__Override>>
20-
public function callbackDelayMicrosAvg(): float {
21-
return 0.0;
22-
}
23-
<<__Override>>
24-
public function ioThreadBusyMicrosAvg(): float {
25-
return 0.0;
26-
}
27-
<<__Override>>
28-
public function ioThreadIdleMicrosAvg(): float {
29-
return 0.0;
30-
}
31-
<<__Override>>
32-
public function notificationQueueSize(): int {
33-
return 0;
34-
}
15+
<<__Override>>
16+
public function ioEventLoopMicrosAvg(): float {
17+
return 0.0;
18+
}
19+
<<__Override>>
20+
public function callbackDelayMicrosAvg(): float {
21+
return 0.0;
22+
}
23+
<<__Override>>
24+
public function ioThreadBusyMicrosAvg(): float {
25+
return 0.0;
26+
}
27+
<<__Override>>
28+
public function ioThreadIdleMicrosAvg(): float {
29+
return 0.0;
30+
}
31+
<<__Override>>
32+
public function notificationQueueSize(): int {
33+
return 0;
34+
}
3535
}

src/AsyncMysql/AsyncMysqlConnectResult.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44

55
<<__MockClass>>
66
final class AsyncMysqlConnectResult extends \AsyncMysqlConnectResult {
7-
private float $elapsed;
8-
private float $start;
7+
private float $elapsed;
8+
private float $start;
99

10-
/* HH_IGNORE_ERROR[3012] I don't want to call parent::construct */
11-
public function __construct(bool $from_pool) {
12-
// pretend connections take longer if they don't come from the pool
13-
if ($from_pool) {
14-
$this->elapsed = .001;
15-
} else {
16-
$this->elapsed = .01;
17-
}
18-
$this->start = \microtime(true);
19-
}
10+
/* HH_IGNORE_ERROR[3012] I don't want to call parent::construct */
11+
public function __construct(bool $from_pool) {
12+
// pretend connections take longer if they don't come from the pool
13+
if ($from_pool) {
14+
$this->elapsed = .001;
15+
} else {
16+
$this->elapsed = .01;
17+
}
18+
$this->start = \microtime(true);
19+
}
2020

21-
<<__Override>>
22-
public function elapsedMicros(): int {
23-
return (int)($this->elapsed * 1000000);
24-
}
25-
<<__Override>>
26-
public function startTime(): float {
27-
return $this->start;
28-
}
29-
<<__Override>>
30-
public function endTime(): float {
31-
return $this->start + $this->elapsed;
32-
}
21+
<<__Override>>
22+
public function elapsedMicros(): int {
23+
return (int)($this->elapsed * 1000000);
24+
}
25+
<<__Override>>
26+
public function startTime(): float {
27+
return $this->start;
28+
}
29+
<<__Override>>
30+
public function endTime(): float {
31+
return $this->start + $this->elapsed;
32+
}
3333

34-
<<__Override>>
35-
public function clientStats(): \AsyncMysqlClientStats {
36-
return new AsyncMysqlClientStats();
37-
}
34+
<<__Override>>
35+
public function clientStats(): \AsyncMysqlClientStats {
36+
return new AsyncMysqlClientStats();
37+
}
3838
}

0 commit comments

Comments
 (0)