Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CS fixes

  • Loading branch information...
commit 40527482fad1329c9c43bfecc8d77c804aff7e27 1 parent df0327d
Ingo Walz authored
14 library/Zend/Stdlib/Hydrator/ClassMethods.php
View
@@ -48,7 +48,7 @@ public function __construct($underscoreSeparatedKeys = true)
}
/**
- * @param array|\Traversable $options
+ * @param array|\Traversable $options
* @return ClassMethods
* @throws Exception\InvalidArgumentException
*/
@@ -69,12 +69,13 @@ public function setOptions($options)
}
/**
- * @param boolean $underscoreSeparatedKeys
+ * @param boolean $underscoreSeparatedKeys
* @return ClassMethods
*/
public function setUnderscoreSeparatedKeys($underscoreSeparatedKeys)
{
$this->underscoreSeparatedKeys = $underscoreSeparatedKeys;
+
return $this;
}
@@ -91,7 +92,7 @@ public function getUnderscoreSeparatedKeys()
*
* Extracts the getter/setter of the given $object.
*
- * @param object $object
+ * @param object $object
* @return array
* @throws Exception\BadMethodCallException for a non-object $object
*/
@@ -115,6 +116,7 @@ public function extract($object)
$transform = function ($letters) {
$letter = array_shift($letters);
+
return '_' . strtolower($letter);
};
$attributes = array();
@@ -149,8 +151,8 @@ public function extract($object)
*
* Hydrates an object by getter/setter methods of the object.
*
- * @param array $data
- * @param object $object
+ * @param array $data
+ * @param object $object
* @return object
* @throws Exception\BadMethodCallException for a non-object $object
*/
@@ -164,6 +166,7 @@ public function hydrate(array $data, $object)
$transform = function ($letters) {
$letter = substr(array_shift($letters), 1, 1);
+
return ucfirst($letter);
};
@@ -178,6 +181,7 @@ public function hydrate(array $data, $object)
$object->$method($value);
}
}
+
return $object;
}
30 library/Zend/Stdlib/Hydrator/Filter/FilterComposite.php
View
@@ -48,7 +48,7 @@ public function __construct($orFilter = array(), $andFilter = array())
{
array_walk($orFilter,
function($value, $key) {
- if(
+ if (
!is_callable($value)
&& !$value instanceof FilterInterface
) {
@@ -62,7 +62,7 @@ function($value, $key) {
array_walk($andFilter,
function($value, $key) {
- if(
+ if (
!is_callable($value)
&& !$value instanceof FilterInterface
) {
@@ -94,9 +94,9 @@ function($value, $key) {
* );
* </code>
*
- * @param string $name
- * @param callable|FilterInterface $filter
- * @param int $condition Can be either FilterComposite::CONDITION_OR or FilterComposite::CONDITION_AND
+ * @param string $name
+ * @param callable|FilterInterface $filter
+ * @param int $condition Can be either FilterComposite::CONDITION_OR or FilterComposite::CONDITION_AND
* @throws InvalidArgumentException
* @return FilterComposite
*/
@@ -126,11 +126,11 @@ public function addFilter($name, $filter, $condition = self::CONDITION_OR)
*/
public function removeFilter($name)
{
- if( isset($this->orFilter[$name])) {
+ if (isset($this->orFilter[$name])) {
unset($this->orFilter[$name]);
}
- if( isset($this->andFilter[$name])) {
+ if (isset($this->andFilter[$name])) {
unset($this->andFilter[$name]);
}
@@ -161,10 +161,7 @@ public function filter($property)
$andCount = count($this->andFilter);
$orCount = count($this->orFilter);
// return true if no filters are registered
- if (
- $orCount === 0
- && $andCount === 0
- ) {
+ if ($orCount === 0 && $andCount === 0) {
return true;
} elseif ($orCount === 0 && $andCount !== 0) {
$returnValue = true;
@@ -173,10 +170,9 @@ public function filter($property)
}
// Check if 1 from the or filters return true
- foreach($this->orFilter as $filter) {
+ foreach ($this->orFilter as $filter) {
if (is_callable($filter)) {
- if( $filter($property) === true)
- {
+ if ( $filter($property) === true) {
$returnValue = true;
break;
}
@@ -190,14 +186,14 @@ public function filter($property)
}
// Check if all of the and condition return true
- foreach($this->andFilter as $filter) {
+ foreach ($this->andFilter as $filter) {
if (is_callable($filter)) {
- if( $filter($property) === false) {
+ if ($filter($property) === false) {
return false;
}
continue;
} else {
- if( $filter->filter($property) === false) {
+ if ($filter->filter($property) === false) {
return false;
}
}
1  library/Zend/Stdlib/Hydrator/Filter/NumberOfParameterFilter.php
View
@@ -57,4 +57,3 @@ public function filter($property)
return true;
}
}
-
Please sign in to comment.
Something went wrong with that request. Please try again.