<commit_before><?php
namespace api\controllers;

use Yii;
use yii\rest\ActiveController;
use common\models\ProjectSearch;


/**
 * Site controller
 */
class ProjectController extends ActiveController
{
    public $modelClass = 'common\models\Project';
    public $serializer = [
        'class' => 'yii\rest\Serializer',
        'collectionEnvelope' => 'dataProvider',
    ];

    public function actions(){
        $actions = parent::actions();
        unset($actions['index']);
        return $actions;
    }

    public function actionIndex(){
        $params = Yii::$app->request->get();
        $model = new ProjectSearch();
        $dataProvider = $model->search($params);
        return $dataProvider;
    }


}<commit_msg>update example of index<commit_after><?php
namespace api\controllers;

use Yii;
use yii\rest\ActiveController;
use common\models\ProjectSearch;


/**
 * Site controller
 */
class ProjectController extends ActiveController
{
    public $modelClass = 'common\models\Project';
    public $serializer = [
        'class' => 'yii\rest\Serializer',
        'collectionEnvelope' => 'dataProvider',
    ];

    public function actions(){
        $actions = parent::actions();
        unset($actions['index']);
        return $actions;
    }

    public function actionIndex(){
        $model = new ProjectSearch();
        $params[$model->formName()] = Yii::$app->request->get();
        $dataProvider = $model->search($params);
        return $dataProvider;
    }


}
{'fraction_non_alphanumeric': 0.1429530201342282, 'fraction_numerical': 0.0, 'mean_word_length': 3.018867924528302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5379190', 'n_tokens_mistral': 414, 'n_tokens_neox': 411, 'n_words': 91}