@param ModifierInterface $modifier
@param int               $position
@param bool              $continueOnException

@throws \InvalidArgumentException
777195
public function addModifier(ModifierInterface $modifier, $position = null, $continueOnException = false)
    {
        if (null === $position) {
            $position = sizeof($this->modifiers) ? (max(array_keys($this->modifiers)) + 1) : 0;
        }

        if (!is_numeric($position)) {
            throw new \InvalidArgumentException('Position must be a number');
        }

        if (array_key_exists($position, $this->modifiers)) {
            throw new \InvalidArgumentException(sprintf('There already is a modifier at position %d', $position));
        }

        $this->modifiers[$position] = $modifier;
        $this->continues[$position] = $continueOnException;

        ksort($this->modifiers);
    }
362272
public function updateModuleHookPosition(UpdatePositionEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $this->genericUpdatePosition(ModuleHookQuery::create(), $event, $dispatcher);
        $this->cacheClear($dispatcher);

        return $event;
    }
504719
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			getSarlField().getModifiers().add(modifier);
		}
	}
831264
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			this.sarlSpace.getModifiers().add(modifier);
		}
	}
166104
public function setModifier(EventManagerAwareInterface $modifier)
    {
        $this->modifier = $modifier;
        foreach ($this->buildItems['collection'] as $builder) {
            if ($builder instanceof ModifiableInterface) {
                $builder->setModifier($modifier);
            }
        }
        
        return $this;
    }
1006705
void setModifiers(final int modifiers) {
        this.modifiers |= modifiers;
        if ((modifiers & ANNOTATION_CLASS_MODIFIER) != 0) {
            this.isAnnotation = true;
        }
        if ((modifiers & Modifier.INTERFACE) != 0) {
            this.isInterface = true;
        }
    }
1372324
public function upPagesPosition($parentId, $position, $positionLimit = NULL)
    {
        if (is_null($positionLimit))
        {
            $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:Page p SET p.position=p.position-1 WHERE p.position>=:position AND p.parent=:parentId AND p.page_type=:pageType');
        }
        else
        {
            $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:Page p SET p.position=p.position-1 WHERE p.position>=:position AND p.position<=:positionLimit AND p.parent=:parentId AND p.page_type=:pageType');
            $query->setParameter('positionLimit', $positionLimit);
        }
        $query->setParameter('pageType', 'page');
        $query->setParameter('position', $position);
        $query->setParameter('parentId', $parentId);
        $query->getResult();
    }
60953
public static int setInterface(int modifier, boolean b) {
        if (b) {
            return (modifier | (INTERFACE | ABSTRACT)) & 
                (~FINAL & ~SYNCHRONIZED & ~VOLATILE & ~TRANSIENT & ~NATIVE);
        }
        else {
            return modifier & ~INTERFACE;
        }
    }
1058360
public function setPosition($position = self::POSITION_RIGHT) {
		if (!in_array($position,self::$_positionXLref)) {
			return false;
		}

		$this->_position = $position;
		return true;
	}
363729
public void updatePosition(final BitfinexPosition position) {
		
		synchronized (positions) {
			// Replace position
			positions.removeIf(p -> p.getCurrencyPair() == position.getCurrencyPair());
			positions.add(position);
			positions.notifyAll();
		}
		
		notifyCallbacks(position);
	}
486426
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			this.sarlBehavior.getModifiers().add(modifier);
		}
	}
708047
public function setModifiers(array $modifiers)
    {
        $modifiers = array_map('strtolower', $modifiers);

        // Validate modifiers are supported
        $allowed = $this->getSupportedModifiers();
        $unsupported = array_diff($modifiers, $allowed);
        if ($unsupported) {
            throw new InvalidArgumentException(
                static::class . ' does not accept ' . implode(', ', $unsupported) . ' as modifiers'
            );
        }

        $this->modifiers = $modifiers;
    }
1157637
public function matchOneOrNullResult($specification, ResultModifier $modifier = null)
    {
        try {
            return $this->matchSingleResult($specification, $modifier);
        } catch (Exception\NoResultException $e) {
            return;
        }
    }
1264934
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			this.sarlEnumeration.getModifiers().add(modifier);
		}
	}
1275779
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			this.sarlAgent.getModifiers().add(modifier);
		}
	}
984026
private function validateNewLineAfterDocComment(int $position, array $token, bool $asSingleLine = true): void
    {
        if (!$this->isNextLineEmpty($position)) {
            $nextRelevantPos = $this->loadNextDocBlockContent($position);
            $nextToken = $this->tokens[$nextRelevantPos];

            // Register an error if we force a single line or this is no long description with more then one line.
            if ($asSingleLine || ($nextToken['code'] !== T_DOC_COMMENT_STRING)) {
                $isFixing = $this->file->addFixableWarning(
                    self::MESSAGE_NO_LINE_AFTER_DOC_COMMENT,
                    $position,
                    static::CODE_NO_LINE_AFTER_DOC_COMMENT
                );

                if ($isFixing) {
                    $this->fixNoLineAfterDocComment($position, $token);
                }
            }
        }
    }
805144
@Requires("modifier != null")
  @Ensures("!getModifiers().contains(modifier)")
  public void removeModifier(ElementModifier modifier) {
    modifiers.remove(modifier);
    switch (modifier) {
      case PRIVATE:
      case PACKAGE_PRIVATE:
      case PROTECTED:
      case PUBLIC:
        modifiers.add(ElementModifier.PACKAGE_PRIVATE);
    }
  }