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

resourceProperty   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 26
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A resourcePropertyInvalidKindParameter() 0 4 1
A resourcePropertyPropertyKindAndResourceTypeKindMismatch() 0 4 1
1
<?php
2
namespace POData\Common\Messages;
3
4
trait resourceProperty
5
{
6
    /**
7
     * Format a message to show error for invalid ResourcePropertyKind enum argument.
8
     *
9
     * @param string $argumentName The argument name
10
     *
11
     * @return string The formatted message
12
     */
13
    public static function resourcePropertyInvalidKindParameter($argumentName)
14
    {
15
        return "The argument '$argumentName' is not a valid ResourcePropertyKind enum value or valid combination of ResourcePropertyKind enum values";
16
    }
17
    /**
18
     * Format a message to show error when ResourcePropertyKind and ResourceType's ResourceTypeKind mismatches.
19
     *
20
     * @param string $resourcePropertyKindArgName The ResourcePropertyKind argument name
21
     * @param string $resourceTypeArgName         The ResourceType argument name
22
     *
23
     * @return string The formatted message
24
     */
25
    public static function resourcePropertyPropertyKindAndResourceTypeKindMismatch($resourcePropertyKindArgName, $resourceTypeArgName)
26
    {
27
        return "The '$resourcePropertyKindArgName' parameter does not match with the type of the resource type in parameter '$resourceTypeArgName'";
28
    }
29
}
30