@@ 58-65 (lines=8) @@ | ||
55 | return $contents; |
|
56 | } |
|
57 | ||
58 | private function getTitle(array $params) |
|
59 | { |
|
60 | if (isset($params['url'])) { |
|
61 | return new HtmlElement('a', ['class' => 'source', 'href' => $params['url']], $params['title']); |
|
62 | } else { |
|
63 | return new HtmlElement('span', ['class' => 'source'], $params['title']); |
|
64 | } |
|
65 | } |
|
66 | ||
67 | private function getAuthor(array $params) |
|
68 | { |
|
@@ 67-74 (lines=8) @@ | ||
64 | } |
|
65 | } |
|
66 | ||
67 | private function getAuthor(array $params) |
|
68 | { |
|
69 | if (isset($params['author_url'])) { |
|
70 | return new HtmlElement('a', ['class' => 'author', 'href' => $params['author_url']], $params['author']); |
|
71 | } else { |
|
72 | return new HtmlElement('span', ['class' => 'author'], $params['author']); |
|
73 | } |
|
74 | } |
|
75 | ||
76 | private function getLicense(array $params) |
|
77 | { |
|
@@ 76-83 (lines=8) @@ | ||
73 | } |
|
74 | } |
|
75 | ||
76 | private function getLicense(array $params) |
|
77 | { |
|
78 | if (isset($params['license_url'])) { |
|
79 | return new HtmlElement('a', ['class' => 'license', 'href' => $params['license_url']], $params['license']); |
|
80 | } else { |
|
81 | return new HtmlElement('span', ['class' => 'license'], $params['license']); |
|
82 | } |
|
83 | } |
|
84 | } |