protected function getPorts($host = null)
    {
        $ports = $this->ports();
        array_walk($ports, function (&$port) use ($host) {
            $host = isset($host) ? $host : $port;
            $port = "{$host}:{$port}";
        });

        return $ports;
    }
protected function getPorts($host = null)
    {
        $ports = $this->ports();
        array_walk($ports, function (&$port) use ($host) {
            $host = isset($host) ? $host : $port;
            $port = "{$host}:{$port}";
        });

        return $ports;
    }
protected function getPorts ( $ host = null ) { $ ports = $ this -> ports ( ) ; array_walk ( $ ports , function ( & $ port ) use ( $ host ) { $ host = isset ( $ host ) ? $ host : $ port ; $ port = "{$host}:{$port}" ; } ) ; return $ ports ; }
Get Docker formatted service ports.

@param null $host

@return array
An array of Docker service ports.
Get Docker formatted service ports .