Skip to content

Commit

Permalink
minor #10717 unified return null usages (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

unified return null usages

| Q             | A
| ------------- | ---
| License       | MIT

This PR unifies the way we return `null` from a function or method:

 * always use `return;` instead of `return null;` (the current code base uses both);
 * never use `return;` at the end of a function/method.

Commits
-------

d1d569b unified return null usages
  • Loading branch information
fabpot committed Apr 18, 2014
2 parents 4da56d6 + 0d98207 commit 0d2ab42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parser/TokenStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function getNextIdentifierOrStar()
}

if ($next->isDelimiter(array('*'))) {
return null;
return;
}

throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next);
Expand Down

0 comments on commit 0d2ab42

Please sign in to comment.