Webmozart\Console\Api\Config\OptionCommandConfig::isShortNamePreferred PHP 메소드

isShortNamePreferred() 공개 메소드

If no preference was set, the short name is preferred by default if one is set. If no short name is set, the long name is preferred by default.
public isShortNamePreferred ( ) : boolean
리턴 boolean Returns `true` if the short name should be preferred over the long name.
    public function isShortNamePreferred()
    {
        return !$this->isLongNamePreferred();
    }

Usage Example

예제 #1
0
 public function testSetShortNameToNullSetsLongNameToBePreferred()
 {
     $this->config->setShortName('d');
     $this->config->setPreferShortName();
     $this->config->setShortName(null);
     $this->assertTrue($this->config->isLongNamePreferred());
     $this->assertFalse($this->config->isShortNamePreferred());
 }