Code Duplication    Length = 7-8 lines in 2 locations

services/NorthWind/NorthWindQueryProvider.php 2 locations

@@ 98-104 (lines=7) @@
95
        $select=null, $orderby=null, $top=null, $skip=null
96
    ) {
97
        $resourceSetName =  $resourceSet->getName();
98
        if ($resourceSetName !== 'Customers' 
99
            && $resourceSetName !== 'Orders' 
100
            && $resourceSetName !== 'Order_Details'
101
            && $resourceSetName !== 'Employees'
102
        ) {
103
        	throw ODataException::createInternalServerError('(NorthWindQueryProvider) Unknown resource set ' . $resourceSetName . '! Contact service provider');
104
        }
105
106
        if ($resourceSetName === 'Order_Details') {
107
            $resourceSetName = 'Order Details';
@@ 150-157 (lines=8) @@
147
    public function getResourceFromResourceSet(ResourceSet $resourceSet, KeyDescriptor $keyDescriptor)
148
    {   
149
        $resourceSetName =  $resourceSet->getName();
150
        if ($resourceSetName !== 'Customers' 
151
            && $resourceSetName !== 'Orders' 
152
            && $resourceSetName !== 'Order_Details' 
153
            && $resourceSetName !== 'Products' 
154
            && $resourceSetName !== 'Employees'
155
        ) {
156
            die('(NorthWindQueryProvider) Unknown resource set ' . $resourceSetName);    
157
        }
158
159
        if ($resourceSetName === 'Order_Details') {
160
            $resourceSetName = 'Order Details';