original_string: public function addNotifier(Notifier $notifier, bool $setLogger = true)
      {
          if ($notifier instanceof self) {
              throw new LogicException('Cannot add self');
          }
  
          if ($setLogger) {
              $notifier->setLogger($this->getLogger());
          }
          $this->notifiers[] = $notifier;
      }
code: public function addNotifier(Notifier $notifier, bool $setLogger = true)
      {
          if ($notifier instanceof self) {
              throw new LogicException('Cannot add self');
          }
  
          if ($setLogger) {
              $notifier->setLogger($this->getLogger());
          }
          $this->notifiers[] = $notifier;
      }
code_tokens: public function addNotifier ( Notifier $ notifier , bool $ setLogger = true ) { if ( $ notifier instanceof self ) { throw new LogicException ( 'Cannot add self' ) ; } if ( $ setLogger ) { $ notifier -> setLogger ( $ this -> getLogger ( ) ) ; } $ this -> notifiers [ ] = $ notifier ; }
docstring: Add a notifier to the Notification center.
  
  @param Notifier $notifier
  @param bool $setLogger if false the default logger will not be set to the notifier
  
  @throws LogicException
docstring_tokens: Add a notifier to the Notification center .