original_string: protected function _parseCondition($field, $value)
      {
          $operator = '=';
          $expression = $field;
          $parts = explode(' ', trim($field), 2);
  
          if (count($parts) > 1) {
              list($expression, $operator) = $parts;
          }
  
          $type = $this->getTypeMap()->type($expression);
          $operator = strtolower(trim($operator));
  
          $typeMultiple = strpos($type, '[]') !== false;
          if (in_array($operator, ['in', 'not in']) || $typeMultiple) {
              $type = $type ?: 'string';
              $type .= $typeMultiple ? null : '[]';
              $operator = $operator === '=' ? 'IN' : $operator;
              $operator = $operator === '!=' ? 'NOT IN' : $operator;
              $typeMultiple = true;
          }
  
          if ($typeMultiple) {
              $value = $value instanceof ExpressionInterface ? $value : (array)$value;
          }
  
          if ($operator === 'is' && $value === null) {
              return new UnaryExpression(
                  'IS NULL',
                  new IdentifierExpression($expression),
                  UnaryExpression::POSTFIX
              );
          }
  
          if ($operator === 'is not' && $value === null) {
              return new UnaryExpression(
                  'IS NOT NULL',
                  new IdentifierExpression($expression),
                  UnaryExpression::POSTFIX
              );
          }
  
          if ($operator === 'is' && $value !== null) {
              $operator = '=';
          }
  
          if ($operator === 'is not' && $value !== null) {
              $operator = '!=';
          }
  
          return new Comparison($expression, $value, $type, $operator);
      }
code: protected function _parseCondition($field, $value)
      {
          $operator = '=';
          $expression = $field;
          $parts = explode(' ', trim($field), 2);
  
          if (count($parts) > 1) {
              list($expression, $operator) = $parts;
          }
  
          $type = $this->getTypeMap()->type($expression);
          $operator = strtolower(trim($operator));
  
          $typeMultiple = strpos($type, '[]') !== false;
          if (in_array($operator, ['in', 'not in']) || $typeMultiple) {
              $type = $type ?: 'string';
              $type .= $typeMultiple ? null : '[]';
              $operator = $operator === '=' ? 'IN' : $operator;
              $operator = $operator === '!=' ? 'NOT IN' : $operator;
              $typeMultiple = true;
          }
  
          if ($typeMultiple) {
              $value = $value instanceof ExpressionInterface ? $value : (array)$value;
          }
  
          if ($operator === 'is' && $value === null) {
              return new UnaryExpression(
                  'IS NULL',
                  new IdentifierExpression($expression),
                  UnaryExpression::POSTFIX
              );
          }
  
          if ($operator === 'is not' && $value === null) {
              return new UnaryExpression(
                  'IS NOT NULL',
                  new IdentifierExpression($expression),
                  UnaryExpression::POSTFIX
              );
          }
  
          if ($operator === 'is' && $value !== null) {
              $operator = '=';
          }
  
          if ($operator === 'is not' && $value !== null) {
              $operator = '!=';
          }
  
          return new Comparison($expression, $value, $type, $operator);
      }
code_tokens: protected function _parseCondition ( $ field , $ value ) { $ operator = '=' ; $ expression = $ field ; $ parts = explode ( ' ' , trim ( $ field ) , 2 ) ; if ( count ( $ parts ) > 1 ) { list ( $ expression , $ operator ) = $ parts ; } $ type = $ this -> getTypeMap ( ) -> type ( $ expression ) ; $ operator = strtolower ( trim ( $ operator ) ) ; $ typeMultiple = strpos ( $ type , '[]' ) !== false ; if ( in_array ( $ operator , [ 'in' , 'not in' ] ) || $ typeMultiple ) { $ type = $ type ? : 'string' ; $ type .= $ typeMultiple ? null : '[]' ; $ operator = $ operator === '=' ? 'IN' : $ operator ; $ operator = $ operator === '!=' ? 'NOT IN' : $ operator ; $ typeMultiple = true ; } if ( $ typeMultiple ) { $ value = $ value instanceof ExpressionInterface ? $ value : ( array ) $ value ; } if ( $ operator === 'is' && $ value === null ) { return new UnaryExpression ( 'IS NULL' , new IdentifierExpression ( $ expression ) , UnaryExpression :: POSTFIX ) ; } if ( $ operator === 'is not' && $ value === null ) { return new UnaryExpression ( 'IS NOT NULL' , new IdentifierExpression ( $ expression ) , UnaryExpression :: POSTFIX ) ; } if ( $ operator === 'is' && $ value !== null ) { $ operator = '=' ; } if ( $ operator === 'is not' && $ value !== null ) { $ operator = '!=' ; } return new Comparison ( $ expression , $ value , $ type , $ operator ) ; }
docstring: Parses a string conditions by trying to extract the operator inside it if any
  and finally returning either an adequate QueryExpression object or a plain
  string representation of the condition. This function is responsible for
  generating the placeholders and replacing the values by them, while storing
  the value elsewhere for future binding.
  
  @param string $field The value from with the actual field and operator will
  be extracted.
  @param mixed $value The value to be bound to a placeholder for the field
  @return string|\Cake\Database\ExpressionInterface
docstring_tokens: Parses a string conditions by trying to extract the operator inside it if any and finally returning either an adequate QueryExpression object or a plain string representation of the condition . This function is responsible for generating the placeholders and replacing the values by them while storing the value elsewhere for future binding .