File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ private function mdBadgeToHtml(string $mdBadge): string
248248 private function getContents (string $ source ): string
249249 {
250250 $ contents = \file_get_contents ($ source );
251- if (! $ contents ) {
251+ if (\is_string ( $ contents) === false ) {
252252 throw new RuntimeException (\sprintf ('Failed to read doc file: %s ' , $ source ));
253253 }
254254
Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ final class TokenListUnitTest extends UtilityMethodTestCase
3838 */
3939 public function testOutput ()
4040 {
41- if (version_compare (Config::VERSION , '3.99.99 ' , '> ' ) === true ) {
41+ if (\ version_compare (Config::VERSION , '3.99.99 ' , '> ' ) === true ) {
4242 // As of PHPCS 4.0, whitespace after the long PHP open tag is tokenized separately,
4343 // hence the difference in test expectations.
44- $ expected = file_get_contents (__DIR__ . '/TokenListExpectationPhpcs4.txt ' );
44+ $ expected = \ file_get_contents (__DIR__ . '/TokenListExpectationPhpcs4.txt ' );
4545 } else {
46- $ expected = file_get_contents (__DIR__ . '/TokenListExpectationPhpcs3.txt ' );
46+ $ expected = \ file_get_contents (__DIR__ . '/TokenListExpectationPhpcs3.txt ' );
4747 }
4848
4949 if (empty (self ::$ phpcsFile ->ruleset ->tokenListeners )) {
You can’t perform that action at this time.
0 commit comments