for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
Checks if the types of the passed arguments in a function/method call are compatible.
<?php
$params = [];
$params['menu'] = [];
$params['menu']['default'] = [];
$params['menu']['default'][] = new ElggMenuItem(1, "Public", false);
false
string
$href
ElggMenuItem::__construct()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
$params['menu']['default'][] = new ElggMenuItem(1, "Public", /** @scrutinizer ignore-type */ false);
$params['menu']['default'][] = new ElggMenuItem(2, "Edit", "#");
$params['menu']['default'][] = new ElggMenuItem(3, elgg_view_icon('thumbs-up'), "#");
$params['name'] = 'entity';
$params['class'] = 'elgg-menu-hz';
echo '<div class="theme-sandbox-demo-sidebar">';
echo elgg_view('navigation/menu/default', $params);
echo '</div>';