original_string: public function delete($idSegment)
      {
          $segment = $this->getSegmentOrFail($idSegment);
          $this->checkUserCanEditOrDeleteSegment($segment);
  
          /**
           * Triggered before a segment is deleted or made invisible.
           *
           * This event can be used by plugins to throw an exception
           * or do something else.
           *
           * @param int $idSegment The ID of the segment being deleted.
           */
          Piwik::postEvent('SegmentEditor.deactivate', array($idSegment));
  
          $this->getModel()->deleteSegment($idSegment);
  
          return true;
      }
code: public function delete($idSegment)
      {
          $segment = $this->getSegmentOrFail($idSegment);
          $this->checkUserCanEditOrDeleteSegment($segment);
  
          /**
           * Triggered before a segment is deleted or made invisible.
           *
           * This event can be used by plugins to throw an exception
           * or do something else.
           *
           * @param int $idSegment The ID of the segment being deleted.
           */
          Piwik::postEvent('SegmentEditor.deactivate', array($idSegment));
  
          $this->getModel()->deleteSegment($idSegment);
  
          return true;
      }
code_tokens: public function delete ( $ idSegment ) { $ segment = $ this -> getSegmentOrFail ( $ idSegment ) ; $ this -> checkUserCanEditOrDeleteSegment ( $ segment ) ; /**
           * Triggered before a segment is deleted or made invisible.
           *
           * This event can be used by plugins to throw an exception
           * or do something else.
           *
           * @param int $idSegment The ID of the segment being deleted.
           */ Piwik :: postEvent ( 'SegmentEditor.deactivate' , array ( $ idSegment ) ) ; $ this -> getModel ( ) -> deleteSegment ( $ idSegment ) ; return true ; }
docstring: Deletes a stored segment.
  
  @param $idSegment
  @return bool
docstring_tokens: Deletes a stored segment .