src/PoEntry.php
public function addFlag(string $name): void
    {
        if (!$this->hasFlag($name)) {
            $flagEntry = $this->entry[PoTokens::FLAG];
            if ($flagEntry === null) {
                $this->set(PoTokens::FLAG, $name);
            } elseif (is_array($flagEntry)) {
                $flagEntry[] = $name;
                $this->set(PoTokens::FLAG, implode(',', $flagEntry));
            } else {
                $this->set(PoTokens::FLAG, $flagEntry . ',' . $name);
            }
        }
    }
public function addFlag(string $name): void
    {
        if (!$this->hasFlag($name)) {
            $flagEntry = $this->entry[PoTokens::FLAG];
            if ($flagEntry === null) {
                $this->set(PoTokens::FLAG, $name);
            } elseif (is_array($flagEntry)) {
                $flagEntry[] = $name;
                $this->set(PoTokens::FLAG, implode(',', $flagEntry));
            } else {
                $this->set(PoTokens::FLAG, $flagEntry . ',' . $name);
            }
        }
    }
public function addFlag ( string $ name ) : void { if ( ! $ this -> hasFlag ( $ name ) ) { $ flagEntry = $ this -> entry [ PoTokens :: FLAG ] ; if ( $ flagEntry === null ) { $ this -> set ( PoTokens :: FLAG , $ name ) ; } elseif ( is_array ( $ flagEntry ) ) { $ flagEntry [ ] = $ name ; $ this -> set ( PoTokens :: FLAG , implode ( ',' , $ flagEntry ) ) ; } else { $ this -> set ( PoTokens :: FLAG , $ flagEntry . ',' . $ name ) ; } } }
add a flag to the entry

@param string $name flag to check

@return void
add a flag to the entry