idiosyncratic/editorconfig
PHP implementation of EditorConfig. Load .editorconfig rules via Composer and query settings for a given file path. Returns matching declarations as an array or prints the resolved config, making it easy to enforce consistent coding style across projects.
PHP implementation of EditorConfig
Install with Composer:
composer require idiosyncratic/editorconfig
<?php
require_once('vendor/autoload.php');
use Idiosyncratic\EditorConfig\EditorConfig;
$ec = new EditorConfig();
// $config will be an array of the declarations matching for the specified path
$config = $ec->getConfigForPath(__FILE__);
// Print matching configuration rules as string
print $ec->printConfigForPath(__FILE__) . PHP_EOL;
How can I help you explore Laravel packages today?