src/Encoder/StringEncoder.php
private function iterateNamespaces($value)
    {
        yield $value;

        $parts = explode('\\', '\\' . $value);
        $count = \count($parts);

        for ($i = 1; $i < $count; $i++) {
            yield ltrim(implode('\\', \array_slice($parts, 0, -$i)), '\\') . '\\';
        }
    }
private function iterateNamespaces($value)
    {
        yield $value;

        $parts = explode('\\', '\\' . $value);
        $count = \count($parts);

        for ($i = 1; $i < $count; $i++) {
            yield ltrim(implode('\\', \array_slice($parts, 0, -$i)), '\\') . '\\';
        }
    }
private function iterateNamespaces ( $ value ) { yield $ value ; $ parts = explode ( '\\' , '\\' . $ value ) ; $ count = \ count ( $ parts ) ; for ( $ i = 1 ; $ i < $ count ; $ i ++ ) { yield ltrim ( implode ( '\\' , \ array_slice ( $ parts , 0 , - $ i ) ) , '\\' ) . '\\' ; } }
Iterates over the variations of the namespace for the given class name.
@param string $value The class name to iterate over
@return \Generator|string[] The namespace parts of the string
Iterates over the variations of the namespace for the given class name .