helpers.php ➔ university()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
use Rinvex\University\UniversityLoader;
6
7
if (! function_exists('university')) {
8
    /**
9
     * Get the university by it's slug.
10
     *
11
     * @param string $slug
12
     * @param bool   $hydrate
13
     *
14
     * @return \Rinvex\University\University|array
15
     */
16
    function university($slug, $hydrate = true)
17
    {
18
        return UniversityLoader::university($slug, $hydrate);
19
    }
20
}
21
22
if (! function_exists('universities')) {
23
    /**
24
     * Get universities for the given country.
25
     *
26
     * @param string|null $countryCode
27
     *
28
     * @return array
29
     */
30
    function universities($countryCode = null)
31
    {
32
        return UniversityLoader::universities($countryCode);
33
    }
34
}
35