Completed
Push — master ( 9431b1...6a8e13 )
by AJ
01:57
created

SubdomainHtmlHelper   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B link() 0 11 6
1
<?php
2
/**
3
 * CakePHP Plugin : CakePHP Subdomain Routing
4
 * Copyright (c) Multidimension.al (http://multidimension.al)
5
 * Github : https://github.com/multidimension-al/cakephp-subdomains
6
 *
7
 * Licensed under The MIT License
8
 * For full copyright and license information, please see the LICENSE file
9
 * Redistributions of files must retain the above copyright notice.
10
 *
11
 * @copyright (c) Multidimension.al (http://multidimension.al)
12
 * @link      https://github.com/multidimension-al/cakephp-subdomains Github
13
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
14
 */
15
16
namespace Multidimensional\Subdomains\View\Helper;
17
18
use Cake\View\Helper\HtmlHelper;
19
20
class SubdomainHtmlHelper extends HtmlHelper
21
{
22
23
    public function link($title, $url = null, array $options = [])
24
    {
25
        if (isset($url['prefix']) && $url['prefix'] === false) {
26
            $url['prefix'] = "false";
27
        }
28
        if (is_array($title) && isset($title['prefix']) && $title['prefix'] === false) {
29
            $title['prefix'] = "false";
30
        }
31
32
        return parent::link($title, $url, $options);
33
    }
34
}
35