Positionable.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Vendor\Sabberworm\CSS\Position; |
| 6 | |
| 7 | /** |
| 8 | * Represents a CSS item that may have a position in the source CSS document (line number and possibly column number). |
| 9 | * |
| 10 | * A standard implementation of this interface is available in the `Position` trait. |
| 11 | */ |
| 12 | interface Positionable |
| 13 | { |
| 14 | /** |
| 15 | * @return int<1, max>|null |
| 16 | */ |
| 17 | public function getLineNumber(); |
| 18 | |
| 19 | /** |
| 20 | * @return int<0, max> |
| 21 | * |
| 22 | * @deprecated in version 8.9.0, will be removed in v9.0. Use `getLineNumber()` instead. |
| 23 | */ |
| 24 | public function getLineNo(); |
| 25 | |
| 26 | /** |
| 27 | * @return int<0, max>|null |
| 28 | */ |
| 29 | public function getColumnNumber(); |
| 30 | |
| 31 | /** |
| 32 | * @return int<0, max> |
| 33 | * |
| 34 | * @deprecated in version 8.9.0, will be removed in v9.0. Use `getColumnNumber()` instead. |
| 35 | */ |
| 36 | public function getColNo(); |
| 37 | |
| 38 | /** |
| 39 | * @param int<0, max>|null $lineNumber |
| 40 | * Providing zero for this parameter is deprecated in version 8.9.0, and will not be supported from v9.0. |
| 41 | * Use `null` instead when no line number is available. |
| 42 | * @param int<0, max>|null $columnNumber |
| 43 | */ |
| 44 | public function setPosition($lineNumber, $columnNumber = null); |
| 45 | } |
| 46 |