Skip to content

Commit

Permalink
Merge pull request #1 from borilyordanov/add-newline-at-end-of-arccon…
Browse files Browse the repository at this point in the history
…fig-and-arclint

Add a newline at the end of `.arc{config,lint}`
  • Loading branch information
vbartusevicius authored Feb 13, 2019
2 parents 04542e7 + 0056a76 commit 48e723d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 1.3.3
### Fixed
- Add a newline at the end of `.arcconfig` and `.arclint` files.

## 1.3.2

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions composer/ArcConfigParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function parseArcConfig(Event $event)

file_put_contents(
self::CONFIG_FILE,
stripslashes(json_encode($parsedConfig, JSON_PRETTY_PRINT))
json_encode($parsedConfig, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL
);
}

Expand Down Expand Up @@ -94,7 +94,10 @@ private static function createOrUpdateArcLint($parsedConfig)
$arcLint['linters']['php-cs-fixer']['unified_diff_format'] = $parsedConfig['lint.php_cs_fixer.unified_diff_format'];
}

file_put_contents(self::LINT_FILE, stripslashes(json_encode($arcLint, JSON_PRETTY_PRINT)));
file_put_contents(
self::LINT_FILE,
json_encode($arcLint, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL
);
}

private static function cleanArcConfig($parsedConfig)
Expand Down

0 comments on commit 48e723d

Please sign in to comment.