@@ -24,11 +24,11 @@ class LinksImprover
24
24
25
25
protected $ tagsInsideLinkCouldBeAdded = [
26
26
'p ' , 'p ' , 'span ' , 'span ' , 'b ' , 'b ' ,
27
- 'strong ' , 'strong ' , 'em ' , 'em ' , 'i ' , 'i ' , 'li ' , 'li '
27
+ 'strong ' , 'strong ' , 'em ' , 'em ' , 'i ' , 'i ' , 'li ' , 'li ' ,
28
28
];
29
- const TAGS_EXTENDED = [
29
+ public const TAGS_EXTENDED = [
30
30
'p ' , 'p ' , 'span ' , 'span ' , 'b ' , 'b ' ,
31
- 'strong ' , 'strong ' , 'em ' , 'em ' , 'i ' , 'i ' , 'li ' , 'li '
31
+ 'strong ' , 'strong ' , 'em ' , 'em ' , 'i ' , 'i ' , 'li ' , 'li ' ,
32
32
'h2 ' , 'h2 ' , 'h3 ' , 'h3 ' , 'h4 ' , 'h4 ' , 'h5 ' , 'h5 ' ,
33
33
'div ' , 'div ' ,
34
34
];
@@ -49,7 +49,7 @@ protected function linkEverExist($link)
49
49
}
50
50
}
51
51
52
- public function improve (LinksManager $ linksManager , $ maxLink , $ linkAttrToAdd = '' ) : string
52
+ public function improve (LinksManager $ linksManager , $ maxLink , $ linkAttrToAdd = '' ): string
53
53
{
54
54
foreach ($ linksManager ->get () as $ link ) {
55
55
if ($ this ->mustStop ($ maxLink )) {
@@ -90,7 +90,7 @@ protected function createLink(Link $link, $anchorTxt, $anchorPos, $attr)
90
90
91
91
protected function getLinkToAdd ($ url , $ anchor , $ attr )
92
92
{
93
- return '<a href=" ' .$ url .'" ' .($ attr ? ' ' .$ attr: '' ).'> ' .trim ($ anchor ).'</a> ' ;
93
+ return '<a href=" ' .$ url .'" ' .($ attr ? ' ' .$ attr : '' ).'> ' .trim ($ anchor ).'</a> ' ;
94
94
}
95
95
96
96
public function setTagsInsideLinkCouldBeAdded (array $ tags )
0 commit comments