| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function assertRedirect($uri = null) |
||
| 55 | { |
||
| 56 | |||
| 57 | PHPUnit::assertTrue( |
||
| 58 | $this->isRedirect(), |
||
| 59 | "Response status code [{$this->getStatusCode()}] is not a redirect status code." |
||
| 60 | ); |
||
| 61 | |||
| 62 | if (! is_null($uri)) { |
||
| 63 | PHPUnit::assertContains(app('url')->to($uri), $this->getHeader('Location'), '', true); |
||
|
|
|||
| 64 | } |
||
| 65 | |||
| 66 | return $this; |
||
| 67 | } |
||
| 99 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.