Skip to content

Commit f37304e

Browse files
authored
Apply fixes from StyleCI (#9)
1 parent cc03f9c commit f37304e

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

src/WebDriver.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace BotMan\Drivers\Web;
44

5-
use BotMan\BotMan\Messages\Attachments\Audio;
6-
use BotMan\BotMan\Messages\Attachments\Image;
7-
use BotMan\BotMan\Messages\Attachments\Video;
85
use BotMan\BotMan\Users\User;
96
use Illuminate\Support\Collection;
107
use BotMan\BotMan\Drivers\HttpDriver;
118
use BotMan\BotMan\Interfaces\WebAccess;
129
use BotMan\BotMan\Messages\Incoming\Answer;
10+
use BotMan\BotMan\Messages\Attachments\Audio;
11+
use BotMan\BotMan\Messages\Attachments\Image;
12+
use BotMan\BotMan\Messages\Attachments\Video;
1313
use BotMan\BotMan\Messages\Outgoing\Question;
1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Component\HttpFoundation\Response;
@@ -248,7 +248,8 @@ protected function addAttachments($incomingMessage)
248248
* @param string $mime
249249
* @return string
250250
*/
251-
protected function getDataURI($file, $mime = '') {
251+
protected function getDataURI($file, $mime = '')
252+
{
252253
return 'data: '.(function_exists('mime_content_type') ? mime_content_type($file) : $mime).';base64,'.base64_encode(file_get_contents($file));
253254
}
254255
}

tests/WebDriverTest.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ private function getDriver($responseData, $htmlInterface = null)
5050

5151
return new WebDriver($request, $config, $htmlInterface);
5252
}
53+
5354
/**
5455
* @param $responseData
5556
* @param array $files
@@ -123,9 +124,9 @@ public function it_returns_images()
123124
'file1' => [
124125
'name' => 'MyFile.png',
125126
'type' => 'image/png',
126-
'tmp_name' => __DIR__ . '/fixtures/image.png',
127-
'size' => 1234
128-
]
127+
'tmp_name' => __DIR__.'/fixtures/image.png',
128+
'size' => 1234,
129+
],
129130
]);
130131
/** @var IncomingMessage $message */
131132
$message = $driver->getMessages()[0];
@@ -146,9 +147,9 @@ public function it_returns_videos()
146147
'file1' => [
147148
'name' => 'MyFile.png',
148149
'type' => 'image/png',
149-
'tmp_name' => __DIR__ . '/fixtures/video.mp4',
150-
'size' => 1234
151-
]
150+
'tmp_name' => __DIR__.'/fixtures/video.mp4',
151+
'size' => 1234,
152+
],
152153
]);
153154
/** @var IncomingMessage $message */
154155
$message = $driver->getMessages()[0];
@@ -169,9 +170,9 @@ public function it_returns_audio()
169170
'file1' => [
170171
'name' => 'MyFile.png',
171172
'type' => 'image/png',
172-
'tmp_name' => __DIR__ . '/fixtures/audio.mp3',
173-
'size' => 1234
174-
]
173+
'tmp_name' => __DIR__.'/fixtures/audio.mp3',
174+
'size' => 1234,
175+
],
175176
]);
176177
/** @var IncomingMessage $message */
177178
$message = $driver->getMessages()[0];

0 commit comments

Comments
 (0)