| Conditions | 5 |
| Paths | 14 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function detailAction() |
||
| 27 | { |
||
| 28 | try |
||
| 29 | { |
||
| 30 | $params = ['page' => 'page-supplier-detail']; |
||
| 31 | |||
| 32 | foreach( app( 'config' )->get( 'shop.page.supplier-detail' ) as $name ) |
||
| 33 | { |
||
| 34 | $params['aiheader'][$name] = Shop::get( $name )->header(); |
||
|
|
|||
| 35 | $params['aibody'][$name] = Shop::get( $name )->body(); |
||
| 36 | } |
||
| 37 | |||
| 38 | return Response::view( Shop::template( 'supplier.detail' ), $params ) |
||
| 39 | ->header( 'Cache-Control', 'private, max-age=10' ); |
||
| 40 | } |
||
| 41 | catch( \Exception $e ) |
||
| 42 | { |
||
| 43 | if( $e->getCode() >= 400 && $e->getCode() < 600 ) { abort( $e->getCode() ); } |
||
| 44 | throw $e; |
||
| 45 | } |
||
| 47 | } |
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.