head_helper   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 2 1
A add() 0 2 1
A build_embeds() 0 2 1
A add_embed() 0 2 1
1
<?php
2
3
/*
4
		<title><?php echo $__server->page_embeds->page_title; ?></title>
5
		<meta property="og:title" content="<?php echo $__server->page_embeds->page_title; ?>" />
6
		<meta property="og:url" content="<?php echo $__server->page_embeds->page_url; ?>" />
7
		<meta property="og:description" content="<?php echo $__server->page_embeds->page_description; ?>" />
8
		<meta property="og:image" content="<?php echo $__server->page_embeds->page_image; ?>" />
9
        <script>
10
            var yt = yt || {};yt.timing = yt.timing || {};yt.timing.tick = function(label, opt_time) {var timer = yt.timing['timer'] || {};if(opt_time) {timer[label] = opt_time;}else {timer[label] = new Date().getTime();}yt.timing['timer'] = timer;};yt.timing.info = function(label, value) {var info_args = yt.timing['info_args'] || {};info_args[label] = value;yt.timing['info_args'] = info_args;};yt.timing.info('e', "904821,919006,922401,920704,912806,913419,913546,913556,919349,919351,925109,919003,920201,912706");if (document.webkitVisibilityState == 'prerender') {document.addEventListener('webkitvisibilitychange', function() {yt.timing.tick('start');}, false);}yt.timing.tick('start');yt.timing.info('li','0');try {yt.timing['srt'] = window.gtbExternal && window.gtbExternal.pageT() ||window.external && window.external.pageT;} catch(e) {}if (window.chrome && window.chrome.csi) {yt.timing['srt'] = Math.floor(window.chrome.csi().pageT);}if (window.msPerformance && window.msPerformance.timing) {yt.timing['srt'] = window.msPerformance.timing.responseStart - window.msPerformance.timing.navigationStart;}    
11
        </script>
12
        <link id="www-core-css" rel="stylesheet" href="/yt/cssbin/www-core-vfluMRDnk.css">
13
        <link rel="stylesheet" href="/yt/cssbin/www-guide-vflx0V5Tq.css">
14
        <script>
15
            if (window.yt.timing) {yt.timing.tick("ct");}    
16
        </script>
17
18
19
        currently unused
20
*/
21
 
22
/**
23
* @Auther: bhief
24
* @Version: 1.0
25
* @Added Base
26
*
27
* Use this to make the head tags for every page
28
*
29
**/
30
class head_helper {
31
    public $tags;
32
    public $embeds;
33
34
    function add(object $dom) {
35
        $this->tags::append($dom);
36
    }
37
38
    function add_embed(object $embed) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
39
        $this->embeds::append($embed);
40
    }
41
42
    function build() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
43
        return $this->tags;
44
    }
45
46
    function build_embeds() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
47
        return $this->embeds;
48
    }
49
}
50
51
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...