Skip to content

Commit c3d2532

Browse files
committed
3487: Added code check to mirations
1 parent d0b585f commit c3d2532

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
146146
bin/console cache:clear
147147
- name: Psalm
148-
run: composer run analysis
148+
run: composer run coding-standards-analysis
149149

150150
markdownlint:
151151
name: Markdown Lint

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@
9595
"coding-standards-check": [
9696
"PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run"
9797
],
98-
"analysis": [
99-
"./vendor/bin/phpstan analyse src"
98+
"coding-standards-analysis": [
99+
"./vendor/bin/phpstan analyse src migrations"
100+
],
101+
"coding-standards-baseline": [
102+
"./vendor/bin/phpstan analyse src migrations --generate-baseline"
100103
]
101104

102105
}

migrations/Version20250113145607.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,16 @@ public function down(Schema $schema): void
8585
}
8686

8787
/**
88+
* Helper function to get data from the database.
89+
*
90+
* @param string $sql
91+
* SQL statement to fetch data
92+
*
93+
* @return array<int, mixed>
94+
* The data fetched from the database as associative array
95+
*
8896
* @throws Exception
97+
* Database error
8998
*/
9099
private function getData(string $sql): array
91100
{

0 commit comments

Comments
 (0)