Update for SSv5

This commit is contained in:
Chris Lock 2023-07-02 22:55:30 +01:00
parent 48995f1e98
commit 0c157d77c8
2 changed files with 8 additions and 9 deletions

View File

@ -31,8 +31,7 @@
}, },
"require-dev": { "require-dev": {
"squizlabs/php_codesniffer": "^3.0", "squizlabs/php_codesniffer": "^3.0",
"silverstripe/versioned": "^2", "silverstripe/versioned": "^2"
"silverstripe/recipe-testing": "^3.0"
}, },
"extra": { "extra": {
"screenshots": [ "screenshots": [

View File

@ -62,7 +62,7 @@ class GridFieldOrderableRows extends RequestHandler implements
* @see setSortField() * @see setSortField()
* @var string * @var string
*/ */
protected $sortField; protected string $sortField;
/** /**
* If set to true, when an item is re-ordered, it will update on the * If set to true, when an item is re-ordered, it will update on the
@ -71,7 +71,7 @@ class GridFieldOrderableRows extends RequestHandler implements
* *
* @var boolean * @var boolean
*/ */
protected $immediateUpdate; protected bool $immediateUpdate;
/** /**
* Extra sort fields to apply before the sort field. * Extra sort fields to apply before the sort field.
@ -88,7 +88,7 @@ class GridFieldOrderableRows extends RequestHandler implements
* *
* @var boolean * @var boolean
*/ */
protected $republishLiveRecords = false; protected bool $republishLiveRecords = false;
/** /**
* The number of the column containing the reorder handles * The number of the column containing the reorder handles
@ -96,12 +96,12 @@ class GridFieldOrderableRows extends RequestHandler implements
* @see setReorderColumnNumber() * @see setReorderColumnNumber()
* @var int * @var int
*/ */
protected $reorderColumnNumber = 0; protected int $reorderColumnNumber = 0;
/** /**
* @param string $sortField * @param string $sortField
*/ */
public function __construct($sortField = 'Sort') public function __construct(string $sortField = 'Sort')
{ {
parent::__construct(); parent::__construct();
$this->sortField = $sortField; $this->sortField = $sortField;
@ -111,7 +111,7 @@ class GridFieldOrderableRows extends RequestHandler implements
/** /**
* @return string * @return string
*/ */
public function getSortField() public function getSortField(): string
{ {
return $this->sortField; return $this->sortField;
} }
@ -122,7 +122,7 @@ class GridFieldOrderableRows extends RequestHandler implements
* @param string $sortField * @param string $sortField
* @return GridFieldOrderableRows $this * @return GridFieldOrderableRows $this
*/ */
public function setSortField($field) public function setSortField(string $field): self
{ {
$this->sortField = $field; $this->sortField = $field;
return $this; return $this;