for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Thepixeldeveloper\Nolimits2PackageLoader;
use SimpleXMLElement;
/**
* Class Coaster
*
* @package Thepixeldeveloper\Nolimits2PackageLoader
*/
class Coaster
{
* @var SimpleXMLElement
protected $coasterXML;
* @var Styles
protected $styles;
* Park constructor.
* @param SimpleXMLElement $simpleXMLElement
* @param Styles $styles
public function __construct(SimpleXMLElement $simpleXMLElement, Styles $styles)
$this->coasterXML = $simpleXMLElement;
$this->styles = $styles;
}
* @return string
public function getName()
return (string) $this->coasterXML->name;
* @return int
public function getStyleId()
return (int) $this->coasterXML->coasterstyleid;
public function getStyle()
return $this->styles->getLabel($this->getStyleId());
public function getNumberOfTrains()
return (int) $this->coasterXML->numtrains;
* @return float
public function getMaxHeight()
return (double) $this->coasterXML->maxheight;
public function getMinHeight()
return (double) $this->coasterXML->minheight;
public function getTrackLength()
return (double) $this->coasterXML->tracklength;
public function getTrackLengthWithoutStorage()
return (double) $this->coasterXML->tracklengthwostorage;