Skip to content

Commit fae8d19

Browse files
author
igor-chepurnoi
committed
added compatibility with php 7.1
1 parent d31011b commit fae8d19

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

.php_cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ $config = PhpCsFixer\Config::create()
1919
'concat_space' => ['spacing' => 'one'],
2020
'ordered_imports' => true,
2121
'array_syntax' => ['syntax' => 'short'],
22+
'yoda_style' => false,
2223
])
2324
->setFinder($finder);
2425

Bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Bootstrap implements BootstrapInterface
1515
/**
1616
* @inheritdoc
1717
*/
18-
public function bootstrap($app): void
18+
public function bootstrap($app)
1919
{
2020
if (!isset($app->get('i18n')->translations['yii2mod.cms'])) {
2121
$app->get('i18n')->translations['yii2mod.cms'] = [

Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Widget extends FroalaEditorWidget
1515
/**
1616
* @inheritdoc
1717
*/
18-
public function init(): void
18+
public function init()
1919
{
2020
parent::init();
2121

actions/PageAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class PageAction extends Action
4343
/**
4444
* @inheritdoc
4545
*/
46-
public function init(): void
46+
public function init()
4747
{
4848
parent::init();
4949

models/CmsModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function beforeValidate(): bool
119119
*
120120
* @return null|ActiveRecord
121121
*/
122-
public function findPage(string $url): ?ActiveRecord
122+
public function findPage(string $url)
123123
{
124124
return self::find()->byUrl($url)->enabled()->one();
125125
}

models/CmsQuery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public function enabled()
2121
}
2222

2323
/**
24-
* @param $url
24+
* @param string $url
2525
*
2626
* @return $this
2727
*/
28-
public function byUrl($url)
28+
public function byUrl(string $url)
2929
{
3030
return $this->andWhere(['url' => $url]);
3131
}

0 commit comments

Comments
 (0)