Upstream PHPUnit\Framework\TestCase::createMock() is protected, not public.
Fix is to set the proper upstream visibility; change from public to
protected.
Public for the method introcuded back in 2018 in fa76f652. Checked against
Phpunit 7.5+ and 8.
Ref: fa76f65209
Remove markers that command PHP_CodeSniffer (Pear package base-name for
"phpcs") to skip files based on their own configuration as those files
are already with the .phpstub extension which effectively has them not
configured/already ignored by phpcs base/upstr. configuration (project
configuration file: phpcs.xml.dist)
Fix is to remove these markers/directives, also not all .phpstub files
had them therefore this is effectively streamlining the file formats
for .phpstub to this regard.
File contains two classes (one class and one interface), the mock-object
interface was missing resolution for Constraint.
This Constraint is PHPUnit\Framework\Constraint\Constraint.
Phpunit upstream indents (prefixes) docblock @param annotations and I can
imagine that some white-space has been taken over from that into the stub
files when writing them.
Also for separation by empty lines between methods which looks as well
as an error quickly porting from upstream (better than anything else).