src/Core/PluginsRepository.php
public function getPlugin(string $directory)
    {
        $files = $this->files->files($this->app->mupluginsPath($directory));

        foreach ($files as $file) {
            $headers = $this->headers($file->getRealPath(), $this->headers);

            if (! empty($headers['name'])) {
                return array_merge(['root' => $file->getFilename()], $headers);
                break;
            }
        }
    }
public function getPlugin(string $directory)
    {
        $files = $this->files->files($this->app->mupluginsPath($directory));

        foreach ($files as $file) {
            $headers = $this->headers($file->getRealPath(), $this->headers);

            if (! empty($headers['name'])) {
                return array_merge(['root' => $file->getFilename()], $headers);
                break;
            }
        }
    }
public function getPlugin ( string $ directory ) { $ files = $ this -> files -> files ( $ this -> app -> mupluginsPath ( $ directory ) ) ; foreach ( $ files as $ file ) { $ headers = $ this -> headers ( $ file -> getRealPath ( ) , $ this -> headers ) ; if ( ! empty ( $ headers [ 'name' ] ) ) { return array_merge ( [ 'root' => $ file -> getFilename ( ) ] , $ headers ) ; break ; } } }
Get the plugin. Find the root file and return its headers.

@param string $directory

@return array
Get the plugin . Find the root file and return its headers .