public function reportLighthouse($opts = [
        'hostname' => null,
        'protocol' => 'http'
    ])
    {
        $host = ProjectX::getProjectConfig()
            ->getHost();

        $protocol = $opts['protocol'];
        $hostname = isset($opts['hostname'])
            ? $opts['hostname']
            : (isset($host['name']) ? $host['name'] : 'localhost');

        $path = $this->getReportsPath() . "/lighthouse-report-$hostname.html";

        $this->taskGoogleLighthouse()
            ->setUrl("$protocol://$hostname")
            ->setOutputPath($path)
            ->run();
    }
public function reportLighthouse($opts = [
        'hostname' => null,
        'protocol' => 'http'
    ])
    {
        $host = ProjectX::getProjectConfig()
            ->getHost();

        $protocol = $opts['protocol'];
        $hostname = isset($opts['hostname'])
            ? $opts['hostname']
            : (isset($host['name']) ? $host['name'] : 'localhost');

        $path = $this->getReportsPath() . "/lighthouse-report-$hostname.html";

        $this->taskGoogleLighthouse()
            ->setUrl("$protocol://$hostname")
            ->setOutputPath($path)
            ->run();
    }
public function reportLighthouse ( $ opts = [ 'hostname' => null , 'protocol' => 'http' ] ) { $ host = ProjectX :: getProjectConfig ( ) -> getHost ( ) ; $ protocol = $ opts [ 'protocol' ] ; $ hostname = isset ( $ opts [ 'hostname' ] ) ? $ opts [ 'hostname' ] : ( isset ( $ host [ 'name' ] ) ? $ host [ 'name' ] : 'localhost' ) ; $ path = $ this -> getReportsPath ( ) . "/lighthouse-report-$hostname.html" ; $ this -> taskGoogleLighthouse ( ) -> setUrl ( "$protocol://$hostname" ) -> setOutputPath ( $ path ) -> run ( ) ; }
Run Google lighthouse report.

@param array $opts
@option string $hostname Set the hostname.
@option string $protocol Set the protocol to use https or http.
Run Google lighthouse report .