Snc\RedisBundle\DependencyInjection\Configuration\RedisDsn::getPort PHP Метод

getPort() публичный Метод

public getPort ( ) : integer
Результат integer
    public function getPort()
    {
        if (null !== $this->socket) {
            return null;
        }
        return $this->port ?: 6379;
    }

Usage Example

Пример #1
0
 /**
  * @param string $dsn  DSN
  * @param int    $port Port
  *
  * @dataProvider portValues
  */
 public function testPort($dsn, $port)
 {
     $dsn = new RedisDsn($dsn);
     $this->assertSame($port, $dsn->getPort());
 }