1
1
<?php
2
2
3
+ /*
4
+ * This file is part of fof/links.
5
+ *
6
+ * Copyright (c) FriendsOfFlarum.
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
3
12
namespace FoF \Links \Extend ;
4
13
5
14
use Flarum \Extend \ExtenderInterface ;
@@ -25,6 +34,7 @@ class LinksOverride implements ExtenderInterface
25
34
* that will return an array of LinkDefinition objects.
26
35
*
27
36
* @param LinkDefinition[]|string $links
37
+ *
28
38
* @return $this
29
39
*/
30
40
public function addLinks ($ links )
@@ -33,13 +43,15 @@ public function addLinks($links)
33
43
throw new \InvalidArgumentException ('addLinks expects an array of LinkDefinition objects or an invokable class string. ' );
34
44
}
35
45
$ this ->links = $ links ;
46
+
36
47
return $ this ;
37
48
}
38
49
39
50
/**
40
51
* Add a single link.
41
52
*
42
53
* @param LinkDefinition $link
54
+ *
43
55
* @return $this
44
56
*/
45
57
public function addLink (LinkDefinition $ link )
@@ -50,6 +62,7 @@ public function addLink(LinkDefinition $link)
50
62
// If a class string was already provided, override it with an array.
51
63
$ this ->links = [$ link ];
52
64
}
65
+
53
66
return $ this ;
54
67
}
55
68
@@ -58,7 +71,7 @@ public function addLink(LinkDefinition $link)
58
71
*
59
72
* This binds the override links into the LinkRepository.
60
73
*
61
- * @param Container $container
74
+ * @param Container $container
62
75
* @param Extension|null $extension
63
76
*/
64
77
public function extend (Container $ container , ?Extension $ extension = null )
0 commit comments