Apply stricter house style where possible

This commit is contained in:
J. King 2020-04-17 11:50:17 -04:00
parent 85f06186f2
commit befd1feb3a
13 changed files with 157 additions and 107 deletions

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
* Copyright 2018 J. King et al.
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace MensBeam\UTF8;
const BASE = __DIR__.DIRECTORY_SEPARATOR;
@ -19,11 +20,63 @@ $paths = [
BASE."tools",
];
$rules = [
// house rules where PSR series is silent
'align_multiline_comment' => ['comment_type' => "phpdocs_only"],
'array_syntax' => ['syntax' => "short"],
'binary_operator_spaces' => [
//'default' => "single_space",
//'operators' => ['=>' => "align_single_space"],
],
'cast_spaces' => ['space' => "single"],
'concat_space' => ['spacing' => "none"],
//'list_syntax' => ['syntax' => "short"],
'magic_constant_casing' => true,
'magic_method_casing' => true,
'modernize_types_casting' => true,
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'no_binary_string' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_extra_blank_lines' => true, // this could probably use more configuration
'no_mixed_echo_print' => ['use' => "echo"],
'no_short_bool_cast' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'pow_to_exponentiation' => true,
'set_type_to_cast' => true,
'standardize_not_equals' => true,
'trailing_comma_in_multiline_array' => true,
'unary_operator_spaces' => true,
'yoda_style' => false,
// PSR standard to apply
'@PSR2' => true,
'declare_strict_types' => true,
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
'function_declaration' => ['closure_function_spacing' => "none"],
];
// PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively
'compact_nullable_typehint' => true,
'declare_equal_normalize' => ['space' => "none"],
'function_typehint_space' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'no_alternative_syntax' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'return_type_declaration' => ['space_before' => "none"],
'single_trait_insert_per_statement' => true,
'short_scalar_cast' => true,
//'visibility_required' => ['elements' => ["const", "property", "method"]],
// house exceptions to PSR rules
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
'function_declaration' => ['closure_function_spacing' => "none"],
'new_with_braces' => false, // no option to specify absence of braces
];
$finder = \PhpCsFixer\Finder::create();
foreach ($paths as $path) {
@ -33,4 +86,4 @@ foreach ($paths as $path) {
$finder = $finder->in($path);
}
}
return \PhpCsFixer\Config::create()->setRules($rules)->setFinder($finder);
return \PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules($rules)->setFinder($finder);

View file

