Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function indexAction() |
||
28 | { |
||
29 | $params = ['page' => 'page-index']; |
||
30 | |||
31 | foreach( app( 'config' )->get( 'shop.page.cms', ['cms/page', 'catalog/tree', 'basket/mini'] ) as $name ) |
||
|
|||
32 | { |
||
33 | $params['aiheader'][$name] = Shop::get( $name )->header(); |
||
34 | $params['aibody'][$name] = Shop::get( $name )->body(); |
||
35 | } |
||
36 | |||
37 | if( empty( $params['aibody']['cms/page'] ) ) { |
||
38 | abort( 404 ); |
||
39 | } |
||
40 | |||
41 | return Response::view( Shop::template( 'page.index' ), $params ) |
||
42 | ->header( 'Cache-Control', 'private, max-age=10' ); |
||
43 | } |
||
45 |
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.