Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'cs/part2-variable-renaming' of https://github.com/arse/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 61 deletions.
4 changes: 2 additions & 2 deletions src/Cloud/Decorator/AbstractCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class AbstractCloud implements Decorator
*
* @var array
*/
protected $_skipOptions = array(
protected $skipOptions = array(
'options',
'config',
);
Expand Down Expand Up @@ -56,7 +56,7 @@ public function __construct($options = null)
public function setOptions(array $options)
{
foreach ($options as $key => $value) {
if (in_array(strtolower($key), $this->_skipOptions)) {
if (in_array(strtolower($key), $this->skipOptions)) {
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Cloud/Decorator/AbstractTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class AbstractTag implements Decorator
*
* @var array
*/
protected $_skipOptions = array(
protected $skipOptions = array(
'options',
'config',
);
Expand Down Expand Up @@ -56,7 +56,7 @@ public function __construct($options = null)
public function setOptions(array $options)
{
foreach ($options as $key => $value) {
if (in_array(strtolower($key), $this->_skipOptions)) {
if (in_array(strtolower($key), $this->skipOptions)) {
continue;
}

Expand Down
18 changes: 9 additions & 9 deletions src/Cloud/Decorator/HtmlCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ class HtmlCloud extends AbstractCloud
/**
* @var string Encoding to use
*/
protected $_encoding = 'UTF-8';
protected $encoding = 'UTF-8';

/**
* List of HTML tags
*
* @var array
*/
protected $_htmlTags = array(
protected $htmlTags = array(
'ul' => array('class' => 'Zend\Tag\Cloud')
);

Expand All @@ -37,7 +37,7 @@ class HtmlCloud extends AbstractCloud
*
* @var string
*/
protected $_separator = ' ';
protected $separator = ' ';

/**
* Get encoding
Expand All @@ -46,7 +46,7 @@ class HtmlCloud extends AbstractCloud
*/
public function getEncoding()
{
return $this->_encoding;
return $this->encoding;
}

/**
Expand All @@ -57,7 +57,7 @@ public function getEncoding()
*/
public function setEncoding($value)
{
$this->_encoding = (string) $value;
$this->encoding = (string) $value;
return $this;
}

Expand All @@ -69,7 +69,7 @@ public function setEncoding($value)
*/
public function setHTMLTags(array $htmlTags)
{
$this->_htmlTags = $htmlTags;
$this->htmlTags = $htmlTags;
return $this;
}

Expand All @@ -80,7 +80,7 @@ public function setHTMLTags(array $htmlTags)
*/
public function getHTMLTags()
{
return $this->_htmlTags;
return $this->htmlTags;
}

/**
Expand All @@ -91,7 +91,7 @@ public function getHTMLTags()
*/
public function setSeparator($separator)
{
$this->_separator = $separator;
$this->separator = $separator;
return $this;
}

Expand All @@ -102,7 +102,7 @@ public function setSeparator($separator)
*/
public function getSeparator()
{
return $this->_separator;
return $this->separator;
}

/**
Expand Down
40 changes: 20 additions & 20 deletions src/Cloud/Decorator/HtmlTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,33 @@ class HtmlTag extends AbstractTag
*
* @var array
*/
protected $_classList = null;
protected $classList = null;

/**
* @var string Encoding to utilize
*/
protected $_encoding = 'UTF-8';
protected $encoding = 'UTF-8';

/**
* Unit for the fontsize
*
* @var string
*/
protected $_fontSizeUnit = 'px';
protected $fontSizeUnit = 'px';

/**
* Allowed fontsize units
*
* @var array
*/
protected $_alloweFontSizeUnits = array('em', 'ex', 'px', 'in', 'cm', 'mm', 'pt', 'pc', '%');
protected $allowedFontSizeUnits = array('em', 'ex', 'px', 'in', 'cm', 'mm', 'pt', 'pc', '%');

/**
* List of HTML tags
*
* @var array
*/
protected $_htmlTags = array(
protected $htmlTags = array(
'li'
);

Expand All @@ -62,14 +62,14 @@ class HtmlTag extends AbstractTag
*
* @var integer
*/
protected $_maxFontSize = 20;
protected $maxFontSize = 20;

/**
* Minimum fontsize
*
* @var integer
*/
protected $_minFontSize = 10;
protected $minFontSize = 10;

/**
* Set a list of classes to use instead of fontsizes
Expand All @@ -93,7 +93,7 @@ public function setClassList(array $classList = null)
}
}

$this->_classList = $classList;
$this->classList = $classList;
return $this;
}

Expand All @@ -104,7 +104,7 @@ public function setClassList(array $classList = null)
*/
public function getClassList()
{
return $this->_classList;
return $this->classList;
}

/**
Expand All @@ -114,7 +114,7 @@ public function getClassList()
*/
public function getEncoding()
{
return $this->_encoding;
return $this->encoding;
}

/**
Expand All @@ -125,7 +125,7 @@ public function getEncoding()
*/
public function setEncoding($value)
{
$this->_encoding = (string) $value;
$this->encoding = (string) $value;
return $this;
}

Expand All @@ -140,11 +140,11 @@ public function setEncoding($value)
*/
public function setFontSizeUnit($fontSizeUnit)
{
if (!in_array($fontSizeUnit, $this->_alloweFontSizeUnits)) {
if (!in_array($fontSizeUnit, $this->allowedFontSizeUnits)) {
throw new InvalidArgumentException('Invalid fontsize unit specified');
}

$this->_fontSizeUnit = (string) $fontSizeUnit;
$this->fontSizeUnit = (string) $fontSizeUnit;
$this->setClassList(null);
return $this;
}
Expand All @@ -156,7 +156,7 @@ public function setFontSizeUnit($fontSizeUnit)
*/
public function getFontSizeUnit()
{
return $this->_fontSizeUnit;
return $this->fontSizeUnit;
}
/**
* Set the HTML tags surrounding the <a> element
Expand All @@ -166,7 +166,7 @@ public function getFontSizeUnit()
*/
public function setHTMLTags(array $htmlTags)
{
$this->_htmlTags = $htmlTags;
$this->htmlTags = $htmlTags;
return $this;
}

Expand All @@ -177,7 +177,7 @@ public function setHTMLTags(array $htmlTags)
*/
public function getHTMLTags()
{
return $this->_htmlTags;
return $this->htmlTags;
}

/**
Expand All @@ -193,7 +193,7 @@ public function setMaxFontSize($maxFontSize)
throw new InvalidArgumentException('Fontsize must be numeric');
}

$this->_maxFontSize = (int) $maxFontSize;
$this->maxFontSize = (int) $maxFontSize;
$this->setClassList(null);
return $this;
}
Expand All @@ -205,7 +205,7 @@ public function setMaxFontSize($maxFontSize)
*/
public function getMaxFontSize()
{
return $this->_maxFontSize;
return $this->maxFontSize;
}

/**
Expand All @@ -221,7 +221,7 @@ public function setMinFontSize($minFontSize)
throw new InvalidArgumentException('Fontsize must be numeric');
}

$this->_minFontSize = (int) $minFontSize;
$this->minFontSize = (int) $minFontSize;
$this->setClassList(null);
return $this;
}
Expand All @@ -233,7 +233,7 @@ public function setMinFontSize($minFontSize)
*/
public function getMinFontSize()
{
return $this->_minFontSize;
return $this->minFontSize;
}

/**
Expand Down
28 changes: 14 additions & 14 deletions src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ class Item implements TaggableInterface
*
* @var string
*/
protected $_title = null;
protected $title = null;

/**
* Weight of the tag
*
* @var float
*/
protected $_weight = null;
protected $weight = null;

/**
* Custom parameters
*
* @var string
*/
protected $_params = array();
protected $params = array();

/**
* Option keys to skip when calling setOptions()
*
* @var array
*/
protected $_skipOptions = array(
protected $skipOptions = array(
'options',
'param'
);
Expand All @@ -71,11 +71,11 @@ public function __construct($options)

$this->setOptions($options);

if ($this->_title === null) {
if ($this->title === null) {
throw new Exception\InvalidArgumentException('Title was not set');
}

if ($this->_weight === null) {
if ($this->weight === null) {
throw new Exception\InvalidArgumentException('Weight was not set');
}
}
Expand All @@ -89,7 +89,7 @@ public function __construct($options)
public function setOptions(array $options)
{
foreach ($options as $key => $value) {
if (in_array(strtolower($key), $this->_skipOptions)) {
if (in_array(strtolower($key), $this->skipOptions)) {
continue;
}

Expand All @@ -109,7 +109,7 @@ public function setOptions(array $options)
*/
public function getTitle()
{
return $this->_title;
return $this->title;
}

/**
Expand All @@ -125,7 +125,7 @@ public function setTitle($title)
throw new Exception\InvalidArgumentException('Title must be a string');
}

$this->_title = (string) $title;
$this->title = (string) $title;
return $this;
}

Expand All @@ -136,7 +136,7 @@ public function setTitle($title)
*/
public function getWeight()
{
return $this->_weight;
return $this->weight;
}

/**
Expand All @@ -152,7 +152,7 @@ public function setWeight($weight)
throw new Exception\InvalidArgumentException('Weight must be numeric');
}

$this->_weight = (float) $weight;
$this->weight = (float) $weight;
return $this;
}

Expand Down Expand Up @@ -180,7 +180,7 @@ public function setParams(array $params)
*/
public function setParam($name, $value)
{
$this->_params[$name] = $value;
$this->params[$name] = $value;
return $this;
}

Expand All @@ -192,8 +192,8 @@ public function setParam($name, $value)
*/
public function getParam($name)
{
if (isset($this->_params[$name])) {
return $this->_params[$name];
if (isset($this->params[$name])) {
return $this->params[$name];
}
return null;
}
Expand Down
Loading

0 comments on commit 7015d6e

Please sign in to comment.