SEOToolboxAnalyzerField   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createBaseHTML() 0 7 1
1
<?php
2
3
class SEOToolboxAnalyzerField extends LiteralField {
4
5
    public function __construct($name, $url) {
6
        $content = $this->createBaseHTML($name, $url);
7
        parent::__construct($name, $content);
8
    }
9
10
    /**
11
     * Create the html needed to represent this form field
12
     *
13
     * @param $name
14
     * @param $url
15
     * @return string
16
     */
17
    private function createBaseHTML($name, $url) {
18
        $div    = "<div id='seotoolbox_con_{$name}'><div class='clearfix result_cont'></div></div>";
19
        $script = "<script type='text/javascript'>
20
                    new PageAnalyzer(jQuery('#seotoolbox_con_{$name} .result_cont'),'{$url}');
21
                   </script>";
22
        return $div.$script;
23
    }
24
}
25