| 1 | <?php |
||
| 7 | final class EntityType |
||
| 8 | { |
||
| 9 | const TYPE_SP = 'saml20-sp'; |
||
| 10 | const TYPE_IDP = 'saml20-idp'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $type; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $type |
||
| 19 | */ |
||
| 20 | public function __construct($type) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Creates a new ServiceProvider Type |
||
| 31 | * @return EntityType |
||
| 32 | * |
||
| 33 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
| 34 | * @SuppressWarnings(PHPMD.ShortMethodName) |
||
| 35 | */ |
||
| 36 | public static function SP() |
||
| 40 | |||
| 41 | // @codingStandardsIgnoreStart |
||
| 42 | /** |
||
| 43 | * Creates a new IdentityProvider Type |
||
| 44 | * @return EntityType |
||
| 45 | * |
||
| 46 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
||
| 47 | */ |
||
| 48 | public static function IdP() |
||
| 52 | // @codingStandardsIgnoreEnd |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return bool |
||
| 56 | */ |
||
| 57 | public function isServiceProvider() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | public function isIdentityProvider() |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @param EntityType $other |
||
| 72 | * @return bool |
||
| 73 | */ |
||
| 74 | public function equals(EntityType $other) |
||
| 78 | |||
| 79 | public function __toString() |
||
| 83 | } |
||
| 84 |
This check looks for method names that are not written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes
databaseConnectionSeeker.