PHP files should not contain syntax errors

More information: https://insight.symfony.com/what-we-analyse/php.php_syntax_error

  1. <?php
  2. class {ClassName} extends yupe\components\DbMigration

    Syntax error, unexpected '{', expecting T_STRING

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by sabian
  3. {
  4. public function safeUp()
  5. {
  6. }

Global variable or function should never be used 3

More information: https://insight.symfony.com/what-we-analyse/php.use_global_variable_or_function

  1. 'encodeLabel' => false,
  2. ]
  3. );
  4. endif;
  5. function moduleRow($module, &$updates, &$modules)

    moduleRow() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Andrey Opeykin
  6. {
  7. ?>
  8. <tr class="<?= ($module->getIsActive()) ? (is_array(
  9. $module->checkSelf()
  10. ) ? 'danger' : '') : 'text-muted'; ?>">
  1. </td>
  2. </tr>
  3. <?php
  4. }
  5. function modulesTable($modules, &$updates, &$allmodules, &$controller)

    modulesTable() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by Michael
  6. {
  7. ob_start();
  8. ob_implicit_flush(false);
  9. ?>
  10. <table class="table table-striped table-vmiddle">
  1. <?php
  2. function renderMenu($items, $level = 0)

    renderMenu() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by sabian
  3. {
  4. $menu = '';
  5. if ($level == 1) {
  6. $menu .= CHtml::openTag('div', ['class' => 'menu-catalog-submenu']);

PHP configuration should not be changed dynamically 2

More information: https://insight.symfony.com/what-we-analyse/php.dynamically_change_configuration

in public/index.php, line 22
  1. date_default_timezone_set('Europe/Moscow');
  2. }
  3. // Setting internal encoding to UTF-8.
  4. if (!ini_get('mbstring.internal_encoding')) {
  5. @ini_set("mbstring.internal_encoding", 'UTF-8');

    Changing PHP configuration dynamically through ini_set() may create hard to debug errors.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Anton Kucherov
  6. mb_internal_encoding('UTF-8');
  7. }
  8. // Comment next two lines on production
  9. define('YII_DEBUG', true);
in public/index-test.php, line 19
  1. date_default_timezone_set('UTC');
  2. }
  3. // Setting internal encoding to UTF-8.
  4. if (!ini_get('mbstring.internal_encoding')) {
  5. @ini_set("mbstring.internal_encoding", 'UTF-8');

    Changing PHP configuration dynamically through ini_set() may create hard to debug errors.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Anton Kucherov
  6. mb_internal_encoding('UTF-8');
  7. }
  8. // Комментируем перед выпуском в продакшен:
  9. define('YII_DEBUG', true);

The EntityManager should not be flushed within a loop

More information: https://insight.symfony.com/what-we-analyse/doctrine.use_flush_in_loop

  1. if (is_dir(
  2. $modPath.'/'.$item->getBaseName('.php')
  3. ) == false && $cacheFile != $item->getBaseName('.php')
  4. ) {
  5. Yii::app()->getCache()->flush();

    Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Opeykin Andrey
  6. unlink($modConfigs.'/'.$item->getBaseName());
  7. throw new Exception(
  8. Yii::t(

Web applications should contain a favicon

More information: https://insight.symfony.com/what-we-analyse/web.missing_favicon

in public

No favicon found in the web root directory

Time to fix: about 1 hour
Open Issue Permalink
Collective
  • public
    • assets
    • uploads
    • index-test.php
    • index.php
    • robots.txt

Files should not be executable

More information: https://insight.symfony.com/what-we-analyse/php.too_permissive_file_permissions

Your project contains files with permissive permissions. In order to avoid opening a security breach, you should restrict execution rights on following files:

  • protected/config/modules/.gitignore
  • public/uploads/.gitignore

Time to fix: about 15 minutes
Open Issue Permalink
Collective
chmod a-x 'protected/config/modules/.gitignore' \
    'public/uploads/.gitignore'

Source code should not contain TODO comments 15

More information: https://insight.symfony.com/what-we-analyse/task_todo_comment

  1. *
  2. * @param bool $backend - если установлен в true - вернет темы оформления для панели управления, иначе - для публичной части сайта
  3. *
  4. * @return array список доступных тем
  5. * @since 0.4
  6. * @todo возможно, стоит добавить кэширование чтобы каждый раз не ходить по файловой системе

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by AKulikov
  7. */
  8. public function getThemes($backend = false)
  9. {
  10. $themes = [];
  1. ];
  2. }
  3. public function search()
  4. {
  5. // @todo Please modify the following code to remove attributes that should not be searched.

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Dark_Cs
  6. $criteria = new CDbCriteria;
  7. $criteria->compare('id', $this->id);
  8. $criteria->compare('name', $this->name, true);
  1. ]
  2. );
  3. if ($user->save()) {
  4. //@TODO заменить на обработку через событие

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  5. if (Yii::app()->hasModule('rbac')) {
  6. Yii::import('application.modules.rbac.models.*');
  7. $assign = new AuthAssignment();
  8. $assign->itemname = AuthItem::ROLE_ADMIN;
  9. $assign->userid = $user->id;
  1. $resultItems = $results->menuItems;
  2. foreach ($resultItems as $result) {
  3. $childItems = $this->getItems($code, $result->id);
  4. // @TODO Если не ставить url и присутствует items, пункт не выводится, возможно баг yii

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by adminnu
  5. if ($result->href) {
  6. // если адрес надо параметризовать через роутер
  7. if (!$result->regular_link) {
  8. $url = $result->href;
  9. strstr($url, '?') ? list($url, $param) = explode("?", $url) : $param = [];
  1. * @return CActiveDataProvider the data provider that can return the models
  2. * based on the search/filter conditions.
  3. */
  4. public function search()
  5. {
  6. // @todo Please modify the following code to remove attributes that should not be searched.

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. $criteria = new CDbCriteria;
  8. $criteria->compare('id', $this->id);
  9. $criteria->compare('order_id', $this->order_id);
  1. return [
  2. ['user_id', 'required'],
  3. ['user_id', 'unique'],
  4. ['user_id, my_post, my_comment', 'numerical', 'integerOnly'=>true],
  5. // The following rule is used by search().
  6. // @todo Please remove those attributes that should not be searched.

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. ['id, user_id, my_post, my_comment', 'safe', 'on'=>'search'],
  8. ];
  9. }
  10. /**
  1. * @return CActiveDataProvider the data provider that can return the models
  2. * based on the search/filter conditions.
  3. */
  4. public function search()
  5. {
  6. // @todo Please modify the following code to remove attributes that should not be searched.

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. $criteria=new CDbCriteria;
  8. $criteria->compare('id',$this->id);
  9. $criteria->compare('user_id',$this->user_id);
  1. }
  2. }
  3. /**
  4. * @return bool
  5. * @TODO вынести всю логику в saveData

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  6. */
  7. public function beforeSave()
  8. {
  9. $this->total_price = $this->getProductsCost();
  1. $this->redirect([$_POST['submit-type']]);
  2. }
  3. }
  4. }
  5. //@TODO вынести в метод модели

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Opeykin Andrey
  6. $criteria = new CDbCriteria;
  7. $criteria->select = new CDbExpression('MAX(position) as position');
  8. $max = $model->find($criteria);
  9. $model->position = $max->position + 1;
  1. $alias = "attributes_values_{$i}";
  2. $criteria->join .= " JOIN {{store_product_attribute_value}} {$alias} ON t.id = {$alias}.product_id ";
  3. //@TODO подумать как улучшить

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  4. if (is_array($params['value'])) {
  5. if (isset($params['value']['from'], $params['value']['to'])) {
  6. $between = new CDbCriteria();
  7. $between->addBetweenCondition(
  8. "{$alias}.".$params['column'],
  1. * @author YupeTeam <team@yupe.ru>
  2. * @link http://yupe.ru
  3. */
  4. /*
  5. *
  6. * @TODO добавить возможность указать параметры для Selenium2 драйвера, можно ограичиться только url

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. *
  8. **/
  9. /**
  10. * Class TestEnvCommand
  1. * @category Widgets
  2. * @package yupe.modules.yupe.widgets
  3. * @author Yupe Team <team@yupe.ru>
  4. * @license https://github.com/yupe/yupe/blob/master/LICENSE BSD
  5. * @link http://yupe.ru
  6. * @todo можно реализовать мультиекшен на основе вызова

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Opeykin Andrey
  7. * метода из CustomGridView и обращаться непосредственно
  8. * к модели.
  9. **/
  10. namespace yupe\widgets;
  1. * @var array
  2. */
  3. public $datePickers = [];
  4. /**
  5. * @todo if this an unused variable - need to delete it

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Opeykin Andrey
  6. */
  7. public $inActiveStatus = 0;
  8. /**
  9. * @todo if this an unused variable - need to delete it
  1. * @todo if this an unused variable - need to delete it
  2. */
  3. public $inActiveStatus = 0;
  4. /**
  5. * @todo if this an unused variable - need to delete it

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Opeykin Andrey
  6. */
  7. public $activeStatus = 1;
  8. /**
  9. * Field for sorting:
  1. * @var string
  2. */
  3. public $sortField = 'sort';
  4. /**
  5. * @todo if this an unused variable - need to delete it

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Opeykin Andrey
  6. */
  7. public $showStatusText = false;
  8. /**
  9. * @var array Page sizes available to set for web-user.

Code should not be duplicated 83

More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code

  1. Yii::app()->user->setFlash(
  2. yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
  3. Yii::t('StoreModule.store', 'Category was changed!')
  4. );
  5. $this->redirect(

    The next 34 lines appear both in protected/modules/store/controllers/CategoryBackendController.php:111 and protected/modules/yml/controllers/ExportBackendController.php:71.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Dark_Cs
  6. (array)Yii::app()->getRequest()->getPost(
  7. 'submit-type',
  8. [
  9. 'update',
  10. 'id' => $model->id,
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 40 lines appear both in protected/modules/blog/views/blogBackend/create.php:18 and protected/modules/blog/views/postBackend/view.php:18.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 30 lines appear both in protected/modules/blog/views/blogBackend/create.php:18 and protected/modules/blog/views/postBackend/update.php:19.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 51 lines appear in protected/modules/blog/views/blogBackend/create.php:18, protected/modules/blog/views/postBackend/create.php:18 and protected/modules/blog/views/userToBlogBackend/create.php:18.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 43 lines appear both in protected/modules/blog/views/blogBackend/create.php:18 and protected/modules/blog/views/userToBlogBackend/update.php:19.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 47 lines appear both in protected/modules/blog/views/blogBackend/create.php:18 and protected/modules/blog/views/userToBlogBackend/view.php:18.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 52 lines appear both in protected/modules/blog/views/blogBackend/create.php:18 and protected/modules/blog/views/userToBlogBackend/index.php:18.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('BlogModule.blog', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('BlogModule.blog', 'Blogs - create');
  4. $this->menu = [

    The next 53 lines appear in protected/modules/blog/views/blogBackend/create.php:18, protected/modules/blog/views/blogBackend/index.php:18 and protected/modules/blog/views/postBackend/index.php:18.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('BlogModule.blog', 'Blogs'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. 'id' => $model->id
  2. ]
  3. ],
  4. [
  5. 'icon' => 'fa fa-fw fa-eye',
  6. 'label' => Yii::t('BlogModule.blog', 'View blog'),

    The next 53 lines appear both in protected/modules/blog/views/blogBackend/update.php:44 and protected/modules/blog/views/blogBackend/view.php:45.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. 'url' => [
  8. '/blog/blogBackend/view',
  9. 'id' => $model->id
  10. ]
  11. ],
  1. *
  2. * @return void
  3. *
  4. * @throws CHttpException
  5. */
  6. public function actionDelete($id)

    The next 28 lines appear both in protected/modules/category/controllers/CategoryBackendController.php:193 and protected/modules/store/controllers/CategoryBackendController.php:141.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Yupe
  7. {
  8. if (Yii::app()->getRequest()->getIsPostRequest()) {
  9. $transaction = Yii::app()->db->beginTransaction();
  1. Yii::t('CategoryModule.category', 'Change'),
  2. ];
  3. $this->pageTitle = Yii::t('CategoryModule.category', 'Categories - edit');
  4. $this->menu = [

    The next 44 lines appear both in protected/modules/category/views/categoryBackend/update.php:10 and protected/modules/category/views/categoryBackend/view.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('CategoryModule.category', 'Category manage'),
  8. 'url' => ['/category/categoryBackend/index']
  9. ],
  1. * Message string can be used with plural forms format. Check i18n section
  2. * of the guide for details.
  3. *
  4. * NOTE, this file must be saved in UTF-8 encoding.
  5. */
  6. return [

    The next 100 lines appear both in protected/modules/comment/messages/en/comment.php:19 and protected/modules/comment/messages/zh_cn/comment.php:19.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  7. '0.5' => '',
  8. 'Email' => '',
  9. 'Email for notifications' => '',
  10. 'ID' => '',
  11. 'IP address' => '',
  1. Yii::t('CommentModule.comment', 'Edit'),
  2. ];
  3. $this->pageTitle = Yii::t('CommentModule.comment', 'Comments - edit');
  4. $this->menu = [

    The next 43 lines appear both in protected/modules/comment/views/commentBackend/update.php:10 and protected/modules/comment/views/commentBackend/view.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('CommentModule.comment', 'Manage comments'),
  8. 'url' => ['/comment/commentBackend/index']
  9. ],
  1. Yii::t('ContentBlockModule.contentblock', 'Content block was changed!')
  2. );
  3. Yii::app()->getCache()->delete("ContentBlock{$model->code}");
  4. $this->redirect(

    The next 40 lines appear both in protected/modules/contentblock/controllers/ContentBlockBackendController.php:125 and protected/modules/dictionary/controllers/DictionaryBackendController.php:107.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by akulikov
  5. (array)Yii::app()->getRequest()->getPost(
  6. 'submit-type',
  7. ['update', 'id' => $model->id]
  8. )
  9. );
  1. * Message string can be used with plural forms format. Check i18n section
  2. * of the guide for details.
  3. *
  4. * NOTE, this file must be saved in UTF-8 encoding.
  5. */
  6. return [

    The next 74 lines appear both in protected/modules/contentblock/messages/en/contentblock.php:19 and protected/modules/contentblock/messages/zh_cn/contentblock.php:19.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  7. '*unknown type*' => '',
  8. '0.2' => '',
  9. 'Add block' => '',
  10. 'Add block and close' => '',
  11. 'Add block and continue' => '',
  1. 'icon' => 'fa fa-fw fa-plus-square',
  2. 'label' => Yii::t('ContentBlockModule.contentblock', 'Add content block'),
  3. 'url' => ['/contentblock/contentBlockBackend/create']
  4. ],
  5. [
  6. 'label' => Yii::t('ContentBlockModule.contentblock', 'Content block') . ' «' . mb_substr(

    The next 30 lines appear both in protected/modules/contentblock/views/contentBlockBackend/update.php:25 and protected/modules/contentblock/views/contentBlockBackend/view.php:21.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. $model->name,
  8. 0,
  9. 32
  10. ) . '»'
  11. ],
  1. Yii::t('CouponModule.coupon', 'Edition'),
  2. ];
  3. $this->pageTitle = Yii::t('CouponModule.coupon', 'Coupons - edition');
  4. $this->menu = [

    The next 44 lines appear both in protected/modules/coupon/views/couponBackend/update.php:14 and protected/modules/coupon/views/couponBackend/view.php:13.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('CouponModule.coupon', 'Manage coupons'),
  8. 'url' => ['/coupon/couponBackend/index'],
  9. ],
  1. Yii::t('DictionaryModule.dictionary', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('DictionaryModule.dictionary', 'Dictionaries - create');
  4. $this->menu = [

    The next 37 lines appear both in protected/modules/dictionary/views/dictionaryBackend/create.php:9 and protected/modules/dictionary/views/dictionaryDataBackend/index.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('DictionaryModule.dictionary', 'Dictionaries'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('DictionaryModule.dictionary', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('DictionaryModule.dictionary', 'Dictionaries - create');
  4. $this->menu = [

    The next 36 lines appear both in protected/modules/dictionary/views/dictionaryBackend/create.php:9 and protected/modules/dictionary/views/dictionaryDataBackend/create.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('DictionaryModule.dictionary', 'Dictionaries'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('DictionaryModule.dictionary', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('DictionaryModule.dictionary', 'Dictionaries - create');
  4. $this->menu = [

    The next 28 lines appear both in protected/modules/dictionary/views/dictionaryBackend/create.php:9 and protected/modules/dictionary/views/dictionaryDataBackend/update.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('DictionaryModule.dictionary', 'Dictionaries'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('DictionaryModule.dictionary', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('DictionaryModule.dictionary', 'Dictionaries - create');
  4. $this->menu = [

    The next 69 lines appear both in protected/modules/dictionary/views/dictionaryBackend/create.php:9 and protected/modules/dictionary/views/dictionaryDataBackend/view.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('DictionaryModule.dictionary', 'Dictionaries'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('DictionaryModule.dictionary', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('DictionaryModule.dictionary', 'Dictionaries - create');
  4. $this->menu = [

    The next 38 lines appear both in protected/modules/dictionary/views/dictionaryBackend/create.php:9 and protected/modules/dictionary/views/dictionaryBackend/index.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('DictionaryModule.dictionary', 'Dictionaries'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('DictionaryModule.dictionary', 'Edit'),
  2. ];
  3. $this->pageTitle = Yii::t('DictionaryModule.dictionary', 'Dictionaries - edit');
  4. $this->menu = [

    The next 69 lines appear both in protected/modules/dictionary/views/dictionaryBackend/update.php:13 and protected/modules/dictionary/views/dictionaryBackend/view.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('DictionaryModule.dictionary', 'Dictionaries'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('FeedbackModule.feedback', 'Reply'),
  2. ];
  3. $this->pageTitle = Yii::t('FeedbackModule.feedback', 'Messages - answer');
  4. $this->menu = [

    The next 58 lines appear both in protected/modules/feedback/views/feedbackBackend/answer.php:11 and protected/modules/feedback/views/feedbackBackend/view.php:11.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('FeedbackModule.feedback', 'Messages management'),
  8. 'url' => ['/feedback/feedbackBackend/index']
  9. ],
  1. Yii::t('FeedbackModule.feedback', 'Reply'),
  2. ];
  3. $this->pageTitle = Yii::t('FeedbackModule.feedback', 'Messages - answer');
  4. $this->menu = [

    The next 50 lines appear both in protected/modules/feedback/views/feedbackBackend/answer.php:11 and protected/modules/feedback/views/feedbackBackend/update.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('FeedbackModule.feedback', 'Messages management'),
  8. 'url' => ['/feedback/feedbackBackend/index']
  9. ],
  1. $this->breadcrumbs = [
  2. Yii::t('GalleryModule.gallery', 'Galleries') => ['/gallery/galleryBackend/index'],
  3. $model->name,
  4. ];
  5. $this->menu = [

    The next 40 lines appear both in protected/modules/gallery/views/galleryBackend/images.php:18 and protected/modules/gallery/views/galleryBackend/update.php:11.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  6. [
  7. 'icon' => 'fa fa-fw fa-list-alt',
  8. 'label' => Yii::t('GalleryModule.gallery', 'Gallery management'),
  9. 'url' => ['/gallery/galleryBackend/index']
  10. ],
  1. Yii::t('ImageModule.image', 'Edit'),
  2. ];
  3. $this->pageTitle = Yii::t('ImageModule.image', 'Images - edit');
  4. $this->menu = [

    The next 43 lines appear both in protected/modules/image/views/imageBackend/update.php:10 and protected/modules/image/views/imageBackend/view.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('ImageModule.image', 'Image management'),
  8. 'url' => ['/image/imageBackend/index']
  9. ],
  1. $this->height = $this->width;
  2. }
  3. Yii::app()->clientScript->registerCssFile(
  4. Yii::app()->assetManager->publish(
  5. Yii::getPathOfAlias('image.widgets.assets') . '/image-wrapper.css'

    The next 28 lines appear both in protected/modules/image/widgets/ImageWrapper.php:55 and protected/modules/user/widgets/AvatarWidget.php:81.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  6. )
  7. );
  8. $htmlOptions = [
  9. 'class' => 'img-wrapper-tocenter',
  1. Yii::app()->user->setFlash(
  2. yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
  3. Yii::t('MailModule.mail', 'Record was created!')
  4. );
  5. $this->redirect(

    The next 53 lines appear both in protected/modules/mail/controllers/EventBackendController.php:106 and protected/modules/mail/controllers/TemplateBackendController.php:107.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by akulikov
  6. (array)Yii::app()->getRequest()->getPost(
  7. 'submit-type',
  8. ['update', 'id' => $model->id]
  9. )
  10. );
  1. Yii::t('MailModule.mail', 'Mail events') => ['/mail/eventBackend/index'],
  2. $model->name => ['view', 'id' => $model->id],
  3. Yii::t('MailModule.mail', 'Edit'),
  4. ];
  5. $this->pageTitle = Yii::t('MailModule.mail', 'Edit mail template');
  6. $this->menu = [

    The next 54 lines appear both in protected/modules/mail/views/templateBackend/update.php:9 and protected/modules/mail/views/templateBackend/view.php:8.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  7. ['label' => Yii::t('MailModule.mail', 'Mail templates')],
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  10. 'label' => Yii::t('MailModule.mail', 'Templates list'),
  11. 'url' => ['/mail/templateBackend/index']
  1. Yii::t('MenuModule.menu', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('MenuModule.menu', 'Menu - insert');
  4. $this->menu = [

    The next 37 lines appear in protected/modules/menu/views/menuBackend/create.php:20, protected/modules/menu/views/menuBackend/index.php:20 and protected/modules/menu/views/menuitemBackend/view.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('MenuModule.menu', 'Menu'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('MenuModule.menu', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('MenuModule.menu', 'Menu - insert');
  4. $this->menu = [

    The next 28 lines appear both in protected/modules/menu/views/menuBackend/create.php:20 and protected/modules/menu/views/menuitemBackend/update.php:11.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('MenuModule.menu', 'Menu'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('MenuModule.menu', 'Create'),
  2. ];
  3. $this->pageTitle = Yii::t('MenuModule.menu', 'Menu - insert');
  4. $this->menu = [

    The next 36 lines appear in protected/modules/menu/views/menuBackend/create.php:20, protected/modules/menu/views/menuitemBackend/create.php:10 and protected/modules/menu/views/menuitemBackend/index.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('MenuModule.menu', 'Menu'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. Yii::t('MenuModule.menu', 'Edit'),
  2. ];
  3. $this->pageTitle = Yii::t('MenuModule.menu', 'Menu - edit');
  4. $this->menu = [

    The next 22 lines appear both in protected/modules/menu/views/menuBackend/update.php:21 and protected/modules/menu/views/menuBackend/view.php:20.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('MenuModule.menu', 'Menu'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. 'http://yupe.ru' => '',
  2. 'team@yupe.ru' => '',
  3. 'yupe team' => '',
  4. 'Author' => '',
  5. 'Alias' => '',
  6. 'This section describes News Management' => '',

    The next 32 lines appear both in protected/modules/news/messages/en/news.php:31 and protected/modules/news/messages/zh_cn/news.php:35.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'Visual Editor' => '',
  8. 'You inserting translation for {lang} language' => '',
  9. 'Do you really want to remove the article?' => '',
  10. 'Main news category' => '',
  11. 'Data for SEO' => '',
  1. 'Minimum size (in bytes)' => '',
  2. 'Module for creating and management news' => '',
  3. 'On moderation' => '',
  4. 'Bad raquest. Please don\'t use similar requests anymore!' => '',
  5. 'News' => '',
  6. 'News - create' => '',

    The next 43 lines appear both in protected/modules/news/messages/en/news.php:66 and protected/modules/news/messages/zh_cn/news.php:70.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'News - show' => '',
  8. 'News - edit' => '',
  9. 'News - management' => '',
  10. 'News Article' => '',
  11. 'News article was created!' => '',
  1. Yii::t('NotifyModule.notify', 'Edition'),
  2. ];
  3. $this->pageTitle = Yii::t('NotifyModule.notify', 'Notify - edition');
  4. $this->menu = [

    The next 22 lines appear both in protected/modules/notify/views/notifyBackend/update.php:20 and protected/modules/notify/views/notifyBackend/view.php:19.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('NotifyModule.notify', 'Manage notify'), 'url' => ['/notify/notifyBackend/index']],
  6. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('NotifyModule.notify', 'Create notify'), 'url' => ['/notify/notifyBackend/create']],
  7. ['label' => Yii::t('NotifyModule.notify', 'Notification') . ' «' . mb_substr($model->id, 0, 32) . '»'],
  8. ['icon' => 'fa fa-fw fa-pencil', 'label' => Yii::t('NotifyModule.notify', 'Update notify'), 'url' => [
  9. '/notify/notifyBackend/update',
  1. yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
  2. Yii::t('OrderModule.order', 'Record updated! Notification is sent!')
  3. );
  4. }
  5. if (!isset($_POST['submit-type'])) {

    The next 38 lines appear both in protected/modules/order/controllers/OrderBackendController.php:136 and protected/modules/order/controllers/StatusBackendController.php:69.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Dark_Cs
  6. $this->redirect(['update', 'id' => $model->id]);
  7. } else {
  8. $this->redirect([$_POST['submit-type']]);
  9. }
  10. }
  1. /* @var $spamField string */
  2. /* @var $spamFieldValue string */
  3. /* @var $redirectTo string */
  4. /* @var $comments Comment[] */
  5. Yii::app()->clientScript

    The next 35 lines appear both in protected/modules/order/views/orderBackend/comments.php:10 and themes/default/views/comment/widgets/CommentsWidget/comments.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  6. ->registerScriptFile(Yii::app()->getModule('comment')->getAssetsUrl() . '/js/comments.js')
  7. ->registerScript(
  8. __FILE__,
  9. "$(document).ready(function(){
  10. $(document).on('focus', '#Comment_text, div.redactor-editor', function() {
  1. <hr/>
  2. <?php $form = $this->beginWidget(
  3. 'bootstrap.widgets.TbActiveForm',
  4. [
  5. 'action' => Yii::app()->createUrl('/comment/add/'),
  6. 'id' => 'comment-form',

    The next 120 lines appear both in protected/modules/order/views/orderBackend/comments.php:72 and themes/default/views/comment/widgets/CommentsWidget/comments.php:72.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  7. 'type' => 'vertical',
  8. 'enableAjaxValidation' => true,
  9. 'enableClientValidation' => true,
  10. 'htmlOptions' => [
  11. 'class' => 'well',
  1. Yii::t('OrderModule.order', 'Creating'),
  2. ];
  3. $this->pageTitle = Yii::t('OrderModule.order', 'Orders - creating');
  4. $this->menu = [

    The next 13 lines appear both in protected/modules/order/views/orderBackend/create.php:9 and protected/modules/order/views/statusBackend/update.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('OrderModule.order', 'Orders'),
  7. 'items' => [
  8. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('OrderModule.order', 'Manage orders'), 'url' => ['/order/orderBackend/index']],
  9. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('OrderModule.order', 'Create order'), 'url' => ['/order/orderBackend/create']],
  1. Yii::t('OrderModule.order', 'Creating'),
  2. ];
  3. $this->pageTitle = Yii::t('OrderModule.order', 'Orders - creating');
  4. $this->menu = [

    The next 21 lines appear in protected/modules/order/views/orderBackend/create.php:9, protected/modules/order/views/orderBackend/index.php:11 and protected/modules/order/views/statusBackend/index.php:12.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('OrderModule.order', 'Orders'),
  7. 'items' => [
  8. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('OrderModule.order', 'Manage orders'), 'url' => ['/order/orderBackend/index']],
  9. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('OrderModule.order', 'Create order'), 'url' => ['/order/orderBackend/create']],
  1. Yii::t('OrderModule.order', 'Creating'),
  2. ];
  3. $this->pageTitle = Yii::t('OrderModule.order', 'Orders - creating');
  4. $this->menu = [

    The next 20 lines appear both in protected/modules/order/views/orderBackend/create.php:9 and protected/modules/order/views/statusBackend/create.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('OrderModule.order', 'Orders'),
  7. 'items' => [
  8. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('OrderModule.order', 'Manage orders'), 'url' => ['/order/orderBackend/index']],
  9. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('OrderModule.order', 'Create order'), 'url' => ['/order/orderBackend/create']],
  1. Yii::t('OrderModule.order', 'Edition'),
  2. ];
  3. $this->pageTitle = Yii::t('OrderModule.order', 'Orders - edition');
  4. $this->menu = [

    The next 64 lines appear both in protected/modules/order/views/orderBackend/update.php:10 and protected/modules/order/views/orderBackend/view.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('OrderModule.order', 'Orders'),
  7. 'items' => [
  8. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('OrderModule.order', 'Manage orders'), 'url' => ['/order/orderBackend/index']],
  9. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('OrderModule.order', 'Create order'), 'url' => ['/order/orderBackend/create']],
  1. * Message string can be used with plural forms format. Check i18n section
  2. * of the guide for details.
  3. *
  4. * NOTE, this file must be saved in UTF-8 encoding.
  5. */
  6. return [

    The next 73 lines appear both in protected/modules/page/messages/en/page.php:19 and protected/modules/page/messages/zh_cn/page.php:19.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  7. '*unknown*' => '',
  8. '- no matter -' => '',
  9. '- not set -' => '',
  10. '--choose--' => '',
  11. '-choose-' => '',
  1. 'Parent page.' => '',
  2. 'Parent menu item' => '',
  3. 'Created by' => '',
  4. 'Created at' => '',
  5. 'Sorting' => '',
  6. 'Save page and close' => '',

    The next 28 lines appear both in protected/modules/page/messages/en/page.php:92 and protected/modules/page/messages/zh_cn/page.php:92.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'Save page and continue' => '',
  8. 'List' => '',
  9. 'Pages list' => '',
  10. 'Status' => '',
  11. 'Page' => '',
  1. Yii::t('QueueModule.queue', 'Edit'),
  2. ];
  3. $this->pageTitle = Yii::t('QueueModule.queue', 'Tasks - edit');
  4. $this->menu = [

    The next 43 lines appear both in protected/modules/queue/views/queueBackend/update.php:10 and protected/modules/queue/views/queueBackend/view.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('QueueModule.queue', 'Task list'),
  8. 'url' => ['/queue/queueBackend/index']
  9. ],
  1. Yii::t('RbacModule.rbac', 'RBAC') => ['index'],
  2. $model->name => ['view', 'id' => $model->name],
  3. Yii::t('RbacModule.rbac', 'Edit'),
  4. ];
  5. $this->menu = array_merge(

    The next 25 lines appear both in protected/modules/rbac/views/rbacBackend/update.php:8 and protected/modules/rbac/views/rbacBackend/view.php:8.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by ApexWire
  6. $this->module->getNavigation(),
  7. [
  8. ['label' => Yii::t('RbacModule.rbac', 'Operation') . ' «' . mb_substr($model->name, 0, 32) . '»', 'utf-8'],
  9. [
  10. 'icon' => 'fa fa-fw fa-pencil',
  1. */
  2. public function actionCreate()
  3. {
  4. $model = new Product();
  5. if (Yii::app()->getRequest()->getIsPostRequest() && Yii::app()->getRequest()->getPost('Product')) {

    The next 16 lines appear both in protected/modules/store/controllers/ProductBackendController.php:103 and protected/modules/store/controllers/ProductBackendController.php:151.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  6. $attributes = Yii::app()->getRequest()->getPost('Product');
  7. $typeAttributes = Yii::app()->getRequest()->getPost('Attribute', []);
  8. $variants = Yii::app()->getRequest()->getPost('ProductVariant', []);
  9. $categories = Yii::app()->getRequest()->getPost('categories', []);
  1. echo CHtml::image(
  2. !$model->isNewRecord && $model->image ? $model->getImageUrl() : '#',
  3. $model->name,
  4. [
  5. 'class' => 'preview-image img-thumbnail',
  6. 'style' => !$model->isNewRecord && $model->image ? '' : 'display:none'

    The next 61 lines appear both in protected/modules/store/views/categoryBackend/_form.php:91 and protected/modules/store/views/producerBackend/_form.php:66.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sabian
  7. ]
  8. ); ?>
  9. </div>
  10. <?= $form->fileFieldGroup(
  11. $model,
  1. 'class' => 'preview-image img-thumbnail',
  2. 'style' => !$model->isNewRecord && $model->image ? '' : 'display:none'
  3. ]
  4. ); ?>
  5. </div>
  6. <?= $form->fileFieldGroup(

    The next 41 lines appear both in protected/modules/store/views/categoryBackend/_form.php:95 and protected/modules/store/views/productBackend/_form.php:209.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  7. $model,
  8. 'image',
  9. [
  10. 'widgetOptions' => [
  11. 'htmlOptions' => [
  1. Yii::t('StoreModule.store', 'Edition'),
  2. ];
  3. $this->pageTitle = Yii::t('StoreModule.store', 'Categories - edition');
  4. $this->menu = [

    The next 36 lines appear both in protected/modules/store/views/categoryBackend/update.php:10 and protected/modules/store/views/categoryBackend/view.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('StoreModule.store', 'Manage categories'), 'url' => ['/store/categoryBackend/index']],
  6. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('StoreModule.store', 'Create category'), 'url' => ['/store/categoryBackend/create']],
  7. ['label' => Yii::t('StoreModule.store', 'Category') . ' «' . mb_substr($model->name, 0, 32) . '»'],
  8. [
  9. 'icon' => 'fa fa-fw fa-pencil',
  1. Yii::t('StoreModule.store', 'Edition'),
  2. ];
  3. $this->pageTitle = Yii::t('StoreModule.store', 'Producers - edition');
  4. $this->menu = [

    The next 36 lines appear both in protected/modules/store/views/producerBackend/update.php:10 and protected/modules/store/views/producerBackend/view.php:10.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'icon' => 'fa fa-fw fa-list-alt',
  7. 'label' => Yii::t('StoreModule.store', 'Manage producers'),
  8. 'url' => ['/store/producerBackend/index'],
  9. ],
  1. Yii::t('StoreModule.store', 'Edition'),
  2. ];
  3. $this->pageTitle = Yii::t('StoreModule.store', 'Products - edition');
  4. $this->menu = [

    The next 35 lines appear both in protected/modules/store/views/productBackend/update.php:17 and protected/modules/store/views/productBackend/view.php:16.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. ['label' => Yii::t('StoreModule.store', 'Product') . ' «' . mb_substr($model->name, 0, 32) . '»'],
  6. [
  7. 'icon' => 'fa fa-fw fa-pencil',
  8. 'label' => Yii::t('StoreModule.store', 'Update product'),
  9. 'url' => [
  1. <html lang="ru">
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>
  5. <?= Yii::t(
  6. 'UserModule.user',

    The next 60 lines appear both in protected/modules/user/views/account/passwordAutoRecoveryEmail.php:7 and protected/modules/user/views/account/passwordRecoveryEmail.php:7.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'Reset password for site "{site}"',
  8. [
  9. '{site}' => CHtml::encode(Yii::app()->getModule('yupe')->siteName)
  10. ]
  11. ); ?>
  1. <html lang="ru">
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>
  5. <?= Yii::t(
  6. 'UserModule.user',

    The next 63 lines appear both in protected/modules/user/views/account/passwordAutoRecoveryEmail.php:7 and themes/shop/views/user/email/passwordRecoveryEmail.php:7.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'Reset password for site "{site}"',
  8. [
  9. '{site}' => CHtml::encode(Yii::app()->getModule('yupe')->siteName)
  10. ]
  11. ); ?>
  1. <html lang="ru">
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>
  5. <?= Yii::t(
  6. 'UserModule.user',

    The next 47 lines appear both in protected/modules/user/views/account/passwordAutoRecoveryEmail.php:7 and themes/default/views/user/email/passwordRecoveryEmail.php:7.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'Reset password for site "{site}"',
  8. [
  9. '{site}' => CHtml::encode(Yii::app()->getModule('yupe')->siteName)
  10. ]
  11. ); ?>
  1. Yii::t('UserModule.user', 'Users') => ['/user/userBackend/index'],
  2. Yii::t('UserModule.user', 'Tokens') => ['/user/tokensBackend/index'],
  3. Yii::t('UserModule.user', 'Update token') . ' #' . $model->id,
  4. ];
  5. $this->pageTitle = Yii::t('UserModule.user', 'Update token') . ' #' . $model->id;

    The next 59 lines appear both in protected/modules/user/views/tokensBackend/update.php:8 and protected/modules/user/views/tokensBackend/view.php:8.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by akulikov
  6. $this->menu = [
  7. [
  8. 'label' => Yii::t('UserModule.user', 'Users'),
  9. 'items' => [
  1. Yii::t('UserModule.user', 'Edit password'),
  2. ];
  3. $this->pageTitle = Yii::t('UserModule.user', 'Users - password change');
  4. $this->menu = [

    The next 66 lines appear in protected/modules/user/views/userBackend/changepassword.php:10, protected/modules/user/views/userBackend/update.php:8 and protected/modules/user/views/userBackend/view.php:12.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  5. [
  6. 'label' => Yii::t('UserModule.user', 'Users'),
  7. 'items' => [
  8. [
  9. 'icon' => 'fa fa-fw fa-list-alt',
  1. $controller = $this->getController();
  2. if ($this->layout !== null) {
  3. $layout = $controller->layout;
  4. $controller->layout = is_callable($this->layout) ? call_user_func($this->layout) : $this->layout;

    The next 34 lines appear both in protected/modules/yupe/components/actions/CreateAction.php:61 and protected/modules/yupe/components/actions/UpdateAction.php:75.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  5. }
  6. $this->onBeforeRender($event = new CEvent($this));
  7. if (!$event->handled) {
  8. if (($data = Yii::app()->request->getPost(get_class($model))) !== null) {
  1. public $dataProviderConfig = [];
  2. /**
  3. * @var string|callable the name of the view to be rendered.
  4. */
  5. public $view = 'index';

    The next 32 lines appear both in protected/modules/yupe/components/actions/ExtendedIndexAction.php:54 and protected/modules/yupe/components/actions/IndexAction.php:34.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  6. /**
  7. * @var string|callable the name of the layout to be applied to the views.
  8. * This will be assigned to {@link CController::layout} before the view is rendered.
  9. * Defaults to null, meaning the controller's layout will be used.
  1. if (($data = Yii::app()->request->getParam(get_class($model))) !== null) {
  2. $model->setAttributes($data);
  3. }
  4. $controller = $this->getController();

    The next 15 lines appear both in protected/modules/yupe/components/actions/IndexAction.php:57 and protected/modules/yupe/components/actions/ViewAction.php:54.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  5. if ($this->layout !== null) {
  6. $layout = $controller->layout;
  7. $controller->layout = is_callable($this->layout) ? call_user_func($this->layout, $model) : $this->layout;
  8. }
  1. if (is_array($tag->content)) {
  2. $tag->attributes['rdf:parseType'] = "Resource";
  3. }
  4. if (in_array($tag->name, $this->CDATAEncoded)) {

    The next 24 lines appear both in protected/modules/yupe/extensions/feed/EFeedItemRSS1.php:92 and protected/modules/yupe/extensions/feed/EFeedItemRSS2.php:81.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  5. $element .= CHtml::openTag($tag->name, $tag->attributes);
  6. $element .= '<![CDATA[';
  7. } else {
  8. $element .= CHtml::openTag($tag->name, $tag->attributes);
  1. ];
  2. \$this->pageTitle = Yii::t('{$this->getModuleTranslate()}', '{$label} - редактирование');
  3. \$this->menu = [
  4. ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('{$this->getModuleTranslate()}', 'Управление {$this->mtvor}'), 'url' => ['/{$this->mid}/{$this->controller}/index']],

    The next 24 lines appear both in protected/modules/yupe/extensions/yupe/gii/yupeCrud/templates/default/update.php:39 and protected/modules/yupe/extensions/yupe/gii/yupeCrud/templates/default/view.php:38.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by apexwire
  5. ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('{$this->getModuleTranslate()}', 'Добавить {$this->vin}'), 'url' => ['/{$this->mid}/{$this->controller}/create']],
  6. ['label' => Yii::t('{$this->getModuleTranslate()}', '{$labelIm}') . ' «' . mb_substr(\$model->{$this->tableSchema->primaryKey}, 0, 32) . '»'],
  7. ['icon' => 'fa fa-fw fa-pencil', 'label' => Yii::t('{$this->getModuleTranslate()}', 'Редактирование {$this->rod}'), 'url' => [
  8. '/{$this->mid}/{$this->controller}/update',
  9. 'id' => \$model->{$this->tableSchema->primaryKey}
  1. <?php
  2. /**
  3. * @var $this PostController
  4. */
  5. $this->title = $post->title;

    The next 16 lines appear both in themes/default/views/blog/post/view.php:6 and themes/shop/views/blog/post/view.php:6.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  6. $this->description = !empty($post->description) ? $post->description : strip_tags($post->getQuote());
  7. $this->keywords = !empty($post->keywords) ? $post->keywords : implode(', ', $post->getTags());
  8. Yii::app()->clientScript->registerScript(
  9. "ajaxBlogToken",
  1. ?>
  2. <div class="comments-item <?= $level > 0 ? 'comments-item-child' : '' ?>"
  3. data-level="<?= $level; ?>"
  4. data-pid="<?= $comment->parent_id; ?>"
  5. data-id="<?= $comment->id; ?>"

    The next 32 lines appear both in themes/default/views/comment/comment/_comment.php:9 and themes/shop/views/comment/comment/_comment.php:4.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  6. style="margin-left: <?=(30 * $level); ?>px;">
  7. <div class="comments-item-main">
  8. <div class="comments-item-avatar">
  9. <a href="<?= $comment->getAuthorUrl() ?>"><?= $comment->getAuthorAvatar(); ?></a>
  1. <html>
  2. <head>
  3. <title><?= Yii::t('FeedbackModule.feedback', 'New message from site'); ?> <?= CHtml::encode(

    The next 25 lines appear both in themes/default/views/feedback/contact/feedbackEmail.php:3 and themes/shop/views/feedback/contact/feedbackEmail.php:3.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  4. Yii::app()->name
  5. ); ?>!</title>
  6. </head>
  7. <body>
  8. <?= Yii::t('FeedbackModule.feedback', 'New message from site was received'); ?> <?= CHtml::encode(
  1. ['widgetOptions' => ['htmlOptions' => ['rows' => 10]]]
  2. ); ?>
  3. </div>
  4. </div>
  5. <?php if ($module->showCaptcha && !Yii::app()->getUser()->isAuthenticated()): ?>

    The next 37 lines appear both in themes/default/views/feedback/contact/index.php:106 and themes/default/views/feedback/widgets/FeedbackWidget/default.php:64.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  6. <?php if (CCaptcha::checkRequirements()): ?>
  7. <?php $this->widget(
  8. 'CCaptcha',
  9. [
  10. 'showRefreshButton' => true,
  1. *
  2. * @var $this GalleryController
  3. * @var $model Image
  4. **/
  5. $this->title = $model->name; ?>

    The next 34 lines appear both in themes/default/views/gallery/gallery/image.php:15 and themes/shop/views/gallery/gallery/image.php:15.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  6. <?php $this->breadcrumbs = [
  7. Yii::t('GalleryModule.gallery', 'Galleries') => ['/gallery/gallery/index'],
  8. $model->gallery->name => ['/gallery/gallery/view', 'id' => $model->gallery->id],
  9. $model->name
  10. ];
  1. <?php
  2. /** @var Page $page */
  3. if ($page->layout) {

    The next 16 lines appear both in themes/default/views/homepage/hp/page.php:4 and themes/shop/views/homepage/hp/page.php:4.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sabian
  4. $this->layout = "//layouts/{$page->layout}";
  5. }
  6. $this->title = $page->title;
  7. $this->breadcrumbs = [
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?php $subject = Yii::t(
  6. 'OrderModule.order',

    The next 163 lines appear both in themes/default/views/order/order/email/newOrderAdmin.php:6 and themes/shop/views/order/order/email/newOrderAdmin.php:6.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. 'Заказ №{n} в магазине "{site}"',
  8. ['{n}' => $order->id, '{site}' => Yii::app()->getModule('yupe')->siteName]
  9. ); ?>
  10. <h1 style="font-weight:normal;">
  11. <?= CHtml::link(
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?php $subject = Yii::t(
  6. 'OrderModule.order',

    The next 153 lines appear both in themes/default/views/order/order/email/newOrderAdmin.php:6 and themes/shop/views/payment/email/newOrderAdmin.php:6.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. 'Заказ №{n} в магазине "{site}"',
  8. ['{n}' => $order->id, '{site}' => Yii::app()->getModule('yupe')->siteName]
  9. ); ?>
  10. <h1 style="font-weight:normal;">
  11. <?= CHtml::link(
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?php $subject = Yii::t(
  6. 'OrderModule.order',

    The next 95 lines appear both in themes/default/views/order/order/email/newOrderAdmin.php:6 and themes/default/views/payment/email/newOrderAdmin.php:6.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  7. 'Заказ №{n} в магазине "{site}"',
  8. ['{n}' => $order->id, '{site}' => Yii::app()->getModule('yupe')->siteName]
  9. ); ?>
  10. <h1 style="font-weight:normal;">
  11. <?= CHtml::link(
  1. <table cellpadding="6" cellspacing="0" style="border-collapse: collapse;">
  2. <?php foreach ($order->products as $orderProduct): ?>
  3. <?php $productUrl = Yii::app()->createAbsoluteUrl(
  4. '/store/product/view',

    The next 76 lines appear in themes/default/views/order/order/email/newOrderAdmin.php:93, themes/default/views/order/order/email/newOrderUser.php:83, themes/default/views/order/order/email/orderChangeStatus.php:83, themes/shop/views/order/order/email/newOrderUser.php:83 and themes/shop/views/order/order/email/orderChangeStatus.php:83.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sabian
  5. ['name' => $orderProduct->product->slug]
  6. ); ?>
  7. <tr>
  8. <td align="center"
  9. style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;">
  1. <table cellpadding="6" cellspacing="0" style="border-collapse: collapse;">
  2. <?php foreach ($order->products as $orderProduct): ?>
  3. <?php $productUrl = Yii::app()->createAbsoluteUrl(
  4. '/store/product/view',

    The next 76 lines appear in themes/default/views/payment/email/newOrderAdmin.php:92, themes/default/views/payment/email/newOrderUser.php:83 and themes/shop/views/payment/email/newOrderUser.php:83.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sabian
  5. ['name' => $orderProduct->product->slug]
  6. ); ?>
  7. <tr>
  8. <td align="center"
  9. style="padding:6px; width:100; padding:6px; background-color:#ffffff; border:1px solid #e0e0e0;">
  1. <?php $this->title = Yii::t('default', 'Error') . ' ' . $error['code']; ?>

    The next 31 lines appear both in themes/default/views/site/error.php:1 and themes/shop/views/site/error.php:1.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  2. <h2><?= Yii::t('default', 'Error') . ' ' . $error['code']; ?>!</h2>
  3. <?php
  4. switch ($error['code']) {
  1. /**
  2. * @var Producer $brand
  3. * @var CActiveDataProvider $products
  4. */
  5. $mainAssets = Yii::app()->getTheme()->getAssetsUrl();

    The next 18 lines appear both in themes/default/views/store/producer/view.php:7 and themes/shop/views/store/producer/view.php:7.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sabian
  6. Yii::app()->getClientScript()->registerScriptFile($mainAssets . '/js/store.js');
  7. $this->title = $brand->meta_title ?: $brand->name;
  8. $this->description = $brand->meta_description;
  9. $this->keywords = $brand->meta_keywords;
  1. <?php
  2. $this->title = Yii::t('UserModule.user', 'Password recovery');

    The next 52 lines appear both in themes/default/views/user/account/changePassword.php:2 and themes/shop/views/user/account/changePassword.php:2.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  3. $this->breadcrumbs = [Yii::t('UserModule.user', 'Password recovery')];
  4. ?>
  5. <?php $this->widget('yupe\widgets\YFlashMessages'); ?>
  1. <?php
  2. $this->title = CHtml::encode($user->nick_name);
  3. $this->breadcrumbs = [
  4. Yii::t('UserModule.user', 'Users') => ['/user/people/index/'],
  5. CHtml::encode($user->getfullName()),

    The next 31 lines appear both in themes/default/views/user/people/userInfo.php:5 and themes/shop/views/user/people/userInfo.php:9.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  6. ];
  7. ?>
  8. <div class="row">
  9. <div class='col-xs-3'>
  10. <?php $this->widget('AvatarWidget', ['user' => $user, 'imageHtmlOptions' => ['width' => 100, 'height' => 100]]); ?>
  1. </div>
  2. <div class="panel-body">
  3. <div class="row">
  4. <div class="col-xs-12">
  5. <?= CHtml::link(
  6. $this->widget(

    The next 51 lines appear both in themes/default/views/user/widgets/ProfileWidget/profile-widget.php:13 and themes/shop/views/user/widgets/ProfileWidget/profile-widget.php:13.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Michael
  7. 'application.modules.user.widgets.AvatarWidget',
  8. ['user' => $user, 'noCache' => true, 'imageHtmlOptions' => ['width' => 100, 'height' => 100]],
  9. true
  10. ),
  11. ['/user/people/userInfo/', 'username' => $user->nick_name],
  1. <?php
  2. Yii::app()->clientScript->registerCssFile(Yii::app()->getTheme()->getAssetsUrl() . "/css/user-popup-info.css");

    The next 40 lines appear both in themes/default/views/user/widgets/UserPopupInfoWidget/user-popup-info.php:3 and themes/shop/views/user/widgets/UserPopupInfoWidget/user-popup-info.php:3.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Dark_Cs
  3. Yii::app()->clientScript->registerScript(
  4. 'popover-help',
  5. "$('.popover-help').popover({ trigger: 'hover', placement: 'bottom', delay: 500, html: true });",
  6. CClientScript::POS_END
  1. CHtml::encode($term),
  2. ['placeholder' => Yii::t('ZendSearchModule.zendsearch', 'Search...'), 'class' => 'form-control']
  3. ); ?>
  4. <?= CHtml::submitButton(
  5. Yii::t('ZendSearchModule.zendsearch', 'Find!'),
  6. ['class' => 'btn btn-default', 'name' => '']

    The next 42 lines appear both in themes/default/views/zendsearch/search/search.php:18 and themes/shop/views/zendsearch/search/search.php:26.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by mikspark
  7. ); ?>
  8. <?= CHtml::endForm(); ?>
  9. <?php if (!empty($results)): ?>
  1. </div>
  2. <?php if (Yii::app()->getModule('user')->sessionLifeTime > 0): { ?>
  3. <div class="fast-order__inputs">
  4. <?= $form->checkBox($model, 'remember_me'); ?>
  5. <?= $form->labelEx($model, 'remember_me'); ?>

    The next 47 lines appear both in themes/shop/views/social/user/connect.php:30 and themes/shop/views/user/account/login.php:38.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sabian
  6. </div>
  7. <?php } endif; ?>
  8. <?php if (Yii::app()->getUser()->getState('badLoginCount', 0) >= 3 && CCaptcha::checkRequirements('gd')): { ?>
  9. <div class="fast-order__inputs">

Include statements should not be used

More information: https://insight.symfony.com/what-we-analyse/symfony.include_statement_used

  1. * @return mixed version and apply time
  2. */
  3. protected function instantiateMigration($module, $class)
  4. {
  5. $file = Yii::getPathOfAlias("application.modules.".$module.".install.migrations").'/'.$class.'.php';
  6. include_once $file;

    Using include() or require() bypasses lazy-loading of third-party classes. Prefer using autoloading.

    Time to fix: about 3 hours
    Open Issue Permalink
    Last edited by yupe
  7. $migration = new $class();
  8. $migration->setDbConnection($this->getDbConnection());
  9. return $migration;
  10. }

Booleans and null should be compared strictly 19

More information: https://insight.symfony.com/what-we-analyse/php.strict_boolean_comparison_should_be_used

  1. Yii::app()->getModule('yupe')->setImport($imports);
  2. }
  3. try {
  4. if ($imports === false || ($modules = Yii::app()->getCache()->get('modulesDisabled')) == false) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by xoma
  5. $modConfigs = Yii::getPathOfAlias('application.config.modules');
  6. $modPath = Yii::getPathOfAlias('application.modules');
  7. $cacheFile = Yii::app()->configManager->cacheFileName;
  8. foreach (new GlobIterator($modConfigs.'/*.php') as $item) {
  1. $modPath = Yii::getPathOfAlias('application.modules');
  2. $cacheFile = Yii::app()->configManager->cacheFileName;
  3. foreach (new GlobIterator($modConfigs.'/*.php') as $item) {
  4. if (is_dir(

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by yupe
  5. $modPath.'/'.$item->getBaseName('.php')
  6. ) == false && $cacheFile != $item->getBaseName('.php')
  7. ) {
  8. Yii::app()->getCache()->flush();
  1. foreach ($this->getMainSearchParams() as $param => $field) {
  2. if ($request->getQuery($param)) {
  3. $result[$param] = $request->getQuery($param);
  4. if (is_array($result[$param])) {
  5. if (isset($result[$param]['to']) && null == $result[$param]['to']) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by xoma
  6. unset($result[$param]['to']);
  7. }
  8. if (isset($result[$param]['from']) && null == $result[$param]['from']) {
  9. unset($result[$param]['from']);
  10. }
  1. $result[$param] = $request->getQuery($param);
  2. if (is_array($result[$param])) {
  3. if (isset($result[$param]['to']) && null == $result[$param]['to']) {
  4. unset($result[$param]['to']);
  5. }
  6. if (isset($result[$param]['from']) && null == $result[$param]['from']) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by xoma
  7. unset($result[$param]['from']);
  8. }
  9. }
  10. }
  11. }
  1. if (null === $searchParams) {
  2. continue;
  3. }
  4. if (is_array($searchParams)) {
  5. if (isset($searchParams['from']) && null == $searchParams['from']) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by xoma
  6. unset($searchParams['from']);
  7. }
  8. if (isset($searchParams['to']) && null == $searchParams['to']) {
  9. unset($searchParams['to']);
  10. }
  1. if (is_array($searchParams)) {
  2. if (isset($searchParams['from']) && null == $searchParams['from']) {
  3. unset($searchParams['from']);
  4. }
  5. if (isset($searchParams['to']) && null == $searchParams['to']) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by xoma
  6. unset($searchParams['to']);
  7. }
  8. if (empty($searchParams)) {
  9. continue;
  10. }
  1. */
  2. public function getIsActive()
  3. {
  4. $status = is_file(Yii::app()->basePath . '/config/modules/' . $this->getId() . '.php');
  5. if ($this->getId() == 'install') {
  6. $status = ($status == false) ? true : false;

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by AKulikov
  7. }
  8. return $status;
  9. }
  1. // Проверка модулей от которых зависит данный
  2. if (!$noDependent) {
  3. $dependencies = $this->getDependencies();
  4. if (!empty($dependencies) && is_array($dependencies)) {
  5. foreach ($dependencies as $dependency) {
  6. if (Yii::app()->getModule($dependency) == null) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by AKulikov
  7. //установить все зависимости @since 0.8
  8. $module = Yii::app()->moduleManager->getCreateModule($dependency);
  9. if (null === $module) {
  10. throw new CException(
  1. if (!$noDependent) {
  2. $dependent = $this->getDependent();
  3. if (!empty($dependent) && is_array($dependent)) {
  4. foreach ($dependent as $dependen) {
  5. $module = Yii::app()->getModule($dependen);
  6. if ($module != null) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by yupe
  7. if($module->getIsNoDisable()) {
  8. continue;
  9. }
  10. $module->getDeActivate();
  11. }
  1. // Запускаем цикл обработки, шагая по конфигурационным файлам
  2. // сливая их с пользовательскими настройками модулей
  3. foreach (new GlobIterator($this->modulePath . '/*.php') as $item) {
  4. // Если нет такого модуля, нет необходимости в обработке:
  5. if (is_dir($this->appModules . '/' . $item->getBaseName('.php')) == false) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by AKulikov
  6. continue;
  7. }
  8. $moduleConfig = require $item->getRealPath();
  1. }
  2. // Добавляем в таблицу все остальные элементы
  3. foreach ($others as &$other) {
  4. $rootNode = \Comment::model()->findByPk($other["parent_id"]);
  5. if ($rootNode != null) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Michael
  6. $comment = new \Comment();
  7. $comment->setAttributes($other, false);
  8. $comment->appendTo($rootNode, false);
  9. } else {
  10. echo 'Bad comment which parent was deleted: ' . $other["id"] . "\n";
  1. $model->email,
  2. 'RE: '.$model->theme,
  3. $body
  4. );
  5. if (Yii::app()->getRequest()->getIsAjaxRequest() == false) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by akulikov
  6. Yii::app()->getUser()->setFlash(
  7. yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
  8. Yii::t('FeedbackModule.feedback', 'Reply on message was sent!')
  9. );
  1. //пропускаем автора поста + если отвечают на комментарий автора поста - он уже получил уведомление выше
  2. if($comment->user_id != $post->create_user_id) {
  3. $notify = NotifySettings::model()->getForUser($post->create_user_id);
  4. if (null != $notify && $notify->isNeedSendForNewPostComment()) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by yupe
  5. Yii::app()->mail->send(
  6. $module->email,
  7. $post->createUser->email,
  8. Yii::t(
  1. if(null !== $menu) {
  2. $item = MenuItem::model()->find('href = :href', [':href' => '/store/product/index']);
  3. if(null != $item) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by yupe
  4. $item = new MenuItem();
  5. $item->menu_id = $menu->id;
  6. $item->title = 'Магазин';
  7. $item->href = '/store/product/index';
  1. if ($url != '' && $url[strlen($url) - 1] == '/') {
  2. $url = substr($url, 0, strlen($url) - 1);
  3. }
  4. // Убираем из GET-параметров адреса языковой параметр
  5. if ($param != false) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by AKulikov
  6. parse_str($param, $param);
  7. if (isset($param[$this->langParam])) {
  8. unset($param[$this->langParam]);
  9. }
  10. if ($param != []) {
  1. * @throws CHttpException
  2. * @return void
  3. **/
  4. public function actionFlushDumpSettings()
  5. {
  6. if (Yii::app()->getRequest()->getIsAjaxRequest() == false) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by akulikov
  7. throw new CHttpException(404, Yii::t('YupeModule.yupe', 'Page was not found!'));
  8. }
  9. if (!Yii::app()->configManager->isCached()) {
  10. Yii::app()->ajax->failure(
  1. ]
  2. )
  3. );
  4. }
  5. $action = $result == false

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by AKulikov
  6. ? 'failure'
  7. : 'success';
  8. Yii::app()->ajax->$action($message[$action]);
  9. }
  1. * @return nothing
  2. */
  3. public function actionModupdate($name = null)
  4. {
  5. if ($name) {
  6. if (($module = Yii::app()->getModule($name)) == null) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by yupe
  7. $module = Yii::app()->moduleManager->getCreateModule($name);
  8. }
  9. if ($module->getIsInstalled()) {
  1. * @param string an optional prefix
  2. * @return string the formated uuid
  3. */
  4. public static function uuid($key = null, $prefix = '')
  5. {
  6. $key = ($key == null) ? uniqid(rand()) : $key;

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Michael
  7. $chars = md5($key);
  8. $uuid = substr($chars, 0, 8) . '-';
  9. $uuid .= substr($chars, 8, 4) . '-';
  10. $uuid .= substr($chars, 12, 4) . '-';
  11. $uuid .= substr($chars, 16, 4) . '-';

Error silenced by the at sign (@) 6

More information: https://insight.symfony.com/what-we-analyse/php.silenced_error

Updated rule! We've recently tweaked this rule. This may explain the disappearance of false positives, or new suggestions not linked to any activity in the code.
in public/index.php, line 22
  1. date_default_timezone_set('Europe/Moscow');
  2. }
  3. // Setting internal encoding to UTF-8.
  4. if (!ini_get('mbstring.internal_encoding')) {
  5. @ini_set("mbstring.internal_encoding", 'UTF-8');

    Adding "@" before ini_set('mbstring.internal_encoding', 'UTF-8') prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Anton Kucherov
  6. mb_internal_encoding('UTF-8');
  7. }
  8. // Comment next two lines on production
  9. define('YII_DEBUG', true);
in public/index-test.php, line 19
  1. date_default_timezone_set('UTC');
  2. }
  3. // Setting internal encoding to UTF-8.
  4. if (!ini_get('mbstring.internal_encoding')) {
  5. @ini_set("mbstring.internal_encoding", 'UTF-8');

    Adding "@" before ini_set('mbstring.internal_encoding', 'UTF-8') prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Anton Kucherov
  6. mb_internal_encoding('UTF-8');
  7. }
  8. // Комментируем перед выпуском в продакшен:
  9. define('YII_DEBUG', true);
  1. }
  2. }
  3. if ($this->getIsNoDisable()) {
  4. throw new CException(Yii::t('YupeModule.yupe', 'This module can\'t be disabled!'));
  5. } elseif (@md5_file($fileModule) != @md5_file($fileConfig) && !@copy($fileConfig, $fileConfigBack)) {

    Adding "@" before md5_file($fileModule) prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by AKulikov
  6. throw new CException(
  7. Yii::t(
  8. 'YupeModule.yupe',
  9. "Error when coping old configuration file in modulesBack folder!"
  10. )
  1. }
  2. }
  3. if ($this->getIsNoDisable()) {
  4. throw new CException(Yii::t('YupeModule.yupe', 'This module can\'t be disabled!'));
  5. } elseif (@md5_file($fileModule) != @md5_file($fileConfig) && !@copy($fileConfig, $fileConfigBack)) {

    Adding "@" before md5_file($fileConfig) prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by AKulikov
  6. throw new CException(
  7. Yii::t(
  8. 'YupeModule.yupe',
  9. "Error when coping old configuration file in modulesBack folder!"
  10. )
  1. $fileModule = Yii::app()->moduleManager->getModulesConfigDefault($name);
  2. $fileConfig = Yii::app()->moduleManager->getModulesConfig($name);
  3. $fileConfigBack = Yii::app()->moduleManager->getModulesConfigBack($name);
  4. if ($name != \yupe\components\ModuleManager::CORE_MODULE && ((!(@is_file($fileModule) && @md5_file(

    Adding "@" before md5_file($fileModule) prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by yupe
  5. $fileModule
  6. ) == @md5_file(
  7. $fileConfig
  8. )) && !@copy($fileConfig, $fileConfigBack)) || !@unlink($fileConfig))
  9. ) {
  1. $fileConfig = Yii::app()->moduleManager->getModulesConfig($name);
  2. $fileConfigBack = Yii::app()->moduleManager->getModulesConfigBack($name);
  3. if ($name != \yupe\components\ModuleManager::CORE_MODULE && ((!(@is_file($fileModule) && @md5_file(
  4. $fileModule
  5. ) == @md5_file(

    Adding "@" before md5_file($fileConfig) prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by xoma
  6. $fileConfig
  7. )) && !@copy($fileConfig, $fileConfigBack)) || !@unlink($fileConfig))
  8. ) {
  9. $error = true;
  10. Yii::app()->getUser()->setFlash(

Version of dependencies should be fixed 4

More information: https://insight.symfony.com/what-we-analyse/composer.unfixed_dependency_version

Package yiiext/nested-set-behavior#dev-master is not fixed.

Time to fix: about 1 hour
Open Issue Permalink
Collective

Package nodge/yii-eauth#dev-master is not fixed.

Time to fix: about 1 hour
Open Issue Permalink
Collective

Package 2amigos/transliterator-helper#dev-master is not fixed.

Time to fix: about 1 hour
Open Issue Permalink
Collective

Package yiiext/migrate-command#dev-master is not fixed.

Time to fix: about 1 hour
Open Issue Permalink
Collective

Object parameters should be type hinted 99

More information: https://insight.symfony.com/what-we-analyse/php.object_parameter_not_type_hinted

  1. public static function getUserList()
  2. {
  3. return CHtml::listData(
  4. User::model()->findAll(),
  5. 'id',
  6. function ($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Michael
  7. return $data->getFullName();
  8. }
  9. );
  10. }
  1. null
  2. )
  3. );
  4. }
  5. private function getItemDescription($item)

    The parameter item, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Dark_Cs
  6. {
  7. return $item->description." ({$item->getType()} <span class='text-muted'>{$item->name}</span>)";
  8. }
  9. /**
  1. 'type' => 'html',
  2. ],
  3. [
  4. 'class' => 'yupe\widgets\CustomButtonColumn',
  5. 'frontViewButtonUrl' => function ($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  6. return Yii::app()->createUrl('/blog/blog/view', ['slug' => $data->slug]);
  7. },
  8. 'buttons' => [
  9. 'front_view' => [
  10. 'visible' => function ($row, $data) {
  1. 'frontViewButtonUrl' => function ($data) {
  2. return Yii::app()->createUrl('/blog/blog/view', ['slug' => $data->slug]);
  3. },
  4. 'buttons' => [
  5. 'front_view' => [
  6. 'visible' => function ($row, $data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return $data->status == Blog::STATUS_ACTIVE;
  8. },
  9. ],
  10. ],
  11. ],
  1. Post::STATUS_MODERATED => ['class' => 'label-warning'],
  2. ],
  3. ],
  4. [
  5. 'class' => 'yupe\widgets\CustomButtonColumn',
  6. 'frontViewButtonUrl' => function ($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->createUrl('/blog/post/view', ['slug' => $data->slug]);
  8. },
  9. 'buttons' => [
  10. 'front_view' => [
  11. 'visible' => function ($row, $data) {
  1. 'frontViewButtonUrl' => function ($data) {
  2. return Yii::app()->createUrl('/blog/post/view', ['slug' => $data->slug]);
  3. },
  4. 'buttons' => [
  5. 'front_view' => [
  6. 'visible' => function ($row, $data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return $data->status == Post::STATUS_PUBLISHED;
  8. },
  9. ],
  10. ],
  11. ],
  1. }
  2. public function afterFind()
  3. {
  4. $this->payment_methods = array_map(
  5. function ($x) {

    The parameter x, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Dark_Cs
  6. return $x->id;
  7. },
  8. $this->paymentMethods
  9. );
  10. parent::afterFind();
  1. 'label' => Yii::t('GalleryModule.gallery', 'Gallery images'),
  2. 'url' => 'array("/gallery/galleryBackend/images", "id" => $data->id)',
  3. 'options' => ['class' => 'btn btn-sm btn-default'],
  4. ],
  5. ],
  6. 'frontViewButtonUrl' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by sabian
  7. return Yii::app()->createUrl('/gallery/gallery/view', ['id' => $data->id]);
  8. },
  9. ],
  10. ],
  11. ]
  1. 'filter' => $this->yupe->getLanguagesList(),
  2. 'type' => 'html',
  3. ],
  4. [
  5. 'class' => 'yupe\widgets\CustomButtonColumn',
  6. 'frontViewButtonUrl' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->createUrl('/news/news/view', ['slug' => $data->slug]);
  8. },
  9. 'buttons' => [
  10. 'front_view' => [
  11. 'visible' => function ($row, $data) {
  1. 'frontViewButtonUrl' => function($data){
  2. return Yii::app()->createUrl('/news/news/view', ['slug' => $data->slug]);
  3. },
  4. 'buttons' => [
  5. 'front_view' => [
  6. 'visible' => function ($row, $data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return $data->status == News::STATUS_PUBLISHED;
  8. }
  9. ]
  10. ]
  11. ],
  1. )
  2. ],
  3. 'columns' => [
  4. [
  5. 'name' => 'user_id',
  6. 'value' => function($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by yupe
  7. return $data->user->getFullName();
  8. },
  9. 'filter' => CHtml::listData(User::model()->findAll(), 'id', 'fullName')
  10. ],
  11. [
  1. },
  2. 'filter' => CHtml::listData(User::model()->findAll(), 'id', 'fullName')
  3. ],
  4. [
  5. 'name' => 'my_post',
  6. 'value' => function($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by yupe
  7. return $data->my_post ? Yii::t('YupeModule.yupe', 'yes') : Yii::t('YupeModule.yupe', 'no');
  8. },
  9. 'filter' => $this->module->getChoice()
  10. ],
  11. [
  1. },
  2. 'filter' => $this->module->getChoice()
  3. ],
  4. [
  5. 'name' => 'my_comment',
  6. 'value' => function($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by yupe
  7. return $data->my_comment ? Yii::t('YupeModule.yupe', 'yes') : Yii::t('YupeModule.yupe', 'no');
  8. },
  9. 'filter' => $this->module->getChoice()
  10. ],
  11. [
  1. <?php $this->widget('bootstrap.widgets.TbDetailView', [
  2. 'data' => $model,
  3. 'attributes' => [
  4. [
  5. 'name' => 'user_id',
  6. 'value' => function($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by yupe
  7. return $model->user->getFullName();
  8. }
  9. ],
  10. [
  11. 'name' => 'my_post',
  1. return $model->user->getFullName();
  2. }
  3. ],
  4. [
  5. 'name' => 'my_post',
  6. 'value' => function($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by yupe
  7. return $model->my_post ? Yii::t('YupeModule.yupe', 'yes') : Yii::t('YupeModule.yupe', 'no');
  8. },
  9. ],
  10. [
  11. 'name' => 'my_comment',
  1. return $model->my_post ? Yii::t('YupeModule.yupe', 'yes') : Yii::t('YupeModule.yupe', 'no');
  2. },
  3. ],
  4. [
  5. 'name' => 'my_comment',
  6. 'value' => function($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by yupe
  7. return $model->my_comment ? Yii::t('YupeModule.yupe', 'yes') : Yii::t('YupeModule.yupe', 'no');
  8. },
  9. ],
  10. ],
  11. ]); ?>
  1. ],
  2. 'columns' => [
  3. [
  4. 'name' => 'last_name',
  5. 'type' => 'html',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->last_name, ['/order/clientBackend/view', 'id' => $data->id]);
  8. }
  9. ],
  10. [
  11. 'name' => 'first_name',
  1. }
  2. ],
  3. [
  4. 'name' => 'first_name',
  5. 'type' => 'html',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->first_name, ['/order/clientBackend/view', 'id' => $data->id]);
  8. }
  9. ],
  10. [
  11. 'name' => 'middle_name',
  1. }
  2. ],
  3. [
  4. 'name' => 'middle_name',
  5. 'type' => 'html',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->middle_name, ['/order/clientBackend/view', 'id' => $data->id]);
  8. }
  9. ],
  10. [
  11. 'name' => 'email',
  1. }
  2. ],
  3. [
  4. 'name' => 'email',
  5. 'type' => 'html',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->email, ['/order/clientBackend/view', 'id' => $data->id]);
  8. }
  9. ],
  10. [
  11. 'name' => 'phone',
  1. }
  2. ],
  3. [
  4. 'name' => 'phone',
  5. 'type' => 'html',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->phone, ['/order/clientBackend/view', 'id' => $data->id]);
  8. }
  9. ],
  10. [
  11. 'name' => 'ordersTotalNumber',
  1. ],
  2. [
  3. 'name' => 'ordersTotalNumber',
  4. 'header' => Yii::t('OrderModule.order', 'Orders'),
  5. 'type' => 'html',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->getOrderNumber(), ['/order/orderBackend/index', 'Order[user_id]' => $data->id]);
  8. },
  9. ],
  10. [
  11. 'name' => 'ordersTotalSum',
  1. },
  2. ],
  3. [
  4. 'name' => 'ordersTotalSum',
  5. 'header' => Yii::t('OrderModule.order', 'Money'),
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->numberFormatter->formatCurrency($data->getOrderSum(), Yii::app()->getModule('store')->currency);
  8. }
  9. ],
  10. [
  11. 'name' => 'create_time',
  1. }
  2. ],
  3. [
  4. 'name' => 'create_time',
  5. 'filter' => false,
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->getDateFormatter()->formatDateTime($data->create_time);
  8. },
  9. ],
  10. [
  11. 'name' => 'visit_time',
  1. return Yii::app()->getDateFormatter()->formatDateTime($data->create_time);
  2. },
  3. ],
  4. [
  5. 'name' => 'visit_time',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->getDateFormatter()->formatDateTime($data->visit_time);
  8. },
  9. 'filter' => false
  10. ],
  11. [
  1. 'columns' => [
  2. [
  3. 'name' => 'id',
  4. 'htmlOptions' => ['width' => '90px'],
  5. 'type' => 'raw',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->id, array("/order/orderBackend/update", "id" => $data->id));
  8. },
  9. ],
  10. [
  11. 'name' => 'date',
  1. ],
  2. 'htmlOptions' => [
  3. 'class' => 'form-control',
  4. ],
  5. ], true),
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->date, array("/order/orderBackend/update", "id" => $data->id));
  8. },
  9. ],
  10. [
  11. 'name' => 'name',
  1. },
  2. ],
  3. [
  4. 'name' => 'name',
  5. 'type' => 'raw',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return isset($data->client) ? CHtml::link($data->client->getFullName(), ['/order/orderBackend/view', 'id' => $data->id]) : $data->name;
  8. },
  9. 'htmlOptions' => ['width' => '400px'],
  10. ],
  11. [
  1. },
  2. 'htmlOptions' => ['width' => '400px'],
  3. ],
  4. [
  5. 'name' => 'total_price',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->getNumberFormatter()->formatCurrency($data->total_price, Yii::app()->getModule('store')->currency);
  8. }
  9. ],
  10. [
  1. ],
  2. [
  3. 'name' => 'delivery_id',
  4. 'header' => Yii::t('OrderModule.order', 'Delivery'),
  5. 'filter' => CHtml::listData(Delivery::model()->findAll(), 'id', 'name'),
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return $data->delivery->name;
  8. }
  9. ],
  10. ],
  11. ]
  1. 'bulkActions' => [false],
  2. 'template' => '{items}',
  3. 'columns' => [
  4. [
  5. 'name' => 'coupon_id',
  6. 'value' => function ($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Nickolay Sedov
  7. return CHtml::link(
  8. $data->coupon->code,
  9. ['/coupon/couponBackend/update', 'id' => $data->coupon_id]
  10. );
  11. },
  1. 'columns' => [
  2. [
  3. 'name' => 'id',
  4. 'htmlOptions' => ['width' => '90px'],
  5. 'type' => 'raw',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link($data->id, array("/order/orderBackend/update", "id" => $data->id));
  8. },
  9. ],
  10. [
  11. 'name' => 'date',
  1. ],
  2. 'htmlOptions' => [
  3. 'class' => 'form-control',
  4. ],
  5. ], true),
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::link(Yii::app()->getDateFormatter()->formatDateTime($data->date, 'medium'), array("/order/orderBackend/update", "id" => $data->id));
  8. },
  9. ],
  10. [
  11. 'name' => 'name',
  1. },
  2. ],
  3. [
  4. 'name' => 'name',
  5. 'type' => 'raw',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return isset($data->client) ? CHtml::link($data->client->getFullName(), ['/order/clientBackend/view', 'id' => $data->user_id]) : $data->name;
  8. },
  9. 'htmlOptions' => ['width' => '400px'],
  10. ],
  11. [
  1. },
  2. 'htmlOptions' => ['width' => '400px'],
  3. ],
  4. [
  5. 'name' => 'total_price',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->getNumberFormatter()->formatCurrency($data->total_price, Yii::app()->getModule('store')->currency);
  8. }
  9. ],
  10. [
  11. 'class' => 'yupe\widgets\EditableStatusColumn',
  1. 'source' => OrderStatus::model()->getList(),
  2. 'options' => OrderStatus::model()->getLabels(),
  3. ],
  4. [
  5. 'name' => 'payment_method_id',
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return $data->payment ? $data->payment->name : '---';
  8. },
  9. 'filter' => CHtml::listData(Payment::model()->findAll(), 'id', 'name')
  10. ],
  11. [
  1. 'filter' => CHtml::listData(
  2. User::model()->findAll('access_level = :level', [':level' => User::ACCESS_LEVEL_ADMIN]),
  3. 'id',
  4. 'fullName'
  5. ),
  6. 'value' => function($data){

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by sabian
  7. return isset($data->manager) ? $data->manager->getFullName() : null;
  8. },
  9. ],
  10. [
  11. 'class' => 'yupe\widgets\CustomButtonColumn',
  1. 'name' => 'status_id',
  2. 'value' => $model->status->getTitle(),
  3. ],
  4. [
  5. 'name' => 'total_price',
  6. 'value' => function ($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->numberFormatter->formatCurrency(
  8. $model->getTotalPriceWithDelivery(),
  9. 'RUB'
  10. );
  11. },
  1. ],
  2. [
  3. 'name' => 'user_id',
  4. 'type' => 'raw',
  5. 'visible' => isset($model->client),
  6. 'value' => function ($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return isset($model->client) ?
  8. CHtml::link(
  9. $model->client->getFullName(),
  10. ['/order/clientBackend/view', 'id' => $model->user_id]
  11. ) : '---';
  1. [
  2. 'data' => $model,
  3. 'attributes' => [
  4. [
  5. 'name' => 'delivery_id',
  6. 'value' => function ($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return empty($model->delivery) ? '---' : $model->delivery->name;
  8. },
  9. ],
  10. [
  11. 'name' => 'delivery_price',
  1. return empty($model->delivery) ? '---' : $model->delivery->name;
  2. },
  3. ],
  4. [
  5. 'name' => 'delivery_price',
  6. 'value' => function ($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return Yii::app()->numberFormatter->formatCurrency($model->delivery_price, 'RUB');
  8. },
  9. ],
  10. 'separate_delivery:boolean',
  11. 'zipcode',
  1. [
  2. 'data' => $model,
  3. 'attributes' => [
  4. [
  5. 'name' => 'payment_method_id',
  6. 'value' => function ($model) {

    The parameter model, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return empty($model->payment) ? '---' : $model->payment->name;
  8. },
  9. ],
  10. 'paid:boolean',
  11. 'payment_time',
  1. 'type' => 'condensed',
  2. 'dataProvider' => $products,
  3. 'columns' => [
  4. [
  5. 'type' => 'raw',
  6. 'value' => function ($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by xoma
  7. return CHtml::image($data->product->getImageUrl(40, 40), "", ["class" => "img-thumbnail"]);
  8. },
  9. ],
  10. [
  11. 'name' => 'product_name',
  1. [
  2. 'class' => 'yupe\widgets\CustomButtonColumn',
  3. 'template' => '{update} {delete}',
  4. 'buttons' => [
  5. 'update' => [
  6. 'visible' => function ($row, $data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by sabian
  7. return !$data->is_system ? true: false;
  8. }
  9. ],
  10. 'delete' => [
  11. 'visible' => function ($row, $data) {
  1. 'visible' => function ($row, $data) {
  2. return !$data->is_system ? true: false;
  3. }
  4. ],
  5. 'delete' => [
  6. 'visible' => function ($row, $data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by sabian
  7. return !$data->is_system ? true: false;
  8. }
  9. ],
  10. ],
  11. ],
  1. 'columns' => [
  2. [
  3. 'name' => 'id',
  4. 'htmlOptions' => ['width' => '90px'],
  5. 'type' => 'raw',
  6. 'value' => function ($data) {

    The parameter data, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Dark_Cs
  7. return CHtml::link(
  8. Yii::t('OrderModule.order', 'Order #').$data->id,
  9. ["/order/orderBackend/update", "id" => $data->id]
  10. );
  11. },