@@ -98,20 +98,6 @@ public function delete($url, $parameters = [])
9898 return $ httpClient ->parseResponse ($ response );
9999 }
100100
101- /**
102- * Global method to validate an argument.
103- *
104- * @param string $type The required parameter (used for the error message)
105- * @param string $input Input value
106- * @param array $possibleValues Possible values for this argument
107- */
108- private function validateArgument ($ type , $ input , $ possibleValues )
109- {
110- if (!in_array ($ input , $ possibleValues , true )) {
111- throw new InvalidArgumentException ($ type . ' parameter " ' . $ input . '" is wrong. Possible values are: ' . implode (', ' , $ possibleValues ));
112- }
113- }
114-
115101 /**
116102 * Validate "sort" parameter and throw an exception if it's a bad value.
117103 *
@@ -144,4 +130,18 @@ protected function validateVoteArgument($vote, $possibleValues)
144130 {
145131 $ this ->validateArgument ('Vote ' , $ vote , $ possibleValues );
146132 }
133+
134+ /**
135+ * Global method to validate an argument.
136+ *
137+ * @param string $type The required parameter (used for the error message)
138+ * @param string $input Input value
139+ * @param array $possibleValues Possible values for this argument
140+ */
141+ private function validateArgument ($ type , $ input , $ possibleValues )
142+ {
143+ if (!\in_array ($ input , $ possibleValues , true )) {
144+ throw new InvalidArgumentException ($ type . ' parameter " ' . $ input . '" is wrong. Possible values are: ' . implode (', ' , $ possibleValues ));
145+ }
146+ }
147147}
0 commit comments