Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function invert()
 {
     // we can't invert a text set if it has any 'values' (ie, non range intervals) in it
     // check for these and throw a error if we have any
     foreach ($this->intervals as $interval) {
         if ($interval[0] === $interval[1] and $interval[0] !== null) {
             throw new \RuntimeException("I'm sorry I can't invert the text set('{$this}') because it contains values.");
         }
     }
     return parent::invert();
 }