From 40b151b4c508c47a89e0d3c63476dd7a6af22888 Mon Sep 17 00:00:00 2001 From: slawkens Date: Wed, 7 Oct 2020 23:36:21 +0200 Subject: [PATCH] Remove whitespaces --- system/libs/pot/OTS_MonstersList.php | 46 +++++++++++++------------- system/libs/pot/OTS_SpellsList.php | 48 ++++++++++++++-------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/system/libs/pot/OTS_MonstersList.php b/system/libs/pot/OTS_MonstersList.php index 8b1372cc..b33bcf57 100644 --- a/system/libs/pot/OTS_MonstersList.php +++ b/system/libs/pot/OTS_MonstersList.php @@ -15,7 +15,7 @@ /** * Wrapper for monsters list. - * + * * @package POT * @version 0.1.3 * @tutorial POT/data_directory.pkg#monsters @@ -24,14 +24,14 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess { /** * Monsters directory. - * + * * @var string */ private $monstersPath; /** * List of loaded monsters. - * + * * @var array */ private $monsters = array(); @@ -40,11 +40,11 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess private $hasErrors = false; /** * Loads monsters mapping file. - * + * *

* Note: You pass directory path, not monsters.xml file name itself. *

- * + * * @param string $path Monsters directory. * @throws DOMException On DOM operation error. */ @@ -64,7 +64,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess log_append('error.log', '[OTS_MonstersList.php] Fatal error: Cannot load monsters.xml. File does not exist. (' . $this->monstersPath . 'monsters.xml' . ').'); throw new Exception('Error: Cannot load monsters.xml. File not found.'); } - + // loads monsters mapping file $monsters = new DOMDocument(); if(!@$monsters->load($this->monstersPath . 'monsters.xml')) { @@ -81,9 +81,9 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Magic PHP5 method. - * + * * Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}. - * + * * @param array $properties List of object properties. */ public function __set_state($properties) @@ -101,7 +101,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Checks if given monster ID exists on list. - * + * * @version 0.1.3 * @since 0.1.3 * @param string $name Monster name. @@ -124,7 +124,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess } /** * Returns loaded data of given monster. - * + * * @version 0.1.3 * @param string $name Monster name. * @return OTS_Monster Monster data. @@ -140,10 +140,10 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess // loads file $monster = new OTS_Monster(); //echo $this->monstersPath . $this->monsters[$name]; - + // check if monster file exist if(file_exists($this->monstersPath . $this->monsters[$name])) { - set_error_handler(array($this, 'xmlErrorHandler')); + set_error_handler(array($this, 'xmlErrorHandler')); $this->lastMonsterFile = $this->monstersPath . $this->monsters[$name]; @$monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name]))); restore_error_handler(); @@ -160,7 +160,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess } /** * Returns amount of monsters loaded. - * + * * @return int Count of monsters. */ public function count() @@ -170,7 +170,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Returns monster at current position in iterator. - * + * * @return OTS_Monster Monster. * @throws DOMException On DOM operation error. */ @@ -178,7 +178,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess { return $this->getMonster( key($this->monsters) ); } - + public function currentFile() { return $this->monsters[key($this->monsters)]; @@ -194,7 +194,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Returns name of current position. - * + * * @return string Current position key. */ public function key() @@ -204,7 +204,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Checks if there is anything more in interator. - * + * * @return bool If iterator has anything more. */ public function valid() @@ -222,7 +222,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Checks if given element exists. - * + * * @param string $offset Array key. * @return bool True if it's set. */ @@ -233,7 +233,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Returns item from given position. - * + * * @version 0.1.3 * @param string $offset Array key. * @return OTS_Monster Monster instance. @@ -246,7 +246,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * This method is implemented for ArrayAccess interface. In fact you can't write/append to monsters list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise. - * + * * @param string|int $offset Array key. * @param mixed $value Field value. * @throws E_OTS_ReadOnly Always - this class is read-only. @@ -258,7 +258,7 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * This method is implemented for ArrayAccess interface. In fact you can't write/append to monsters list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise. - * + * * @param string|int $offset Array key. * @throws E_OTS_ReadOnly Always - this class is read-only. */ @@ -269,11 +269,11 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess /** * Returns string representation of object. - * + * *

