Skip to content

Commit

Permalink
Add pre-run ci script for regenerating static analysis docblocks prio…
Browse files Browse the repository at this point in the history
…r to running psalm
  • Loading branch information
matt committed Feb 25, 2024
1 parent 61b33e1 commit 8259d48
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .laminas-ci/pre-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Regenerate docblocks on test/StaticAnalysis files so psalm will pick up any breakages

WORKDIR=$2
JOB=$3
COMMAND=$(echo "${JOB}" | jq -r '.command')
if [[ ! ${COMMAND} =~ psalm ]];then
exit 0
fi

cd "$WORKDIR"
vendor/bin/laminas --container test/container.php form:psalm-type test/StaticAnalysis
6 changes: 3 additions & 3 deletions test/StaticAnalysis/Artist.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
/**
* @psalm-import-type TAlbumData from Album
* @psalm-type TArtistData = array{
* id: null|string,
* name: null|string,
* albums: array<array-key, TAlbumData>,
* id: null|string,
* name: null|string,
* albums: array<array-key, TAlbumData>,
* }
* @extends Form<TArtistData>
*/
Expand Down

0 comments on commit 8259d48

Please sign in to comment.