/**
  * @param string $operator
  * @param bool $result_old
  * @param bool $result_new
  *
  * @return mixed
  */
 private function translator($operator, $result_old, $result_new)
 {
     if (!$this->operatorFactory) {
         $this->operatorFactory = new InterpreterOperatorFactory();
     }
     switch ($operator) {
         case '&':
             return $this->operatorFactory->make('Binary\\InterpreterBinaryAnd', null)->operate($result_old, $result_new);
             break;
         case '|':
             return $this->operatorFactory->make('Binary\\InterpreterBinaryOr', null)->operate($result_old, $result_new);
             break;
         case '^':
             return $this->operatorFactory->make('Binary\\InterpreterBinaryXOr', null)->operate($result_old, $result_new);
             break;
     }
     return false;
 }
 /**
  * @test
  */
 public function checkIfMultipleCallFactoryReturnsDifferentKnownOperatorWithoutNamespace()
 {
     $factory = new InterpreterOperatorFactory();
     $op1 = $factory->make('Binary\\InterpreterBinaryOr', []);
     self::assertNotEquals($op1, $factory->make('Binary\\InterpreterBinaryAnd', []));
 }