Skip to content

Commit

Permalink
MNT Resolve CI problems
Browse files Browse the repository at this point in the history
- Tell phpcs what to sniff
- Throw a hard error if we can't bootstrap tests correctly
  • Loading branch information
GuySartorelli committed Nov 13, 2023
1 parent 47f0c4d commit eae1e90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<ruleset name="PSR12">
<rule ref="PSR12"/>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>tests/bootstrap\.php</exclude-pattern>
</rule>
<rule ref="PSR12"/>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>tests/bootstrap\.php</exclude-pattern>
</rule>

<file>./src</file>
<file>./tests</file>
</ruleset>
4 changes: 4 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
}
}

if (!$autoloaded) {
throw new RuntimeException("Couldn't find autoloader");
}

if (!defined('PHP_CODESNIFFER_VERBOSITY')) {
define('PHP_CODESNIFFER_VERBOSITY', 0);
}
Expand Down

0 comments on commit eae1e90

Please sign in to comment.