app_id()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
1
<?php
2
3
if (! function_exists('apps')) {
4
    /**
5
     * Get the application manager instance.
6
     *
7
     * @return \ElfSundae\Apps\AppManager
8
     */
9
    function apps()
10
    {
11 4
        return app('apps');
12
    }
13
}
14
15
if (! function_exists('app_id')) {
16
    /**
17
     * Get or check the current application identifier.
18
     *
19
     * @return string|bool
20
     */
21
    function app_id()
22
    {
23 4
        return app('apps')->id(...func_get_args());
24
    }
25
}
26
27
if (! function_exists('app_url')) {
28
    /**
29
     * Generate an absolute URL to a path for the given application identifier.
30
     *
31
     * @param  string  $app
32
     * @param  string  $path
33
     * @param  mixed  $parameters
34
     * @return string
35
     */
36
    function app_url($app = '', $path = '', $parameters = [])
37
    {
38 4
        return app('apps')->url($app, $path, $parameters);
39
    }
40
}
41