Apply PSR-12 code style (#3886)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / form / builder / field / IMaximumFormField.class.php
1 <?php
2
3 namespace wcf\system\form\builder\field;
4
5 /**
6 * Represents a form field that supports setting the maximum of the field value.
7 *
8 * @author Matthias Schmidt
9 * @copyright 2001-2019 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Form\Builder\Field
12 * @since 5.2
13 */
14 interface IMaximumFormField extends IFormField
15 {
16 /**
17 * Returns the maximum of the values of this field or `null` if no maximum
18 * has been set.
19 *
20 * @return null|number
21 */
22 public function getMaximum();
23
24 /**
25 * Sets the maximum of the values of this field. If `null` is passed, the
26 * maximum is removed.
27 *
28 * @param null|number $maximum maximum field value
29 * @return static this field
30 *
31 * @throws \InvalidArgumentException if the given maximum is no number or otherwise invalid
32 */
33 public function maximum($maximum = null);
34 }