@param string|null $conditionOne
@param string|null $conditionTwo

@return string|null
328692
private function combineConditions($conditionOne, $conditionTwo)
    {
        if (null === $conditionOne) {
            return $conditionTwo;
        }

        if (null === $conditionTwo) {
            return $conditionOne;
        }

        return sprintf('(%s) and (%s)', $conditionOne, $conditionTwo);
    }
1247437
public function _condition($condition, $jsCodeIfTrue, $jsCodeIfFalse=null, $immediatly=false) {
		$str="if(".$condition."){".$jsCodeIfTrue."}";
		if (isset($jsCodeIfFalse)) {
			$str.="else{".$jsCodeIfFalse."}";
		}

		if ($immediatly)
			$this->jquery_code_for_compile[]=$str;
			return $str;
	}
1140653
function getCondition() {
  const type = NodeType.ConditionType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  let content = [];
  let s;
  let _pos;

  content.push(getAtkeyword());

  while (pos < tokensLength) {
    if (checkBlock(pos)) break;

    s = checkSC(pos);
    _pos = pos + s;

    if (!_checkCondition(_pos)) break;

    if (s) content = content.concat(getSC());
    content.push(_getCondition());
  }

  return newNode(type, content, line, column);
}
609764
public static Map<Node, List<String>> getConditionNodes(final Node node) {
        final Map<Node, List<String>> conditionalNodes = new HashMap<Node, List<String>>();
        getConditionNodes(node, conditionalNodes);
        return conditionalNodes;
    }
743079
public function is($condition, $field) {
		if (!isset($this->_fields[$field])) {
			return null;
		}
		return isset($this->_fields[$field][$condition]) && $this->_fields[$field][$condition];
	}
1305042
public function between($userOne, $userTwo)
    {
        $conversation1 = $this->conversation->userConversations($userOne)->toArray();
        $conversation2 = $this->conversation->userConversations($userTwo)->toArray();

        $common_conversations = $this->getConversationsInCommon($conversation1, $conversation2);

        if (!$common_conversations) {
            return;
        }

        return $this->conversation->findOrFail($common_conversations[0]);
    }
888650
public function createCondition($conditionType)
    {
        try {
            $classname = "";
            $tasklwr = strtolower($conditionType);
            foreach ($this->typedefs as $name => $class) {
                if (strtolower($name) === $tasklwr) {
                    $classname = $class;
                    break;
                }
            }

            if ($classname === "") {
                return null;
            }

            $o = $this->createObject($classname);

            if ($o instanceof Condition) {
                return $o;
            } else {
                throw new BuildException("Not actually a condition");
            }
        } catch (Exception $e) {
            throw new BuildException("Could not create condition of type: " . $conditionType, $e);
        }
    }
310247
public function where($key, $condition = null, $value = null)
    {
        if (!is_null($condition) && is_null($value)) {
            $value = $condition;
            $condition = '=';
        }

        if (count($this->_conditions) < 1) {
            array_push($this->_conditions, []);
        }
        return $this->makeWhere($key, $condition, $value);
    }
346622
public function mergeConditions( ConditionInterface $old, ConditionInterface $new ) {
		if ( $old instanceof UrlCondition && $new instanceof UrlCondition ) {
			return $old->concatenate( $new->getUrl(), $new->getUrlWhere() );
		}

		return $this->makeFromArrayOfConditions( [$old, $new] );
	}
1131189
public static function writeCondition($content, $condition = null, $global = false)
    {
        if (empty($condition)) {
            return $content;
        }
        return '<!--[' . $condition . ']>'
            . ($global ? '<!-->' : '')
            . ' ' . $content . ' '
            . ($global ? '<!--' : '')
            . '<![endif]-->';
    }
1073638
public Choice<T> condition(final Predicate<? super T> predicate) {
    checkNotNull(predicate);
    final Choice<T> thisChoice = this;
    return new Choice<T>() {
      @Override
      protected Iterator<T> iterator() {
        return Iterators.filter(thisChoice.iterator(), predicate);
      }

      @Override
      public String toString() {
        return String.format("%s.condition(%s)", thisChoice, predicate);
      }
    };
  }
