Passed
Push — master ( b89ee9...82ea21 )
by Sebastian
03:18
created

Mockery::createTemplateMock()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Hook;
13
14
trait Mockery
15
{
16
    /**
17
     * Create Template mock
18
     *
19
     * @return \CaptainHook\App\Hook\Template&\PHPUnit\Framework\MockObject\MockObject
20
     */
21
    public function createTemplateMock(): Template
22
    {
23
        return $this->getMockBuilder(Template\Local::class)
0 ignored issues
show
Bug introduced by
It seems like getMockBuilder() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
        return $this->/** @scrutinizer ignore-call */ getMockBuilder(Template\Local::class)
Loading history...
24
                    ->disableOriginalConstructor()
25
                    ->getMock();
26
    }
27
}
28