Test Failed
Pull Request — master (#2)
by Pol
03:30
created

Dice   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
cbo 3
dl 0
loc 18
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A roll() 0 9 1
1
<?php
2
3
namespace drupol\Yaroc\Examples;
4
5
use drupol\Yaroc\Plugin\Method\GenerateIntegers;
6
7
/**
8
 * Class Dice.
9
 */
10
class Dice extends BaseExample
11
{
12
13
    /**
14
     * @throws \Http\Client\Exception
15
     *
16
     * @return bool|mixed
17
     */
18
    public function roll()
19
    {
20
        $parameters = ['n' => 2, 'min' => 1, 'max' => 6];
21
22
        $generateIntegers = (new GenerateIntegers($this->getHttpClient()))
23
            ->withParameters($parameters);
24
25
        return $this->getRandomOrgAPI()->getData($generateIntegers);
26
    }
27
}
28