Page MenuHomeDevCentral

Allow to extract class name from a fully qualified class name expression
Closed, ResolvedPublic

Description

Data provider for an unit test:

public function provideFullyQualifiedClassNames () : iterable {
    // Example from PSR-4 canonical document
    // Fully qualified class name, class
    yield ['\Acme\Log\Writer\File_Writer', 'File_Writer'];
    yield ['\Aura\Web\Response\Status', 'Status'];
    yield ['\Symfony\Core\Request', 'Request'];

    yield ['Foo', 'Foo'];
    yield ['', ''];
    yield ["Foo\\", ''];

}