Completed
Pull Request — master (#20)
by Anatoliy
18:45 queued 08:46
created

DoubleTypeMock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSample() 0 5 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Created by PhpStorm.
5
 * User: danchukas
6
 * Date: 2017-07-18 08:46
7
 */
8
9
namespace DanchukAS\Mock\Type;
10
11
12
use DanchukAS\Mock\TypeMock;
13
14
/**
15
 * Class DoubleTypeMock
16
 * @package DanchukAS\Mock\Type
17
 */
18
class DoubleTypeMock extends TypeMock
19
{
20
    protected static $optimalCount = 3;
21
22
    /**
23
     * @return float|\Generator
24
     */
25
    public static function getSample()
26
    {
27
        yield ["double(big)" => PHP_INT_MAX / 0.3];
28
        yield ["double(small)" => PHP_INT_MIN / 0.9];
0 ignored issues
show
Bug introduced by
The constant DanchukAS\Mock\Type\PHP_INT_MIN was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
29
        yield ["double(near zerro)" => -1.0 / 3.0];
30
    }
31
}