---
title: "rector-laravel/laravel-legacy-factories-to-classes set"
pagination: false
---

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

rector-laravel's `laravel-legacy-factories-to-classes` set: the Pun lint rules its Rector rules map to, and nothing else.

```toml
[lint]
sets = ["rector-laravel/laravel-legacy-factories-to-classes"]
```

A rule merged from several Rector rules runs only the rewrites of this set's Rector rules, unless a [preset](/docs/configuration/presets#lint-presets) also turns it on. Rector rules that are format rules in Pun run under `[format]` instead. Laravel, Pest, and PHPUnit rules also need their [extension](/docs/configuration/pun-toml#extensions).

## Rules (3)

| Rule | Rector rules | Status |
| --- | --- | --- |
| [`lint/laravel-8/prefer-factory-classes`](/docs/rules/lint/laravel-8/prefer-factory-classes) | `FactoryDefinitionRector` | Ported |
| [`lint/laravel-8/prefer-factory-state-methods`](/docs/rules/lint/laravel-8/prefer-factory-state-methods) | `FactoryApplyingStatesRector` | Ported |
| [`lint/laravel-8/prefer-model-factory-method`](/docs/rules/lint/laravel-8/prefer-model-factory-method) | `FactoryFuncCallToStaticCallRector` | Ported |
