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

resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty()   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
4
trait resourceAssociationType
5
{
6
    /**
7
     * Format a message to show error when target resource property argument is
8
     * not null or instance of ResourceProperty.
9
     *
10
     * @param string $argumentName The name of the target resource property argument
11
     *
12
     * @return string The formatted message
13
     */
14
    public static function resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty($argumentName)
15
    {
16
        return "The argument '$argumentName' must be either null or instance of 'ResourceProperty";
17
    }
18
19
    /**
20
     * Error message to show when both from and to property arguments are null.
21
     *
22
     * @return string The error message
23
     */
24
    public static function resourceAssociationTypeEndBothPropertyCannotBeNull()
25
    {
26
        return 'Both to and from property argument to ResourceAssociationTypeEnd constructor cannot be null';
27
    }
28
29
30
}
31