Code Duplication    Length = 16-16 lines in 2 locations

tests/Nabu/AutoloaderTest.php 2 locations

@@ 132-147 (lines=16) @@
129
    /**
130
     * @return bool
131
     */
132
    private function autoloaderClassExists()
133
    {
134
        $autoload_functions = spl_autoload_functions();
135
136
        $autoloader_class_exists = false;
137
138
        if ($autoload_functions) {
139
            foreach ($autoload_functions as $function) {
140
                if ($function[0] instanceof Autoloader) {
141
                    $autoloader_class_exists = true;
142
                }
143
            }
144
        }
145
146
        return $autoloader_class_exists;
147
    }
148
149
    /**
150
     * @return mixed
@@ 152-167 (lines=16) @@
149
    /**
150
     * @return mixed
151
     */
152
    private function getAutoloaderFromAutoloadStack()
153
    {
154
        $autoloader_object = false;
155
156
        $autoload_functions = spl_autoload_functions();
157
158
        if ($autoload_functions) {
159
            foreach ($autoload_functions as $function_array) {
160
                if ($function_array[0] instanceof Autoloader) {
161
                    $autoloader_object = $function_array;
162
                }
163
            }
164
        }
165
166
        return $autoloader_object;
167
    }
168
}
169