GooglePlus   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A processShareData() 0 3 1
A buildLink() 0 3 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 Google Plus.
15
 *
16
 * @see https://plus.google.com
17
 *
18
 * @author Vladimir Kuprienko <[email protected]>
19
 *
20
 * @since 1.0
21
 */
22
class GooglePlus extends AbstractDriver
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function processShareData()
28
    {
29
        $this->url = static::encodeData($this->url);
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function buildLink()
36
    {
37
        return 'https://plusone.google.com/_/+1/confirm?hl=en&url={url}';
38
    }
39
}
40