Skip to content

Commit

Permalink
1.0.0 stable version with unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Iglesias committed Sep 27, 2016
1 parent b6cd6fe commit 45c0184
Show file tree
Hide file tree
Showing 9 changed files with 364 additions and 543 deletions.
1 change: 0 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ public function description ()
return $this->_description;
}


////////////////////////////////////////////////////////////////////////
// Internals

Expand Down
18 changes: 16 additions & 2 deletions src/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ class Feature
* @var
*/
private static $defaultWorld;

/**
* @var array
*/
private static $configCache = array();

/**
* @var
*/
Expand All @@ -63,30 +65,37 @@ class Feature
* @var array
*/
private static $features = array();

/**
* @var string
*/
private static $uaid = '';

/**
* @var string
*/
private static $userID = '';

/**
* @var string
*/
private static $userName = '';

/**
* @var null
*/
private static $group = null;

/**
* @var string
*/
private static $source = '';

/**
* @var bool
*/
private static $isAdmin = false;

/**
* @var string
*/
Expand All @@ -112,7 +121,7 @@ public function __construct(
$userName = '',
$group = null,
$source = '',
$isAdmin = bool,
$isAdmin = false,
$url = ''
) {
self::$log = $log;
Expand All @@ -129,6 +138,8 @@ public function __construct(
/**
* Get an object that can be passed to Smarty templates that wraps
* our API with non-static methods of the same names and arguments.
*
* @return Instance
*/
public static function getInstance()
{
Expand Down Expand Up @@ -337,12 +348,13 @@ public static function clearCacheForTests()
self::$configCache = array();
}


/**
* Get the list of selections that have been made as an array of
* (feature_name, variant_name, selector) arrays. This can be used
* to record information about what features were associated with
* what variants and why during the course of handling a request.
*
* @return array
*/
public static function selections ()
{
Expand All @@ -352,6 +364,8 @@ public static function selections ()
/**
* This API always uses the default World. Config takes
* the world as an argument in order to ease unit testing.
*
* @return World
*/
private static function world ()
{
Expand Down
3 changes: 2 additions & 1 deletion src/World/Mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function __construct ($udid, $userID, Logger $logger)
}

/**
* @return Logger
* UAID of the current request.
* @return mixed
*/
public function uaid()
{
Expand Down
Loading

0 comments on commit 45c0184

Please sign in to comment.