Passed
Push — develop ( 501901...142042 )
by Septianata
14:25
created

Conversation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A askRenderable() 0 5 1
A sayRenderable() 0 5 1
1
<?php
2
3
namespace App\Conversations;
4
5
use BotMan\BotMan\Messages\Conversations\Conversation as BaseConversation;
6
use Illuminate\Contracts\Support\Renderable;
7
8
abstract class Conversation extends BaseConversation
9
{
10
    /**
11
     * Run `$this->say()` method with a renderable parameter.
12
     *
13
     * @param  \Illuminate\Contracts\Support\Renderable  $view
14
     * @param  array  $additionalParameters
15
     * @return $this
16
     */
17
    protected function sayRenderable(Renderable $view, array $additionalParameters = [])
18
    {
19
        $this->say($view->render(), $additionalParameters);
20
21
        return $this;
22
    }
23
24
    /**
25
     * Run `$this->ask()` method with a renderable parameter.
26
     *
27
     * @param  \Illuminate\Contracts\Support\Renderable  $view
28
     * @param  array|\Closure  $next
29
     * @param  array  $additionalParameters
30
     * @return $this
31
     */
32
    protected function askRenderable($view, $next, $additionalParameters = [])
33
    {
34
        $this->ask($view->render(), $next, $additionalParameters);
35
36
        return $this;
37
    }
38
}
39