original_string: public function onBlock(BlockEvent $event)
      {
          $identifier = $event->getSetting('id', null);
  
          if (null === $identifier) {
              return;
          }
  
          $block = new Block();
          $block->setId(uniqid());
          $block->setSettings($event->getSettings());
          $block->setType($this->blockService->getName());
  
          $event->addBlock($block);
      }
code: public function onBlock(BlockEvent $event)
      {
          $identifier = $event->getSetting('id', null);
  
          if (null === $identifier) {
              return;
          }
  
          $block = new Block();
          $block->setId(uniqid());
          $block->setSettings($event->getSettings());
          $block->setType($this->blockService->getName());
  
          $event->addBlock($block);
      }
code_tokens: public function onBlock ( BlockEvent $ event ) { $ identifier = $ event -> getSetting ( 'id' , null ) ; if ( null === $ identifier ) { return ; } $ block = new Block ( ) ; $ block -> setId ( uniqid ( ) ) ; $ block -> setSettings ( $ event -> getSettings ( ) ) ; $ block -> setType ( $ this -> blockService -> getName ( ) ) ; $ event -> addBlock ( $ block ) ; }
docstring: Add blocks services to event.
  
  @param BlockEvent $event
docstring_tokens: Add blocks services to event .