Browse Source

CS fix

labels
J. King 6 years ago
parent
commit
a441fc6a95
  1. 12
      RoboFile.php
  2. 2
      lib/UTF8.php

12
RoboFile.php

@ -70,6 +70,16 @@ class RoboFile extends \Robo\Tasks {
return $this->taskExec("php")->arg($execpath)->args($args)->run();
}
/** Runs the coding standards fixer */
public function clean($opts = ['demo|d' => false]): Result {
$t = $this->taskExec(realpath(self::BASE."vendor/bin/php-cs-fixer"));
$t->arg("fix");
if ($opts['demo']) {
$t->args("--dry-run", "--diff")->option("--diff-format", "udiff");
}
return $t->run();
}
protected function findCoverageEngine(): string {
$null = null;
$code = 0;
@ -97,6 +107,6 @@ class RoboFile extends \Robo\Tasks {
}
$execpath = realpath(self::BASE."vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit");
$confpath = realpath(self::BASE_TEST."phpunit.xml");
return $this->taskExec($executor)->arg($execpath)->option("-c", $confpath)->args(array_merge($set,$args))->run();
return $this->taskExec($executor)->arg($execpath)->option("-c", $confpath)->args(array_merge($set, $args))->run();
}
}

2
lib/UTF8.php

@ -202,7 +202,7 @@ abstract class UTF8 {
$upper = 0xBF;
while ($seen < $needed) {
$b = ord(@$string[$pos++]);
if(!$seen) {
if (!$seen) {
if ($b >= 0xC2 && $b <= 0xDF) { // two-byte character
$needed = 2;
$point = $b & 0x1F;

Loading…
Cancel
Save