@ -25,7 +25,7 @@ class RoboFile extends \Robo\Tasks {
* ./robo test --testsuite TTRSS --exclude-group slow --testdox
*
* Please see the PHPUnit documentation for available options.
*/
*/
public function test(array $args): Result {
return $this->runTests(escapeshellarg(\PHP_BINARY), "typical", $args);
}
@ -34,7 +34,7 @@ class RoboFile extends \Robo\Tasks {
*
* This includes pedantic tests which may help to identify problems.
* See help for the "test" task for more details.
*/
*/
public function testFull(array $args): Result {
return $this->runTests(escapeshellarg(\PHP_BINARY), "full", $args);
}
@ -43,7 +43,7 @@ class RoboFile extends \Robo\Tasks {
* Runs a quick subset of the test suite
*
* See help for the "test" task for more details.
*/
*/
public function testQuick(array $args): Result {
return $this->runTests(escapeshellarg(\PHP_BINARY), "quick", $args);
}
@ -57,7 +57,7 @@ class RoboFile extends \Robo\Tasks {
* Robo first tries to use phpdbg and will fall back to Xdebug if available.
* Because Xdebug slows down non-coverage tasks, however, phpdbg is highly
* recommended if debugging facilities are not otherwise needed.
*/
*/
public function coverage(array $args): Result {
// run tests with code coverage reporting enabled
$exec = $this->findCoverageEngine();
@ -72,7 +72,7 @@ class RoboFile extends \Robo\Tasks {
* run all tests which may cover code.
*
* See also help for the "coverage" task for more details.
*/
*/
public function coverageFull(array $args): Result {
// run tests with code coverage reporting enabled
$exec = $this->findCoverageEngine();
@ -93,7 +93,7 @@ class RoboFile extends \Robo\Tasks {
*
* The performance of the library's basic functionality is tested against
* the IntlCodePointBreakIterator class
*/
*/
public function perf(array $args): Result {
$execpath = realpath(norm(BASE."perf/perf.php"));
return $this->taskExec("php")->arg($execpath)->args($args)->run();
@ -114,7 +114,7 @@ class RoboFile extends \Robo\Tasks {
}
}
protected function runTests(string $executor, string $set, array $args) : Result {
protected function runTests(string $executor, string $set, array $args): Result {
switch ($set) {
case "typical":
$set = ["--exclude-group", "optional"];

View file

@ -22,7 +22,6 @@ class Big5 implements StatelessEncoding {
protected $bufferedCode = 0;
public function nextCode() {
$this->posChar++;
if ($this->bufferedCode > 0) {

View file

@ -47,7 +47,7 @@ interface Encoding {
/** Advance $distance characters through the string
*
* If the end (or beginning) of the string was reached before the end of the operation, the remaining number of requested characters is returned
*
*
* @param int $distance The number of characters to advance. If negative, the operation will seek back toward the beginning of the string
*/
public function seek(int $distance): int;
@ -55,17 +55,17 @@ interface Encoding {
/** Seeks to the start of the string
*
* This is usually faster than using the seek method for the same purpose
*/
*/
public function rewind();
/** Retrieves the next $num characters (in UTF-8 encoding) from the string without advancing the character pointer
*
*
* @param int $num The number of characters to retrieve
*/
public function peekChar(int $num = 1): string;
/** Retrieves the next $num code points from the string, without advancing the character pointer
*
*
* @param int $num The number of code points to retrieve
*/
public function peekCode(int $num = 1): array;
@ -76,7 +76,7 @@ interface Encoding {
/** Calculates the length of the string in code points
*
* Note that this may involve processing to the end of the string
*/
*/
public function lenChar(): int;
/** Returns whether the character pointer is at the end of the string */

View file

@ -87,7 +87,7 @@ class XUserDefined implements Encoding {
/** Calculates the length of the string in code points
*
* Note that this may involve processing to the end of the string
*/
*/
public function lenChar(): int {
return $this->lenByte;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -84,7 +84,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
/**
* @dataProvider provideCodePoints
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::encode
*/
*/
public function testEncodeCodePoints(bool $fatal, $input, $exp, string $class = SingleByteEncoding::class) {
$out = "";
foreach ($input as $code) {
@ -97,7 +97,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::__construct
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::nextCode
*/
*/
public function testDecodeMultipleCharactersAsCodePoints(string $input, array $exp, string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testDecodeMultipleCharactersAsCodePoints($input, $exp);
@ -107,7 +107,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::__construct
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::nextChar
*/
*/
public function testDecodeMultipleCharactersAsStrings(string $input, array $exp, string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testDecodeMultipleCharactersAsStrings($input, $exp);
@ -116,7 +116,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
/**
* @dataProvider provideStrings
* @coversNothing
*/
*/
public function testSTepBackThroughAString(string $input, array $exp, string $class = SingleByteEncoding::class) {
// this test has no meaning for single-byte encodings
$this->testedClass = $class;
@ -129,7 +129,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::posChar
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::posByte
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::rewind
*/
*/
public function testSeekThroughAString(string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testSeekThroughAString();
@ -140,7 +140,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::posChar
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::posByte
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::eof
*/
*/
public function testTraversePastTheEndOfAString(string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testTraversePastTheEndOfAString();
@ -153,7 +153,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::posByte
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::stateSave
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::stateApply
*/
*/
public function testPeekAtCharacters(string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testPeekAtCharacters();
@ -166,7 +166,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::posByte
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::stateSave
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::stateApply
*/
*/
public function testPeekAtCodePoints(string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testPeekAtCodePoints();
@ -178,7 +178,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::lenByte
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::stateSave
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::stateApply
*/
*/
public function testGetStringLength(string $input, array $points, string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testGetStringLength($input, $points);
@ -187,7 +187,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
/**
* @dataProvider provideBrokenStrings
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::err
*/
*/
public function testReplacementModes(string $input = "", string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
$this->brokenChar = $input;
@ -199,7 +199,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::rewind
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::chars
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::codes
*/
*/
public function testIterateThroughAString(string $input, array $exp, string $class = SingleByteEncoding::class) {
$this->testedClass = $class;
return parent::testIterateThroughAString($input, $exp);
@ -208,7 +208,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
/**
* @dataProvider provideStrings
* @coversNothing
*/
*/
public function testIterateThroughAStringAllowingSurrogates(string $input, array $exp, $class = null) {
$this->testedClass = $class;
return parent::testIterateThroughAStringAllowingSurrogates($input, $exp, $exp);
@ -287,7 +287,7 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest {
* @dataProvider provideInvalids
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::encode
* @covers MensBeam\Intl\Encoding\SingleByteEncoding::err
*/
*/
public function testEncodeInvalidCodePoints(string $class, bool $mode, int $input, $exp) {
if ($exp instanceof \Throwable) {
$this->expectException(get_class($exp));

View file

@ -31,7 +31,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF16::__construct
* @covers MensBeam\Intl\Encoding\UTF16::nextCode
*/
*/
public function testDecodeMultipleCharactersAsCodePoints(string $input, array $exp) {
return parent::testDecodeMultipleCharactersAsCodePoints($input, $exp);
}
@ -40,7 +40,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF16::__construct
* @covers MensBeam\Intl\Encoding\UTF16::nextChar
*/
*/
public function testDecodeMultipleCharactersAsStrings(string $input, array $exp) {
return parent::testDecodeMultipleCharactersAsStrings($input, $exp);
}
@ -48,7 +48,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
/**
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF16::seekBack
*/
*/
public function testSTepBackThroughAString(string $input, array $exp) {
return parent::testSTepBackThroughAString($input, $exp);
}
@ -58,7 +58,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\UTF16::posChar
* @covers MensBeam\Intl\Encoding\UTF16::posByte
* @covers MensBeam\Intl\Encoding\UTF16::rewind
*/
*/
public function testSeekThroughAString() {
return parent::testSeekThroughAString();
}
@ -67,7 +67,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\UTF16::posChar
* @covers MensBeam\Intl\Encoding\UTF16::posByte
* @covers MensBeam\Intl\Encoding\UTF16::eof
*/
*/
public function testTraversePastTheEndOfAString() {
return parent::testTraversePastTheEndOfAString();
}
@ -76,7 +76,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\UTF16::peekChar
* @covers MensBeam\Intl\Encoding\UTF16::stateSave
* @covers MensBeam\Intl\Encoding\UTF16::stateApply
*/
*/
public function testPeekAtCharacters() {
return parent::testPeekAtCharacters();
}
@ -85,7 +85,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\UTF16::peekCode
* @covers MensBeam\Intl\Encoding\UTF16::stateSave
* @covers MensBeam\Intl\Encoding\UTF16::stateApply
*/
*/
public function testPeekAtCodePoints() {
return parent::testPeekAtCodePoints();
}
@ -96,14 +96,14 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\UTF16::lenByte
* @covers MensBeam\Intl\Encoding\UTF16::stateSave
* @covers MensBeam\Intl\Encoding\UTF16::stateApply
*/
*/
public function testGetStringLength(string $input, array $points) {
return parent::testGetStringLength($input, $points);
}
/**
* @covers MensBeam\Intl\Encoding\UTF16::err
*/
*/
public function testReplacementModes() {
return parent::testReplacementModes();
}
@ -113,7 +113,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\UTF16::rewind
* @covers MensBeam\Intl\Encoding\UTF16::chars
* @covers MensBeam\Intl\Encoding\UTF16::codes
*/
*/
public function testIterateThroughAString(string $input, array $exp) {
return parent::testIterateThroughAString($input, $exp);
}
@ -121,7 +121,7 @@ class TestUTF16LE extends \MensBeam\Intl\Test\DecoderTest {
/**
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF16::nextCode
*/
*/
public function testIterateThroughAStringAllowingSurrogates(string $input, array $strictExp, array $relaxedExp = null) {
return parent::testIterateThroughAStringAllowingSurrogates($input, $strictExp, $relaxedExp);
}

View file

@ -32,7 +32,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @dataProvider provideCodePoints
* @covers MensBeam\Intl\Encoding\UTF8::encode
* @covers MensBeam\Intl\Encoding\UTF8::err
*/
*/
public function testEncodeCodePoints(bool $fatal, $input, $exp) {
return parent::testEncodeCodePoints($fatal, $input, $exp);
}
@ -41,7 +41,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF8::__construct
* @covers MensBeam\Intl\Encoding\UTF8::nextCode
*/
*/
public function testDecodeMultipleCharactersAsCodePoints(string $input, array $exp) {
return parent::testDecodeMultipleCharactersAsCodePoints($input, $exp);
}
@ -50,7 +50,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF8::__construct
* @covers MensBeam\Intl\Encoding\UTF8::nextChar
*/
*/
public function testDecodeMultipleCharactersAsStrings(string $input, array $exp) {
return parent::testDecodeMultipleCharactersAsStrings($input, $exp);
}
@ -58,7 +58,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
/**
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF8::seekBack
*/
*/
public function testSTepBackThroughAString(string $input, array $exp) {
return parent::testSTepBackThroughAString($input, $exp);
}
@ -68,7 +68,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\UTF8::posChar
* @covers MensBeam\Intl\Encoding\UTF8::posByte
* @covers MensBeam\Intl\Encoding\UTF8::rewind
*/
*/
public function testSeekThroughAString() {
return parent::testSeekThroughAString();
}
@ -77,7 +77,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\UTF8::posChar
* @covers MensBeam\Intl\Encoding\UTF8::posByte
* @covers MensBeam\Intl\Encoding\UTF8::eof
*/
*/
public function testTraversePastTheEndOfAString() {
return parent::testTraversePastTheEndOfAString();
}
@ -86,7 +86,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\UTF8::peekChar
* @covers MensBeam\Intl\Encoding\UTF8::stateSave
* @covers MensBeam\Intl\Encoding\UTF8::stateApply
*/
*/
public function testPeekAtCharacters() {
return parent::testPeekAtCharacters();
}
@ -95,7 +95,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\UTF8::peekCode
* @covers MensBeam\Intl\Encoding\UTF8::stateSave
* @covers MensBeam\Intl\Encoding\UTF8::stateApply
*/
*/
public function testPeekAtCodePoints() {
return parent::testPeekAtCodePoints();
}
@ -106,14 +106,14 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\UTF8::lenByte
* @covers MensBeam\Intl\Encoding\UTF8::stateSave
* @covers MensBeam\Intl\Encoding\UTF8::stateApply
*/
*/
public function testGetStringLength(string $input, array $points) {
return parent::testGetStringLength($input, $points);
}
/**
* @covers MensBeam\Intl\Encoding\UTF8::err
*/
*/
public function testReplacementModes() {
return parent::testReplacementModes();
}
@ -123,7 +123,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
* @covers MensBeam\Intl\Encoding\UTF8::rewind
* @covers MensBeam\Intl\Encoding\UTF8::chars
* @covers MensBeam\Intl\Encoding\UTF8::codes
*/
*/
public function testIterateThroughAString(string $input, array $exp) {
return parent::testIterateThroughAString($input, $exp);
}
@ -131,7 +131,7 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest {
/**
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\UTF8::nextCode
*/
*/
public function testIterateThroughAStringAllowingSurrogates(string $input, array $strictExp, array $relaxedExp = null) {
return parent::testIterateThroughAStringAllowingSurrogates($input, $strictExp, $relaxedExp);
}

View file

@ -21,7 +21,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\XUserDefined::__construct
* @covers MensBeam\Intl\Encoding\XUserDefined::nextCode
*/
*/
public function testDecodeMultipleCharactersAsCodePoints(string $input, array $exp) {
return parent::testDecodeMultipleCharactersAsCodePoints($input, $exp);
}
@ -30,7 +30,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @dataProvider provideStrings
* @covers MensBeam\Intl\Encoding\XUserDefined::__construct
* @covers MensBeam\Intl\Encoding\XUserDefined::nextChar
*/
*/
public function testDecodeMultipleCharactersAsStrings(string $input, array $exp) {
return parent::testDecodeMultipleCharactersAsStrings($input, $exp);
}
@ -38,7 +38,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
/**
* @dataProvider provideStrings
* @coversNothing
*/
*/
public function testSTepBackThroughAString(string $input, array $exp) {
// this test has no meaning for x-user-defined
return parent::testSTepBackThroughAString($input, $exp);
@ -49,7 +49,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\XUserDefined::posChar
* @covers MensBeam\Intl\Encoding\XUserDefined::posByte
* @covers MensBeam\Intl\Encoding\XUserDefined::rewind
*/
*/
public function testSeekThroughAString() {
return parent::testSeekThroughAString();
}
@ -58,7 +58,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\XUserDefined::posChar
* @covers MensBeam\Intl\Encoding\XUserDefined::posByte
* @covers MensBeam\Intl\Encoding\XUserDefined::eof
*/
*/
public function testTraversePastTheEndOfAString() {
return parent::testTraversePastTheEndOfAString();
}
@ -67,7 +67,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\XUserDefined::peekChar
* @covers MensBeam\Intl\Encoding\XUserDefined::stateSave
* @covers MensBeam\Intl\Encoding\XUserDefined::stateApply
*/
*/
public function testPeekAtCharacters() {
return parent::testPeekAtCharacters();
}
@ -76,7 +76,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\XUserDefined::peekCode
* @covers MensBeam\Intl\Encoding\XUserDefined::stateSave
* @covers MensBeam\Intl\Encoding\XUserDefined::stateApply
*/
*/
public function testPeekAtCodePoints() {
return parent::testPeekAtCodePoints();
}
@ -87,14 +87,14 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\XUserDefined::lenByte
* @covers MensBeam\Intl\Encoding\XUserDefined::stateSave
* @covers MensBeam\Intl\Encoding\XUserDefined::stateApply
*/
*/
public function testGetStringLength(string $input, array $points) {
return parent::testGetStringLength($input, $points);
}
/**
* @covers MensBeam\Intl\Encoding\XUserDefined::err
*/
*/
public function testReplacementModes() {
return parent::testReplacementModes();
}
@ -104,7 +104,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
* @covers MensBeam\Intl\Encoding\XUserDefined::rewind
* @covers MensBeam\Intl\Encoding\XUserDefined::chars
* @covers MensBeam\Intl\Encoding\XUserDefined::codes
*/
*/
public function testIterateThroughAString(string $input, array $exp) {
return parent::testIterateThroughAString($input, $exp);
}
@ -112,7 +112,7 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest {
/**
* @dataProvider provideStrings
* @coversNothing
*/
*/
public function testIterateThroughAStringAllowingSurrogates(string $input, array $strictExp, array $relaxedExp = null) {
return parent::testIterateThroughAStringAllowingSurrogates($input, $strictExp, $relaxedExp);
}

View file

@ -6,8 +6,6 @@
declare(strict_types=1);
namespace MensBeam\Intl\Test;
use MensBeam\Intl\Encoding\EncoderException;
abstract class CoderDecoderTest extends DecoderTest {
public function testEncodeCodePoints(bool $fatal, $input, $exp) {
$class = $this->testedClass;