PHPackages                             tarekdj/nsfix - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tarekdj/nsfix

ActivePhpcodesniffer-standard[Utility &amp; Helpers](/categories/utility)

tarekdj/nsfix
=============

PHP\_CodeSniffer custom sniff that finds a set of namespaces and replace it by new ones.

v1.0.2(5y ago)1967MITPHP

Since Dec 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tarekdj/nsfix)[ Packagist](https://packagist.org/packages/tarekdj/nsfix)[ RSS](/packages/tarekdj-nsfix/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

nsfix [![Build Status](https://camo.githubusercontent.com/85b12b959c303b478edd6c61014e4eaef2d35c35206e87a0fe63c9a2969ee7d5/68747470733a2f2f7472617669732d63692e636f6d2f746172656b646a2f6e736669782e7376673f6272616e63683d6d61696e)](https://travis-ci.com/tarekdj/nsfix)
========================================================================================================================================================================================================================================================================

[](#nsfix-)

This is a phpcs sniff that finds a set of namespaces and replace it by new ones.

Installation
------------

[](#installation)

```
composer require tarekdj/nsfix --dev

```

Usage
-----

[](#usage)

Create a ruleset file with the following content (Don't forget to set old and new namespaces)

```

```

### Run phpcs

[](#run-phpcs)

```
./vendor/bin/phpcs --standard=PATH/TO/RULESET.xml PATH/TO/SRC

```

### Run phpcbf

[](#run-phpcbf)

```
./vendor/bin/phpcbf --standard=PATH/TO/RULESET.xml PATH/TO/SRC

```

### Result example

[](#result-example)

```
--- a/test/file.php
+++ b/test/file.php
@@ -1,14 +1,14 @@
