# $pricingRule->checkRule()

> Checks if the pricing rule applies to the current context

- Source: `src/PricingRule.php#L70` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/src/PricingRule.php#L70>

```php
$pricingRule->checkRule(null|Kirby\Cms\App $kirby = null): bool
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$kirby` | `null\|Kirby\Cms\App` | `null` |

## Return type

`bool`

## Description

Kirby instance is passed to the rule function if it is a callable.
If no rule is set, true is returned.

## Parent class

`Wagnerwagner\Merx\PricingRule`