348756
protected function buildConditionFromRequest()
    {
        $request = $this->getRequest();
        $post = $request->request->getIterator();
        $serviceId = $request->request->get('categoryCondition');
        $operators = [];
        $values = [];
        foreach ($post as $key => $input) {
            if (isset($input['operator']) && isset($input['value'])) {
                $operators[$key] = $input['operator'];
                $values[$key] = $input['value'];
            }
        }

        /** @var ConditionFactory $conditionFactory */
        $conditionFactory = $this->container->get('thelia.condition.factory');
        $conditionToSave = $conditionFactory->build($serviceId, $operators, $values);

        return $conditionToSave;
    }
675837
public static long checkPostconditionL(
    final long value,
    final ContractLongConditionType condition)
    throws PostconditionViolationException
  {
    return checkPostconditionL(
      value, condition.predicate(), condition.describer());
  }
283231
static function isConditionTrue( $conditionName, $messageType )
    {
        $ini = eZINI::instance( 'debug.ini' );

        if ( $ini->variable( 'DebugSettings', 'ConditionDebug' ) != 'enabled' )
            return false;

        $generalSetting = 'GeneralCondition';
        if ( $ini->hasVariable( $generalSetting, $conditionName ) )
            return $ini->variable( $generalSetting, $conditionName ) == 'enabled';

        $specificSetting = eZDebug::instance()->messageName( $messageType ) . 'Condition';
        if ( $ini->hasVariable( $specificSetting, $conditionName ) )
            return $ini->variable( $specificSetting, $conditionName ) == 'enabled';
    }
1130902
protected function buildDefaultConditionNode(Form $form, ConditionNodeInterface $root, $parentName = '')
    {
        foreach ($form->all() as $child) {
            $formType = $child->getConfig()->getType()->getInnerType();

            $name = ('' !== $parentName) ? $parentName.'.'.$child->getName() : $child->getName();

            if ($child->getConfig()->hasAttribute('add_shared') || $formType instanceof EmbeddedFilterTypeInterface) {
                $isCollection = ($formType instanceof CollectionAdapterFilterType);

                $this->buildDefaultConditionNode(
                    $isCollection ? $child->get(0) : $child,
                    $root->andX(),
                    $name
                );
            } else {
                $root->field($name);
            }
        }
    }
461996
public function validateConditionUpdateStruct(Condition $condition, ConditionUpdateStruct $conditionUpdateStruct): void
    {
        $conditionType = $condition->getConditionType();

        $this->validate(
            $conditionUpdateStruct->value,
            $conditionType->getConstraints(),
            'value'
        );
    }
89890
public function filter(Condition $condition = null, int &$limit = null, int &$offset = null)
    {
        $offset = (int)$offset;

        if ($condition) {
            $limit = $condition->getLimit();
            $offset = (int)$condition->getOffset();
            $conditions = $condition->getConditions();
            return function (array $item) use ($conditions) {
                foreach ($conditions as $cond) {
                    if (!\is_array($cond)) {
                        continue;
                    }

                    $cond = \array_values($cond);
                    $type = \array_shift($cond);
                    $value = $item[$cond[0]] ?? null;
                    switch ($type) {
                        case Condition::EQUALS:
                            if (\is_array($value)) {
                                if (!\in_array($cond[1], $value, false)) {
                                    return false;
                                }
                            } else {
                                /** @noinspection TypeUnsafeComparisonInspection */
                                if ($value != $cond[1]) {
                                    return false;
                                }
                            }
                            break;
                        case Condition::NOT_EQUALS:
                            /** @noinspection TypeUnsafeComparisonInspection */
                            if ($value == $cond[1]) {
                                return false;
                            }
                            break;
                        case Condition::LESS_THAN:
                            if ($value >= $cond[1]) {
                                return false;
                            }
                            break;
                        case Condition::GREATER_THAN:
                            if ($value <= $cond[1]) {
                                return false;
                            }
                            break;
                        case Condition::LESS_OR_EQUALS:
                            if ($value > $cond[1]) {
                                return false;
                            }
                            break;
                        case Condition::GREATER_OR_EQUALS:
                            if ($value < $cond[1]) {
                                return false;
                            }
                            break;
                        case Condition::BETWEEN:
                            if ($value < $cond[1] || $value > $cond[2]) {
                                return false;
                            }
                            break;
                        case Condition::LIKE:
                            if (!\mb_strstr($value, $cond[1])) {
                                return false;
                            }
                            break;
                        case Condition::IN:
                            if (!\in_array($value, $cond[1], false)) {
                                return false;
                            }
                            break;
                    }
                }

                return true;
            };
        }

        return null;
    }