Url   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFacadeComponentId() 0 4 1
1
<?php
2
/**
3
 * Facades for Yii 2.
4
 *
5
 * @see       https://github.com/sergeymakinen/yii2-facades
6
 * @copyright Copyright (c) 2016 Sergey Makinen (https://makinen.ru)
7
 * @license   https://github.com/sergeymakinen/yii2-facades/blob/master/LICENSE The MIT License
8
 */
9
10
namespace sergeymakinen\facades;
11
12
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
13
/**
14
 * Url facade.
15
 *
16
 * Facades Yii::$app->get('urlManager') component.
17
 *
18
 * @see \yii\web\UrlManager
19
 * @method static addRules(array $rules, bool $append = true) Adds additional URL rules.
20
 * @method static \yii\base\Behavior attachBehavior(string $name, string|array|\yii\base\Behavior $behavior) Attaches a behavior to this component.
21
 * @method static attachBehaviors(array $behaviors) Attaches a list of behaviors to the component.
22
 * @method static array behaviors() Returns a list of behaviors that this component should behave as.
23
 * @method static string createAbsoluteUrl(string|array $params, string $scheme = null) Creates an absolute URL using the given route and query parameters.
24
 * @method static string createUrl(string|array $params) Creates a URL using the given route and query parameters.
25
 * @method static null|\yii\base\Behavior detachBehavior(string $name) Detaches a behavior from the component.
26
 * @method static detachBehaviors() Detaches all behaviors from the component.
27
 * @method static ensureBehaviors() Makes sure that the behaviors declared in [[behaviors()]] are attached to this component.
28
 * @method static string getBaseUrl() Returns the base URL that is used by [[createUrl()]] to prepend to created URLs.
29
 * @method static null|\yii\base\Behavior getBehavior(string $name) Returns the named behavior object.
30
 * @method static \yii\base\Behavior[] getBehaviors() Returns all behaviors attached to this component.
31
 * @method static \yii\caching\Cache|string getCache() Returns the cache object or the application component ID of the cache object.
32
 * @method static bool getEnablePrettyUrl() Returns whether to enable pretty URLs.
33
 * @method static bool getEnableStrictParsing() Returns whether to enable strict parsing.
34
 * @method static string getHostInfo() Returns the host info that is used by [[createAbsoluteUrl()]] to prepend to created URLs.
35
 * @method static string getRouteParam() Returns the GET parameter name for route.
36
 * @method static array getRuleConfig() Returns the default configuration of URL rules.
37
 * @method static array getRules() Returns the rules for creating and parsing URLs when [[enablePrettyUrl]] is true.
38
 * @method static string getScriptUrl() Returns the entry script URL that is used by [[createUrl()]] to prepend to created URLs.
39
 * @method static bool getShowScriptName() Returns whether to show entry script name in the constructed URL.
40
 * @method static string getSuffix() Returns the URL suffix used when in 'path' format.
41
 * @method static bool hasEventHandlers(string $name) Returns a value indicating whether there is any handler attached to the named event.
42
 * @method static bool off(string $name, callable $handler = null) Detaches an existing event handler from this component.
43
 * @method static on(string $name, callable $handler, mixed $data = null, bool $append = true) Attaches an event handler to an event.
44
 * @method static array|bool parseRequest(\yii\web\Request $request) Parses the user request.
45
 * @method static setBaseUrl(string $value) Sets the base URL that is used by [[createUrl()]] to prepend to created URLs.
46
 * @method static setCache(\yii\caching\Cache|string $value) Sets the cache object or the application component ID of the cache object.
47
 * @method static setEnablePrettyUrl(bool $value) Sets whether to enable pretty URLs.
48
 * @method static setEnableStrictParsing(bool $value) Sets whether to enable strict parsing.
49
 * @method static setHostInfo(string $value) Sets the host info that is used by [[createAbsoluteUrl()]] to prepend to created URLs.
50
 * @method static setRouteParam(string $value) Sets the GET parameter name for route.
51
 * @method static setRuleConfig(array $value) Sets the default configuration of URL rules.
52
 * @method static setRules(array $value) Sets the rules for creating and parsing URLs when [[enablePrettyUrl]] is true.
53
 * @method static setScriptUrl(string $value) Sets the entry script URL that is used by [[createUrl()]] to prepend to created URLs.
54
 * @method static setShowScriptName(bool $value) Sets whether to show entry script name in the constructed URL.
55
 * @method static setSuffix(string $value) Sets the URL suffix used when in 'path' format.
56
 * @method static trigger(string $name, \yii\base\Event $event = null) Triggers an event.
57
 */
58
class Url extends Facade
59
{
60
    /**
61
     * @inheritdoc
62
     */
63 1
    public static function getFacadeComponentId()
64
    {
65 1
        return 'urlManager';
66
    }
67
}
68