Skip to content

Commit afdcc47

Browse files
committed
Merge branch 'master' of github.com:DivineOmega/php-hcl-parser
2 parents 8d53540 + 5bf513c commit afdcc47

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

src/HCLParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ public function parse()
2424
{
2525
return json_decode($this->getJSONString());
2626
}
27-
}
27+
}

src/Installer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static function installBinaries()
88
{
99
$binaryUrls = ['https://github.com/kvz/json2hcl/releases/download/v0.0.6/json2hcl_v0.0.6_linux_amd64'];
1010

11-
foreach($binaryUrls as $binaryUrl) {
11+
foreach ($binaryUrls as $binaryUrl) {
1212
$destination = __DIR__.'/../bin/'.basename($binaryUrl);
1313

1414
if (file_exists($destination)) {
@@ -19,4 +19,4 @@ public static function installBinaries()
1919
chmod($destination, 0755);
2020
}
2121
}
22-
}
22+
}

test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
}
7070
}
7171
72-
*/
72+
*/

tests/Unit/BasicUsageTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
use PHPUnit\Framework\TestCase;
43
use DivineOmega\HCLParser\HCLParser;
4+
use PHPUnit\Framework\TestCase;
55

66
class BasicUsageTest extends TestCase
77
{
@@ -14,5 +14,4 @@ public function testBasicParsing()
1414

1515
$this->assertEquals($expected, $configObject);
1616
}
17-
1817
}

tests/Unit/InstallerTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?php
22

3-
use PHPUnit\Framework\TestCase;
43
use DivineOmega\HCLParser\Installer;
4+
use PHPUnit\Framework\TestCase;
55

66
class InstallerTest extends TestCase
77
{
88
public function testBinariesInstallation()
99
{
10-
foreach(glob(__DIR__.'/../../bin/*') as $file) {
10+
foreach (glob(__DIR__.'/../../bin/*') as $file) {
1111
unlink($file);
1212
}
1313

1414
// Check binaries install after deletion
1515
Installer::installBinaries();
1616
$this->checkBinariesAreInstalled();
17-
17+
1818
// Check binaries remain installed if call is made a second time
1919
Installer::installBinaries();
2020
$this->checkBinariesAreInstalled();
@@ -24,15 +24,14 @@ private function checkBinariesAreInstalled()
2424
{
2525
$files = glob(__DIR__.'/../../bin/*');
2626

27-
array_walk($files, function(&$value) {
27+
array_walk($files, function (&$value) {
2828
$value = basename($value);
2929
});
3030

3131
$expectedFiles = ['json2hcl_v0.0.6_linux_amd64'];
3232

33-
foreach($expectedFiles as $expectedFile) {
33+
foreach ($expectedFiles as $expectedFile) {
3434
$this->assertContains($expectedFile, $files);
3535
}
3636
}
37-
3837
}

0 commit comments

Comments
 (0)