src/Rocketeer/Services/Display/QueueExplainer.php
protected function getLongestSize()
    {
        if ($this->longest) {
            return $this->longest;
        }

        // Build possible handles
        $strings = [];
        $connections = $this->connections->getActiveConnections();
        $stages = (array) $this->connections->getAvailableStages() ?: [''];
        foreach ($connections as $handle => $connection) {
            $servers = $connection->getConnectionKey()->servers;
            if (count($servers) > 1) {
                $handle .= '/'.count($servers);
            }

            foreach ($stages as $stage) {
                $strings[] = trim($handle.'/'.$stage, '/');
            }
        }

        // Get longest string
        $strings = array_map('strlen', $strings);
        $strings = $strings ? max($strings) : 0;

        // Cache value
        $this->longest = $strings;

        return $this->longest;
    }
protected function getLongestSize()
    {
        if ($this->longest) {
            return $this->longest;
        }

        // Build possible handles
        $strings = [];
        $connections = $this->connections->getActiveConnections();
        $stages = (array) $this->connections->getAvailableStages() ?: [''];
        foreach ($connections as $handle => $connection) {
            $servers = $connection->getConnectionKey()->servers;
            if (count($servers) > 1) {
                $handle .= '/'.count($servers);
            }

            foreach ($stages as $stage) {
                $strings[] = trim($handle.'/'.$stage, '/');
            }
        }

        // Get longest string
        $strings = array_map('strlen', $strings);
        $strings = $strings ? max($strings) : 0;

        // Cache value
        $this->longest = $strings;

        return $this->longest;
    }
protected function getLongestSize ( ) { if ( $ this -> longest ) { return $ this -> longest ; } // Build possible handles $ strings = [ ] ; $ connections = $ this -> connections -> getActiveConnections ( ) ; $ stages = ( array ) $ this -> connections -> getAvailableStages ( ) ? : [ '' ] ; foreach ( $ connections as $ handle => $ connection ) { $ servers = $ connection -> getConnectionKey ( ) -> servers ; if ( count ( $ servers ) > 1 ) { $ handle .= '/' . count ( $ servers ) ; } foreach ( $ stages as $ stage ) { $ strings [ ] = trim ( $ handle . '/' . $ stage , '/' ) ; } } // Get longest string $ strings = array_map ( 'strlen' , $ strings ) ; $ strings = $ strings ? max ( $ strings ) : 0 ; // Cache value $ this -> longest = $ strings ; return $ this -> longest ; }
Get the longest size an handle can have.

@return int
Get the longest size an handle can have .