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

queryProviderReturnsNonQueryResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 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