From 6beb7e35b14e279ed7ee71384e1fa6a0de083a17 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Sun, 20 Sep 2015 12:32:07 +0200 Subject: [PATCH] typos --- consistence-coding-standard.md | 2 +- readme.md | 6 +++--- tests/Sniffs/TestCase.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/consistence-coding-standard.md b/consistence-coding-standard.md index da26e6c..3a1bc4a 100644 --- a/consistence-coding-standard.md +++ b/consistence-coding-standard.md @@ -559,7 +559,7 @@ interface Exception extends \Consistence\Exception * Implemented as classes, class name describes the use-case and should be very specific. * Use-case exception implements "namespace exception" of the namespace where it is defined. * It may implement any other interfaces. -* Inheritance is used used for implementation purposes - such as `Consistence\PhpException`, where `$code` argument is skipped. +* Inheritance is used for implementation purposes - such as `Consistence\PhpException`, where `$code` argument is skipped. * Constructor requires only arguments, which are needed, the rest of the message is composed in the constructor. * All exceptions should support exceptions chaining (allow optional `\Exception` as last argument). * Arguments should be stored in private properties and available via public methods, so that exception handling may use this data. diff --git a/readme.md b/readme.md index d2619e4..32810ca 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ Consistence Coding Standard > **Complete standard is described in a [separate document](consistence-coding-standard.md)**. -This is a custom coding standard which is used by all Consistence projects. It is also suitable to be used with any other project or as a foundation for your own standard. +This is a custom coding standard, which is used by all Consistence projects. It is also suitable to be used with any other project or as a foundation for your own standard. The main objectives of this standard are: @@ -30,7 +30,7 @@ Coding Standard document should be considered the source of truth and main objec * `MINOR` version will be incremented if new sniffs are implemented to check for existing described rules. * `PATCH` version will be incremented for bug fixing - fixing a bug is considered everything which does not conform to the document - this may even lead to (temporarily) disabling an existing sniff - or part of it, until a better check is available or it is properly fixed. -None of the implementation of the automatic checks (both custom sniffs and the ruleset.xml file) are not subject to the SemVer and may change over time to accommodate changes in PHP_CodeSniffer and provided default sniffs, which are used also by this standard. +The implementation of the automatic checks (both custom sniffs and the ruleset.xml file) are not subject to the SemVer and may change over time to accommodate changes in PHP_CodeSniffer and provided default sniffs, which are used also by this standard. Recommended dependency on this package is on `MINOR` version (e.g. `~1.0.0`), which means effectively: * No new rules will be added. @@ -51,4 +51,4 @@ Then run `phpcs` with this standard: vendor/bin/phpcs --standard=vendor/consistence/coding-standard/Consistence/ruleset.xml --extensions=php --encoding=utf-8 -sp src ``` -For further usage options see the [PHP_CodeSniffer documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki). \ No newline at end of file +For further usage options see the [PHP_CodeSniffer documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki). diff --git a/tests/Sniffs/TestCase.php b/tests/Sniffs/TestCase.php index 01de68d..4c57bbd 100644 --- a/tests/Sniffs/TestCase.php +++ b/tests/Sniffs/TestCase.php @@ -9,7 +9,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { /** - * @param string $name + * @param string|null $name * @param mixed[] $data * @param string $dataName */ @@ -120,7 +120,7 @@ protected function assertSniffError(PHP_CodeSniffer_File $resultFile, $line, $co * @param string|null $message * @return boolean */ - private function hasError(array $errorsForLine, $code, $message = null) + private function hasError(array $errorsForLine, $code, $message) { foreach ($errorsForLine as $errorsForPosition) { foreach ($errorsForPosition as $error) {