public function sortReleases()
	{
		// If there is an unreleased release pull that out and sort the rest
		$unreleased = null;
		if (isset($this->releases['unreleased']))
		{
			$unreleased = $this->releases['unreleased'];
			unset($this->releases['unreleased']);
		}

		$order = Sort::sort(array_keys($this->releases));
		$order = array_reverse($order);

		$newOrder = [];
		/** @var Version $version */
		foreach ($order as $version)
		{
			$index = $version->__toString();
			$newOrder[$index] = $this->releases[$index];
		}

		if ($unreleased !== null)
		{
			$newOrder = ['unreleased' => $unreleased] + $newOrder;
		}

		$this->releases = $newOrder;
	}
public function sortReleases()
	{
		// If there is an unreleased release pull that out and sort the rest
		$unreleased = null;
		if (isset($this->releases['unreleased']))
		{
			$unreleased = $this->releases['unreleased'];
			unset($this->releases['unreleased']);
		}

		$order = Sort::sort(array_keys($this->releases));
		$order = array_reverse($order);

		$newOrder = [];
		/** @var Version $version */
		foreach ($order as $version)
		{
			$index = $version->__toString();
			$newOrder[$index] = $this->releases[$index];
		}

		if ($unreleased !== null)
		{
			$newOrder = ['unreleased' => $unreleased] + $newOrder;
		}

		$this->releases = $newOrder;
	}
public function sortReleases ( ) { // If there is an unreleased release pull that out and sort the rest $ unreleased = null ; if ( isset ( $ this -> releases [ 'unreleased' ] ) ) { $ unreleased = $ this -> releases [ 'unreleased' ] ; unset ( $ this -> releases [ 'unreleased' ] ) ; } $ order = Sort :: sort ( array_keys ( $ this -> releases ) ) ; $ order = array_reverse ( $ order ) ; $ newOrder = [ ] ; /** @var Version $version */ foreach ( $ order as $ version ) { $ index = $ version -> __toString ( ) ; $ newOrder [ $ index ] = $ this -> releases [ $ index ] ; } if ( $ unreleased !== null ) { $ newOrder = [ 'unreleased' => $ unreleased ] + $ newOrder ; } $ this -> releases = $ newOrder ; }
Sorts the releases inside this log in accordance with semantic versioning, latest release first.
Sorts the releases inside this log in accordance with semantic versioning latest release first .