Completed
Push — master ( 837ac6...83f19b )
by Oscar
02:03
created

Opengraph::addMeta()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace SocialLinks\Metas;
4
5 View Code Duplication
class Opengraph extends MetaBase implements MetaInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    const META_ATTRIBUTE_NAME = 'property';
8
    const META_NAME_PREFIX = 'og:';
9
10
    protected static $characterLimits = array(
11
        'title' => 65,
12
        'description' => 156,
13
    );
14
15
    /**
16
     * {@inheritdoc}
17
     */
18
    protected function generateTags()
19
    {
20
        $this->addMeta('type', 'website');
21
22
        $this->addMetas($this->page->get(array(
23
            'title',
24
            'image',
25
            'url',
26
            'text' => 'description',
27
        )));
28
    }
29
}
30