GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 3.x ( 56b2ee...e477bf )
by Jindřich
01:49
created

WebServiceAlias::resolveAlias()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 4
cts 5
cp 0.8
rs 9.9666
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2.032
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace Skautis\Wsdl;
7
8
9
class WebServiceAlias
10
{
11
  /**
12
   * Aliasy webových služeb pro rychlý přístup
13
   *
14
   * @var string[]
15
   */
16
  private const ALIASES = [
17
    'user' => 'UserManagement',
18
    'usr' => 'UserManagement',
19
    'org' => 'OrganizationUnit',
20
    'app' => 'ApplicationManagement',
21
    'event' => 'Events',
22
    'events' => 'Events',
23
  ];
24
25 1
  public static function resolveAlias(string $alias): string {
26 1
    $alias = strtolower($alias);
27
28 1
    if (!array_key_exists($alias, self::ALIASES)) {
29
      throw new WebServiceAliasNotFoundException($alias);
30
    }
31
32 1
    return self::ALIASES[$alias];
33
  }
34
}