From ab37cf78e339ead650738e1dd2075607bf2fff49 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Thu, 12 Dec 2024 17:23:57 +0100 Subject: [PATCH] Restrict branches for PHP CS Fixer workflow actions (#431) * Restrict branches for PHP CS Fixer workflow actions * Special changes to test PHP CS Fixer --- .github/workflows/php-cs-fixer.yml | 6 ++++++ Events.php | 1 - controllers/ConfigController.php | 3 +-- models/Message.php | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 4bfcaf1..ac8fbfa 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -2,6 +2,12 @@ name: PHP CS Fixer on: push: + branches: + - master + - main + - develop + paths: + - '**.php' schedule: - cron: "0 0 * * 0" diff --git a/Events.php b/Events.php index d713228..6d41d73 100644 --- a/Events.php +++ b/Events.php @@ -1,5 +1,4 @@ load(Yii::$app->request->post()) && $form->save()) { + if ($form->load(Yii::$app->request->post()) && $form->save()){ $this->view->saved(); } diff --git a/models/Message.php b/models/Message.php index af4c2da..442b8a4 100644 --- a/models/Message.php +++ b/models/Message.php @@ -52,7 +52,7 @@ public function rules() return [ [['created_by', 'updated_by'], 'integer'], [['title'], 'string', 'max' => 255], - [['created_at', 'updated_at'], 'safe'], + [['created_at', 'updated_at'], 'safe'] ]; }