Skip to content

Commit 637b17d

Browse files
committed
docs: Add the functions return type self.
1 parent 7811d2a commit 637b17d

1 file changed

Lines changed: 6 additions & 18 deletions

File tree

system/Router/RouteCollectionInterface.php

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ interface RouteCollectionInterface
3030
*
3131
* @param array|Closure|string $to
3232
* @param array $options
33-
*
34-
* @return mixed
3533
*/
36-
public function add(string $from, $to, ?array $options = null);
34+
public function add(string $from, $to, ?array $options = null): self;
3735

3836
/**
3937
* Registers a new constraint with the system. Constraints are used
@@ -45,45 +43,35 @@ public function add(string $from, $to, ?array $options = null);
4543
*
4644
* @param array|string $placeholder
4745
* @param string $pattern
48-
*
49-
* @return mixed
5046
*/
51-
public function addPlaceholder($placeholder, ?string $pattern = null);
47+
public function addPlaceholder($placeholder, ?string $pattern = null): self;
5248

5349
/**
5450
* Sets the default namespace to use for Controllers when no other
5551
* namespace has been specified.
56-
*
57-
* @return mixed
5852
*/
59-
public function setDefaultNamespace(string $value);
53+
public function setDefaultNamespace(string $value): self;
6054

6155
/**
6256
* Sets the default controller to use when no other controller has been
6357
* specified.
64-
*
65-
* @return mixed
6658
*/
67-
public function setDefaultController(string $value);
59+
public function setDefaultController(string $value): self;
6860

6961
/**
7062
* Sets the default method to call on the controller when no other
7163
* method has been set in the route.
72-
*
73-
* @return mixed
7464
*/
75-
public function setDefaultMethod(string $value);
65+
public function setDefaultMethod(string $value): self;
7666

7767
/**
7868
* Tells the system whether to convert dashes in URI strings into
7969
* underscores. In some search engines, including Google, dashes
8070
* create more meaning and make it easier for the search engine to
8171
* find words and meaning in the URI for better SEO. But it
8272
* doesn't work well with PHP method names....
83-
*
84-
* @return mixed
8573
*/
86-
public function setTranslateURIDashes(bool $value);
74+
public function setTranslateURIDashes(bool $value): self;
8775

8876
/**
8977
* If TRUE, the system will attempt to match the URI against

0 commit comments

Comments
 (0)