Livejournal   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A shareUrl() 0 18 2
1
<?php
2
3
namespace SocialLinks\Providers;
4
5
class Livejournal extends ProviderBase implements ProviderInterface
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function shareUrl()
11
    {
12
        $titleArray = $this->page->get(array('title'));
13
14
        if (isset($titleArray['title'])) {
15
            $title = $titleArray['title'];
16
        } else {
17
            $title = $this->page->getUrl();
18
        }
19
20
        $postText = '<a href="'.$this->page->getUrl().'">'.$title.'</a>';
21
22
        return $this->buildUrl(
23
            'http://www.livejournal.com/update.bml',
24
            array('title' => 'subject'),
25
            array('event' => $postText)
26
        );
27
    }
28
}
29