---
title: "analyse/operators/non-numeric-unary-plus"
pagination: false
---

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

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

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

## Configuration

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

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

## Replaces

- [`OperandInArithmeticUnaryPlusRule`](https://github.com/phpstan/phpstan-strict-rules#readme) (phpstan-classes)
- [`unaryPlus.nonNumeric`](https://phpstan.org/error-identifiers/unaryPlus.nonNumeric) (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)
