Skip to content

Commit af93e4d

Browse files
committed
Fix CS
1 parent 366fb9f commit af93e4d

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

src/FpmRuntime/FpmHandler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ public function start(): void
8282
'php-fpm',
8383
'--nodaemonize',
8484
'--force-stderr',
85-
'--fpm-config', $this->configFile,
85+
'--fpm-config',
86+
$this->configFile,
8687
// Override ini settings to force disabling display_errors
8788
// Displaying errors in the HTTP response is a security risk
88-
'-d', 'display_errors=0',
89+
'-d',
90+
'display_errors=0',
8991
], [], $pipes);
9092

9193
if (! is_resource($resource)) {

tests/PluginTest.php

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace Bref\Test;
44

5+
use Bref\ConsoleRuntime\Main as ConsoleMain;
6+
use Bref\FpmRuntime\Main as FpmMain;
7+
use Bref\FunctionRuntime\Main as FunctionMain;
58
use PHPUnit\Framework\TestCase;
69
use Symfony\Component\Process\Process;
710
use Symfony\Component\Yaml\Yaml;
@@ -12,23 +15,23 @@ public function test the plugin adds the layers(): void
1215
{
1316
$output = $this->slsPrint('serverless.yml');
1417

15-
self::assertFunction($output['functions']['function'], \Bref\FunctionRuntime\Main::class, [
18+
self::assertFunction($output['functions']['function'], FunctionMain::class, [
1619
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
1720
]);
18-
self::assertFunction($output['functions']['fpm'], \Bref\FpmRuntime\Main::class, [
21+
self::assertFunction($output['functions']['fpm'], FpmMain::class, [
1922
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
2023
]);
21-
self::assertFunction($output['functions']['console'], \Bref\ConsoleRuntime\Main::class, [
24+
self::assertFunction($output['functions']['console'], ConsoleMain::class, [
2225
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
2326
]);
2427

25-
self::assertFunction($output['functions']['function-arm'], \Bref\FunctionRuntime\Main::class, [
28+
self::assertFunction($output['functions']['function-arm'], FunctionMain::class, [
2629
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
2730
]);
28-
self::assertFunction($output['functions']['fpm-arm'], \Bref\FpmRuntime\Main::class, [
31+
self::assertFunction($output['functions']['fpm-arm'], FpmMain::class, [
2932
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
3033
]);
31-
self::assertFunction($output['functions']['console-arm'], \Bref\ConsoleRuntime\Main::class, [
34+
self::assertFunction($output['functions']['console-arm'], ConsoleMain::class, [
3235
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
3336
]);
3437
}
@@ -37,10 +40,10 @@ public function test the plugin adds the layers when the runtime is se
3740
{
3841
$output = $this->slsPrint('serverless-runtime-root.yml');
3942

40-
self::assertFunction($output['functions']['function'], \Bref\FunctionRuntime\Main::class, [
43+
self::assertFunction($output['functions']['function'], FunctionMain::class, [
4144
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
4245
]);
43-
self::assertFunction($output['functions']['function-arm'], \Bref\FunctionRuntime\Main::class, [
46+
self::assertFunction($output['functions']['function-arm'], FunctionMain::class, [
4447
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
4548
]);
4649
}
@@ -49,21 +52,21 @@ public function test the plugin doesnt break layers added separately(): v
4952
{
5053
$output = $this->slsPrint('serverless-with-layers.yml');
5154

52-
self::assertFunction($output['functions']['function'], \Bref\FunctionRuntime\Main::class, [
55+
self::assertFunction($output['functions']['function'], FunctionMain::class, [
5356
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
5457
'arn:aws:lambda:us-east-1:1234567890:layer:foo:1',
5558
]);
56-
self::assertFunction($output['functions']['function-arm'], \Bref\FunctionRuntime\Main::class, [
59+
self::assertFunction($output['functions']['function-arm'], FunctionMain::class, [
5760
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
5861
'arn:aws:lambda:us-east-1:1234567890:layer:foo:1',
5962
]);
60-
self::assertFunction($output['functions']['function-with-layers'], \Bref\FunctionRuntime\Main::class, [
63+
self::assertFunction($output['functions']['function-with-layers'], FunctionMain::class, [
6164
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
6265
// This function doesn't have the `foo` layer because that's how SF works:
6366
// layers in the function completely override the layers in the root
6467
'arn:aws:lambda:us-east-1:1234567890:layer:bar:1',
6568
]);
66-
self::assertFunction($output['functions']['function-arm-with-layers'], \Bref\FunctionRuntime\Main::class, [
69+
self::assertFunction($output['functions']['function-arm-with-layers'], FunctionMain::class, [
6770
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
6871
// This function doesn't have the `foo` layer because that's how SF works:
6972
// layers in the function completely override the layers in the root
@@ -75,21 +78,21 @@ public function test the plugin doesnt break layers added separately wit
7578
{
7679
$output = $this->slsPrint('serverless-runtime-root-with-layers.yml');
7780

78-
self::assertFunction($output['functions']['function'], \Bref\FunctionRuntime\Main::class, [
81+
self::assertFunction($output['functions']['function'], FunctionMain::class, [
7982
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
8083
'arn:aws:lambda:us-east-1:1234567890:layer:foo:1',
8184
]);
82-
self::assertFunction($output['functions']['function-arm'], \Bref\FunctionRuntime\Main::class, [
85+
self::assertFunction($output['functions']['function-arm'], FunctionMain::class, [
8386
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
8487
'arn:aws:lambda:us-east-1:1234567890:layer:foo:1',
8588
]);
86-
self::assertFunction($output['functions']['function-with-layers'], \Bref\FunctionRuntime\Main::class, [
89+
self::assertFunction($output['functions']['function-with-layers'], FunctionMain::class, [
8790
'arn:aws:lambda:us-east-1:873528684822:layer:php-83:',
8891
// This function doesn't have the `foo` layer because that's how SF works:
8992
// layers in the function completely override the layers in the root
9093
'arn:aws:lambda:us-east-1:1234567890:layer:bar:1',
9194
]);
92-
self::assertFunction($output['functions']['function-arm-with-layers'], \Bref\FunctionRuntime\Main::class, [
95+
self::assertFunction($output['functions']['function-arm-with-layers'], FunctionMain::class, [
9396
'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83:',
9497
// This function doesn't have the `foo` layer because that's how SF works:
9598
// layers in the function completely override the layers in the root

0 commit comments

Comments
 (0)