Skip to content

Commit 72facce

Browse files
committed
"wikibase/wikibase-codesniffer": "~1.0.0"
This also brings the required php version to 7.1+
1 parent 98f2026 commit 72facce

51 files changed

Lines changed: 106 additions & 112 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.phpcs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<rule ref="Squiz.Strings.DoubleQuoteUsage">
1919
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" />
2020
</rule>
21+
<rule ref="PSR2.Classes.ClassDeclaration.InterfaceWrongIndent">
22+
<exclude name="PSR2.Classes.ClassDeclaration.InterfaceWrongIndent" />
23+
</rule>
2124

2225
<file>.</file>
2326
</ruleset>

RELEASE-NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Version 9.3.0 (development)
44

5-
* Raised minimum PHP version to 7.0 (^7.0)
5+
* Raised minimum PHP version to 7.1
66

77
## Version 9.2.0 (2020-01-24)
88

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
"irc": "irc://irc.freenode.net/wikidata"
2828
},
2929
"require": {
30-
"php": "^7.0",
30+
"php": "^7.1",
3131
"data-values/data-values": "~0.1|~1.0|~2.0",
3232
"wikimedia/assert": "~0.2.2|~0.3.0|~0.4.0"
3333
},
3434
"require-dev": {
3535
"ockcyp/covers-validator": "~0.5.0",
3636
"phpmd/phpmd": "~2.6",
3737
"phpunit/phpunit": "~5.7",
38-
"wikibase/wikibase-codesniffer": "^0.5.0"
38+
"wikibase/wikibase-codesniffer": "~1.0.0"
3939
},
4040
"autoload": {
4141
"psr-4": {
@@ -65,6 +65,7 @@
6565
"phpcs -p -s",
6666
"phpmd src/ text phpmd.xml"
6767
],
68+
"fix": "phpcbf",
6869
"ci": [
6970
"@cs",
7071
"@test"

src/Entity/EntityId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class EntityId implements Comparable, Serializable {
3030
*/
3131
protected $localPart;
3232

33-
const PATTERN = '/^:?(\w+:)*[^:]+\z/';
33+
public const PATTERN = '/^:?(\w+:)*[^:]+\z/';
3434

3535
/**
3636
* @since 6.2

src/Entity/Int32EntityId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
interface Int32EntityId {
2323

24-
const MAX = 2147483647;
24+
public const MAX = 2147483647;
2525

2626
/**
2727
* @since 6.1

src/Entity/Item.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@
2626
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
2727
* @author Bene* < benestar.wikimedia@gmail.com >
2828
*/
29-
class Item implements StatementListProvidingEntity, FingerprintProvider, StatementListHolder,
30-
LabelsProvider, DescriptionsProvider, AliasesProvider, ClearableEntity {
31-
32-
const ENTITY_TYPE = 'item';
29+
class Item implements
30+
StatementListProvidingEntity,
31+
FingerprintProvider,
32+
StatementListHolder,
33+
LabelsProvider,
34+
DescriptionsProvider,
35+
AliasesProvider,
36+
ClearableEntity
37+
{
38+
39+
public const ENTITY_TYPE = 'item';
3340

3441
/**
3542
* @var ItemId|null

src/Entity/ItemId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ItemId extends EntityId implements Int32EntityId {
1414
/**
1515
* @since 0.5
1616
*/
17-
const PATTERN = '/^Q[1-9]\d{0,9}\z/i';
17+
public const PATTERN = '/^Q[1-9]\d{0,9}\z/i';
1818

1919
/**
2020
* @param string $idSerialization

src/Entity/Property.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@
2323
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
2424
* @author Bene* < benestar.wikimedia@gmail.com >
2525
*/
26-
class Property implements StatementListProvidingEntity, FingerprintProvider, StatementListHolder,
27-
LabelsProvider, DescriptionsProvider, AliasesProvider, ClearableEntity {
28-
29-
const ENTITY_TYPE = 'property';
26+
class Property implements
27+
StatementListProvidingEntity,
28+
FingerprintProvider,
29+
StatementListHolder,
30+
LabelsProvider,
31+
DescriptionsProvider,
32+
AliasesProvider,
33+
ClearableEntity
34+
{
35+
36+
public const ENTITY_TYPE = 'property';
3037

3138
/**
3239
* @var PropertyId|null
@@ -58,8 +65,8 @@ class Property implements StatementListProvidingEntity, FingerprintProvider, Sta
5865
* @param StatementList|null $statements Since 1.1
5966
*/
6067
public function __construct(
61-
PropertyId $id = null,
62-
Fingerprint $fingerprint = null,
68+
?PropertyId $id,
69+
?Fingerprint $fingerprint,
6370
$dataTypeId,
6471
StatementList $statements = null
6572
) {

src/Entity/PropertyId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class PropertyId extends EntityId implements Int32EntityId {
1414
/**
1515
* @since 0.5
1616
*/
17-
const PATTERN = '/^P[1-9]\d{0,9}\z/i';
17+
public const PATTERN = '/^P[1-9]\d{0,9}\z/i';
1818

1919
/**
2020
* @param string $idSerialization

src/Snak/SnakRole.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*/
1313
class SnakRole {
1414

15-
const MAIN_SNAK = 0;
16-
const QUALIFIER = 1;
15+
public const MAIN_SNAK = 0;
16+
public const QUALIFIER = 1;
1717

1818
private function __construct() {
1919
}

0 commit comments

Comments
 (0)