Skip to content

Commit bf8f40a

Browse files
committed
chore: update phpdocs
1 parent 7e8172c commit bf8f40a

File tree

2 files changed

+73
-52
lines changed

2 files changed

+73
-52
lines changed

src/support/src/Facades/Route.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
* @method static string|null getModelBinding(string $param)
1717
* @method static \Closure|null getExplicitBinding(string $param)
1818
* @method static void addRoute(string|string[] $httpMethod, string $route, array|string $handler, array $options = [])
19-
* @method static void get(string $route, array|string $handler, array $options = [])
20-
* @method static void post(string $route, array|string $handler, array $options = [])
21-
* @method static void put(string $route, array|string $handler, array $options = [])
22-
* @method static void delete(string $route, array|string $handler, array $options = [])
23-
* @method static void patch(string $route, array|string $handler, array $options = [])
24-
* @method static void head(string $route, array|string $handler, array $options = [])
19+
* @method static void get(string $route, null|array|callable|string $handler, array $options = [])
20+
* @method static void post(string $route, null|array|callable|string $handler, array $options = [])
21+
* @method static void put(string $route, null|array|callable|string $handler, array $options = [])
22+
* @method static void delete(string $route, null|array|callable|string $handler, array $options = [])
23+
* @method static void patch(string $route, null|array|callable|string $handler, array $options = [])
24+
* @method static void head(string $route, null|array|callable|string $handler, array $options = [])
2525
* @method static array getData()
2626
* @method static \FastRoute\RouteParser getRouteParser()
2727
*

src/support/src/Facades/Validator.php

Lines changed: 67 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,32 @@
88

