Base   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 14 2
1
<?php
2
namespace Telegram\Bot\Keyboard;
3
4
use Illuminate\Support\Collection;
5
use Illuminate\Support\Str;
6
7
class Base extends Collection
8
{
9
    /**
10
     * Dynamically build params.
11
     *
12
     * @param string $method
13
     * @param array  $args
14
     *
15
     * @return $this
16
     */
17
    public function __call($method, $args)
18
    {
19
        $action = substr($method, 0, 3);
20
21
        if ($action !== 'set') {
22
            return parent::__call($method, $args);
23
        }
24
25
        $property = Str::snake(substr($method, 3));
26
        $this->items[$property] = $args[0];
27
28
        return $this;
29
30
    }
31
}
32