Skip to content

Commit 6a9aec9

Browse files
committed
Add code-completion for json methods
1 parent c65f4ae commit 6a9aec9

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.phpstorm.meta.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,49 @@
205205
0,
206206
argumentsSet('curl_options')
207207
);
208+
registerArgumentsSet(
209+
'json_decode_flags',
210+
\JSON_BIGINT_AS_STRING,
211+
\JSON_INVALID_UTF8_IGNORE,
212+
\JSON_INVALID_UTF8_SUBSTITUTE,
213+
\JSON_OBJECT_AS_ARRAY,
214+
\JSON_THROW_ON_ERROR,
215+
);
216+
expectedArguments(
217+
\Framework\HTTP\Client\Response::getJson(),
218+
1,
219+
argumentsSet('json_decode_flags')
220+
);
221+
expectedArguments(
222+
\Framework\HTTP\Client\Response::setJsonFlags(),
223+
0,
224+
argumentsSet('json_decode_flags')
225+
);
226+
registerArgumentsSet(
227+
'json_encode_flags',
228+
\JSON_FORCE_OBJECT,
229+
\JSON_HEX_QUOT,
230+
\JSON_HEX_TAG,
231+
\JSON_HEX_AMP,
232+
\JSON_HEX_APOS,
233+
\JSON_INVALID_UTF8_IGNORE,
234+
\JSON_INVALID_UTF8_SUBSTITUTE,
235+
\JSON_NUMERIC_CHECK,
236+
\JSON_PARTIAL_OUTPUT_ON_ERROR,
237+
\JSON_PRESERVE_ZERO_FRACTION,
238+
\JSON_PRETTY_PRINT,
239+
\JSON_UNESCAPED_LINE_TERMINATORS,
240+
\JSON_UNESCAPED_SLASHES,
241+
\JSON_UNESCAPED_UNICODE,
242+
\JSON_THROW_ON_ERROR,
243+
);
244+
expectedArguments(
245+
\Framework\HTTP\Client\Request::setJson(),
246+
1,
247+
argumentsSet('json_encode_flags')
248+
);
249+
expectedArguments(
250+
\Framework\HTTP\Client\Request::setJsonFlags(),
251+
0,
252+
argumentsSet('json_encode_flags')
253+
);

0 commit comments

Comments
 (0)