Asserts that the given condition is strictly true.

@param mixed $condition The condition to assert that must be strictly true.
@param Throwable $exception The exception to throw if the assertion fails.
@return bool
437689
public static function assertTrue($condition, Throwable $exception): bool
    {
        static::makeAssertion(true === $condition, $exception);
        return true;
    }
715350
public function strict($condition) {
      $query = $this->buildStrategyCondition($condition, Strict::create());
      return $this->process($query);
    }
332537
public static function assertIsNotObject($variable, Throwable $exception): bool
    {
        static::makeAssertion(!\is_object($variable), $exception);
        return true;
    }
736560
private function isCompatibleWithDingo(Exception $exception): bool
    {
        if (!config('api.dingo')) {
            return false;
        }


        if (method_exists($exception, 'getHttpStatusCode') && $exception->getHttpStatusCode() !== 404) {
            return false;
        }


        if (!method_exists($exception, 'getStatusCode')) {
            return false;
        }

        if ($exception->getStatusCode() !== 404) {
            return false;
        }

        if (app('request')->segment(1) === config('api.prefix')) {
            return true;
        }

        return false;
    }
232192
public function isTrue($condition, Blueprint $sourceBlueprint=null)
    {
        // resolve placeholders
        $condition = $this->valueResolver->resolvePlaceholders($condition, $sourceBlueprint, 'conditional_value', $condition);

        if ($condition == 'default') {
            return true;
        }
        if (strpos($condition, '==') !== false) {
            list($left, $right) = explode('==', $condition, 2);
            $left = trim($left);
            $right = trim($right);
            return ($left == $right);
        } elseif (strpos($condition, '!=') !== false) {
            list($left, $right) = explode('!=', $condition, 2);
            $left = trim($left);
            $right = trim($right);
            return ($left != $right);
        } elseif (strpos($condition, '~=') !== false) {
            list($subject, $pattern) = explode('~=', $condition, 2);
            $subject = trim($subject);
            $pattern = trim($pattern);
            return preg_match($pattern, $subject);
        }
        throw new \Exception('Invalid condition: ' . $condition);
    }
42358
public static function assertIsNotFloat($variable, Throwable $exception): bool
    {
        static::makeAssertion(!\is_float($variable), $exception);
        return true;
    }
1206785
public static function onException( $exception )
    {
        $_trace = $exception->getTrace();
        $_traceText = static::_cleanTrace( $_trace, 3 );

        if ( E_NOTICE == $exception->getCode() )
        {
            return false;
        }

        static::$_error = array(
            'code'       => $exception->getCode(),
            'type'       => '',
            'message'    => $exception->getMessage(),
            'file'       => $exception->getFile(),
            'line'       => $exception->getLine(),
            'trace'      => $_traceText,
            'traces'     => $exception->getTrace(),
            'source'     => static::_getCodeLines( $exception->getFile(), $exception->getLine(), static::$_sourceLines ),
            'start_line' => static::$_startLine,
        );

        Log::error( static::$_error['message'] . ' (' . static::$_error['code'] . ')' );

        return static::renderError();
    }
145540
public static function assertNotFalse($condition, Throwable $exception): bool
    {
        static::makeAssertion(false !== $condition, $exception);
        return true;
    }
1047572
public function assertIsNull($value, $message='Unexpected null value: %s', $exception='Asserts')
    {
        if (is_null($value)) {
            $value = 'NULL';
            $this->throwException($exception, $message, $value);
        }
    }
677843
protected function resolveConditionalLogic($condition)
    {
        $renderer = $this->getActionRenderer();
        if ($renderer && is_callable([ $renderer, $condition ])) {
            return !!$renderer->{$condition}();
        } elseif (is_callable([ $this, $condition ])) {
            return !!$this->{$condition}();
        } elseif (is_callable($condition)) {
            return !!$condition();
        } elseif ($renderer) {
            return !!$renderer->renderTemplate($condition);
        } elseif ($this->view()) {
            return !!$this->renderTemplate($condition);
        }

        return !!$condition;
    }
448325
public function isValid( &$exception = null )
    {
        $exception = null;
        // have we validated this before?
        if( $this->isValid === null ) {
            $this->decoded = @json_decode( $this->json, true );
            // have error?
            if( null === $this->decoded and JSON_ERROR_NONE !== $lastError = json_last_error() ) {
                // yep
                $this->isValid = new BadJsonException( $this->json, $lastError );
                $exception = $this->isValid;
            } else {
                // nope
                $this->isValid = true;
            }
        // is the isValid propety a exception
        } elseif ( $this->isValid !== true ) {
            $exception = $this->isValid;
        }

        return $this->isValid === true;
    }
365613
public static function assertEquals($actual, $expected, Throwable $exception)
    {
        static::makeAssertion($actual === $expected, $exception);
        return $actual;
    }
715622
protected function assertFalse($condition, $message = null)
    {
        $this->context->assertFalse($condition, $message);

        return $this;
    }
909768
public function assertIsEqual($value1, $value2, $message='%s and %s must be equal', $exception='Asserts')
    {
        if ($value1 !== $value2) {
            $this->throwException($exception, $message, array($value1, $value2));
        }
    }
54780
public function assertIsEmpty($value, $message='%s must not be empty', $exception='Asserts')
    {
        if (isset($value) === false || empty($value)) {
            $this->throwException($exception, $message, $value);
        }
    }
497702
public function isGoneAwayInUpdateException(\Exception $exception)
    {
        $message = $exception->getMessage();

        foreach ($this->goneAwayInUpdateExceptions as $goneAwayException) {
            if (stripos($message, $goneAwayException) !== false) {
                return true;
            }
        }

        return false;
    }
33595
public static function assertIsNotScalar($variable, Throwable $exception): bool
    {
        static::makeAssertion(!\is_scalar($variable), $exception);
        return true;
    }