Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions classes/output/fulltrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ class fulltrade implements renderable, templatable {
*
* @param int $stashid Stash ID
* @param trade $trade Trade details
* @param array $tradeitems Items for the trade
* @param int $courseid Course ID
* @param ?array $tradeitems Items for the trade
* @param ?int $courseid Course ID
*/
public function __construct(int $stashid, trade $trade = null, array $tradeitems = null, int $courseid = null) {
public function __construct(int $stashid, ?trade $trade = null, ?array $tradeitems = null, ?int $courseid = null) {
$this->stashid = $stashid;
$this->trade = $trade;
$this->tradeitems = $tradeitems;
Expand Down
8 changes: 4 additions & 4 deletions classes/persistent.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ abstract class persistent {
* Create an instance of this class.
*
* @param int $id If set, this is the id of an existing record, used to load the data.
* @param stdClass $record If set will be passed to {@link self::from_record()}.
* @param ?stdClass $record If set will be passed to {@link self::from_record()}.
*/
public function __construct($id = 0, stdClass $record = null) {
public function __construct($id = 0, ?stdClass $record = null) {
if ($id > 0) {
$this->set('id', $id);
$this->read();
Expand Down Expand Up @@ -855,10 +855,10 @@ public static function record_exists($id) {
* Check if a records exists.
*
* @param string $select
* @param array $params
* @param ?array $params
* @return bool
*/
public static function record_exists_select($select, array $params = null) {
public static function record_exists_select($select, ?array $params = null) {
global $DB;
return $DB->record_exists_select(static::TABLE, $select, $params);
}
Expand Down
2 changes: 1 addition & 1 deletion classes/swap.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class swap {
private $status;

public function __construct(int $stashid, int $initiator, int $receiver, array $initiatoritems = [], array $receiveritems = [],
string $message = '', int $messageformat = 1, int $status = null) {
string $message = '', int $messageformat = 1, ?int $status = null) {
$this->stashid = $stashid;
$this->initiator = $initiator;
$this->receiver = $receiver;
Expand Down