Skip to content

Commit dc88896

Browse files
authored
Merge pull request #9 from botman/analysis-zeoGEA
Apply fixes from StyleCI
2 parents 430de1a + 70f6d75 commit dc88896

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/Commands/Tinker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ public function handle()
6868

6969
$loop->run();
7070
}
71-
}
71+
}

src/Drivers/ConsoleDriver.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ConsoleDriver implements DriverInterface
2323
/** @var string */
2424
protected $bot_id;
2525

26-
/** @var boolean */
26+
/** @var bool */
2727
protected $hasQuestion = false;
2828

2929
/** @var array */
@@ -75,15 +75,17 @@ public function matchesRequest()
7575
*/
7676
public function getConversationAnswer(IncomingMessage $message)
7777
{
78-
$index = (int)$message->getText() - 1;
78+
$index = (int) $message->getText() - 1;
7979

8080
if ($this->hasQuestion && isset($this->lastQuestions[$index])) {
8181
$question = $this->lastQuestions[$index];
82+
8283
return Answer::create($question['name'])
8384
->setInteractiveReply(true)
8485
->setValue($question['value'])
8586
->setMessage($message);
8687
}
88+
8789
return Answer::create($this->message)->setMessage($message);
8890
}
8991

@@ -163,9 +165,9 @@ public function sendPayload($payload)
163165
$questionData = $payload['questionData'];
164166
$this->client->writeln(self::BOT_NAME.': '.$payload['text']);
165167

166-
if (!is_null($questionData)) {
168+
if (! is_null($questionData)) {
167169
foreach ($questionData['actions'] as $key => $action) {
168-
$this->client->writeln(($key+1).') '.$action['text']);
170+
$this->client->writeln(($key + 1).') '.$action['text']);
169171
}
170172
$this->hasQuestion = true;
171173
$this->lastQuestions = $questionData['actions'];

src/TinkerServiceProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<?php
2+
23
namespace BotMan\Tinker;
34

45
use BotMan\Tinker\Commands\Tinker;
56
use Illuminate\Support\ServiceProvider;
67

78
class TinkerServiceProvider extends ServiceProvider
89
{
9-
1010
public function register()
1111
{
1212
$this->commands([
13-
Tinker::class
13+
Tinker::class,
1414
]);
1515
}
16-
17-
}
16+
}

0 commit comments

Comments
 (0)