Commit 960d7693 authored by Fredy Nurman Saleh's avatar Fredy Nurman Saleh

enabling tidyOutput by default

parent a564d03c
......@@ -119,9 +119,9 @@ class Generator extends \yii\gii\generators\crud\Generator
public $overwriteSearchModelClass = false;
/**
* @var array whether to use phptidy on renderer files before saving
* @var bool whether to use phptidy on renderer files before saving
*/
public $tidyOutput;
public $tidyOutput = true;
/**
* @var string form field for selecting and loading saved gii forms
......@@ -393,7 +393,7 @@ class Generator extends \yii\gii\generators\crud\Generator
$tmpFile = $tmpDir.'/'.md5($template);
file_put_contents($tmpFile, $code);
shell_exec('vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phptidy replace '.$tmpFile);
shell_exec('..'.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phptidy replace '.$tmpFile);
return file_get_contents($tmpFile);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment