Skip to content

Commit 1d9adb2

Browse files
Merge pull request #10264 from SidRoberts/routeinterface-route
[2.0.x] Methods returning `this` in Mvc\Router\Route now have the correct return type
2 parents a800ac4 + b2aebb2 commit 1d9adb2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

phalcon/mvc/router/route.zep

+7-7
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class Route implements RouteInterface
141141
* $route->via(array('GET', 'POST'));
142142
*</code>
143143
*/
144-
public function via(var httpMethods) -> <RouteInterface>
144+
public function via(var httpMethods) -> <Route>
145145
{
146146
let this->_methods = httpMethods;
147147
return this;
@@ -419,7 +419,7 @@ class Route implements RouteInterface
419419
* ))->setName('about');
420420
*</code>
421421
*/
422-
public function setName(string name) -> <RouteInterface>
422+
public function setName(string name) -> <Route>
423423
{
424424
let this->_name = name;
425425
return this;
@@ -430,7 +430,7 @@ class Route implements RouteInterface
430430
* The developer can implement any arbitrary conditions here
431431
* If the callback returns false the route is treated as not matched
432432
*/
433-
public function beforeMatch(callable callback) -> <RouteInterface>
433+
public function beforeMatch(callable callback) -> <Route>
434434
{
435435
let this->_beforeMatch = callback;
436436
return this;
@@ -498,7 +498,7 @@ class Route implements RouteInterface
498498
* $route->setHttpMethods(array('GET', 'POST'));
499499
*</code>
500500
*/
501-
public function setHttpMethods(var httpMethods) -> <RouteInterface>
501+
public function setHttpMethods(var httpMethods) -> <Route>
502502
{
503503
let this->_methods = httpMethods;
504504
return this;
@@ -519,7 +519,7 @@ class Route implements RouteInterface
519519
* $route->setHostname('localhost');
520520
*</code>
521521
*/
522-
public function setHostname(string! hostname) -> <RouteInterface>
522+
public function setHostname(string! hostname) -> <Route>
523523
{
524524
let this->_hostname = hostname;
525525
return this;
@@ -536,7 +536,7 @@ class Route implements RouteInterface
536536
/**
537537
* Sets the group associated with the route
538538
*/
539-
public function setGroup(<GroupInterface> group) -> <RouteInterface>
539+
public function setGroup(<GroupInterface> group) -> <Route>
540540
{
541541
let this->_group = group;
542542
return this;
@@ -553,7 +553,7 @@ class Route implements RouteInterface
553553
/**
554554
* Adds a converter to perform an additional transformation for certain parameter
555555
*/
556-
public function convert(string! name, var converter) -> <RouteInterface>
556+
public function convert(string! name, var converter) -> <Route>
557557
{
558558
let this->_converters[name] = converter;
559559
return this;

0 commit comments

Comments
 (0)