Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64053
Change subject: SomeProperty->getDescription to ->getSubDescription
......................................................................
SomeProperty->getDescription to ->getSubDescription
Change-Id: Ibe653c97f7913c4e91c20f7352da809b3b3905ae
---
M Tests/Phpunit/Language/Description/SomePropertyTest.php
M includes/Ask/Language/Description/SomeProperty.php
2 files changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask
refs/changes/53/64053/1
diff --git a/Tests/Phpunit/Language/Description/SomePropertyTest.php
b/Tests/Phpunit/Language/Description/SomePropertyTest.php
index d084c89..ca8e638 100644
--- a/Tests/Phpunit/Language/Description/SomePropertyTest.php
+++ b/Tests/Phpunit/Language/Description/SomePropertyTest.php
@@ -58,7 +58,7 @@
* @param SomeProperty $description
*/
public function testGetDescription( SomeProperty $description ) {
- $subDescription = $description->getDescription();
+ $subDescription = $description->getSubDescription();
$this->assertInstanceOf(
'Ask\Language\Description\Description', $subDescription );
@@ -66,7 +66,7 @@
$this->assertEquals(
$subDescription,
- $newInstance->getDescription(),
+ $newInstance->getSubDescription(),
'Description is returned as it was passed to the
constructor'
);
}
@@ -83,7 +83,7 @@
$this->assertInstanceOf( '\DataValues\PropertyValue', $property
);
- $newInstance = new SomeProperty( $property,
$description->getDescription() );
+ $newInstance = new SomeProperty( $property,
$description->getSubDescription() );
$this->assertEquals(
$property,
@@ -104,7 +104,7 @@
$this->assertInternalType( 'boolean', $isSubProperty );
- $newInstance = new SomeProperty( $description->getProperty(),
$description->getDescription(), $isSubProperty );
+ $newInstance = new SomeProperty( $description->getProperty(),
$description->getSubDescription(), $isSubProperty );
$this->assertEquals(
$isSubProperty,
diff --git a/includes/Ask/Language/Description/SomeProperty.php
b/includes/Ask/Language/Description/SomeProperty.php
index 88c5166..dd27193 100644
--- a/includes/Ask/Language/Description/SomeProperty.php
+++ b/includes/Ask/Language/Description/SomeProperty.php
@@ -56,7 +56,7 @@
*
* @var Description
*/
- private $description;
+ private $subDescription;
/**
* If the property is a sub property or not.
@@ -87,14 +87,14 @@
* @since 0.1
*
* @param PropertyValue $property
- * @param Description $description
+ * @param Description $subDescription
* @param boolean $isSubProperty
*
* @throws InvalidArgumentException
*/
- public function __construct( PropertyValue $property, Description
$description, $isSubProperty = false ) {
+ public function __construct( PropertyValue $property, Description
$subDescription, $isSubProperty = false ) {
$this->property = $property;
- $this->description = $description;
+ $this->subDescription = $subDescription;
if ( !is_bool( $isSubProperty ) ) {
throw new InvalidArgumentException( '$isSubProperty
must be of type boolean' );
@@ -110,8 +110,8 @@
*
* @return Description
*/
- public function getDescription() {
- return $this->description;
+ public function getSubDescription() {
+ return $this->subDescription;
}
/**
@@ -144,7 +144,7 @@
* @return integer
*/
public function getSize() {
- return $this->description->getSize() + 1;
+ return $this->subDescription->getSize() + 1;
}
/**
@@ -155,7 +155,7 @@
* @return integer
*/
public function getDepth() {
- return $this->description->getDepth() + 1;
+ return $this->subDescription->getDepth() + 1;
}
/**
@@ -179,7 +179,7 @@
public function getArrayValue() {
return array(
'property' => $this->property->toArray(),
- 'description' => $this->description->toArray(),
+ 'description' => $this->subDescription->toArray(),
'issubproperty' => $this->isSubProperty
);
}
@@ -197,7 +197,7 @@
return $mixed instanceof SomeProperty
&& $this->isSubProperty === $mixed->isSubProperty()
&& $this->property->equals( $mixed->getProperty() )
- && $this->description->equals( $mixed->getDescription()
);
+ && $this->subDescription->equals(
$mixed->getSubDescription() );
}
/**
@@ -212,7 +212,7 @@
$this->hash = sha1(
$this->getType() .
$this->property->getHash() .
- $this->description->getHash() .
+ $this->subDescription->getHash() .
$this->isSubProperty
);
}
--
To view, visit https://gerrit.wikimedia.org/r/64053
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe653c97f7913c4e91c20f7352da809b3b3905ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits