---
title: "lint/types/prefer-literal-bool-phpdoc"
pagination: false
---

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

<RuleId id="lint/types/prefer-literal-bool-phpdoc" />

In the [`types`](/docs/rules/sets/types) set. Unsafe fix: it can change behaviour. **Planned: not in Pun yet.** Enabling it is a config error.

## What it does

Narrow @return docblock "bool" to "false" or "true" when the native return type only allows one of them

## Replaces

- [`NarrowBoolDocblockReturnType`](https://getrector.com/rule-detail/narrow-bool-docblock-return-type-rector) (rector)

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