Skip to content

Commit 2bed9ff

Browse files
committed
Merge pull request #22 from DataValues/release021
Release 0.2.1
2 parents 50091c9 + 252a198 commit 2bed9ff

File tree

6 files changed

+19
-9
lines changed

6 files changed

+19
-9
lines changed

Interfaces.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
return 1;
1616
}
1717

18-
define( 'DATAVALUES_INTERFACES_VERSION', '0.2.0' );
18+
define( 'DATAVALUES_INTERFACES_VERSION', '0.2.1' );
1919

2020
if ( defined( 'MEDIAWIKI' ) ) {
2121
$GLOBALS['wgExtensionCredits']['datavalues'][] = array(

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ as [Wikimedia Germany](https://wikimedia.de) employee for the [Wikidata project]
5656

5757
## Release notes
5858

59+
### 0.2.1 (2016-01-13)
60+
61+
* Fixed an issue when using this component with HHVM 1.11.0 (see #21).
62+
5963
### 0.2.0 (2015-08-11)
6064

6165
* Dropped deprecated `ErrorObject`, use `Error` instead

src/ValueFormatters/ValueFormatter.php

-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace ValueFormatters;
44

55
/**
6-
* Interface for value formatters.
7-
*
86
* @since 0.1
97
*
108
* @licence GNU GPL v2+
@@ -19,8 +17,6 @@ interface ValueFormatter {
1917
const OPT_LANG = 'lang';
2018

2119
/**
22-
* Formats a value.
23-
*
2420
* @since 0.1
2521
*
2622
* @param mixed $value The value to format

src/ValueParsers/ParseException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class ParseException extends RuntimeException {
2424

2525
/**
2626
* @param string $message A plain english message describing the error
27-
* @param string $rawValue The raw value that failed to be parsed
28-
* @param string $expectedFormat An identifier for the format the raw value
27+
* @param string|null $rawValue The raw value that failed to be parsed.
28+
* @param string|null $expectedFormat An identifier for the format the raw value
2929
* did not match
3030
*
3131
* @since 0.1.4

src/ValueValidators/ValueValidatorObject.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,12 @@ protected function addErrors( array $errors ) {
162162
* @param string|null $property
163163
* @param array $optionMap
164164
*/
165-
protected function runSubValidator( $value, ValueValidator $validator, $property = null, array $optionMap = array() ) {
165+
protected function runSubValidator(
166+
$value,
167+
ValueValidator $validator,
168+
$property = null,
169+
array $optionMap = array()
170+
) {
166171
if ( $optionMap !== array() ) {
167172
$options = array();
168173

tests/ValueFormatters/ValueFormatterTestBase.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ protected abstract function getInstance( FormatterOptions $options = null );
4646
* @param FormatterOptions|null $options
4747
* @param ValueFormatter|null $formatter
4848
*/
49-
public function testValidFormat( $value, $expected, FormatterOptions $options = null, ValueFormatter $formatter = null ) {
49+
public function testValidFormat(
50+
$value,
51+
$expected,
52+
FormatterOptions $options = null,
53+
ValueFormatter $formatter = null
54+
) {
5055
if ( $formatter === null ) {
5156
$formatter = $this->getInstance( $options );
5257
}

0 commit comments

Comments
 (0)