Passed
Push — master ( 0fc838...cc37a2 )
by Stefan
07:57
created

ExternalNothing   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 4
eloc 6
c 3
b 0
f 0
dl 0
loc 43
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A countAllServiceProviders() 0 3 1
A listAllServiceProviders() 0 3 1
A listExternalEntities() 0 5 1
1
<?php
2
3
/*
4
 * *****************************************************************************
5
 * Contributions to this work were made on behalf of the GÉANT project, a 
6
 * project that has received funding from the European Union’s Framework 
7
 * Programme 7 under Grant Agreements No. 238875 (GN3) and No. 605243 (GN3plus),
8
 * Horizon 2020 research and innovation programme under Grant Agreements No. 
9
 * 691567 (GN4-1) and No. 731122 (GN4-2).
10
 * On behalf of the aforementioned projects, GEANT Association is the sole owner
11
 * of the copyright in all material which was developed by a member of the GÉANT
12
 * project. GÉANT Vereniging (Association) is registered with the Chamber of 
13
 * Commerce in Amsterdam with registration number 40535155 and operates in the 
14
 * UK as a branch of GÉANT Vereniging.
15
 * 
16
 * Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands. 
17
 * UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK
18
 *
19
 * License: see the web/copyright.inc.php file in the file structure or
20
 *          <base_url>/copyright.php after deploying the software
21
 */
22
23
/**
24
 * This file contains the ExternalNothing class. It contains dummy methods for
25
 * the lack of an external entity database.
26
 *
27
 * @author Stefan Winter <[email protected]>
28
 * @author Tomasz Wolniewicz <[email protected]>
29
 *
30
 * @package Developer
31
 *
32
 */
33
34
namespace core;
35
36
use \Exception;
37
38
/**
39
 * This class interacts with the external DB to fetch operational data for
40
 * read-only purposes.
41
 * 
42
 * @author Stefan Winter <[email protected]>
43
 *
44
 * @license see LICENSE file in root directory
45
 *
46
 * @package Developer
47
 */
48
class ExternalNothing implements ExternalLinkInterface
49
{
50
51
    /**
52
     * constructor, gives us access to the DB handle we need for queries
53
     */
54
    public function __construct()
55
    {
56
        
57
    }
58
59
    /**
60
     * retrieves the list of all service providers from the eduroam database
61
     * 
62
     * @return array list of providers
63
     */
64
    public function listAllServiceProviders()
65
    {
66
        return [];
67
    }
68
69
    /**
70
     * nothing to count here, please move along
71
     * 
72
     * @return int
73
     */
74
    public function countAllServiceProviders(): int
75
    {
76
        return 0;
77
    }
78
    
79
    /**
80
     * retrieves entity information from the eduroam database. Choose whether to get all entities with an SP role, an IdP role, or only those with both roles
81
     * 
82
     * @param string      $tld  the top-level domain from which to fetch the entities
83
     * @param string|NULL $type type of entity to retrieve
84
     * @return array list of entities
85
     */
86
    public function listExternalEntities($tld, $type)
87
    {
88
        unset($tld); // not needed
89
        unset($type); // not needed
90
        return [];
91
    }
92
}