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

Commit

Permalink
Merge pull request zendframework/zendframework#4352 from neeckeloo/do…
Browse files Browse the repository at this point in the history
…c-blocks-consistency

Fix doc blocks consistency and coding standards PSR2

Conflicts:
	library/Zend/Barcode/Renderer/Pdf.php
	library/Zend/Mvc/Router/Http/Regex.php
	library/Zend/View/Helper/Navigation/Listener/AclListener.php
  • Loading branch information
weierophinney committed Apr 29, 2013
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Expr.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* Example:
* <code>
* $foo = array(
* 'integer' =>9,
* 'string' =>'test string',
* 'integer' => 9,
* 'string' => 'test string',
* 'function' => Zend\Json\Expr(
* 'function() { window.alert("javascript function encoded by Zend\Json\Json") }'
* ),
Expand Down
2 changes: 1 addition & 1 deletion src/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ protected static function _getXmlValue($simpleXmlElementObject)
*
* @param SimpleXMLElement $simpleXmlElementObject
* @param bool $ignoreXmlAttributes
* @param integer $recursionDepth
* @param int $recursionDepth
* @throws Exception\RecursionException if the XML tree is deeper than the allowed limit.
* @return array
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Server/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,10 @@ protected function _handle()
}

//Make sure named parameters are passed in correct order
if (is_string( key( $params ) )) {

if (is_string(key($params))) {
$callback = $invokable->getCallback();
if ('function' == $callback->getType()) {
$reflection = new ReflectionFunction( $callback->getFunction() );
$reflection = new ReflectionFunction($callback->getFunction());
} else {

$reflection = new ReflectionMethod(
Expand All @@ -523,9 +522,9 @@ protected function _handle()
$orderedParams = array();
foreach ($reflection->getParameters() as $refParam) {
if (array_key_exists($refParam->getName(), $params)) {
$orderedParams[ $refParam->getName() ] = $params[ $refParam->getName() ];
$orderedParams[$refParam->getName()] = $params[$refParam->getName()];
} elseif ($refParam->isOptional()) {
$orderedParams[ $refParam->getName() ] = null;
$orderedParams[$refParam->getName()] = null;
} else {
return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS);
}
Expand Down

0 comments on commit 9c84fb7

Please sign in to comment.