Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackCompat\Helper: add getEncoding()helper method #118

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Mar 25, 2020

BackCompat\Helper: add getEncoding()helper method

... to retrieve the file encoding a project supposedly uses. No check is done to see if the encoding set is actually correct for the files presented to PHPCS.

In PHPCS, the encoding can be set via --config-set or --encoding from the command-line or via a custom ruleset like <arg name="encoding" value="utf-8"/>.

The default encoding encoding used by PHPCS changed between PHPCS 2.x (iso-8859-1) and 3.x utf-8.

Using the utf-8 file encoding is strongly advised for all PHP projects.

Includes minimal unit tests.

Orthography::isLastCharPunctuation(): implement use of the Helper::getEncoding() method

... to retrieve the file encoding a project supposedly uses. No check is done to see if the `encoding` set is actually correct for the files presented to PHPCS.

In PHPCS, the `encoding` can be set via `--config-set` or `--encoding` from the command-line or via a custom ruleset like `<arg name="encoding" value="utf-8"/>`.

The default encoding encoding used by PHPCS changed between PHPCS 2.x (`iso-8859-1`) and 3.x `utf-8`.

Using the `utf-8` file encoding is strongly advised for all PHP projects.

Includes minimal unit tests.
@jrfnl jrfnl added this to the 1.0.0 milestone Mar 25, 2020
@jrfnl jrfnl merged commit 9676824 into develop Mar 25, 2020
@jrfnl jrfnl deleted the feature/helper-new-getencoding-method branch March 25, 2020 19:20
@jrfnl jrfnl modified the milestones: 1.0.0, 1.0.0-alpha3 May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant