Trello   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A processShareData() 0 4 1
A getMetaTags() 0 3 1
A buildLink() 0 5 1
1
<?php
2
3
/**
4
 * @link https://github.com/yiimaker/yii2-social-share
5
 * @copyright Copyright (c) 2017-2021 Volodymyr Kupriienko
6
 * @license BSD 3-Clause License
7
 */
8
9
namespace ymaker\social\share\drivers;
10
11
use ymaker\social\share\base\AbstractDriver;
12
13
/**
14
 * Driver for Trello.
15
 *
16
 * @see https://trello.com
17
 *
18
 * @author Vladimir Kuprienko <[email protected]>
19
 *
20
 * @since 2.2
21
 */
22
class Trello extends AbstractDriver
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function processShareData()
28
    {
29
        $this->url = static::encodeData($this->url);
30
        $this->title = static::encodeData($this->title);
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    protected function buildLink()
37
    {
38
        return 'https://trello.com/add-card'
39
            . '?url={url}'
40
            . '&name={title}'
41
        ;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    protected function getMetaTags()
48
    {
49
        return [['property' => 'og:description', 'content' => '{description}']];
50
    }
51
}
52