@@ -8,12 +8,12 @@ |
||
8 | 8 | defined('YII_DEBUG') or define('YII_DEBUG', true); |
9 | 9 | defined('YII_ENV') or define('YII_ENV', 'test'); |
10 | 10 | |
11 | -require(__DIR__ . '/../../vendor/autoload.php'); |
|
12 | -require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); |
|
13 | -require(__DIR__ . '/../../common/config/bootstrap.php'); |
|
14 | -require(__DIR__ . '/../../backend/config/bootstrap.php'); |
|
11 | +require(__DIR__.'/../../vendor/autoload.php'); |
|
12 | +require(__DIR__.'/../../vendor/yiisoft/yii2/Yii.php'); |
|
13 | +require(__DIR__.'/../../common/config/bootstrap.php'); |
|
14 | +require(__DIR__.'/../../backend/config/bootstrap.php'); |
|
15 | 15 | |
16 | 16 | |
17 | -$config = require(__DIR__ . '/../../tests/codeception/config/backend/acceptance.php'); |
|
17 | +$config = require(__DIR__.'/../../tests/codeception/config/backend/acceptance.php'); |
|
18 | 18 | |
19 | 19 | (new yii\web\Application($config))->run(); |
@@ -2,16 +2,16 @@ |
||
2 | 2 | defined('YII_DEBUG') or define('YII_DEBUG', true); |
3 | 3 | defined('YII_ENV') or define('YII_ENV', 'dev'); |
4 | 4 | |
5 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
6 | -require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
7 | -require(__DIR__ . '/../common/config/bootstrap.php'); |
|
8 | -require(__DIR__ . '/../frontend/config/bootstrap.php'); |
|
5 | +require(__DIR__.'/../vendor/autoload.php'); |
|
6 | +require(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
7 | +require(__DIR__.'/../common/config/bootstrap.php'); |
|
8 | +require(__DIR__.'/../frontend/config/bootstrap.php'); |
|
9 | 9 | |
10 | 10 | $config = yii\helpers\ArrayHelper::merge( |
11 | - require(__DIR__ . '/../common/config/main.php'), |
|
12 | - require(__DIR__ . '/../common/config/main-local.php'), |
|
13 | - require(__DIR__ . '/../frontend/config/main.php'), |
|
14 | - require(__DIR__ . '/../frontend/config/main-local.php') |
|
11 | + require(__DIR__.'/../common/config/main.php'), |
|
12 | + require(__DIR__.'/../common/config/main-local.php'), |
|
13 | + require(__DIR__.'/../frontend/config/main.php'), |
|
14 | + require(__DIR__.'/../frontend/config/main-local.php') |
|
15 | 15 | ); |
16 | 16 | |
17 | 17 | $application = new yii\web\Application($config); |
@@ -8,11 +8,11 @@ |
||
8 | 8 | defined('YII_DEBUG') or define('YII_DEBUG', true); |
9 | 9 | defined('YII_ENV') or define('YII_ENV', 'test'); |
10 | 10 | |
11 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
12 | -require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
13 | -require(__DIR__ . '/../common/config/bootstrap.php'); |
|
14 | -require(__DIR__ . '/../frontend/config/bootstrap.php'); |
|
11 | +require(__DIR__.'/../vendor/autoload.php'); |
|
12 | +require(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
13 | +require(__DIR__.'/../common/config/bootstrap.php'); |
|
14 | +require(__DIR__.'/../frontend/config/bootstrap.php'); |
|
15 | 15 | |
16 | -$config = require(__DIR__ . '/../tests/codeception/config/frontend/acceptance.php'); |
|
16 | +$config = require(__DIR__.'/../tests/codeception/config/frontend/acceptance.php'); |
|
17 | 17 | |
18 | 18 | (new yii\web\Application($config))->run(); |
@@ -55,8 +55,8 @@ |
||
55 | 55 | $posts = $query->all(); |
56 | 56 | |
57 | 57 | if ($posts) { |
58 | - if (is_file($this->view->theme->basePath . '/user/view-' . $model->username . '.php')) { |
|
59 | - $render = 'view-' . $model->username . '.php'; |
|
58 | + if (is_file($this->view->theme->basePath.'/user/view-'.$model->username.'.php')) { |
|
59 | + $render = 'view-'.$model->username.'.php'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this->render($render, [ |
@@ -55,8 +55,8 @@ |
||
55 | 55 | ->limit($pages->limit) |
56 | 56 | ->all(); |
57 | 57 | |
58 | - if (is_file($this->view->theme->basePath . '/term/view-' . $model->taxonomy->name . '.php')) { |
|
59 | - $render = 'view-' . $model->taxonomy->name; |
|
58 | + if (is_file($this->view->theme->basePath.'/term/view-'.$model->taxonomy->name.'.php')) { |
|
59 | + $render = 'view-'.$model->taxonomy->name; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this->render($render, [ |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | $posts = $query->all(); |
56 | 56 | |
57 | 57 | if ($posts) { |
58 | - if (is_file($this->view->theme->basePath . '/post/index-' . $postType->name . '.php')) { |
|
59 | - $render = 'index-' . $postType->name . '.php'; |
|
58 | + if (is_file($this->view->theme->basePath.'/post/index-'.$postType->name.'.php')) { |
|
59 | + $render = 'index-'.$postType->name.'.php'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this->render($render, [ |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | return $this->render('protected', ['post' => $model]); |
104 | 104 | } |
105 | 105 | |
106 | - if (is_file($this->view->theme->basePath . '/post/view-' . $model->postType->name . '.php')) { |
|
107 | - $render = 'view-' . $model->postType->name . '.php'; |
|
106 | + if (is_file($this->view->theme->basePath.'/post/view-'.$model->postType->name.'.php')) { |
|
107 | + $render = 'view-'.$model->postType->name.'.php'; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | return $this->render($render, [ |
@@ -90,8 +90,8 @@ |
||
90 | 90 | $comment = new PostComment(); |
91 | 91 | $query = $query->andWhere(['id' => $frontPage]); |
92 | 92 | if ($post = $query->one()) { |
93 | - if (is_file($this->view->theme->basePath . '/post/view-' . $post->postType->slug . '.php')) { |
|
94 | - $render = '/post/view-' . $post->postType->slug; |
|
93 | + if (is_file($this->view->theme->basePath.'/post/view-'.$post->postType->slug.'.php')) { |
|
94 | + $render = '/post/view-'.$post->postType->slug; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | return $this->render($render, [ |
@@ -54,10 +54,10 @@ |
||
54 | 54 | return $this->render('protected', ['media' => $model]); |
55 | 55 | } |
56 | 56 | |
57 | - if (is_file($this->view->theme->basePath . '/media/view-' |
|
58 | - . substr($model->mime_type, 0, strpos($model->mime_type, '/', 1)) . '.php') |
|
57 | + if (is_file($this->view->theme->basePath.'/media/view-' |
|
58 | + . substr($model->mime_type, 0, strpos($model->mime_type, '/', 1)).'.php') |
|
59 | 59 | ) { |
60 | - $render = 'view-' . substr($model->mime_type, 0, strpos($model->mime_type, '/', 1)); |
|
60 | + $render = 'view-'.substr($model->mime_type, 0, strpos($model->mime_type, '/', 1)); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | return $this->render($render, [ |
@@ -16,14 +16,14 @@ |
||
16 | 16 | /* @var $comment common\models\PostComment */ |
17 | 17 | /* @var $category common\models\Term */ |
18 | 18 | |
19 | -$this->title = Html::encode($post->title . ' - ' . Option::get('sitetitle')); |
|
19 | +$this->title = Html::encode($post->title.' - '.Option::get('sitetitle')); |
|
20 | 20 | $this->params['breadcrumbs'][] = [ |
21 | 21 | 'label' => Html::encode($post->postType->singular_name), |
22 | 22 | 'url' => ['/post/index', 'id' => $post->postType->id], |
23 | 23 | ]; |
24 | 24 | $category = $post->getTerms() |
25 | 25 | ->innerJoinWith([ |
26 | - 'taxonomy' => function ($query) { |
|
26 | + 'taxonomy' => function($query) { |
|
27 | 27 | /* @var $query \yii\db\ActiveQuery */ |
28 | 28 | $query->from(['taxonomy' => Taxonomy::tableName()]); |
29 | 29 | }, |