PHPackages                             scotteuser/twigcs-fractal - 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. scotteuser/twigcs-fractal

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scotteuser/twigcs-fractal
=========================

Checkstyle automation for Fractal Twig

02.6kPHP

Since Mar 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/scotteuser/twigcs-fractal)[ Packagist](https://packagist.org/packages/scotteuser/twigcs-fractal)[ RSS](/packages/scotteuser-twigcs-fractal/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Twigcs Fractal
==============

[](#twigcs-fractal)

This extends the excellent [Twigcs](https://github.com/friendsoftwig/twigcs) to provide a ruleset for the [Fractal Render component](https://fractal.build/guide/components/including-sub-components.html#providing-context-data-to-sub-components).

Installation
============

[](#installation)

This is available as a package on packagist:

```
composer require scotteuser/twigcs-fractal

```

What does this do?
==================

[](#what-does-this-do)

Consider the following Fractal code:

```
{% set card_label = 'Hello' %}
{% render "@card" with {
  label: card_label
} %}
```

Twigcs by default will consider `card_label` as an unused variable because it does not know of Fractal's `render` tag.

How do you use it?
==================

[](#how-do-you-use-it)

Add a file `.twig_cs.dist` to your project root and change your project to use this ruleset.

```
