---
title: "analyse/operators/non-numeric-modulo"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="analyse/operators/non-numeric-modulo" />

In the [`analyse-strict`](/docs/rules/presets/analyse-strict) preset and every stricter one. Report only. Upstream gates: `strictRules.numericOperandsInArithmeticOperators`.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"operators/non-numeric-modulo" = "on"
```

To skip it in some files or lines, add an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`OperandsInArithmeticModuloRule`](https://github.com/phpstan/phpstan-strict-rules#readme) (phpstan-classes)
- [`mod.leftNonNumeric`](https://phpstan.org/error-identifiers/mod.leftNonNumeric) (phpstan-strict-rules)
- [`mod.rightNonNumeric`](https://phpstan.org/error-identifiers/mod.rightNonNumeric) (phpstan-strict-rules)

[More analyse/operators rules](/docs/rules/analyse/operators) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
