Update doc blocks for all app/

This commit is contained in:
Dane Everitt 2017-03-19 19:36:50 -04:00
parent 5e27772fef
commit 0312c974f5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
114 changed files with 1360 additions and 949 deletions

View file

@ -29,10 +29,17 @@ use GuzzleHttp\Client;
class VersionService
{
/**
* The cached CDN response.
*
* @var object
*/
protected static $versions;
/**
* Constructor.
* Version constructor.
*
* @return void
*/
public function __construct()
{
@ -58,26 +65,51 @@ class VersionService
});
}
/**
* Return current panel version from CDN.
*
* @return string
*/
public static function getPanel()
{
return self::$versions->panel;
}
/**
* Return current daemon version from CDN.
*
* @return string
*/
public static function getDaemon()
{
return self::$versions->daemon;
}
/**
* Return Discord link from CDN.
*
* @return string
*/
public static function getDiscord()
{
return self::$versions->discord;
}
/**
* Return current panel version.
*
* @return null|string
*/
public function getCurrentPanel()
{
return config('app.version');
}
/**
* Determine if panel is latest version.
*
* @return bool
*/
public static function isLatestPanel()
{
if (config('app.version') === 'canary') {
@ -87,6 +119,11 @@ class VersionService
return version_compare(config('app.version'), self::$versions->panel) >= 0;
}
/**
* Determine if daemon is latest version.
*
* @return bool
*/
public static function isLatestDaemon($daemon)
{
if ($daemon === '0.0.0-canary') {