HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/magento.bikenow.co/vendor/friendsofphp/php-cs-fixer/doc/custom_rules.rst
=====================
Creating custom rules
=====================

If you need to enforce some specific code style rules, you can implement your
own fixers.

For each rule you want to add, create a class that implements
`PhpCsFixer\\Fixer\\FixerInterface <./src/Fixer/FixerInterface.php>`_.
Note that there is a specific constraint
regarding custom rules names: they must match the pattern
``/^[A-Z][a-zA-Z0-9]*\/[a-z][a-z0-9_]*$/``.

Then register your custom fixers and enable them in the config file:

.. code-block:: php
    <?php
    // ...
    return (new PhpCsFixer\Config())
        // ...
        ->registerCustomFixers([
            new CustomerFixer1(),
            new CustomerFixer2(),
        ])
        ->setRules([
            // ...
            'YourVendorName/custome_rule' => true,
            'YourVendorName/custome_rule_2' => true,
        ])
    ;
There are several interfaces that your fixers can also implement if needed:

* `PhpCsFixer\\Fixer\\DefinedFixerInterface <./src/Fixer/DefinedFixerInterface.php>`_: allows to describe what the fixer does in details;
* `PhpCsFixer\\Fixer\\WhitespacesAwareFixerInterface <./src/Fixer/WhitespacesAwareFixerInterface.php>`_: for fixers that need to know the configured indentation and line endings;
* `PhpCsFixer\\Fixer\\ConfigurableFixerInterface <./src/Fixer/ConfigurableFixerInterface.php>`_: to create a configurable fixer;
* `PhpCsFixer\\Fixer\\DeprecatedFixerInterface <./src/Fixer/DeprecatedFixerInterface.php>`_: to deprecate a fixer.