www.gusucode.com > Elgg PHP开源SNS系统 V1.12.5源码程序 > elgg-1.12.5/.scripts/fix_style.php

    <?php

if (php_sapi_name() !== "cli") {
	die('CLI only');
}

$root = dirname(__DIR__);
if (!is_writable($root)) {
	echo "$root is not writable.\n";
	exit(1);
}

require "$root/engine/classes/Elgg/Project/CodeStyle.php";

$style = new Elgg\Project\CodeStyle();

$report = $style->fixDirectory($root);
if (!$report) {
	exit;
}

$json_opts = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0;
echo json_encode($report, $json_opts) . "\n";