Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49381


Change subject: DO NOT MERGE
......................................................................

DO NOT MERGE

Change-Id: Icf9295a700cb32f98877f1755cd752ad9bcbc434
---
M includes/Ask/Language/Description/SomeProperty.php
1 file changed, 32 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/81/49381/1

diff --git a/includes/Ask/Language/Description/SomeProperty.php 
b/includes/Ask/Language/Description/SomeProperty.php
index eff5f10..b906234 100644
--- a/includes/Ask/Language/Description/SomeProperty.php
+++ b/includes/Ask/Language/Description/SomeProperty.php
@@ -1,7 +1,9 @@
 <?php
 
 namespace Ask\Language\Description;
+
 use DataValues\PropertyValue;
+use InvalidArgumentException;
 
 /**
  * Description of a set of instances that have an attribute with some value
@@ -53,16 +55,32 @@
        protected $description;
 
        /**
+        * @since 0.1
+        *
+        * @var boolean
+        */
+       protected $isSubProperty;
+
+       /**
         * Constructor.
         *
         * @since 0.1
         *
         * @param PropertyValue $property
         * @param Description $description
+        * @param boolean $isSubProperty
+        *
+        * @throws InvalidArgumentException
         */
-       public function __construct( PropertyValue $property, Description 
$description ) {
+       public function __construct( PropertyValue $property, Description 
$description, $isSubProperty ) {
                $this->property = $property;
                $this->description = $description;
+
+               if ( !is_bool( $isSubProperty ) ) {
+                       throw new InvalidArgumentException( '$isSubProperty 
must be of type boolean' );
+               }
+
+               $this->isSubProperty = $isSubProperty;
        }
 
        /**
@@ -88,6 +106,19 @@
        }
 
        /**
+        * Returns if the property is a sub property.
+        *
+        *
+        *
+        * @since 0.1
+        *
+        * @return boolean
+        */
+       public function isSubProperty() {
+               return $this->isSubProperty;
+       }
+
+       /**
         * {@inheritdoc}
         *
         * @since 0.1

-- 
To view, visit https://gerrit.wikimedia.org/r/49381
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf9295a700cb32f98877f1755cd752ad9bcbc434
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

Reply via email to