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

metadataResourceTypeSetBagOfComplexTypeWithDerivedTypes()   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 metadataResourceType
5
{
6
    /**
7
     * Format a message to show error when entity type of an entity set has a
8
     * derived type with named stream property(ies).
9
     *
10
     * @param string $entitySetName   The entity set name
11
     * @param string $derivedTypeName The full name of the derived type
12
     *
13
     * @return string The formatted message
14
     */
15
    public static function metadataResourceTypeSetNamedStreamsOnDerivedEntityTypesNotSupported($entitySetName, $derivedTypeName)
16
    {
17
        return "Named streams are not supported on derived entity types. Entity Set '$entitySetName' has a instance of type '$derivedTypeName', which is an derived entity type and has named streams. Please remove all named streams from type '$derivedTypeName'.";
18
    }
19
20
    /**
21
     * Format a message to show error when complex type having derived type
22
     * is used as item type of a bag property.
23
     *
24
     * @param string $complexTypeName The name of the bag's complex type
25
     *                                having derived type
26
     *
27
     * @return string The formatted message
28
     */
29
    public static function metadataResourceTypeSetBagOfComplexTypeWithDerivedTypes($complexTypeName)
30
    {
31
        return "Complex type '$complexTypeName' has derived types and is used as the item type in a bag. Only bags containing complex types without derived types are supported.";
32
    }
33
34
}
35