Completed
Push — master ( d66c3c...7db86c )
by Alex
05:11
created

queryProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 34
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A queryProviderReturnsNonQueryResult() 0 4 1
A queryProviderResultCountMissing() 0 4 1
A queryProviderResultsMissing() 0 4 1
1
<?php
2
namespace POData\Common\Messages;
3
use POData\Providers\Query\QueryType;
4
5
trait queryProvider
6
{
7
    /**
8
     * @param string $methodName method name
9
     *
10
     * @return string The message
11
     */
12
    public static function queryProviderReturnsNonQueryResult($methodName)
13
    {
14
        return "The implementation of the method $methodName must return a QueryResult instance.";
15
    }
16
17
    /**
18
     * @param string    $methodName method name
19
     * @param QueryType $queryType
20
     *
21
     * @return string The message
22
     */
23
    public static function queryProviderResultCountMissing($methodName, QueryType $queryType)
24
    {
25
        return "The implementation of the method $methodName must return a QueryResult instance with a count for queries of type $queryType.";
26
    }
27
28
    /**
29
     * @param string    $methodName method name
30
     * @param QueryType $queryType
31
     *
32
     * @return string The message
33
     */
34
    public static function queryProviderResultsMissing($methodName, QueryType $queryType)
35
    {
36
        return "The implementation of the method $methodName must return a QueryResult instance with an array of results for queries of type $queryType.";
37
    }
38
}
39