PHPackages                             avirdz/laravel-git-sniffer - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. avirdz/laravel-git-sniffer

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

avirdz/laravel-git-sniffer
==========================

An artisan command to check your code standards via pre-commit git hook.

v1.4.0(6y ago)542.0k9[2 issues](https://github.com/avirdz/laravel-git-sniffer/issues)[3 PRs](https://github.com/avirdz/laravel-git-sniffer/pulls)MITPHPPHP &gt;=5.5.9

Since May 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/avirdz/laravel-git-sniffer)[ Packagist](https://packagist.org/packages/avirdz/laravel-git-sniffer)[ RSS](/packages/avirdz-laravel-git-sniffer/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (9)Dependencies (2)Versions (13)Used By (0)

laravel-git-sniffer
===================

[](#laravel-git-sniffer)

An artisan command to check your code standards via pre-commit git hook

### Install with composer

[](#install-with-composer)

```
composer require avirdz/laravel-git-sniffer
```

#### Add the provider to app config (You don't need to do this if using Laravel &gt;= 5.5)

[](#add-the-provider-to-app-config-you-dont-need-to-do-this-if-using-laravel--55)

```
Avirdz\LaravelGitSniffer\GitSnifferServiceProvider
```

#### Use artisan to publish the config

[](#use-artisan-to-publish-the-config)

```
php artisan vendor:publish --provider="Avirdz\LaravelGitSniffer\GitSnifferServiceProvider" --tag=config
```

#### Run artisan command to copy the pre-commit hook

[](#run-artisan-command-to-copy-the-pre-commit-hook)

```
php artisan git-sniffer:copy
```

If you are working with other developers and you prefer each time that someone makes a clone and runs composer install, the hook is automatically copied, just add the copy command to the composer scripts, anyways it runs only on the defined environment, which by default is local.

```
"post-install-cmd": [
    "...laravel commands..."
    "php artisan git-sniffer:copy"
],
```

### Config

[](#config)

KeyValueDescriptionenv(string) default: localThe environment where the commands will be executed.phpcs\_bin(string) default: ./vendor/bin/phpcsbin for Php\_CodeSniffer, installed as a dependency.standard(string) default: PSR2Code standardencoding(string) default: utf-8The encoding of your source filesextensions(array) default: phpValid php file extensions to checkphpcs\_ignore(array) default: ./resources/views/\*Blade templates are ignored by defaulttemp(string) default: .tmp\_stagingA temp directory where staged files will be copiedeslint\_bin(string)bin for ESLinteslint\_config(string)Path to the eslintrc config fileeslint\_extensions(array) default: jsValid js file extensions to checkeslint\_ignore\_path(string)Path to the .eslintignore file.Note: Eslint ignores all hidden files and directories by default, since there is a temp staging folder and by default is hidden, you need to add it to the eslintignore files at the first line.

```
!.tmp_staging
otherfile.js
```

If you leave eslint\_bin config empty it will be ignored, the same for phpcs\_bin, but you need to configure at least one of them.

### Resources

[](#resources)

I'ts the same script just translated to php to work with laravel command.

- Bash script:

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~154 days

Recently: every ~202 days

Total

9

Last Release

2454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b02070867e5cb8f8353674eac837eb1e660fabae921a1ea86f6b641dc5e5359?d=identicon)[avirdz](/maintainers/avirdz)

---

Top Contributors

[![farnsworthMars](https://avatars.githubusercontent.com/u/1650516?v=4)](https://github.com/farnsworthMars "farnsworthMars (2 commits)")[![tonychuuy](https://avatars.githubusercontent.com/u/418694?v=4)](https://github.com/tonychuuy "tonychuuy (2 commits)")[![berloatb](https://avatars.githubusercontent.com/u/4874499?v=4)](https://github.com/berloatb "berloatb (1 commits)")[![Sealtyel](https://avatars.githubusercontent.com/u/5265872?v=4)](https://github.com/Sealtyel "Sealtyel (1 commits)")

---

Tags

laravellaravel-5-packagephpcslaravelcodesniffergitHOOKpre-commit

### Embed Badge

![Health badge](/badges/avirdz-laravel-git-sniffer/health.svg)

```
[![Health](https://phpackages.com/badges/avirdz-laravel-git-sniffer/health.svg)](https://phpackages.com/packages/avirdz-laravel-git-sniffer)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.7k](/packages/larastan-larastan)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

601170.6M2.2k](/packages/dealerdirect-phpcodesniffer-composer-installer)[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k130.4M2.1k](/packages/slevomat-coding-standard)[moodlehq/moodle-cs

Moodle Coding Sniffer rules

263.0M5](/packages/moodlehq-moodle-cs)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

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