Problem/Motivation

In a previous issue #2304909: Relax requirement for @file when using OO Class or Interface per file, we decided that we did not need a @file doc block for PSR-4 files with exactly one class in them. #2665744: @file is not required for classes, interfaces and traits made a Coder rule for it, and #2572643: Fix 'Drupal.Commenting.FileComment' coding standard fixed up Core so that we could run the Coder rule, and #2665992: @file is not required for classes, interfaces and traits ran it against Core and turned on this as a permanent sniffer in 8.2.x.

Then on #2734195: Remove @file tag docblock from files that contain a namespaced class/interface/trait, whose file name is the class name with a .php extension, @neerajsingh noticed that we still have a bunch of test class files that have @file doc blocks, and made a patch to remove them. @jhodgdon marked this as a duplicate and reopened #2572643: Fix 'Drupal.Commenting.FileComment' coding standard. @alexpott on comment #28 figured out that the reason these are still in Core is that they are test class files, where there is an additional class in the file (used for testing purposes). An example:
core/modules/block/tests/src/Unit/BlockRepositoryTest.php
This contains:

namespace Drupal\Tests\block\Unit;

class BlockRepositoryTest extends UnitTestCase {
}

interface TestContextAwareBlockInterface extends BlockPluginInterface, ContextAwarePluginInterface {
}

So, the question here is whether we need a @file doc block for this class file. If so, what should it say? If not, we need a new/revised Coder rule to detect/fix/remove this doc block.

Proposed resolution

TBD

Remaining tasks

TBD

Comments

jhodgdon created an issue. See original summary.