PHPackages                             pavelpage/censorship - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. pavelpage/censorship

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

pavelpage/censorship
====================

This package can clean all non-normative lexis from your texts

1.0.0(8y ago)13.1kMITPHPPHP &gt;=5.6.0

Since Apr 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/pavelpage/censorship)[ Packagist](https://packagist.org/packages/pavelpage/censorship)[ RSS](/packages/pavelpage-censorship/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Censor
======

[](#censor)

This package could be used for cleaning obscene language from user messages.

Usage
-----

[](#usage)

### Installation

[](#installation)

Simply install it using composer command:

` composer require "pavelpage/censorship:dev-master"`

### Usage

[](#usage-1)

You have to options for using this package:

**Replace obscene words**

```
$censor = new Censor();
$text = "some text";

$censor->clean($text);// will replace obscene words in your text
```

**Check the text**

```
$censor = new Censor();
$text = "some text";

$censor->hasObsceneWords($text);
```

Configuration
-------------

[](#configuration)

You have a few abilities to add functionality if you think, that package doesn't solute your problems.

Here are some parameters which you can replace in the config file:

ParameterValuedefault\_obscene\_patternsdefault patterns which used to detect obscene wordsobscene\_patternsyou can add your own patterns to find obscene wordsreplace\_patternplace symbols which will replace obscene wordsobscene\_wordssimply write words which should be replacedexcept\_wordsalso, you can exclude some words from checking```
$censor = new Censor(['param_name' => []);// just send your custom configuration parameters to __construct method of controller
```

### Demo:

[](#demo)

You can visit this site [demo](https://demo.pavelpage.ru/censorship/) and check how it is working.

### Notice:

[](#notice)

Now package works only with russian language, feel free to add english patterns or use some patterns from the examples directory(english.php).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/259d18629b7e017944698c33761392ec5a4308dc7ab5cc06e9ae6d89c2c3d857?d=identicon)[pavelpage](/maintainers/pavelpage)

---

Top Contributors

[![pavelpage](https://avatars.githubusercontent.com/u/16864291?v=4)](https://github.com/pavelpage "pavelpage (4 commits)")

### Embed Badge

![Health badge](/badges/pavelpage-censorship/health.svg)

```
[![Health](https://phpackages.com/badges/pavelpage-censorship/health.svg)](https://phpackages.com/packages/pavelpage-censorship)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
