Minor modifications

This commit is contained in:
Dennis Eichhorn 2017-04-11 23:05:03 +02:00
parent fdc0bf8ff7
commit 7a55ea0e56
5 changed files with 26 additions and 45 deletions

View File

@ -35,4 +35,6 @@ abstract class AddressType extends Enum
/* public */ const SHIPPING = 3;
/* public */ const BILLING = 4;
/* public */ const WORK = 5;
/* public */ const CONTRACT = 6;
/* public */ const OTHER = 7;
}

View File

@ -140,4 +140,17 @@ abstract class Enum
return defined('static::' . $name);
}
/**
* Count enum variables
*
* @return int
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function count() : int
{
return count(self::getConstants());
}
}

View File

@ -84,9 +84,19 @@ class ColorUtils
return $gradient;
}
/**
* Convert int to rgb
*
* @param int $rgbInt Value to convert
*
* @return array
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function intToRgb(int $rgbInt) : array
{
$rgb = [];
$rgb = ['r' => 0, 'g' => 0, 'b' => 0];
$rgb['b'] = $rgbInt & 255;
$rgb['g'] = ($rgbInt >> 8) & 255;

View File

@ -1,22 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
namespace phpOMS\Utils\RnG;
class Country
{
}

View File

@ -1,22 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
namespace phpOMS\Utils\RnG;
class Currency
{
}