作者 lackoxygen

style:fix

@@ -528,6 +528,21 @@ FACADE; @@ -528,6 +528,21 @@ FACADE;
528 ); 528 );
529 } 529 }
530 530
  531 + protected function fixStyle()
  532 + {
  533 + global $app_path;
  534 +
  535 + $cs = $app_path . '/vendor/bin/php-cs-fixer';
  536 +
  537 + if (!file_exists($cs)) {
  538 + return;
  539 + }
  540 +
  541 + $directory = $app_path . '/src';
  542 +
  543 + `{$cs} fix --quiet {$directory} --rules=@PSR12 > /dev/null`;
  544 + }
  545 +
531 public function __destruct() 546 public function __destruct()
532 { 547 {
533 $this->codeSpace->write(); 548 $this->codeSpace->write();
@@ -536,6 +551,8 @@ FACADE; @@ -536,6 +551,8 @@ FACADE;
536 551
537 $this->createFacade($metas); 552 $this->createFacade($metas);
538 553
  554 + $this->fixStyle();
  555 +
539 println('success!'); 556 println('success!');
540 } 557 }
541 } 558 }