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

resourcePropertyPropertyKindAndResourceTypeKindMismatch()   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 2
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