Skip to content

Commit 0bbce79

Browse files
committed
Style fixes
1 parent 28f307e commit 0bbce79

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

ci/phan.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env php
22
<?php
3+
34
declare(strict_types=1);
45
require realpath(dirname(__FILE__)).'/../vendor/autoload.php';
56
use Expensify\Bedrock\CI\PhanAnalyzer;
67

78
$analyzer = new PhanAnalyzer($_SERVER['GITHUB_REF']);
89
if ($analyzer->analyze()) {
910
exit(0);
10-
} else {
11-
exit(1);
1211
}
12+
exit(1);

ci/src/PHPStyler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function check()
3939
$PHPLintCommand = "find . -name '*.php' -not \\( -path './externalLib/*' -or -path './vendor/*' -or -path './build/*' \\) -print0 | xargs -0 -L 1 -n 1 -P 8 php -l 1>/dev/null";
4040

4141
if ($this->branch === 'main') {
42-
Travis::foldCall("lintmaster.php", $PHPLintCommand);
42+
Travis::foldCall('lintmaster.php', $PHPLintCommand);
4343

4444
echo 'Skipping style check for merge commits';
4545

@@ -48,9 +48,9 @@ public function check()
4848

4949
$this->checkoutBranch($this->branch);
5050

51-
Travis::foldCall("lint.php", $PHPLintCommand);
51+
Travis::foldCall('lint.php', $PHPLintCommand);
5252

53-
Travis::fold("start", "style.php");
53+
Travis::fold('start', 'style.php');
5454
Travis::timeStart();
5555
echo 'Enforce PHP style'.PHP_EOL;
5656
$output = $this->getModifiedFiles($this->branch);
@@ -83,13 +83,13 @@ public function check()
8383
}
8484

8585
Travis::timeFinish();
86-
Travis::fold("end", "style.php");
86+
Travis::fold('end', 'style.php');
8787

8888
if (!$lintOK) {
8989
return false;
9090
}
9191

92-
Travis::foldCall("git.checkout2", "git checkout {$this->commit} 2>&1");
92+
Travis::foldCall('git.checkout2', "git checkout {$this->commit} 2>&1");
9393

9494
return true;
9595
}

ci/src/PhanAnalyzer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public function analyze()
3535

3636
$this->checkoutBranch($this->branch);
3737

38-
Travis::fold("start", "phan.analyze");
38+
Travis::fold('start', 'phan.analyze');
3939
Travis::timeStart();
4040
echo 'Analyze PHP using Phan'.PHP_EOL;
4141
$changedFiles = $this->eexec("git diff main...{$this->branch} --name-status | egrep \"^[A|M].*\\.php$\" | cut -f 2");
42-
echo "Analyzing files:".PHP_EOL;
43-
$lintErrors = $this->eexec("./vendor/bin/phan -p -z --processes 5", false);
42+
echo 'Analyzing files:'.PHP_EOL;
43+
$lintErrors = $this->eexec('./vendor/bin/phan -p -z --processes 5', false);
4444
$lintOK = true;
4545
foreach ($lintErrors as $lintError) {
4646
foreach ($changedFiles as $file) {
@@ -52,7 +52,7 @@ public function analyze()
5252
}
5353
}
5454
Travis::timeFinish();
55-
Travis::fold("end", "phan.analyze");
55+
Travis::fold('end', 'phan.analyze');
5656

5757
return $lintOK;
5858
}

0 commit comments

Comments
 (0)