Clean up and docs
This commit is contained in:
parent
aef387bab3
commit
2ec9b2254b
3 changed files with 3 additions and 5 deletions
|
|
@ -55,7 +55,7 @@ class ArrayObject extends \ArrayObject
|
||||||
*
|
*
|
||||||
* @return int|array
|
* @return int|array
|
||||||
*/
|
*/
|
||||||
public function randomValue( $count = 1)
|
public function randomValue( $count = 1 )
|
||||||
{
|
{
|
||||||
$arr = ( array )$this;
|
$arr = ( array )$this;
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ class ArrayObject extends \ArrayObject
|
||||||
* @param string $valueOptions
|
* @param string $valueOptions
|
||||||
* @param string $null
|
* @param string $null
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string The html for the table
|
||||||
*/
|
*/
|
||||||
public function toTable(
|
public function toTable(
|
||||||
$transpose = false,
|
$transpose = false,
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class Enum extends \yii\base\Object
|
||||||
*/
|
*/
|
||||||
public static function isEmpty($var)
|
public static function isEmpty($var)
|
||||||
{
|
{
|
||||||
return !isset($var) ? true : (is_array($var) ? empty($var) : ($var === null || $var === ''));
|
return !isset( $var ) ? true : ( is_array( $var ) ? empty( $var ) : ( $var === null || $var === '' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
use adeattwood\helpers\ArrayObject;
|
use adeattwood\helpers\ArrayObject;
|
||||||
|
|
||||||
|
|
||||||
class ArrayObjectCest
|
class ArrayObjectCest
|
||||||
{
|
{
|
||||||
public $arrayObject;
|
public $arrayObject;
|
||||||
|
|
@ -44,7 +43,6 @@ class ArrayObjectCest
|
||||||
*/
|
*/
|
||||||
public function testToTable( UnitTester $I )
|
public function testToTable( UnitTester $I )
|
||||||
{
|
{
|
||||||
require __DIR__ . "/../../vendor/yiisoft/yii2/Yii.php";
|
|
||||||
$table = $this->arrayObject->toTable();
|
$table = $this->arrayObject->toTable();
|
||||||
|
|
||||||
$I->assertContains( '<table class="table table-bordered table-striped">', $table );
|
$I->assertContains( '<table class="table table-bordered table-striped">', $table );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue