Closed yurahaid closed 5 years ago
Define one class per file - this does not apply to private helper classes that are not intended to be instantiated from the outside and thus are not concerned by the PSR-0 and PSR-4 autoload standards; https://symfony.com/doc/current/contributing/code/standards.html#structure
does this also occur when you split them up in two seperate files?
Yes, if have file with only
<?php
interface FooExceptionInterface extends BaseException {};
this also occur.
i appear to be unable to reproduce your issue... could you perhaps specify which version phpcs and which version of this repo you're using?
PHP_CodeSniffer version 3.4.2 repo - 3.9.0
File for testing, but before run sniffer - change extension from txt to php InfinityLoopTest.txt
My command - vendor/bin/phpcs --standard=Symfony/ruleset.xml InfinityLoopTest.php
my php version - v7.1.27
ok, bit of a weird edge case, but fixed @ https://github.com/djoos/Symfony-coding-standard/pull/172
Hi If run sniffer for this code
I get infinity loop.
In
Symfony\Sniffs\NamingConventions\ValidClassNameSniff::116