3131 * ['ip_address', 'ip', 'expandIPv6' => true], // expands IPv6 address to a full notation format
3232 * ```
3333 *
34- * @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. See [[setRanges()]] for
34+ * @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. See {@see Ip::ranges()} for
3535 * detailed description.
3636 */
3737class Ip extends Rule
3838{
3939 /**
4040 * Negation char.
4141 *
42- * Used to negate [[ranges]] or [[networks]] or to negate validating value when [[negation]] is set to `true`.
43- *
44- * @see allowNegation
45- * @see networks
46- * @see ranges
42+ * Used to negate {@see ranges()} or {@see network()} or to negate validating value when {@see allowNegation()}
43+ * is used.
4744 */
4845 private const NEGATION_CHAR = '! ' ;
4946
5047 /**
5148 * @var array The network aliases, that can be used in {@see ranges()}.
5249 * - key - alias name
5350 * - value - array of strings. String can be an IP range, IP address or another alias. String can be
54- * negated with [[ NEGATION_CHAR]] (independent of `negation` option).
51+ * negated with {@see NEGATION_CHAR} (independent of {@see allowNegation()} option).
5552 *
5653 * The following aliases are defined by default:
5754 * - `*`: `any`
@@ -99,7 +96,7 @@ class Ip extends Rule
9996 private bool $ requireSubnet = false ;
10097
10198 /**
102- * @var bool whether address may have a [[ NEGATION_CHAR]] character at the beginning.
99+ * @var bool whether address may have a {@see NEGATION_CHAR} character at the beginning.
103100 * Defaults to `false`.
104101 */
105102 private bool $ allowNegation = false ;
@@ -151,7 +148,7 @@ class Ip extends Rule
151148 private string $ wrongCidr = 'Contains wrong subnet mask. ' ;
152149
153150 /**
154- * @var string user-defined error message is used when validation fails due to subnet [[subnet]] set to 'only' ,
151+ * @var string user-defined error message is used when validation fails due to subnet {@see allowSubnet()} is used ,
155152 * but the CIDR prefix is not set.
156153 *
157154 * You may use the following placeholders in the message:
@@ -165,7 +162,7 @@ class Ip extends Rule
165162
166163 /**
167164 * @var string user-defined error message is used when validation fails
168- * due to [[subnet]] is false, but CIDR prefix is present.
165+ * due to {@see allowSubnet()} is false, but CIDR prefix is present.
169166 *
170167 * You may use the following placeholders in the message:
171168 *
@@ -178,7 +175,7 @@ class Ip extends Rule
178175
179176 /**
180177 * @var string user-defined error message is used when validation fails due to IP address
181- * is not not allowed by [[ ranges]] check.
178+ * is not not allowed by {@see ranges()} check.
182179 *
183180 * You may use the following placeholders in the message:
184181 *
@@ -265,7 +262,7 @@ protected function validateValue($value, DataSetInterface $dataSet = null): Resu
265262 *
266263 * The following preparation tasks are performed:
267264 *
268- * - Recursively substitutes aliases (described in [[ networks]] ) with their values.
265+ * - Recursively substitutes aliases (described in {@see networks} ) with their values.
269266 * - Removes duplicates
270267 *
271268 * @param array $ranges the IPv4 or IPv6 ranges that are allowed or forbidden.
@@ -405,7 +402,7 @@ private function isAllowed(string $ip): bool
405402 }
406403
407404 /**
408- * Parses IP address/range for the negation with [[ NEGATION_CHAR]] .
405+ * Parses IP address/range for the negation with {@see NEGATION_CHAR} .
409406 *
410407 * @param $string
411408 *
@@ -420,9 +417,9 @@ private function parseNegatedRange($string): array
420417 }
421418
422419 /**
423- * Prepares array to fill in [[ ranges]] .
420+ * Prepares array to fill in {@see ranges} .
424421 *
425- * - Recursively substitutes aliases, described in [[ networks]] with their values,
422+ * - Recursively substitutes aliases, described in {@see networks} with their values,
426423 * - Removes duplicates.
427424 *
428425 * @param array $ranges
0 commit comments