Code Duplication    Length = 11-11 lines in 2 locations

src/LesserPhp/Compiler.php 1 location

@@ 135-145 (lines=11) @@
132
    }
133
134
    // attempts to find the path of an import url, returns null for css files
135
    protected function findImport($url)
136
    {
137
        foreach ((array)$this->importDir as $dir) {
138
            $full = $dir . (substr($dir, -1) !== '/' ? '/' : '') . $url;
139
            if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) {
140
                return $file;
141
            }
142
        }
143
144
        return null;
145
    }
146
147
    protected function fileExists($name)
148
    {

src/LesserPhp/Library/Functions.php 1 location

@@ 741-751 (lines=11) @@
738
     *
739
     * @return null|string
740
     */
741
    public function findImport($url)
742
    {
743
        foreach ((array)$this->compiler->importDir as $dir) {
744
            $full = $dir . (substr($dir, -1) !== '/' ? '/' : '') . $url;
745
            if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) {
746
                return $file;
747
            }
748
        }
749
750
        return null;
751
    }
752
753
    /**
754
     * @param string $name