Completed
Push — master ( f1a8d5...1a6045 )
by Dmitry
03:22
created

ValidationResponseFactory::createValidation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 1
crap 1
1
<?php
2
3
namespace TonicForHealth\PagerDutyClient\Validation;
4
5
/**
6
 * Class ValidationFactory.
7
 */
8
class ValidationResponseFactory
9
{
10
    /**
11
     * @param string $resourceName
12
     *
13
     * @return ValidationResponseInterface.
0 ignored issues
show
Documentation introduced by
The doc-type ValidationResponseInterface. could not be parsed: Unknown type name "ValidationResponseInterface." at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
14
     */
15 4
    public static function createValidation($resourceName)
16
    {
17 4
        $className = sprintf(
18 4
            '\%s\%s\%sValidationResponse',
19 4
            __NAMESPACE__,
20 4
            $resourceName,
21
            $resourceName
22 4
        );
23
24 4
        return new $className();
25
    }
26
}
27