protected function looksLikePlugin($file)
    {
        if (! $file || ! $this->filesystem->isFile($file) || ! $this->filesystem->isReadable($file)) {
            return false;
        }

        $chunk = str_replace("\r", "\n", file_get_contents($file, false, null, 0, 8192));

        return preg_match('/^[ \t\/*#@]*Plugin Name:(.*)$/mi', $chunk, $match) && $match[1];
    }
protected function looksLikePlugin($file)
    {
        if (! $file || ! $this->filesystem->isFile($file) || ! $this->filesystem->isReadable($file)) {
            return false;
        }

        $chunk = str_replace("\r", "\n", file_get_contents($file, false, null, 0, 8192));

        return preg_match('/^[ \t\/*#@]*Plugin Name:(.*)$/mi', $chunk, $match) && $match[1];
    }
protected function looksLikePlugin ( $ file ) { if ( ! $ file || ! $ this -> filesystem -> isFile ( $ file ) || ! $ this -> filesystem -> isReadable ( $ file ) ) { return false ; } $ chunk = str_replace ( "\r" , "\n" , file_get_contents ( $ file , false , null , 0 , 8192 ) ) ; return preg_match ( '/^[ \t\/*#@]*Plugin Name:(.*)$/mi' , $ chunk , $ match ) && $ match [ 1 ] ; }
Does the file look like a WordPress plugin?

@param string $file
@return bool
Does the file look like a WordPress plugin?