* If any display driver is currently loaded then it uses it's method. *

- * + * * @version 0.1.3 * @since 0.1.3 * @return string String representation of object. diff --git a/system/libs/pot/OTS_SpellsList.php b/system/libs/pot/OTS_SpellsList.php index cfd1a581..5c2a91c3 100644 --- a/system/libs/pot/OTS_SpellsList.php +++ b/system/libs/pot/OTS_SpellsList.php @@ -15,11 +15,11 @@ /** * Wrapper for spells list. - * + * *

* Note: Unlike other lists classes this one doesn't implement ArrayAccess interface because it contains three kinds of spells grouped into pararell arrays. *

- * + * * @package POT * @version 0.1.5 * @property-read array $runesList List of rune spells. @@ -44,32 +44,32 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Rune spells. - * + * * @var array */ private $runes = array(); /** * Instant spells. - * + * * @var array */ private $instants = array(); /** * Conjure spells. - * + * * @var array */ private $conjures = array(); /** * Magic PHP5 method. - * + * *

* Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}. *

- * + * * @param array $properties List of object properties. */ public function __set_state($properties) @@ -87,7 +87,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Loads spells list. - * + * * @param string $file Spells file name. * @throws DOMException On DOM operation error. */ @@ -98,7 +98,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable log_append('error.log', '[OTS_SpellsList.php] Fatal error: Cannot load spells.xml. File does not exist. (' . $file . ').'); throw new Exception('Error: Cannot load spells.xml. File not found.'); } - + // loads monsters mapping file $spells = new DOMDocument(); if(!@$spells->load($file)) { @@ -127,7 +127,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns list of runes. - * + * * @return array List of rune names. */ public function getRunesList() @@ -137,7 +137,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Checks if rune exists. - * + * * @version 0.1.3 * @since 0.1.3 * @param string $name Rune name. @@ -150,7 +150,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns given rune spell. - * + * * @version 0.1.3 * @param string $name Rune name. * @return OTS_Spell Rune spell wrapper. @@ -168,7 +168,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns list of instants. - * + * * @return array List of instant spells names. */ public function getInstantsList() @@ -178,7 +178,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Checks if instant exists. - * + * * @version 0.1.3 * @since 0.1.3 * @param string $name Instant name. @@ -191,7 +191,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns given instant spell. - * + * * @version 0.1.3 * @param string $name Spell name. * @return OTS_Spell Instant spell wrapper. @@ -209,7 +209,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns list of conjure spells. - * + * * @return array List of conjure spells names. */ public function getConjuresList() @@ -219,7 +219,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Checks if conjure exists. - * + * * @version 0.1.3 * @since 0.1.3 * @param string $name Conjure name. @@ -232,7 +232,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns given conjure spell. - * + * * @version 0.1.3 * @param string $name Spell name. * @return OTS_Spell Conjure spell wrapper. @@ -250,7 +250,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Magic PHP5 method. - * + * * @param string $name Property name. * @return mixed Property value. * @throws OutOfBoundsException For non-supported properties. @@ -275,11 +275,11 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Returns string representation of object. - * + * *

* If any display driver is currently loaded then it uses it's method. *

- * + * * @version 0.1.3 * @since 0.1.3 * @return string String representation of object. @@ -299,11 +299,11 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Iterator for all spells. - * + * *

* Returned object will continousely iterate through all kind of spells. *

- * + * * @version 0.1.5 * @since 0.1.5 * @return AppendIterator Iterator for all spells. @@ -319,7 +319,7 @@ class OTS_SpellsList implements IteratorAggregate, Countable /** * Number of all loaded spells. - * + * * @version 0.1.5 * @since 0.1.5 * @return int Amount of all spells.