MockingStrategyInterface
last analyzed

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 40
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
build() 0 1 ?
decorate() 0 1 ?
get() 0 1 ?
call() 0 1 ?
getMockType() 0 1 ?
1
<?php
2
declare(strict_types=1);
3
4
namespace Moka\Strategy;
5
6
use Moka\Exception\InvalidArgumentException;
7
use Moka\Exception\MockNotCreatedException;
8
use Moka\Exception\NotImplementedException;
9
10
/**
11
 * Interface MockingStrategyInterface
12
 * @package Moka\Strategy
13
 */
14
interface MockingStrategyInterface
15
{
16
    /**
17
     * @param string $fqcn
18
     * @return object
19
     *
20
     * @throws MockNotCreatedException
21
     */
22
    public function build(string $fqcn);
23
24
    /**
25
     * @param object $mock
26
     * @param array $stubs
27
     * @return void
28
     */
29
    public function decorate($mock, array $stubs);
30
31
    /**
32
     * @param object $mock
33
     * @return object
34
     *
35
     * @throws InvalidArgumentException
36
     * @throws MockNotCreatedException
37
     */
38
    public function get($mock);
39
40
    /**
41
     * @param object $mock
42
     * @param string $methodName
43
     * @return mixed
44
     */
45
    public function call($mock, string $methodName);
46
47
    /**
48
     * @return string
49
     *
50
     * @throws NotImplementedException
51
     */
52
    public function getMockType(): string;
53
}
54