Code Duplication    Length = 6-6 lines in 3 locations

PHPDaemon/Core/ClassFinder.php 3 locations

@@ 59-64 (lines=6) @@
56
            if ('Example' === substr($class, 0, 7)) {
57
                array_unshift($e, 'Examples');
58
            }
59
            if ('Server' === substr($class, -6)) {
60
                $path = '\\PHPDaemon\\Servers\\' . substr($class, 0, -6) . '\\Pool';
61
                $r = str_replace('\\Servers\\Servers', '\\Servers', $path);
62
                Daemon::log('ClassFinder: \'' . $class . '\' -> \'' . $r . '\', you should change your code.');
63
                return $r;
64
            }
65
            if ('Client' === substr($class, -6)) {
66
                $path = '\\PHPDaemon\\Clients\\' . substr($class, 0, -6) . '\\Pool';
67
                $r = str_replace('\\Clients\\Clients', '\\Clients', $path);
@@ 65-70 (lines=6) @@
62
                Daemon::log('ClassFinder: \'' . $class . '\' -> \'' . $r . '\', you should change your code.');
63
                return $r;
64
            }
65
            if ('Client' === substr($class, -6)) {
66
                $path = '\\PHPDaemon\\Clients\\' . substr($class, 0, -6) . '\\Pool';
67
                $r = str_replace('\\Clients\\Clients', '\\Clients', $path);
68
                Daemon::log('ClassFinder: \'' . $class . '\' -> \'' . $r . '\', you should change your code.');
69
                return $r;
70
            }
71
            if ('ClientAsync' === substr($class, -11)) {
72
                $path = '\\PHPDaemon\\Clients\\' . substr($class, 0, -11) . '\\Pool';
73
                $r = str_replace('\\Client\\Clients', '\\Clients', $path);
@@ 71-76 (lines=6) @@
68
                Daemon::log('ClassFinder: \'' . $class . '\' -> \'' . $r . '\', you should change your code.');
69
                return $r;
70
            }
71
            if ('ClientAsync' === substr($class, -11)) {
72
                $path = '\\PHPDaemon\\Clients\\' . substr($class, 0, -11) . '\\Pool';
73
                $r = str_replace('\\Client\\Clients', '\\Clients', $path);
74
                Daemon::log('ClassFinder: \'' . $class . '\' -> \'' . $r . '\', you should change your code.');
75
                return $r;
76
            }
77
        }
78
        if ($namespace !== null && sizeof($e) < 2) {
79
            array_unshift($e, $namespace);