Skip to content

Commit 37a6916

Browse files
authored
Merge pull request #403 from Yoast/feature/phpstan-tweaks
PHPStan: minor tweaks
2 parents ae00979 + 6159fb9 commit 37a6916

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Yoast/Sniffs/NamingConventions/NamespaceNameSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ private function validate_src_directory( File $phpcsFile ) {
424424
$this->validated_src_directory = [];
425425

426426
// Note: the check whether a basepath is available is done in the main `process()` routine.
427-
$base_path = PathHelper::normalize_absolute_path( $phpcsFile->config->basepath );
427+
$base_path = PathHelper::normalize_absolute_path( $phpcsFile->config->basepath ); // @phpstan-ignore argument.type
428428

429429
// Add any src directories.
430430
$absolute_paths = PathValidationHelper::relative_to_absolute( $phpcsFile, $this->src_directory );

Yoast/Tests/Utils/PSR4PathsTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function test_validate_psr4_paths_without_basepath_resets_validated() {
311311
$this->assertSame( $input['expected'], $this->validated_psr4_paths, 'Validated paths has not been set correctly' );
312312

313313
// Now make sure that the missing basepath resets the validated paths.
314-
$phpcsFile->config->basepath = null; // @phpstan-ignore assign.propertyType (Issue with the PHPCS docs. Can't be helped.)
314+
$phpcsFile->config->basepath = null;
315315

316316
$this->validate_psr4_paths( $phpcsFile );
317317

0 commit comments

Comments
 (0)