Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Gii template variables order #3739

Merged
merged 1 commit into from
Jun 8, 2014

Conversation

umneeq
Copy link
Contributor

@umneeq umneeq commented Jun 8, 2014

No description provided.

@samdark
Copy link
Member

samdark commented Jun 8, 2014

What's wrong with current order?

@creocoder
Copy link
Contributor

We set variables in one order and put it to view in different order. It really does not matter for php. But this is hell for perfectionists. So why not merge this PR if things become little better?

    public function actionIndex()
    {
        $searchModel = new ArticleSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
            'dataProvider' => $dataProvider,
            'searchModel' => $searchModel,
        ]);
    }

VS

    public function actionIndex()
    {
        $searchModel = new ArticleSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

samdark added a commit that referenced this pull request Jun 8, 2014
@samdark samdark merged commit a2e25bf into yiisoft:master Jun 8, 2014
@samdark
Copy link
Member

samdark commented Jun 8, 2014

Merged.

@umneeq umneeq deleted the gii-codestyle-fixes-2 branch June 8, 2014 15:38
@cebe
Copy link
Member

cebe commented Jun 8, 2014

this is hell for perfectionists.

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants