1. Go to this page and download the library: Download henry-wiki/sc-indent-fix 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/ */
henry-wiki / sc-indent-fix example snippets
$fixer = new \henry_wiki\sc_indent_fix\sc_indent_fix();
$result = $fixer->process($code);
// Before
function render($items) {
$output[] = "<div>";
foreach ($items as $item) {
$output[] = "<p>" . $item . "</p>";
}
$output[] = "</div>";
return implode("\n", $output);
}
// After
function render($items) {
$output[] = "<div>";
foreach ($items as $item) {
$output[] = "<p>" . $item . "</p>";
}
$output[] = "</div>";
return implode("\n", $output);
}
// Before
$sql = "SELECT
p.ProductId
FROM products p
WHERE p.Active = 1
AND p.Deleted = 0";
// After
$sql = "SELECT
p.ProductId
FROM products p
WHERE p.Active = 1
AND p.Deleted = 0";
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.