for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Itstructure\RbacModule\models;
use yii\data\ArrayDataProvider;
/**
* Class RoleSearch
*
* @package Itstructure\RbacModule\models
*/
class RoleSearch extends Role
{
* Modify for custom search rules.
* @inheritdoc
public function rules()
return [];
}
* Creates data provider
* @param array $params
* @return ArrayDataProvider
public function search($params)
$params
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function search(/** @scrutinizer ignore-unused */ $params)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$allModels = $this->authManager->getRoles();
$dataProvider = new ArrayDataProvider([
'allModels' => $allModels,
]);
* Modify for custom search conditions.
$this->load($params);
if (!$this->validate()) {
return $dataProvider;
}*/
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.