PHPackages                             project-nos/spryker-twig-code-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. [Templating &amp; Views](/categories/templating)
4. /
5. project-nos/spryker-twig-code-sniffer

ActiveLibrary[Templating &amp; Views](/categories/templating)

project-nos/spryker-twig-code-sniffer
=====================================

This package aims to be for twig templates in spryker what phpcs is to php. It checks your codebase for violations on coding standards.

v1.1.1(2y ago)1030.3k↓16.3%3[1 issues](https://github.com/project-nos/spryker-twig-code-sniffer/issues)MITPHPPHP &gt;=8.1

Since Dec 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/project-nos/spryker-twig-code-sniffer)[ Packagist](https://packagist.org/packages/project-nos/spryker-twig-code-sniffer)[ RSS](/packages/project-nos-spryker-twig-code-sniffer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

[![NOS spryker twig code sniffer](.github/banner.svg)](.github/banner.svg)

[![mit license](https://camo.githubusercontent.com/1d243e7a587ba5dbd61fbba84a8c8576d33765152bdca39674171162864eae8a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70726f6a6563742d6e6f732f737072796b65722d747769672d63733f7374796c653d666c61742d737175617265)](https://github.com/project-nos/spryker-twig-cs/blob/master/LICENSE)[![github workflow tests](https://camo.githubusercontent.com/41c26a7df0c48c28735c1868868988ac41b28c14d7789a1afb065de01b550619/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70726f6a6563742d6e6f732f737072796b65722d747769672d63732f74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/project-nos/spryker-twig-cs/actions/workflows/tests.yml)[![packagist version](https://camo.githubusercontent.com/e903d76979878738b8b836477f6f9ac2ae5c950db020ef8c02b126ed51cbf58c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f6a6563742d6e6f732f737072796b65722d747769672d636f64652d736e6966666572)](https://packagist.org/packages/project-nos/spryker-twig-code-sniffer)

*This package aims to be for twig templates in spryker what [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) is to php. It checks your codebase for violations on coding standards.*

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

[](#installation)

```
composer require --dev project-nos/spryker-twig-code-sniffer

```

Setup
-----

[](#setup)

To use the provided console commands you will need to register the namespace `Nos` in `config/Shared/config_default.php`.

```
$config[KernelConstants::CORE_NAMESPACES] = [
    // add 'Nos' as a core namespace
    'Nos',
];
```

In `src/Pyz/Yves/Console/ConsoleDependencyProvider.php` you need to register the console command plugin for deploy tasks.

```
use Nos\Yves\TwigCodeSniffer\Plugin\Console\TwigCodeSnifferConsole;

    protected function getConsoleCommands(Container $container): array
    {
        $commands = [
            // other registered console plugins ...
            new TwigCodeSnifferConsole(),
        ];
```

Then you should see a new command in the `code` section:

```
code
   ...
   code:sniff:twig  Sniff and fix twig code style
   ...

```

### Definition

[](#definition)

```
Description:
  Sniff and fix twig code style

Usage:
  code:sniff:twig [options] [--] [...]

Arguments:
  paths                 Paths of files and folders to parse

Options:
      --level=LEVEL     Allowed values are notice, warning or error [default: "NOTICE"]
      --report=REPORT   Report format [default: "text"]
      --fix             Automatically fix all the fixable violations
      --no-cache        Disable cache while running the fixer

```

### Coding Standard

[](#coding-standard)

This package attempts to mimic the [official coding standard](https://twig.symfony.com/doc/3.x/coding_standards.html) with the following exceptions:

- One (and only one) space before and after the | (pipe) operator.

License
-------

[](#license)

Copyright (c) [Andreas Penz](https://github.com/andreaspenz). Licensed under the [MIT License](https://github.com/project-nos/spryker-twig-cs/blob/master/LICENSE).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community9

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

Every ~7 days

Recently: every ~17 days

Total

10

Last Release

826d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a10aaf9aae9d97ccb561f13fb424d5178860fe8a01c5e2161f319ac20d3c7c04?d=identicon)[AndreasPenz](/maintainers/AndreasPenz)

---

Top Contributors

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

---

Tags

standardsstatic analysistwigspryker

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/project-nos-spryker-twig-code-sniffer/health.svg)

```
[![Health](https://phpackages.com/badges/project-nos-spryker-twig-code-sniffer/health.svg)](https://phpackages.com/packages/project-nos-spryker-twig-code-sniffer)
```

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91492.0M315](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36763.2M221](/packages/twig-intl-extra)[twig/string-extra

A Twig extension for Symfony String

22046.0M133](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22918.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21914.8M162](/packages/symfony-ux-twig-component)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)

PHPackages © 2026

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