Merge "HISTORY: Add MediaWiki 1.19 post-release change notes"
[lhc/web/wiklou.git] / includes / utils / MWRestrictions.php
index 617e8f5..d4f1a92 100644 (file)
@@ -26,7 +26,8 @@ class MWRestrictions {
        private $ipAddresses = [ '0.0.0.0/0', '::/0' ];
 
        /**
-        * @param array $restrictions
+        * @param array|null $restrictions
+        * @throws InvalidArgumentException
         */
        protected function __construct( array $restrictions = null ) {
                if ( $restrictions !== null ) {
@@ -44,6 +45,7 @@ class MWRestrictions {
        /**
         * @param array $restrictions
         * @return MWRestrictions
+        * @throws InvalidArgumentException
         */
        public static function newFromArray( array $restrictions ) {
                return new self( $restrictions );
@@ -52,6 +54,7 @@ class MWRestrictions {
        /**
         * @param string $json JSON representation of the restrictions
         * @return MWRestrictions
+        * @throws InvalidArgumentException
         */
        public static function newFromJson( $json ) {
                $restrictions = FormatJson::decode( $json, true );