---
title: "analyse/laravel/unexpected-dispatch-arguments"
pagination: false
---

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

<RuleId id="analyse/laravel/unexpected-dispatch-arguments" />

In the [`analyse-essential`](/docs/rules/presets/analyse-essential) preset and every stricter one. Report only. Runs when laravel is installed.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"laravel/unexpected-dispatch-arguments" = "on"
```

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

## Replaces

- [`CheckDispatchArgumentTypesCompatibleWithClassConstructorRule`](https://github.com/larastan/larastan/blob/v3.14.0/docs/rules.md#checkdispatchargumenttypescompatiblewithclassconstructorrule) (phpstan-classes)
- [`larastan.events.noConstructor`](https://github.com/larastan/larastan/blob/v3.14.0/docs/rules.md) (larastan)
- [`larastan.jobs.noConstructor`](https://github.com/larastan/larastan/blob/v3.14.0/docs/rules.md) (larastan)

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