jenkins-bot has submitted this change and it was merged.

Change subject: Remove result object which was no longer loaded anyway
......................................................................


Remove result object which was no longer loaded anyway

Change-Id: I033044ff3269b59131047cd94d2aa0ef1182edaa
---
D ValueFormatters/includes/Result.php
1 file changed, 0 insertions(+), 101 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ValueFormatters/includes/Result.php 
b/ValueFormatters/includes/Result.php
deleted file mode 100644
index 91991f5..0000000
--- a/ValueFormatters/includes/Result.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-namespace ValueFormatters;
-
-use Exception;
-use Immutable;
-
-/**
- * Interface for value parser results.
- * Immutable.
- *
- * @since 0.1
- * @deprecated
- *
- * @file
- * @ingroup ValueFormatters
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroended...@gmail.com >
- */
-class Result implements Immutable {
-
-       /**
-        * Indicates if the parsing process was successful.
-        *
-        * @since 0.1
-        *
-        * @var boolean
-        */
-       protected $isValid;
-
-       /**
-        * A DataValue instance representing the parsed value,
-        * or null if the parsing process failed.
-        *
-        * @since 0.1
-        *
-        * @var mixed
-        */
-       protected $value;
-
-       /**
-        * @since 0.1
-        *
-        * @param mixed $value
-        *
-        * @return Result
-        */
-       public static function newSuccess( $value ) {
-               return new static( true, $value );
-       }
-
-       /**
-        * @since 0.1
-        *
-        * @param boolean $isValid
-        * @param mixed $value
-        */
-       protected function __construct( $isValid, $value = null ) {
-               $this->isValid = $isValid;
-               $this->value = $value;
-       }
-
-       /**
-        * Returns the formatted value.
-        * If the formatting process failed, this method will throw an
-        * exception when called. You can check for failure using
-        * the @see isValid method first.
-        *
-        * @since 0.1
-        *
-        * @return mixed
-        * @throws Exception
-        */
-       public function getValue() {
-               if ( $this->isValid() ) {
-                       return $this->value;
-               }
-               else {
-                       throw new Exception( 'Cannot obtain the formatted value 
as the formatting process failed' );
-               }
-       }
-
-       /**
-        * Returns if the formatting was successful.
-        * If it was, you can obtain the resulting value via @see getValue
-        *
-        * @since 0.1
-        *
-        * @return boolean
-        */
-       public function isValid() {
-               return $this->isValid;
-       }
-
-}
-
-/**
- * @deprecated
- */
-class ResultObject extends Result {}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I033044ff3269b59131047cd94d2aa0ef1182edaa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to