@@ -14,6 +14,9 @@ |
||
14 | 14 | private $text; |
15 | 15 | private $keyboard; |
16 | 16 | |
17 | + /** |
|
18 | + * @param string $text |
|
19 | + */ |
|
17 | 20 | public function __construct(User $recipient, $text, Keyboard $keyboard = null) |
18 | 21 | { |
19 | 22 | $this->recipient = $recipient; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Channels\Telegram; |
6 | 6 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @return Keyboard|null |
48 | 48 | */ |
49 | - public function getKeyboard(): ?Keyboard |
|
49 | + public function getKeyboard(): ? Keyboard |
|
50 | 50 | { |
51 | 51 | return $this->keyboard; |
52 | 52 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | return $payload; |
71 | 71 | } |
72 | 72 | |
73 | - private function getReplyMarkup(): ?array |
|
73 | + private function getReplyMarkup(): ? array |
|
74 | 74 | { |
75 | 75 | if ($this->keyboard !== null) { |
76 | 76 | $buttons = []; |
@@ -65,6 +65,9 @@ |
||
65 | 65 | return $this->interaction; |
66 | 66 | } |
67 | 67 | |
68 | + /** |
|
69 | + * @param null|Interaction $interaction |
|
70 | + */ |
|
68 | 71 | public function setInteraction(?Interaction $interaction): void |
69 | 72 | { |
70 | 73 | $this->interaction = $interaction; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation; |
6 | 6 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | return $this->message; |
51 | 51 | } |
52 | 52 | |
53 | - public function getStory(): ?Story |
|
53 | + public function getStory(): ? Story |
|
54 | 54 | { |
55 | 55 | return $this->story; |
56 | 56 | } |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | $this->story = $story; |
61 | 61 | } |
62 | 62 | |
63 | - public function getInteraction(): ?Interaction |
|
63 | + public function getInteraction(): ? Interaction |
|
64 | 64 | { |
65 | 65 | return $this->interaction; |
66 | 66 | } |
67 | 67 | |
68 | - public function setInteraction(?Interaction $interaction): void |
|
68 | + public function setInteraction(? Interaction $interaction) : void |
|
69 | 69 | { |
70 | 70 | $this->interaction = $interaction; |
71 | 71 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation; |
6 | 6 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * |
23 | 23 | * @return Story|null |
24 | 24 | */ |
25 | - public function find(Context $context, ReceivedMessage $message): ?Story |
|
25 | + public function find(Context $context, ReceivedMessage $message): ? Story |
|
26 | 26 | { |
27 | 27 | $story = $context->getStory(); |
28 | 28 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @return Story|null |
51 | 51 | */ |
52 | - private function findActivator(ReceivedMessage $message): ?Story |
|
52 | + private function findActivator(ReceivedMessage $message): ? Story |
|
53 | 53 | { |
54 | 54 | foreach ($this->stories as $story) { |
55 | 55 | foreach ($story->activators() as $activator) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation\Activators; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation\Keyboards; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation; |
6 | 6 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param string $key |
69 | 69 | * @param string $value |
70 | 70 | */ |
71 | - private function replacePlaceholder(string &$input, string $key, string $value): void |
|
71 | + private function replacePlaceholder(string&$input, string $key, string $value): void |
|
72 | 72 | { |
73 | 73 | $key = mb_strtoupper($key); |
74 | 74 | $input = str_replace('___'.$key.'___', $value, $input); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Conversation\Fallback; |
6 | 6 |