1. Go to this page and download the library: Download pmjones/php-styler library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pmjones / php-styler example snippets
use PhpStyler\Config;
use PhpStyler\Files;
use PhpStyler\Styler;
return new Config(
files: new Files(__DIR__ . '/src'),
styler: new Styler(),
cache: __DIR__ . '/.php-styler.cache',
);
use PhpStyler\Config;
use PhpStyler\Files;
use PhpStyler\Styler;
return new Config(
files: new Files(__DIR__ . '\\src'),
styler: new Styler(
eol: "\r\n",
lineLen: 120,
indentLen: 8,
indentTab: true,
),
);