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

resourceAssociationType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty() 0 4 1
A resourceAssociationTypeEndBothPropertyCannotBeNull() 0 4 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