MultisiteSubDomainResolver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fixStyleScriptPathFilter() 0 8 2
1
<?php
2
namespace Gwa\Wordpress;
3
4
use Gwa\Wordpress\Contracts\MultisiteDirectoryResolver as ResolverContract;
5
6
class MultisiteSubDomainResolver extends AbstractResolver implements ResolverContract
7
{
8
    /**
9
     * Set the right path for script and style loader.
10
     *
11
     * @param string $src
12
     * @param string $handle
13
     *
14
     * @return string
15
     */
16
    public function fixStyleScriptPathFilter($src, $handle)
17
    {
18
        if (strpos($src, '/app')) {
19
            $src = str_replace('//app', '/app', $src);
20
        }
21
22
        return $this->getWpBridge()->escUrl($src);
23
    }
24
}
25