Wanna mark a thing as garbage?

@param   bool  $flag  Only true or false should be passed
@return  bool
555166
public function trash_it($term, $flag = true)
    {
        return $this->edit($term, [
            $this->deletion_key => (int) $flag
        ] + $this->timestamp('modification'));
    }
1164774
public function isSelected($flag = null)
    {
        if ($flag !== null) {
            $this->isSelected = !!$flag;

            $this->setCollapsed(!$flag);
        }

        return $this->isSelected;
    }
1077271
public static final boolean dbFlag(final String flag) {
        return flag != null
                && (FLAG_TRUE.equalsIgnoreCase(flag) || FLAG_TRUE_OTHER.equalsIgnoreCase(flag));
    }
241930
public static function isAllBitSet( int $target, int $flag ) : bool
    {
        return self::isBitSet( $target, $flag, self::BITTEST_MODE_ALL );
    }
116149
public function addFlag($flag)
    {
        
        $currentAnnotations = $this->getAnnotations();
        if (!isset($currentAnnotations[self::FLAGS])){
            $currentAnnotations[self::FLAGS] = $flag;
        }
        else if (!(mb_strpos($currentAnnotations[self::FLAGS], $flag, 0, TAO_DEFAULT_ENCODING) !== false)){
            $currentAnnotations[self::FLAGS] .= " ${flag}";
        }
    
        $this->setAnnotations($currentAnnotations);
        
    }
306740
public function hasBeenTransformed($flag = null) {
        if ($flag === null) {
            return $this->hasBeenTransformed;
        }

        $this->hasBeenTransformed = (bool) $flag;

        return $this;
    }
476340
public function disableStripWhitespace($flag = null)
    {
        if (null === $flag) {
            return ! $this->stripWhitespaceFlag;
        }
        $this->stripWhitespaceFlag = ! (bool) $flag;
        return $this;
    }
528761
public function removeFlag($flag)
    {
        
        $currentFlags = $this->getFlags();
        for ($i = 0; $i < count($currentFlags); $i++){
            if ($currentFlags[$i] == $flag){
                break;
            }
        }
        
        if ($i <= count($currentFlags)){
            // The flag is found.
            unset($currentFlags[$i]);
            $this->setFlags($currentFlags);
        }
        
    }
799452
public function removeFlag($flags)
    {
        $this->bitmask = $this->bitmask & ~$this->getMaskFromFlags($flags);

        return $this;
    }
393116
private function boolishToFlag($value): bool
    {
        switch (true) {
            case 'true' === $value:
            case true === $value:
            case 'yes' === $value:
                return true;
            case 'no' === $value:
            case 'false' === $value:
            case false === $value:
                return false;
            default:
                throw new \InvalidArgumentException('Invalid value for remove-obsolete flag.');
        }
    }
1045622
public function distinct($flag = true)
    {
        $this->_parts[self::DISTINCT] = (bool) $flag;
        return $this;
    }
526211
public function setProtocol($flag = true) {
        $this->flag = $flag;
        if($flag){
            $this->protocol = 'https';
        }else{
            $this->protocol = 'http';
        }
    }
1349517
protected function setFlag($flag, $enable = true)
    {
        if ($enable) {
            $this->flags[$flag] = true;
        } else {
            unset($this->flags[$flag]);
        }
    }
598916
public function clearFlag(string $flag, $numbers): bool
    {
        return \imap_clearflag_full($this->resource->getStream(), $this->prepareMessageIds($numbers), $flag, \ST_UID);
    }
325553
private static function getImageFlag(array $flags): int
    {
        $res = 0;
        foreach ($flags as $flag) {
            $res |= constant(Image::class . '::' . $flag);
        }
        return $res;
    }
722499
public function arsort($flags = SORT_REGULAR)
    {
        $this->_modified = true;
        return arsort($this->_storage, $flags);
    }
858844
public function rsort($flags = SORT_REGULAR)
    {
        $this->_modified = true;
        return rsort($this->_storage, $flags);
    }