PHP code example of xwillq / git-stage-editor
1. Go to this page and download the library: Download xwillq/git-stage-editor 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/ */
xwillq / git-stage-editor example snippets
$editor = new \Xwillq\GitStageEditor\GitStagedFileEditor($git_root);
$editor->execute(function ($file, string $file_path) {
exec("php vendor/bin/php-cs-fixer fix $file_path");
});