@@ -13,6 +13,6 @@ |
||
| 13 | 13 | public function build(&$parent = null) |
| 14 | 14 | { |
| 15 | 15 | // return substr(Scalar::replaceSequences(trim($this->raw)), 1,-1); |
| 16 | - return (new Scalar('', 0))->replaceSequences(substr(trim($this->raw), 1,-1)); |
|
| 16 | + return (new Scalar('', 0))->replaceSequences(substr(trim($this->raw), 1, -1)); |
|
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | \ No newline at end of file |
@@ -1,19 +1,19 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | define('PROJECT_ROOT', __DIR__."/../"); |
| 3 | 3 | |
| 4 | -require_once PROJECT_ROOT . 'vendor/autoload.php'; |
|
| 4 | +require_once PROJECT_ROOT.'vendor/autoload.php'; |
|
| 5 | 5 | |
| 6 | 6 | use Dallgoot\Yaml; |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | $testName = 'yamlObject_properties'; |
| 10 | -$yamlObject = (include PROJECT_ROOT . "tests/cases/dumping/$testName.php"); |
|
| 10 | +$yamlObject = (include PROJECT_ROOT."tests/cases/dumping/$testName.php"); |
|
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | $text = Yaml::dump($yamlObject, 0); |
| 14 | 14 | |
| 15 | 15 | |
| 16 | -$nameResultPair = get_object_vars(/** @scrutinizer ignore-type */ Yaml::parseFile(PROJECT_ROOT . 'tests/definitions/dumping_tests.yml')); |
|
| 16 | +$nameResultPair = get_object_vars(/** @scrutinizer ignore-type */ Yaml::parseFile(PROJECT_ROOT.'tests/definitions/dumping_tests.yml')); |
|
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | if ($nameResultPair[$testName] === $text) { |
@@ -7,9 +7,9 @@ |
||
| 7 | 7 | // USE CASE 3 |
| 8 | 8 | $yamlObjList = []; |
| 9 | 9 | $yloader = new Loader(null, 0, $debug); |
| 10 | -foreach(['examples/dummy.yml', 'examples/config.yml'] as $key => $fileName) |
|
| 10 | +foreach (['examples/dummy.yml', 'examples/config.yml'] as $key => $fileName) |
|
| 11 | 11 | { |
| 12 | - $yamlObjList[] = $yloader->load($fileName)->parse(); |
|
| 12 | + $yamlObjList[] = $yloader->load($fileName)->parse(); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | var_dump($yamlObjList); |