@@ -22,7 +22,7 @@ |
||
22 | 22 | $configuration = new Configuration(); |
23 | 23 | $config = $this->processConfiguration($configuration, $configs); |
24 | 24 | |
25 | - $loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
25 | + $loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
26 | 26 | $loader->load('services.php'); |
27 | 27 | |
28 | 28 | $container->setParameter('wanna_speak.api.account_id', $config['api']['credentials']['account_id']); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
6 | 6 | |
7 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
7 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
8 | 8 | $services = $containerConfigurator->services(); |
9 | 9 | |
10 | 10 | $services->defaults() |
@@ -12,12 +12,12 @@ discard block |
||
12 | 12 | ->autowire() |
13 | 13 | ->autoconfigure(); |
14 | 14 | |
15 | - $services->load('Yproximite\WannaSpeakBundle\\', __DIR__.'/../..') |
|
15 | + $services->load('Yproximite\WannaSpeakBundle\\', __DIR__ . '/../..') |
|
16 | 16 | ->exclude([ |
17 | - __DIR__.'/../../DependencyInjection', |
|
18 | - __DIR__.'/../../Exception', |
|
19 | - __DIR__.'/../../Resources', |
|
20 | - __DIR__.'/../../WannaSpeakBundle.php', |
|
17 | + __DIR__ . '/../../DependencyInjection', |
|
18 | + __DIR__ . '/../../Exception', |
|
19 | + __DIR__ . '/../../Resources', |
|
20 | + __DIR__ . '/../../WannaSpeakBundle.php', |
|
21 | 21 | ]); |
22 | 22 | |
23 | 23 | $services->get(\Yproximite\WannaSpeakBundle\HttpClient::class) |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | )) |
94 | 94 | ); |
95 | 95 | |
96 | - $sounds->upload(__DIR__.'/../fixtures/callee.mp3', 'the name'); |
|
96 | + $sounds->upload(__DIR__ . '/../fixtures/callee.mp3', 'the name'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | public function testUploadFileAsSplFileInfo(): void |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | )) |
113 | 113 | ); |
114 | 114 | |
115 | - $splFileInfo = new \SplFileInfo(__DIR__.'/../fixtures/callee.mp3'); |
|
115 | + $splFileInfo = new \SplFileInfo(__DIR__ . '/../fixtures/callee.mp3'); |
|
116 | 116 | |
117 | 117 | $sounds->upload($splFileInfo, 'the name'); |
118 | 118 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | SoundsInterface::API, |
49 | 49 | 'upload', |
50 | 50 | ['name' => 'the name'], |
51 | - Argument::that(function ($args) { |
|
51 | + Argument::that(function($args) { |
|
52 | 52 | return $args['sound'] instanceof DataPart; |
53 | 53 | }) |
54 | 54 | ) |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ->willReturn($response); |
57 | 57 | |
58 | 58 | $this |
59 | - ->upload(__DIR__.'/../../../../tests/fixtures/callee.mp3', 'the name') |
|
59 | + ->upload(__DIR__ . '/../../../../tests/fixtures/callee.mp3', 'the name') |
|
60 | 60 | ->shouldBe(['error' => null, 'data' => [/* ... */]]); |
61 | 61 | } |
62 | 62 | |
@@ -67,14 +67,14 @@ discard block |
||
67 | 67 | SoundsInterface::API, |
68 | 68 | 'upload', |
69 | 69 | ['name' => 'the name'], |
70 | - Argument::that(function ($args) { |
|
70 | + Argument::that(function($args) { |
|
71 | 71 | return $args['sound'] instanceof DataPart; |
72 | 72 | }) |
73 | 73 | ) |
74 | 74 | ->shouldBeCalled() |
75 | 75 | ->willReturn($response); |
76 | 76 | |
77 | - $file = new \SplFileInfo(__DIR__.'/../../../../tests/fixtures/callee.mp3'); |
|
77 | + $file = new \SplFileInfo(__DIR__ . '/../../../../tests/fixtures/callee.mp3'); |
|
78 | 78 | |
79 | 79 | $this |
80 | 80 | ->upload($file, 'the name') |
@@ -313,7 +313,7 @@ |
||
313 | 313 | 'query_tag1' => 12345, |
314 | 314 | 'query_foo1' => true, |
315 | 315 | 'query_foo2' => false, |
316 | - ], |
|
316 | + ], |
|
317 | 317 | [ |
318 | 318 | 'body_name' => 'The name', |
319 | 319 | 'body_tag1' => 12345, |
@@ -276,7 +276,7 @@ |
||
276 | 276 | { |
277 | 277 | $fieldsAllFound = false; |
278 | 278 | |
279 | - $client = $this->createHttpClient(static function (string $method, string $url, array $options) use (&$fieldsAllFound): MockResponse { |
|
279 | + $client = $this->createHttpClient(static function(string $method, string $url, array $options) use (&$fieldsAllFound): MockResponse { |
|
280 | 280 | static::assertSame('9999999999', $options['query']['id']); |
281 | 281 | static::assertRegExp('#^\d{10}-[a-z0-9]{32}$#', $options['query']['key']); |
282 | 282 | static::assertSame('the api', $options['query']['api']); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | { |
95 | 95 | $timeStamp = time(); |
96 | 96 | |
97 | - return $timeStamp.'-'.md5($this->accountId.$timeStamp.$this->secretKey); |
|
97 | + return $timeStamp . '-' . md5($this->accountId . $timeStamp . $this->secretKey); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | private function sanitizeParameters(array $parameters): array |
106 | 106 | { |
107 | - return array_reduce(array_keys($parameters), static function (array $acc, string $fieldKey) use ($parameters) { |
|
107 | + return array_reduce(array_keys($parameters), static function(array $acc, string $fieldKey) use ($parameters) { |
|
108 | 108 | $fieldValue = $parameters[$fieldKey]; |
109 | 109 | |
110 | 110 | if (true === $fieldValue) { |