Ejemplo n.º 1
0
 /**
  * @param PhpExecutable $phpExecutable
  * @param string $fileToCheck Path to file to check
  * @param bool $aspTags
  * @param bool $shortTag
  */
 public function __construct(PhpExecutable $phpExecutable, $fileToCheck, $aspTags = false, $shortTag = false)
 {
     if (empty($fileToCheck)) {
         throw new \InvalidArgumentException("File to check must be set.");
     }
     $parameters = array('-d asp_tags=' . ($aspTags ? 'On' : 'Off'), '-d short_open_tag=' . ($shortTag ? 'On' : 'Off'), '-d error_reporting=E_ALL', '-n', '-l', escapeshellarg($fileToCheck));
     parent::__construct($phpExecutable, $parameters);
 }
 /**
  * @param PhpExecutable $phpExecutable
  * @param array $filesToCheck
  */
 public function __construct(PhpExecutable $phpExecutable, array $filesToCheck)
 {
     $parameters = array('-n ' . escapeshellarg(__DIR__ . '/../../bin/skip-linting.php'));
     parent::__construct($phpExecutable, $parameters, implode("\n", $filesToCheck));
 }