Passed
Push — master ( 92fa0d...527073 )
by Jakub
04:42
created

Friendica::getImageAlt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 2
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexendrie\Components\SocialIcons;
5
6
use Nexendrie\Model\SettingsRepository;
7
8
/**
9
 * Twitter Social Icon
10
 *
11
 * @author Jakub Konečný
12
 */
13 1
final class Friendica implements \Nexendrie\Components\ISocialIcon {
14
  private string $account;
15
16
  public function __construct(SettingsRepository $sr) {
17 1
    $this->account = $sr->settings["socialAccounts"]["friendica"];
18 1
  }
19
20
  public function getLink(): string {
21 1
    $parts = explode("@", $this->account);
22 1
    return "https://{$parts[2]}/profile/{$parts[1]}";
23
  }
24
25
  public function getImage(): string {
26 1
    return "friendica.png";
27
  }
28
29
  public function getImageAlt(): string {
30 1
    return "Friendica";
31
  }
32
33
  public function getImageTitle(): string {
34 1
    return "Účet Friendica v rámci fedivesmíru";
35
  }
36
}
37
?>