Cleanup the models

This commit is contained in:
Tim 2021-11-25 18:57:35 +01:00
parent 65830a4283
commit dab95e7280
12 changed files with 633 additions and 828 deletions

View File

@ -12,7 +12,7 @@ Note: It is modified to remove some unused/wrong object deserializations
## Requirements
PHP 5.5 and later
PHP 7.0 and later
## Installation & Usage
### Composer

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.5",
"php": ">=7.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GameIsStarted implements ModelInterface, ArrayAccess
{
class GameIsStarted implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -57,7 +56,8 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'started' => 'bool',
'game_state' => '\Swagger\Client\Model\GameState' ];
'game_state' => GameState::class,
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -66,15 +66,15 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*/
protected static $swaggerFormats = [
'started' => null,
'game_state' => null ];
'game_state' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -83,8 +83,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -96,7 +95,8 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*/
protected static $attributeMap = [
'started' => 'started',
'game_state' => 'gameState' ];
'game_state' => 'gameState',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -105,7 +105,8 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*/
protected static $setters = [
'started' => 'setStarted',
'game_state' => 'setGameState' ];
'game_state' => 'setGameState',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -114,7 +115,8 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*/
protected static $getters = [
'started' => 'getStarted',
'game_state' => 'getGameState' ];
'game_state' => 'getGameState',
];
/**
* Array of attributes where the key is the local name,
@ -122,8 +124,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -132,8 +133,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -142,8 +142,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -152,13 +151,10 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -172,10 +168,9 @@ class GameIsStarted implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['started'] = isset($data['started']) ? $data['started'] : null;
$this->container['game_state'] = isset($data['game_state']) ? $data['game_state'] : null;
public function __construct(array $data = null) {
$this->container['started'] = $data['started'] ?? null;
$this->container['game_state'] = $data['game_state'] ?? null;
}
/**
@ -183,8 +178,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -196,19 +190,16 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets started
*
* @return bool
*/
public function getStarted()
{
public function getStarted() {
return $this->container['started'];
}
@ -219,8 +210,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setStarted($started)
{
public function setStarted($started) {
$this->container['started'] = $started;
return $this;
@ -231,8 +221,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\GameState
*/
public function getGameState()
{
public function getGameState() {
return $this->container['game_state'];
}
@ -243,12 +232,12 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setGameState($game_state)
{
public function setGameState($game_state) {
$this->container['game_state'] = $game_state;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -256,8 +245,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -268,8 +256,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -281,8 +268,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -297,8 +283,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -307,8 +292,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GameRules implements ModelInterface, ArrayAccess
{
class GameRules implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -62,7 +61,8 @@ class GameRules implements ModelInterface, ArrayAccess
'has_joker' => 'bool',
'has_palifico' => 'bool',
'has_calza' => 'bool',
'joker_die_value' => 'int' ];
'joker_die_value' => 'int',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -76,15 +76,15 @@ class GameRules implements ModelInterface, ArrayAccess
'has_joker' => null,
'has_palifico' => null,
'has_calza' => null,
'joker_die_value' => null ];
'joker_die_value' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -93,8 +93,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -111,7 +110,8 @@ class GameRules implements ModelInterface, ArrayAccess
'has_joker' => 'hasJoker',
'has_palifico' => 'hasPalifico',
'has_calza' => 'hasCalza',
'joker_die_value' => 'jokerDieValue' ];
'joker_die_value' => 'jokerDieValue',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -125,7 +125,8 @@ class GameRules implements ModelInterface, ArrayAccess
'has_joker' => 'setHasJoker',
'has_palifico' => 'setHasPalifico',
'has_calza' => 'setHasCalza',
'joker_die_value' => 'setJokerDieValue' ];
'joker_die_value' => 'setJokerDieValue',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -139,7 +140,8 @@ class GameRules implements ModelInterface, ArrayAccess
'has_joker' => 'getHasJoker',
'has_palifico' => 'getHasPalifico',
'has_calza' => 'getHasCalza',
'joker_die_value' => 'getJokerDieValue' ];
'joker_die_value' => 'getJokerDieValue',
];
/**
* Array of attributes where the key is the local name,
@ -147,8 +149,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -157,8 +158,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -167,8 +167,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -177,13 +176,10 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -197,15 +193,14 @@ class GameRules implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['start_dice_per_player'] = isset($data['start_dice_per_player']) ? $data['start_dice_per_player'] : null;
$this->container['higher_count_lower_value'] = isset($data['higher_count_lower_value']) ? $data['higher_count_lower_value'] : null;
$this->container['joker_counts_double'] = isset($data['joker_counts_double']) ? $data['joker_counts_double'] : null;
$this->container['has_joker'] = isset($data['has_joker']) ? $data['has_joker'] : null;
$this->container['has_palifico'] = isset($data['has_palifico']) ? $data['has_palifico'] : null;
$this->container['has_calza'] = isset($data['has_calza']) ? $data['has_calza'] : null;
$this->container['joker_die_value'] = isset($data['joker_die_value']) ? $data['joker_die_value'] : null;
public function __construct(array $data = null) {
$this->container['start_dice_per_player'] = $data['start_dice_per_player'] ?? null;
$this->container['higher_count_lower_value'] = $data['higher_count_lower_value'] ?? null;
$this->container['joker_counts_double'] = $data['joker_counts_double'] ?? null;
$this->container['has_joker'] = $data['has_joker'] ?? null;
$this->container['has_palifico'] = $data['has_palifico'] ?? null;
$this->container['has_calza'] = $data['has_calza'] ?? null;
$this->container['joker_die_value'] = $data['joker_die_value'] ?? null;
}
/**
@ -213,8 +208,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -226,19 +220,16 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets start_dice_per_player
*
* @return int
*/
public function getStartDicePerPlayer()
{
public function getStartDicePerPlayer() {
return $this->container['start_dice_per_player'];
}
@ -249,8 +240,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setStartDicePerPlayer($start_dice_per_player)
{
public function setStartDicePerPlayer($start_dice_per_player) {
$this->container['start_dice_per_player'] = $start_dice_per_player;
return $this;
@ -261,8 +251,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHigherCountLowerValue()
{
public function getHigherCountLowerValue() {
return $this->container['higher_count_lower_value'];
}
@ -273,8 +262,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHigherCountLowerValue($higher_count_lower_value)
{
public function setHigherCountLowerValue($higher_count_lower_value) {
$this->container['higher_count_lower_value'] = $higher_count_lower_value;
return $this;
@ -285,8 +273,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getJokerCountsDouble()
{
public function getJokerCountsDouble() {
return $this->container['joker_counts_double'];
}
@ -297,8 +284,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setJokerCountsDouble($joker_counts_double)
{
public function setJokerCountsDouble($joker_counts_double) {
$this->container['joker_counts_double'] = $joker_counts_double;
return $this;
@ -309,8 +295,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHasJoker()
{
public function getHasJoker() {
return $this->container['has_joker'];
}
@ -321,8 +306,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHasJoker($has_joker)
{
public function setHasJoker($has_joker) {
$this->container['has_joker'] = $has_joker;
return $this;
@ -333,8 +317,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHasPalifico()
{
public function getHasPalifico() {
return $this->container['has_palifico'];
}
@ -345,8 +328,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHasPalifico($has_palifico)
{
public function setHasPalifico($has_palifico) {
$this->container['has_palifico'] = $has_palifico;
return $this;
@ -357,8 +339,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHasCalza()
{
public function getHasCalza() {
return $this->container['has_calza'];
}
@ -369,8 +350,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHasCalza($has_calza)
{
public function setHasCalza($has_calza) {
$this->container['has_calza'] = $has_calza;
return $this;
@ -381,8 +361,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return int
*/
public function getJokerDieValue()
{
public function getJokerDieValue() {
return $this->container['joker_die_value'];
}
@ -393,12 +372,12 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setJokerDieValue($joker_die_value)
{
public function setJokerDieValue($joker_die_value) {
$this->container['joker_die_value'] = $joker_die_value;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -406,8 +385,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -418,8 +396,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -431,8 +408,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -447,8 +423,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -457,8 +432,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GameState implements ModelInterface, ArrayAccess
{
class GameState implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -58,11 +57,12 @@ class GameState implements ModelInterface, ArrayAccess
protected static $swaggerTypes = [
'state' => 'string',
'code' => 'string',
'rounds' => '\Swagger\Client\Model\Round[]',
'players' => '\Swagger\Client\Model\Player[]',
'current_player' => '\Swagger\Client\Model\Player',
'owning_player' => '\Swagger\Client\Model\Player',
'rules' => '\Swagger\Client\Model\GameRules' ];
'rounds' => Round::class . '[]',
'players' => Player::class . '[]',
'current_player' => Player::class,
'owning_player' => Player::class,
'rules' => GameRules::class,
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -76,15 +76,15 @@ class GameState implements ModelInterface, ArrayAccess
'players' => null,
'current_player' => null,
'owning_player' => null,
'rules' => null ];
'rules' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -93,8 +93,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -111,7 +110,8 @@ class GameState implements ModelInterface, ArrayAccess
'players' => 'players',
'current_player' => 'currentPlayer',
'owning_player' => 'owningPlayer',
'rules' => 'rules' ];
'rules' => 'rules',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -125,7 +125,8 @@ class GameState implements ModelInterface, ArrayAccess
'players' => 'setPlayers',
'current_player' => 'setCurrentPlayer',
'owning_player' => 'setOwningPlayer',
'rules' => 'setRules' ];
'rules' => 'setRules',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -139,7 +140,8 @@ class GameState implements ModelInterface, ArrayAccess
'players' => 'getPlayers',
'current_player' => 'getCurrentPlayer',
'owning_player' => 'getOwningPlayer',
'rules' => 'getRules' ];
'rules' => 'getRules',
];
/**
* Array of attributes where the key is the local name,
@ -147,8 +149,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -157,8 +158,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -167,8 +167,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -177,13 +176,10 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -197,15 +193,14 @@ class GameState implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['state'] = isset($data['state']) ? $data['state'] : null;
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
$this->container['rounds'] = isset($data['rounds']) ? $data['rounds'] : null;
$this->container['players'] = isset($data['players']) ? $data['players'] : null;
$this->container['current_player'] = isset($data['current_player']) ? $data['current_player'] : null;
$this->container['owning_player'] = isset($data['owning_player']) ? $data['owning_player'] : null;
$this->container['rules'] = isset($data['rules']) ? $data['rules'] : null;
public function __construct(array $data = null) {
$this->container['state'] = $data['state'] ?? null;
$this->container['code'] = $data['code'] ?? null;
$this->container['rounds'] = $data['rounds'] ?? null;
$this->container['players'] = $data['players'] ?? null;
$this->container['current_player'] = $data['current_player'] ?? null;
$this->container['owning_player'] = $data['owning_player'] ?? null;
$this->container['rules'] = $data['rules'] ?? null;
}
/**
@ -213,8 +208,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -226,19 +220,16 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets state
*
* @return string
*/
public function getState()
{
public function getState() {
return $this->container['state'];
}
@ -249,8 +240,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setState($state)
{
public function setState($state) {
$this->container['state'] = $state;
return $this;
@ -261,8 +251,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getCode()
{
public function getCode() {
return $this->container['code'];
}
@ -273,8 +262,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setCode($code)
{
public function setCode($code) {
$this->container['code'] = $code;
return $this;
@ -285,8 +273,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Round[]
*/
public function getRounds()
{
public function getRounds() {
return $this->container['rounds'];
}
@ -297,8 +284,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setRounds($rounds)
{
public function setRounds($rounds) {
$this->container['rounds'] = $rounds;
return $this;
@ -309,8 +295,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Player[]
*/
public function getPlayers()
{
public function getPlayers() {
return $this->container['players'];
}
@ -321,8 +306,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setPlayers($players)
{
public function setPlayers($players) {
$this->container['players'] = $players;
return $this;
@ -333,8 +317,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Player
*/
public function getCurrentPlayer()
{
public function getCurrentPlayer() {
return $this->container['current_player'];
}
@ -345,8 +328,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setCurrentPlayer($current_player)
{
public function setCurrentPlayer($current_player) {
$this->container['current_player'] = $current_player;
return $this;
@ -357,8 +339,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Player
*/
public function getOwningPlayer()
{
public function getOwningPlayer() {
return $this->container['owning_player'];
}
@ -369,8 +350,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setOwningPlayer($owning_player)
{
public function setOwningPlayer($owning_player) {
$this->container['owning_player'] = $owning_player;
return $this;
@ -381,8 +361,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\GameRules
*/
public function getRules()
{
public function getRules() {
return $this->container['rules'];
}
@ -393,12 +372,12 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setRules($rules)
{
public function setRules($rules) {
$this->container['rules'] = $rules;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -406,8 +385,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -418,8 +396,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -431,8 +408,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -447,8 +423,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -457,8 +432,7 @@ class GameState implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageResponse implements ModelInterface, ArrayAccess
{
class MessageResponse implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -57,7 +56,8 @@ class MessageResponse implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'message' => 'string',
'errors' => 'string[]' ];
'errors' => 'string[]',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -66,15 +66,15 @@ class MessageResponse implements ModelInterface, ArrayAccess
*/
protected static $swaggerFormats = [
'message' => null,
'errors' => null ];
'errors' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -83,8 +83,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -96,7 +95,8 @@ class MessageResponse implements ModelInterface, ArrayAccess
*/
protected static $attributeMap = [
'message' => 'message',
'errors' => 'errors' ];
'errors' => 'errors',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -105,7 +105,8 @@ class MessageResponse implements ModelInterface, ArrayAccess
*/
protected static $setters = [
'message' => 'setMessage',
'errors' => 'setErrors' ];
'errors' => 'setErrors',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -114,7 +115,8 @@ class MessageResponse implements ModelInterface, ArrayAccess
*/
protected static $getters = [
'message' => 'getMessage',
'errors' => 'getErrors' ];
'errors' => 'getErrors',
];
/**
* Array of attributes where the key is the local name,
@ -122,8 +124,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -132,8 +133,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -142,8 +142,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -152,13 +151,10 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -172,10 +168,9 @@ class MessageResponse implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
$this->container['errors'] = isset($data['errors']) ? $data['errors'] : null;
public function __construct(array $data = null) {
$this->container['message'] = $data['message'] ?? null;
$this->container['errors'] = $data['errors'] ?? null;
}
/**
@ -183,8 +178,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -196,19 +190,16 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
public function getMessage() {
return $this->container['message'];
}
@ -219,8 +210,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setMessage($message)
{
public function setMessage($message) {
$this->container['message'] = $message;
return $this;
@ -231,8 +221,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return string[]
*/
public function getErrors()
{
public function getErrors() {
return $this->container['errors'];
}
@ -243,12 +232,12 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setErrors($errors)
{
public function setErrors($errors) {
$this->container['errors'] = $errors;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -256,8 +245,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -268,8 +256,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -281,8 +268,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -297,8 +283,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -307,8 +292,7 @@ class MessageResponse implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class MyTurn implements ModelInterface, ArrayAccess
{
class MyTurn implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -57,8 +56,9 @@ class MyTurn implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'turn' => 'bool',
'game_state' => '\Swagger\Client\Model\GameState',
'errors' => 'string[]' ];
'game_state' => GameState::class,
'errors' => 'string[]',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -68,15 +68,15 @@ class MyTurn implements ModelInterface, ArrayAccess
protected static $swaggerFormats = [
'turn' => null,
'game_state' => null,
'errors' => null ];
'errors' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -85,8 +85,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -99,7 +98,8 @@ class MyTurn implements ModelInterface, ArrayAccess
protected static $attributeMap = [
'turn' => 'turn',
'game_state' => 'gameState',
'errors' => 'errors' ];
'errors' => 'errors',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -109,7 +109,8 @@ class MyTurn implements ModelInterface, ArrayAccess
protected static $setters = [
'turn' => 'setTurn',
'game_state' => 'setGameState',
'errors' => 'setErrors' ];
'errors' => 'setErrors',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -119,7 +120,8 @@ class MyTurn implements ModelInterface, ArrayAccess
protected static $getters = [
'turn' => 'getTurn',
'game_state' => 'getGameState',
'errors' => 'getErrors' ];
'errors' => 'getErrors',
];
/**
* Array of attributes where the key is the local name,
@ -127,8 +129,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -137,8 +138,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -147,8 +147,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -157,13 +156,10 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -177,11 +173,10 @@ class MyTurn implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['turn'] = isset($data['turn']) ? $data['turn'] : null;
$this->container['game_state'] = isset($data['game_state']) ? $data['game_state'] : null;
$this->container['errors'] = isset($data['errors']) ? $data['errors'] : null;
public function __construct(array $data = null) {
$this->container['turn'] = $data['turn'] ?? null;
$this->container['game_state'] = $data['game_state'] ?? null;
$this->container['errors'] = $data['errors'] ?? null;
}
/**
@ -189,8 +184,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -202,19 +196,16 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets turn
*
* @return bool
*/
public function getTurn()
{
public function getTurn() {
return $this->container['turn'];
}
@ -225,8 +216,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setTurn($turn)
{
public function setTurn($turn) {
$this->container['turn'] = $turn;
return $this;
@ -237,8 +227,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\GameState
*/
public function getGameState()
{
public function getGameState() {
return $this->container['game_state'];
}
@ -249,8 +238,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setGameState($game_state)
{
public function setGameState($game_state) {
$this->container['game_state'] = $game_state;
return $this;
@ -261,8 +249,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return string[]
*/
public function getErrors()
{
public function getErrors() {
return $this->container['errors'];
}
@ -273,12 +260,12 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setErrors($errors)
{
public function setErrors($errors) {
$this->container['errors'] = $errors;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -286,8 +273,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -298,8 +284,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -311,8 +296,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -327,8 +311,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -337,8 +320,7 @@ class MyTurn implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Player implements ModelInterface, ArrayAccess
{
class Player implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -58,7 +57,8 @@ class Player implements ModelInterface, ArrayAccess
protected static $swaggerTypes = [
'id' => 'string',
'hash' => 'string',
'name' => 'string' ];
'name' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -68,15 +68,15 @@ class Player implements ModelInterface, ArrayAccess
protected static $swaggerFormats = [
'id' => null,
'hash' => null,
'name' => null ];
'name' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -85,8 +85,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -99,7 +98,8 @@ class Player implements ModelInterface, ArrayAccess
protected static $attributeMap = [
'id' => 'id',
'hash' => 'hash',
'name' => 'name' ];
'name' => 'name',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -109,7 +109,8 @@ class Player implements ModelInterface, ArrayAccess
protected static $setters = [
'id' => 'setId',
'hash' => 'setHash',
'name' => 'setName' ];
'name' => 'setName',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -119,7 +120,8 @@ class Player implements ModelInterface, ArrayAccess
protected static $getters = [
'id' => 'getId',
'hash' => 'getHash',
'name' => 'getName' ];
'name' => 'getName',
];
/**
* Array of attributes where the key is the local name,
@ -127,8 +129,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -137,8 +138,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -147,8 +147,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -157,13 +156,10 @@ class Player implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -177,11 +173,10 @@ class Player implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
$this->container['hash'] = isset($data['hash']) ? $data['hash'] : null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
public function __construct(array $data = null) {
$this->container['id'] = $data['id'] ?? null;
$this->container['hash'] = $data['hash'] ?? null;
$this->container['name'] = $data['name'] ?? null;
}
/**
@ -189,8 +184,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -202,19 +196,16 @@ class Player implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string
*/
public function getId()
{
public function getId() {
return $this->container['id'];
}
@ -225,8 +216,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setId($id)
{
public function setId($id) {
$this->container['id'] = $id;
return $this;
@ -237,8 +227,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getHash()
{
public function getHash() {
return $this->container['hash'];
}
@ -249,8 +238,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHash($hash)
{
public function setHash($hash) {
$this->container['hash'] = $hash;
return $this;
@ -261,8 +249,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getName()
{
public function getName() {
return $this->container['name'];
}
@ -273,12 +260,12 @@ class Player implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setName($name)
{
public function setName($name) {
$this->container['name'] = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -286,8 +273,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -298,8 +284,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -311,8 +296,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -327,8 +311,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -337,8 +320,7 @@ class Player implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class PlayerCode implements ModelInterface, ArrayAccess
{
class PlayerCode implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -56,9 +55,10 @@ class PlayerCode implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $swaggerTypes = [
'player' => '\Swagger\Client\Model\Player',
'player' => Player::class,
'code' => 'string',
'errors' => 'string[]' ];
'errors' => 'string[]',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -68,15 +68,15 @@ class PlayerCode implements ModelInterface, ArrayAccess
protected static $swaggerFormats = [
'player' => null,
'code' => null,
'errors' => null ];
'errors' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -85,8 +85,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -99,7 +98,8 @@ class PlayerCode implements ModelInterface, ArrayAccess
protected static $attributeMap = [
'player' => 'player',
'code' => 'code',
'errors' => 'errors' ];
'errors' => 'errors',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -109,7 +109,8 @@ class PlayerCode implements ModelInterface, ArrayAccess
protected static $setters = [
'player' => 'setPlayer',
'code' => 'setCode',
'errors' => 'setErrors' ];
'errors' => 'setErrors',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -119,7 +120,8 @@ class PlayerCode implements ModelInterface, ArrayAccess
protected static $getters = [
'player' => 'getPlayer',
'code' => 'getCode',
'errors' => 'getErrors' ];
'errors' => 'getErrors',
];
/**
* Array of attributes where the key is the local name,
@ -127,8 +129,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -137,8 +138,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -147,8 +147,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -157,13 +156,10 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -177,11 +173,10 @@ class PlayerCode implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['player'] = isset($data['player']) ? $data['player'] : null;
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
$this->container['errors'] = isset($data['errors']) ? $data['errors'] : null;
public function __construct(array $data = null) {
$this->container['player'] = $data['player'] ?? null;
$this->container['code'] = $data['code'] ?? null;
$this->container['errors'] = $data['errors'] ?? null;
}
/**
@ -189,8 +184,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -202,19 +196,16 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets player
*
* @return \Swagger\Client\Model\Player
*/
public function getPlayer()
{
public function getPlayer() {
return $this->container['player'];
}
@ -225,8 +216,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setPlayer($player)
{
public function setPlayer($player) {
$this->container['player'] = $player;
return $this;
@ -237,8 +227,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getCode()
{
public function getCode() {
return $this->container['code'];
}
@ -249,8 +238,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setCode($code)
{
public function setCode($code) {
$this->container['code'] = $code;
return $this;
@ -261,8 +249,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return string[]
*/
public function getErrors()
{
public function getErrors() {
return $this->container['errors'];
}
@ -273,12 +260,12 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setErrors($errors)
{
public function setErrors($errors) {
$this->container['errors'] = $errors;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -286,8 +273,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -298,8 +284,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -311,8 +296,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -327,8 +311,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -337,8 +320,7 @@ class PlayerCode implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class PlayerGuess implements ModelInterface, ArrayAccess
{
class PlayerGuess implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -57,7 +56,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'dice_count' => 'int',
'die_value' => 'int' ];
'die_value' => 'int',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -66,15 +66,15 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*/
protected static $swaggerFormats = [
'dice_count' => null,
'die_value' => null ];
'die_value' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -83,8 +83,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -96,7 +95,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*/
protected static $attributeMap = [
'dice_count' => 'diceCount',
'die_value' => 'dieValue' ];
'die_value' => 'dieValue',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -105,7 +105,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*/
protected static $setters = [
'dice_count' => 'setDiceCount',
'die_value' => 'setDieValue' ];
'die_value' => 'setDieValue',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -114,7 +115,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*/
protected static $getters = [
'dice_count' => 'getDiceCount',
'die_value' => 'getDieValue' ];
'die_value' => 'getDieValue',
];
/**
* Array of attributes where the key is the local name,
@ -122,8 +124,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -132,8 +133,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -142,8 +142,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -152,13 +151,10 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -172,10 +168,9 @@ class PlayerGuess implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['dice_count'] = isset($data['dice_count']) ? $data['dice_count'] : null;
$this->container['die_value'] = isset($data['die_value']) ? $data['die_value'] : null;
public function __construct(array $data = null) {
$this->container['dice_count'] = $data['dice_count'] ?? null;
$this->container['die_value'] = $data['die_value'] ?? null;
}
/**
@ -183,8 +178,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
if ($this->container['dice_count'] === null) {
@ -193,6 +187,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
if ($this->container['die_value'] === null) {
$invalidProperties[] = "'die_value' can't be null";
}
return $invalidProperties;
}
@ -202,19 +197,16 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets dice_count
*
* @return int
*/
public function getDiceCount()
{
public function getDiceCount() {
return $this->container['dice_count'];
}
@ -225,8 +217,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setDiceCount($dice_count)
{
public function setDiceCount($dice_count) {
$this->container['dice_count'] = $dice_count;
return $this;
@ -237,8 +228,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return int
*/
public function getDieValue()
{
public function getDieValue() {
return $this->container['die_value'];
}
@ -249,12 +239,12 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setDieValue($die_value)
{
public function setDieValue($die_value) {
$this->container['die_value'] = $die_value;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -262,8 +252,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -274,8 +263,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -287,8 +275,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -303,8 +290,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -313,8 +299,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Round implements ModelInterface, ArrayAccess
{
class Round implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -57,10 +56,11 @@ class Round implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'number' => 'int',
'turns' => '\Swagger\Client\Model\Turn[]',
'loser' => '\Swagger\Client\Model\Player',
'turns' => Turn::class . '[]',
'loser' => Player::class,
'my_rolls' => 'int[]',
'rolls' => 'int[][]' ];
'rolls' => 'int[][]',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -72,15 +72,15 @@ class Round implements ModelInterface, ArrayAccess
'turns' => null,
'loser' => null,
'my_rolls' => null,
'rolls' => null ];
'rolls' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -89,8 +89,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -105,7 +104,8 @@ class Round implements ModelInterface, ArrayAccess
'turns' => 'turns',
'loser' => 'loser',
'my_rolls' => 'myRolls',
'rolls' => 'rolls' ];
'rolls' => 'rolls',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -117,7 +117,8 @@ class Round implements ModelInterface, ArrayAccess
'turns' => 'setTurns',
'loser' => 'setLoser',
'my_rolls' => 'setMyRolls',
'rolls' => 'setRolls' ];
'rolls' => 'setRolls',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -129,7 +130,8 @@ class Round implements ModelInterface, ArrayAccess
'turns' => 'getTurns',
'loser' => 'getLoser',
'my_rolls' => 'getMyRolls',
'rolls' => 'getRolls' ];
'rolls' => 'getRolls',
];
/**
* Array of attributes where the key is the local name,
@ -137,8 +139,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -147,8 +148,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -157,8 +157,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -167,13 +166,10 @@ class Round implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -187,13 +183,12 @@ class Round implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
$this->container['turns'] = isset($data['turns']) ? $data['turns'] : null;
$this->container['loser'] = isset($data['loser']) ? $data['loser'] : null;
$this->container['my_rolls'] = isset($data['my_rolls']) ? $data['my_rolls'] : null;
$this->container['rolls'] = isset($data['rolls']) ? $data['rolls'] : null;
public function __construct(array $data = null) {
$this->container['number'] = $data['number'] ?? null;
$this->container['turns'] = $data['turns'] ?? null;
$this->container['loser'] = $data['loser'] ?? null;
$this->container['my_rolls'] = $data['my_rolls'] ?? null;
$this->container['rolls'] = $data['rolls'] ?? null;
}
/**
@ -201,8 +196,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -214,19 +208,16 @@ class Round implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets number
*
* @return int
*/
public function getNumber()
{
public function getNumber() {
return $this->container['number'];
}
@ -237,8 +228,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setNumber($number)
{
public function setNumber($number) {
$this->container['number'] = $number;
return $this;
@ -249,8 +239,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Turn[]
*/
public function getTurns()
{
public function getTurns() {
return $this->container['turns'];
}
@ -261,8 +250,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setTurns($turns)
{
public function setTurns($turns) {
$this->container['turns'] = $turns;
return $this;
@ -273,8 +261,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Player
*/
public function getLoser()
{
public function getLoser() {
return $this->container['loser'];
}
@ -285,8 +272,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setLoser($loser)
{
public function setLoser($loser) {
$this->container['loser'] = $loser;
return $this;
@ -297,8 +283,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return int[][]
*/
public function getMyRolls()
{
public function getMyRolls() {
return $this->container['my_rolls'];
}
@ -309,8 +294,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setMyRolls($my_rolls)
{
public function setMyRolls($my_rolls) {
$this->container['my_rolls'] = $my_rolls;
return $this;
@ -321,8 +305,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return int[]
*/
public function getRolls()
{
public function getRolls() {
return $this->container['rolls'];
}
@ -333,12 +316,12 @@ class Round implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setRolls($rolls)
{
public function setRolls($rolls) {
$this->container['rolls'] = $rolls;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -346,8 +329,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -358,8 +340,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -371,8 +352,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -387,8 +367,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -397,8 +376,7 @@ class Round implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),

View File

@ -39,8 +39,7 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Turn implements ModelInterface, ArrayAccess
{
class Turn implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
@ -57,9 +56,10 @@ class Turn implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'number' => 'int',
'player' => '\Swagger\Client\Model\Player',
'player' => Player::class,
'dice_count' => 'int',
'die_value' => 'int' ];
'die_value' => 'int',
];
/**
* Array of property to format mappings. Used for (de)serialization
@ -70,15 +70,15 @@ class Turn implements ModelInterface, ArrayAccess
'number' => null,
'player' => null,
'dice_count' => null,
'die_value' => null ];
'die_value' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -87,8 +87,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -102,7 +101,8 @@ class Turn implements ModelInterface, ArrayAccess
'number' => 'number',
'player' => 'player',
'dice_count' => 'diceCount',
'die_value' => 'dieValue' ];
'die_value' => 'dieValue',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -113,7 +113,8 @@ class Turn implements ModelInterface, ArrayAccess
'number' => 'setNumber',
'player' => 'setPlayer',
'dice_count' => 'setDiceCount',
'die_value' => 'setDieValue' ];
'die_value' => 'setDieValue',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -124,7 +125,8 @@ class Turn implements ModelInterface, ArrayAccess
'number' => 'getNumber',
'player' => 'getPlayer',
'dice_count' => 'getDiceCount',
'die_value' => 'getDieValue' ];
'die_value' => 'getDieValue',
];
/**
* Array of attributes where the key is the local name,
@ -132,8 +134,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -142,8 +143,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -152,8 +152,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -162,13 +161,10 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -182,12 +178,11 @@ class Turn implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
$this->container['player'] = isset($data['player']) ? $data['player'] : null;
$this->container['dice_count'] = isset($data['dice_count']) ? $data['dice_count'] : null;
$this->container['die_value'] = isset($data['die_value']) ? $data['die_value'] : null;
public function __construct(array $data = null) {
$this->container['number'] = $data['number'] ?? null;
$this->container['player'] = $data['player'] ?? null;
$this->container['dice_count'] = $data['dice_count'] ?? null;
$this->container['die_value'] = $data['die_value'] ?? null;
}
/**
@ -195,8 +190,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -208,19 +202,16 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets number
*
* @return int
*/
public function getNumber()
{
public function getNumber() {
return $this->container['number'];
}
@ -231,8 +222,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setNumber($number)
{
public function setNumber($number) {
$this->container['number'] = $number;
return $this;
@ -243,8 +233,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\Player
*/
public function getPlayer()
{
public function getPlayer() {
return $this->container['player'];
}
@ -255,8 +244,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setPlayer($player)
{
public function setPlayer($player) {
$this->container['player'] = $player;
return $this;
@ -267,8 +255,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return int
*/
public function getDiceCount()
{
public function getDiceCount() {
return $this->container['dice_count'];
}
@ -279,8 +266,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setDiceCount($dice_count)
{
public function setDiceCount($dice_count) {
$this->container['dice_count'] = $dice_count;
return $this;
@ -291,8 +277,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return int
*/
public function getDieValue()
{
public function getDieValue() {
return $this->container['die_value'];
}
@ -303,12 +288,12 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setDieValue($die_value)
{
public function setDieValue($die_value) {
$this->container['die_value'] = $die_value;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -316,8 +301,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -328,8 +312,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -341,8 +324,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -357,8 +339,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -367,8 +348,7 @@ class Turn implements ModelInterface, ArrayAccess
*
* @return string
*/
public function __toString()
{
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),