99
/**
1010
* @method static array parseData(array $data)
11-
* @method static \Hyperf\Validation\Validator after(callable|string $callback)
11+
* @method static \Hypervel\Validation\Validator after(callable|array|string $callback)
1212
* @method static bool passes()
1313
* @method static bool fails()
1414
* @method static array validate()
15+
* @method static array validateWithBag(string $errorBag)
16+
* @method static \Hypervel\Support\ValidatedInput|array safe(array|null $keys = null)
1517
* @method static array validated()
1618
* @method static void addFailure(string $attribute, string $rule, array $parameters = [])
1719
* @method static array valid()
1820
* @method static array invalid()
1921
* @method static array failed()
20-
* @method static \Hyperf\Support\MessageBag messages()
21-
* @method static \Hyperf\Contract\MessageBag errors()
22-
* @method static \Hyperf\Contract\MessageBag getMessageBag()
23-
* @method static bool hasRule(string $attribute, array|string|\Stringable $rules)
22+
* @method static \Hypervel\Support\MessageBag messages()
23+
* @method static \Hypervel\Support\MessageBag errors()
24+
* @method static \Hypervel\Support\MessageBag getMessageBag()
25+
* @method static bool hasRule(string $attribute, array|string $rules)
2426
* @method static array attributes()
2527
* @method static array getData()
26-
* @method static \Hyperf\Validation\Validator setData(array $data)
28+
* @method static \Hypervel\Validation\Validator setData(array $data)
29+
* @method static mixed getValue(string $attribute)
30+
* @method static void setValue(string $attribute, mixed $value)
2731
* @method static array getRules()
28-
* @method static \Hyperf\Validation\Validator setRules(array $rules)
32+
* @method static array getRulesWithoutPlaceholders()
33+
* @method static \Hypervel\Validation\Validator setRules(array $rules)
2934
* @method static void addRules(array $rules)
30-
* @method static \Hyperf\Validation\Validator sometimes(array|string $attribute, array|string $rules, callable $callback)
35+
* @method static \Hypervel\Validation\Validator sometimes(array|string $attribute, array|string $rules, callable $callback)
36+
* @method static \Hypervel\Validation\Validator stopOnFirstFailure(bool $stopOnFirstFailure = true)
3137
* @method static void addExtensions(array $extensions)
3238
* @method static void addImplicitExtensions(array $extensions)
3339
* @method static void addDependentExtensions(array $extensions)
@@ -36,25 +42,28 @@
3642
* @method static void addDependentExtension(string $rule, \Closure|string $extension)
3743
* @method static void addReplacers(array $replacers)
3844
* @method static void addReplacer(string $rule, \Closure|string $replacer)
39-
* @method static \Hyperf\Validation\Validator setCustomMessages(array $messages)
40-
* @method static \Hyperf\Validation\Validator setAttributeNames(array $attributes)
41-
* @method static \Hyperf\Validation\Validator addCustomAttributes(array $customAttributes)
42-
* @method static \Hyperf\Validation\Validator setValueNames(array $values)
43-
* @method static \Hyperf\Validation\Validator addCustomValues(array $customValues)
45+
* @method static \Hypervel\Validation\Validator setCustomMessages(array $messages)
46+
* @method static \Hypervel\Validation\Validator setAttributeNames(array $attributes)
47+
* @method static \Hypervel\Validation\Validator addCustomAttributes(array $attributes)
48+
* @method static \Hypervel\Validation\Validator setImplicitAttributesFormatter(callable|null $formatter = null)
49+
* @method static \Hypervel\Validation\Validator setValueNames(array $values)
50+
* @method static \Hypervel\Validation\Validator addCustomValues(array $customValues)
4451
* @method static void setFallbackMessages(array $messages)
45-
* @method static \Hyperf\Validation\Contract\PresenceVerifierInterface getPresenceVerifier()
46-
* @method static \Hyperf\Validation\Contract\PresenceVerifierInterface getPresenceVerifierFor(string|null $connection)
47-
* @method static void setPresenceVerifier(\Hyperf\Validation\Contract\PresenceVerifierInterface $presenceVerifier)
48-
* @method static \Hyperf\Contract\TranslatorInterface getTranslator()
49-
* @method static void setTranslator(\Hyperf\Contract\TranslatorInterface $translator)
52+
* @method static \Hypervel\Validation\PresenceVerifierInterface getPresenceVerifier(string|null $connection = null)
53+
* @method static void setPresenceVerifier(\Hypervel\Validation\PresenceVerifierInterface $presenceVerifier)
54+
* @method static string getException()
55+
* @method static \Hypervel\Validation\Validator setException(string|\Throwable $exception)
56+
* @method static \Hypervel\Validation\Validator ensureExponentWithinAllowedRangeUsing(\Closure $callback)
57+
* @method static \Hypervel\Translation\Contracts\Translator getTranslator()
58+
* @method static void setTranslator(\Hypervel\Translation\Contracts\Translator $translator)
5059
* @method static void setContainer(\Psr\Container\ContainerInterface $container)
51-
* @method static void getValue(string $attribute)
52-
* @method static void setValue(string $attribute, mixed $value)
5360
* @method static string makeReplacements(string $message, string $attribute, string $rule, array $parameters)
5461
* @method static string getDisplayableAttribute(string $attribute)
5562
* @method static string getDisplayableValue(string $attribute, mixed $value)
63+
* @method static string replaceRequiredIfDeclined(string $message, string $attribute, string $rule, array $parameters)
64+
* @method static string replaceProhibitedIfDeclined(string $message, string $attribute, string $rule, array $parameters)
5665
* @method static bool validateAccepted(string $attribute, mixed $value)
57-
* @method static bool validateAcceptedIf(string $attribute, mixed $value, void $parameters)
66+
* @method static bool validateAcceptedIf(string $attribute, mixed $value, mixed $parameters)
5867
* @method static bool validateDeclined(string $attribute, mixed $value)
5968
* @method static bool validateDeclinedIf(string $attribute, mixed $value, mixed $parameters)
6069
* @method static bool validateActiveUrl(string $attribute, mixed $value)
@@ -65,14 +74,14 @@
6574
* @method static bool validateAfter(string $attribute, mixed $value, array $parameters)
6675
* @method static bool validateAfterOrEqual(string $attribute, mixed $value, array $parameters)
6776
* @method static bool validateAlpha(string $attribute, mixed $value, mixed $parameters)
68-
* @method static bool validateAlphaDash(mixed $attribute, mixed $value, mixed $parameters)
77+
* @method static bool validateAlphaDash(string $attribute, mixed $value, mixed $parameters)
6978
* @method static bool validateAlphaNum(string $attribute, mixed $value, mixed $parameters)
7079
* @method static bool validateArray(string $attribute, mixed $value, array $parameters = [])
7180
* @method static bool validateList(string $attribute, mixed $value)
7281
* @method static bool validateRequiredArrayKeys(string $attribute, mixed $value, array $parameters)
7382
* @method static bool validateBetween(string $attribute, mixed $value, array $parameters)
74-
* @method static bool validateBoolean(string $attribute, mixed $value, array $parameters = [])
75-
* @method static bool validateConfirmed(string $attribute, mixed $value)
83+
* @method static bool validateBoolean(string $attribute, mixed $value)
84+
* @method static bool validateConfirmed(string $attribute, mixed $value, array $parameters)
7685
* @method static bool validateContains(string $attribute, mixed $value, array $parameters)
7786
* @method static bool validateDate(string $attribute, mixed $value)
7887
* @method static bool validateDateFormat(string $attribute, mixed $value, array $parameters)
@@ -83,11 +92,11 @@
8392
* @method static bool validateDigitsBetween(string $attribute, mixed $value, array $parameters)
8493
* @method static bool validateDimensions(string $attribute, mixed $value, array $parameters)
8594
* @method static bool validateDistinct(string $attribute, mixed $value, array $parameters)
86-
* @method static bool validateEmail(string $attribute, mixed $value)
95+
* @method static bool validateEmail(string $attribute, mixed $value, array $parameters)
8796
* @method static bool validateExists(string $attribute, mixed $value, array $parameters)
8897
* @method static bool validateUnique(string $attribute, mixed $value, array $parameters)
8998
* @method static array parseTable(string $table)
90-
* @method static string getQueryColumn(array $parameters, string $attribute)
99+
* @method static string|bool getQueryColumn(array $parameters, string $attribute)
91100
* @method static string guessColumnForQuery(string $attribute)
92101
* @method static bool validateExtensions(string $attribute, mixed $value, array $parameters)
93102
* @method static bool validateFile(string $attribute, mixed $value)
@@ -99,60 +108,72 @@
99108
* @method static bool validateLowercase(string $attribute, mixed $value, array $parameters)
100109
* @method static bool validateUppercase(string $attribute, mixed $value, array $parameters)
101110
* @method static bool validateHexColor(string $attribute, mixed $value)
102-
* @method static bool validateImage(string $attribute, mixed $value)
111+
* @method static bool validateImage(string $attribute, mixed $value, array $parameters = [])
103112
* @method static bool validateIn(string $attribute, mixed $value, array $parameters)
104113
* @method static bool validateInArray(string $attribute, mixed $value, array $parameters)
105-
* @method static bool validateInteger(string $attribute, mixed $value, array $parameters = [])
114+
* @method static bool validateInteger(string $attribute, mixed $value)
106115
* @method static bool validateIp(string $attribute, mixed $value)
107116
* @method static bool validateIpv4(string $attribute, mixed $value)
108117
* @method static bool validateIpv6(string $attribute, mixed $value)
109118
* @method static bool validateMacAddress(string $attribute, mixed $value)
110119
* @method static bool validateJson(string $attribute, mixed $value)
111120
* @method static bool validateMax(string $attribute, mixed $value, array $parameters)
112121
* @method static bool validateMaxDigits(string $attribute, mixed $value, array $parameters)
113-
* @method static bool validateMimes(string $attribute, \SplFileInfo $value, array $parameters)
114-
* @method static bool validateMimetypes(string $attribute, \SplFileInfo $value, array $parameters)
122+
* @method static bool validateMimes(string $attribute, mixed $value, array $parameters)
123+
* @method static bool validateMimetypes(string $attribute, mixed $value, array $parameters)
115124
* @method static bool validateMin(string $attribute, mixed $value, array $parameters)
116125
* @method static bool validateMinDigits(string $attribute, mixed $value, array $parameters)
117-
* @method static bool validateMissing(string $attribute, mixed $value, array $parameters)
126+
* @method static bool validateMissing(mixed $attribute, mixed $value, array $parameters)
118127
* @method static bool validateMissingIf(string $attribute, mixed $value, array $parameters)
119128
* @method static bool validateMissingUnless(string $attribute, mixed $value, array $parameters)
120129
* @method static bool validateMissingWith(string $attribute, mixed $value, array $parameters)
121130
* @method static bool validateMissingWithAll(string $attribute, mixed $value, array $parameters)
122131
* @method static bool validateMultipleOf(string $attribute, mixed $value, array $parameters)
123-
* @method static array parseDependentRuleParameters(array $parameters)
124132
* @method static bool validateNullable()
125133
* @method static bool validateNotIn(string $attribute, mixed $value, array $parameters)
126134
* @method static bool validateNumeric(string $attribute, mixed $value)
127135
* @method static bool validatePresent(string $attribute, mixed $value)
136+
* @method static bool validatePresentIf(string $attribute, mixed $value, array $parameters)
137+
* @method static bool validatePresentUnless(string $attribute, mixed $value, array $parameters)
138+
* @method static bool validatePresentWith(string $attribute, mixed $value, array $parameters)
139+
* @method static bool validatePresentWithAll(string $attribute, mixed $value, array $parameters)
128140
* @method static bool validateRegex(string $attribute, mixed $value, array $parameters)
129141
* @method static bool validateNotRegex(string $attribute, mixed $value, array $parameters)
130142
* @method static bool validateRequired(string $attribute, mixed $value)
143+
* @method static bool validateRequiredIf(string $attribute, mixed $value, mixed $parameters)
144+
* @method static bool validateRequiredIfAccepted(string $attribute, mixed $value, mixed $parameters)
145+
* @method static bool validateRequiredIfDeclined(string $attribute, mixed $value, mixed $parameters)
146+
* @method static bool validateProhibited(string $attribute, mixed $value)
147+
* @method static bool validateProhibitedIf(string $attribute, mixed $value, mixed $parameters)
148+
* @method static bool validateProhibitedIfAccepted(string $attribute, mixed $value, mixed $parameters)
149+
* @method static bool validateProhibitedIfDeclined(string $attribute, mixed $value, mixed $parameters)
150+
* @method static bool validateProhibitedUnless(string $attribute, mixed $value, mixed $parameters)
131151
* @method static bool validateProhibits(string $attribute, mixed $value, mixed $parameters)
132-
* @method static bool validateRequiredIf(string $attribute, mixed $value, array $parameters)
133152
* @method static bool validateExclude()
134-
* @method static bool validateExcludeIf(string $attribute, mixed $value, array $parameters)
135-
* @method static bool validateExcludeUnless(string $attribute, mixed $value, array $parameters)
136-
* @method static bool validateRequiredUnless(string $attribute, mixed $value, array $parameters)
137-
* @method static bool validateExcludeWith(string $attribute, mixed $value, array $parameters)
138-
* @method static bool validateExcludeWithout(string $attribute, mixed $value, array $parameters)
139-
* @method static bool validateRequiredWith(string $attribute, mixed $value, array $parameters)
140-
* @method static bool validateRequiredWithAll(string $attribute, mixed $value, array $parameters)
141-
* @method static bool validateRequiredWithout(string $attribute, mixed $value, array $parameters)
142-
* @method static bool validateRequiredWithoutAll(string $attribute, mixed $value, array $parameters)
153+
* @method static bool validateExcludeIf(string $attribute, mixed $value, mixed $parameters)
154+
* @method static bool validateExcludeUnless(string $attribute, mixed $value, mixed $parameters)
155+
* @method static bool validateRequiredUnless(string $attribute, mixed $value, mixed $parameters)
156+
* @method static bool validateExcludeWith(string $attribute, mixed $value, mixed $parameters)
157+
* @method static bool validateExcludeWithout(string $attribute, mixed $value, mixed $parameters)
158+
* @method static array parseDependentRuleParameters(array $parameters)
159+
* @method static bool validateRequiredWith(string $attribute, mixed $value, mixed $parameters)
160+
* @method static bool validateRequiredWithAll(string $attribute, mixed $value, mixed $parameters)
161+
* @method static bool validateRequiredWithout(string $attribute, mixed $value, mixed $parameters)
162+
* @method static bool validateRequiredWithoutAll(string $attribute, mixed $value, mixed $parameters)
143163
* @method static bool validateSame(string $attribute, mixed $value, array $parameters)
144164
* @method static bool validateSize(string $attribute, mixed $value, array $parameters)
145-
* @method static void validateSometimes()
165+
* @method static bool validateSometimes()
146166
* @method static bool validateStartsWith(string $attribute, mixed $value, array $parameters)
147167
* @method static bool validateDoesntStartWith(string $attribute, mixed $value, array $parameters)
148168
* @method static bool validateEndsWith(string $attribute, mixed $value, array $parameters)
149-
* @method static bool validateDoesntEndWith(void $attribute, void $value, void $parameters)
169+
* @method static bool validateDoesntEndWith(string $attribute, mixed $value, array $parameters)
150170
* @method static bool validateString(string $attribute, mixed $value)
151-
* @method static bool validateTimezone(string $attribute, mixed $value)
171+
* @method static bool validateTimezone(string $attribute, mixed $value, array $parameters = [])
152172
* @method static bool validateUrl(string $attribute, mixed $value, array $parameters = [])
153173
* @method static bool validateUlid(string $attribute, mixed $value)
154-
* @method static bool validateUuid(string $attribute, mixed $value)
174+
* @method static bool validateUuid(string $attribute, mixed $value, array $parameters)
155175
* @method static bool isValidFileInstance(mixed $value)
176+
* @method static array|null parseNamedParameters(array $parameters)
156177
* @method static void requireParameterCount(int $count, array $parameters, string $rule)
157178
*
158179
* @see \Hypervel\Validation\Validator

0 commit comments

Comments
 (0)