Skip to content

Commit 16252a8

Browse files
committed
Merge branch 'tests-run-phpstan' into add-bulk-add-subscribers-to-forms
2 parents 5d5715a + 637692e commit 16252a8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
# Make sure your committed .env.dist.testing file ends with a newline.
4343
# The formatting of the contents to include a blank newline is deliberate.
4444
- name: Define GitHub Secrets in .env.dist.testing
45-
uses: DamianReeves/write-file-action@v1.1
45+
uses: DamianReeves/write-file-action@v1.3
4646
with:
4747
path: .env.dist.testing
4848
contents: |
@@ -68,6 +68,11 @@ jobs:
6868
- name: Build PHP Autoloader
6969
run: composer dump-autoload
7070

71+
# Run PHPStan for static analysis.
72+
- name: Run PHPStan Static Analysis
73+
working-directory: ${{ env.PLUGIN_DIR }}
74+
run: php vendor/bin/phpstan analyse --memory-limit=1250M
75+
7176
# Run Coding Standards.
7277
- name: Run Coding Standards
7378
run: php vendor/bin/phpcs --standard=phpcs.xml

src/ConvertKit_API.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ private function create_log(string $message)
142142
// Mask email addresses that may be contained within the message.
143143
$message = preg_replace_callback(
144144
'^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})^',
145+
// @phpstan-ignore-next-line - see https://github.com/phpstan/phpstan/issues/10396
145146
function ($matches) {
146147
return preg_replace('/\B[^@.]/', '*', $matches[0]);
147148
},

0 commit comments

Comments
 (0)