Skip to content

Commit

Permalink
Added tests and removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
raulfraile committed Oct 3, 2013
1 parent e0b3e2b commit 3b08528
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 276 deletions.
27 changes: 0 additions & 27 deletions src/Ladybug/Model/VariableWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ public function __construct($id, $data, $type = self::TYPE_CLASS)
$this->type = $type;
}

/**
* Sets the variable id.
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}

/**
* Gets the variable id.
*
Expand All @@ -60,15 +51,6 @@ public function getId()
return $this->id;
}

/**
* Sets the variable type
* @param int $type Variable type: TYPE_CLASS or TYPE_RESOURCE
*/
public function setType($type)
{
$this->type = $type;
}

/**
* Gets the variable type.
*
Expand All @@ -79,15 +61,6 @@ public function getType()
return $this->type;
}

/**
* Sets the variable itself.
* @param mixed $data
*/
public function setData($data)
{
$this->data = $data;
}

/**
* Gets variable.
*
Expand Down
5 changes: 0 additions & 5 deletions src/Ladybug/Type/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,6 @@ public function __clone()
$this->id = uniqid();
}

public function isComposed()
{
return false;
}

public function getInlineValue()
{
return $this->value;
Expand Down
18 changes: 3 additions & 15 deletions src/Ladybug/Type/ArrayType.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,15 @@ public function getFormattedValue()
}

/**
* Sets if the array is terminal
* @param boolean $terminal
*/
public function setTerminal($terminal)
{
$this->terminal = (boolean) $terminal;
}

/**
* Checks whether the variable is terminal.
*
* @return bool
*/
public function getTerminal()
public function isTerminal()
{
return $this->terminal;
}

public function isComposed()
{
return true;
}

public function getInlineValue()
{
$values = array();
Expand Down
28 changes: 5 additions & 23 deletions src/Ladybug/Type/ArrayType/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ public function __construct($key, TypeInterface $value)
$this->value = $value;
}

/**
* Sets the item key
* @param string $key
*/
public function setKey($key)
{
$this->key = $key;
}

/**
* Gets the item key
*
Expand All @@ -52,15 +43,6 @@ public function getKey()
return $this->key;
}

/**
* Sets the item value
* @param TypeInterface $value
*/
public function setValue($value)
{
$this->value = $value;
}

/**
* Gets the item value.
*
Expand All @@ -71,11 +53,11 @@ public function getValue()
return $this->value;
}

public function setLevel($level)
{
$this->value->setLevel($level);
}

/**
* Gets the item level.
*
* @return int
*/
public function getLevel()
{
return $this->value->getLevel();
Expand Down
Loading

0 comments on commit 3b08528

Please sign in to comment.