Permalink
Browse files

Merge branch 'release'

  • Loading branch information...
2 parents 82c601b + beec01b commit ff98f6530b6dafd431276562c630c17f4ccfca7e @weierophinney weierophinney committed Sep 13, 2012
Showing with 164 additions and 164 deletions.
  1. +4 −4 library/Zend/Captcha/Image.php
  2. +2 −2 library/Zend/Console/Adapter/AbstractAdapter.php
  3. +1 −1 library/Zend/Console/Adapter/Posix.php
  4. +1 −1 library/Zend/Console/Adapter/Windows.php
  5. +2 −2 library/Zend/Console/Adapter/WindowsAnsicon.php
  6. +2 −2 library/Zend/Console/Prompt/Char.php
  7. +2 −2 library/Zend/Console/Prompt/Confirm.php
  8. +3 −3 library/Zend/Console/Prompt/Number.php
  9. +1 −1 library/Zend/Console/Request.php
  10. +1 −1 library/Zend/Di/InstanceManager.php
  11. +9 −9 library/Zend/Feed/PubSubHubbub/Publisher.php
  12. +11 −11 library/Zend/Feed/Reader/Entry/Rss.php
  13. +1 −1 library/Zend/Feed/Reader/Extension/Atom/Entry.php
  14. +2 −2 library/Zend/Feed/Reader/Extension/Content/Entry.php
  15. +2 −2 library/Zend/Feed/Reader/Reader.php
  16. +1 −1 library/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php
  17. +4 −4 library/Zend/Filter/Inflector.php
  18. +2 −2 library/Zend/Filter/Word/SeparatorToCamelCase.php
  19. +1 −1 library/Zend/Form/View/Helper/FormRow.php
  20. +2 −2 library/Zend/Http/Client/Adapter/Curl.php
  21. +1 −1 library/Zend/Http/Client/Adapter/Socket.php
  22. +2 −2 library/Zend/Http/Header/CacheControl.php
  23. +1 −1 library/Zend/Http/Header/GenericMultiHeader.php
  24. +1 −1 library/Zend/Json/Encoder.php
  25. +1 −1 library/Zend/Json/Json.php
  26. +1 −1 library/Zend/Loader/StandardAutoloader.php
  27. +1 −1 library/Zend/Mail/Header/GenericHeader.php
  28. +1 −1 library/Zend/Mail/Header/GenericMultiHeader.php
  29. +1 −1 library/Zend/Mail/Protocol/Smtp.php
  30. +1 −1 library/Zend/Mail/Storage/Maildir.php
  31. +1 −1 library/Zend/Mime/Message.php
  32. +2 −2 library/Zend/Mime/Mime.php
  33. +1 −1 library/Zend/ModuleManager/Listener/ListenerOptions.php
  34. +24 −24 library/Zend/Mvc/Router/Console/Simple.php
  35. +10 −10 library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php
  36. +1 −1 library/Zend/Serializer/Adapter/Json.php
  37. +1 −1 library/Zend/Server/Reflection/AbstractFunction.php
  38. +2 −2 library/Zend/Soap/AutoDiscover.php
  39. +1 −1 library/Zend/Soap/Server/DocumentLiteralWrapper.php
  40. +2 −2 library/Zend/View/Helper/HeadStyle.php
  41. +1 −1 library/Zend/View/Model/ViewModel.php
  42. +2 −2 library/Zend/View/Renderer/JsonRenderer.php
  43. +1 −1 library/Zend/View/View.php
  44. +2 −2 tests/ZendTest/Code/TestAsset/BarClass.php
  45. +2 −2 tests/ZendTest/Code/TestAsset/FooClass.php
  46. +2 −2 tests/ZendTest/Code/TestAsset/MultipleNamespaces.php
  47. +22 −22 tests/ZendTest/Config/ConfigTest.php
  48. +1 −1 tests/ZendTest/Config/FactoryTest.php
  49. +1 −1 tests/ZendTest/Console/GetoptTest.php
  50. +1 −1 tests/ZendTest/Feed/Reader/Integration/WordpressAtom10Test.php
  51. +7 −7 tests/ZendTest/Http/Client/StaticClientTest.php
  52. +1 −1 tests/ZendTest/Http/Header/AcceptTest.php
  53. +2 −2 tests/ZendTest/Http/Response/ResponseStreamTest.php
  54. +2 −2 tests/ZendTest/Mime/PartTest.php
  55. +2 −2 tests/ZendTest/Mvc/ApplicationTest.php
  56. +4 −4 tests/ZendTest/Permissions/Acl/AclTest.php
  57. +1 −1 tests/ZendTest/Validator/InArrayTest.php
@@ -518,10 +518,10 @@ protected function generateImage($id, $word)
// generate noise
for ($i=0; $i < $this->dotNoiseLevel; $i++) {
- imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
+ imagefilledellipse($img, mt_rand(0, $w), mt_rand(0, $h), 2, 2, $text_color);
}
for ($i=0; $i < $this->lineNoiseLevel; $i++) {
- imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
+ imageline($img, mt_rand(0, $w), mt_rand(0, $h), mt_rand(0, $w), mt_rand(0, $h), $text_color);
}
// transformed image
@@ -582,11 +582,11 @@ protected function generateImage($id, $word)
// generate noise
for ($i=0; $i<$this->dotNoiseLevel; $i++) {
- imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
+ imagefilledellipse($img2, mt_rand(0, $w), mt_rand(0, $h), 2, 2, $text_color);
}
for ($i=0; $i<$this->lineNoiseLevel; $i++) {
- imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
+ imageline($img2, mt_rand(0, $w), mt_rand(0, $h), mt_rand(0, $w), mt_rand(0, $h), $text_color);
}
imagepng($img2, $img_file);
@@ -101,7 +101,7 @@ public function writeLine($text = "", $color = null, $bgColor = null)
} elseif ($width == $consoleWidth) {
$this->write($text, $color, $bgColor);
} else {
- $this->write($text. "\n", $color, $bgColor);
+ $this->write($text . "\n", $color, $bgColor);
}
}
@@ -609,7 +609,7 @@ public function readChar($mask = null)
$f = fopen('php://stdin','r');
do {
$char = fread($f,1);
- } while ($mask === null || stristr($mask,$char));
+ } while ($mask === null || stristr($mask, $char));
fclose($f);
return $char;
}
@@ -117,7 +117,7 @@ public function getWidth()
/**
* Try to read console size from "tput" command
*/
- $result = exec('tput cols',$output, $return);
+ $result = exec('tput cols', $output, $return);
if (!$return && is_numeric($result)) {
return $width = (int)$result;
}
@@ -363,7 +363,7 @@ public function readChar($mask = null)
public function readLine($maxLength = 2048)
{
$f = fopen('php://stdin','r');
- $line = rtrim(fread($f,$maxLength),"\r\n");
+ $line = rtrim(fread($f, $maxLength),"\r\n");
fclose($f);
return $line;
@@ -264,7 +264,7 @@ public function readChar($mask = null)
$result = $return = null;
exec(
'powershell -NonInteractive -NoProfile -NoLogo -OutputFormat Text -Command "'
- . '[int[]] $mask = '.join(',',$asciiMask).';'
+ . '[int[]] $mask = '.join(',', $asciiMask).';'
. 'do {'
. '$key = $Host.UI.RawUI.ReadKey(\'NoEcho,IncludeKeyDown\').VirtualKeyCode;'
. '} while( !($mask -contains $key) );'
@@ -276,7 +276,7 @@ public function readChar($mask = null)
$char = !empty($result) ? trim(implode('', $result)) : null;
- if (!$return && $char && ($mask === null || in_array($char,$asciiMask))) {
+ if (!$return && $char && ($mask === null || in_array($char, $asciiMask))) {
// We have obtained an ASCII code, check if it is a carriage
// return and normalize it as needed
if ($char == 13) {
@@ -102,7 +102,7 @@ public function show()
$mask .= strtoupper($mask); // uppercase and append
$mask = str_split($mask); // convert to array
$mask = array_unique($mask); // remove duplicates
- $mask = implode("",$mask); // convert back to string
+ $mask = implode("", $mask); // convert back to string
}
do {
@@ -121,7 +121,7 @@ public function show()
/**
* Check if it is an allowed char
*/
- if (stristr($this->allowedChars,$char) !== false) {
+ if (stristr($this->allowedChars, $char) !== false) {
if ($this->echo) {
echo trim($char)."\n";
} else {
@@ -85,7 +85,7 @@ public function show()
public function setNoChar($noChar)
{
$this->noChar = $noChar;
- $this->setAllowedChars($this->yesChar.$this->noChar);
+ $this->setAllowedChars($this->yesChar . $this->noChar);
}
/**
@@ -102,7 +102,7 @@ public function getNoChar()
public function setYesChar($yesChar)
{
$this->yesChar = $yesChar;
- $this->setAllowedChars($this->yesChar.$this->noChar);
+ $this->setAllowedChars($this->yesChar . $this->noChar);
}
/**
@@ -95,13 +95,13 @@ public function show()
$this->getConsole()->writeLine("$number is not a number\n");
$valid = false;
} elseif (!$this->allowFloat && (round($number) != $number) ) {
- $this->getConsole()->writeLine("Please enter a non-floating number, i.e. ".round($number)."\n");
+ $this->getConsole()->writeLine("Please enter a non-floating number, i.e. " . round($number) . "\n");
$valid = false;
} elseif ($this->max !== null && $number > $this->max) {
- $this->getConsole()->writeLine("Please enter a number not greater than ".$this->max."\n");
+ $this->getConsole()->writeLine("Please enter a number not greater than " . $this->max . "\n");
$valid = false;
} elseif ($this->min !== null && $number < $this->min) {
- $this->getConsole()->writeLine("Please enter a number not smaller than ".$this->min."\n");
+ $this->getConsole()->writeLine("Please enter a number not smaller than " . $this->min . "\n");
$valid = false;
}
} while (!$valid);
@@ -164,7 +164,7 @@ public function env()
*/
public function toString()
{
- return trim(implode(' ',$this->params()->toArray()));
+ return trim(implode(' ', $this->params()->toArray()));
}
/**
@@ -97,7 +97,7 @@ public function getSharedInstance($classOrAlias)
public function addSharedInstance($instance, $classOrAlias)
{
if (!is_object($instance)) {
- throw new Exception\InvalidArgumentException('This method requires an object to be shared. Class or Alias given: '.$classOrAlias);
+ throw new Exception\InvalidArgumentException('This method requires an object to be shared. Class or Alias given: ' . $classOrAlias);
}
$this->sharedInstances[$classOrAlias] = $instance;
@@ -108,8 +108,8 @@ public function addHubUrl($url)
{
if (empty($url) || !is_string($url) || !Uri\UriFactory::factory($url)->isValid()) {
throw new Exception\InvalidArgumentException('Invalid parameter "url"'
- .' of "' . $url . '" must be a non-empty string and a valid'
- .'URL');
+ . ' of "' . $url . '" must be a non-empty string and a valid'
+ . 'URL');
}
$this->hubUrls[] = $url;
return $this;
@@ -167,8 +167,8 @@ public function addUpdatedTopicUrl($url)
{
if (empty($url) || !is_string($url) || !Uri\UriFactory::factory($url)->isValid()) {
throw new Exception\InvalidArgumentException('Invalid parameter "url"'
- .' of "' . $url . '" must be a non-empty string and a valid'
- .'URL');
+ . ' of "' . $url . '" must be a non-empty string and a valid'
+ . 'URL');
}
$this->updatedTopicUrls[] = $url;
return $this;
@@ -227,8 +227,8 @@ public function notifyHub($url)
{
if (empty($url) || !is_string($url) || !Uri\UriFactory::factory($url)->isValid()) {
throw new Exception\InvalidArgumentException('Invalid parameter "url"'
- .' of "' . $url . '" must be a non-empty string and a valid'
- .'URL');
+ . ' of "' . $url . '" must be a non-empty string and a valid'
+ . 'URL');
}
$client = $this->_getHttpClient();
$client->setUri($url);
@@ -289,15 +289,15 @@ public function setParameter($name, $value = null)
}
if (empty($name) || !is_string($name)) {
throw new Exception\InvalidArgumentException('Invalid parameter "name"'
- .' of "' . $name . '" must be a non-empty string');
+ . ' of "' . $name . '" must be a non-empty string');
}
if ($value === null) {
$this->removeParameter($name);
return $this;
}
if (empty($value) || (!is_string($value) && $value !== null)) {
throw new Exception\InvalidArgumentException('Invalid parameter "value"'
- .' of "' . $value . '" must be a non-empty string');
+ . ' of "' . $value . '" must be a non-empty string');
}
$this->parameters[$name] = $value;
return $this;
@@ -328,7 +328,7 @@ public function removeParameter($name)
{
if (empty($name) || !is_string($name)) {
throw new Exception\InvalidArgumentException('Invalid parameter "name"'
- .' of "' . $name . '" must be a non-empty string');
+ . ' of "' . $name . '" must be a non-empty string');
}
if (array_key_exists($name, $this->parameters)) {
unset($this->parameters[$name]);
@@ -200,7 +200,7 @@ public function getDateModified()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10
&& $this->getType() !== Reader\Reader::TYPE_RSS_090
) {
- $dateModified = $this->xpath->evaluate('string('.$this->xpathQueryRss.'/pubDate)');
+ $dateModified = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/pubDate)');
if ($dateModified) {
$dateModifiedParsed = strtotime($dateModified);
if ($dateModifiedParsed) {
@@ -260,9 +260,9 @@ public function getDescription()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10
&& $this->getType() !== Reader\Reader::TYPE_RSS_090
) {
- $description = $this->xpath->evaluate('string('.$this->xpathQueryRss.'/description)');
+ $description = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/description)');
} else {
- $description = $this->xpath->evaluate('string('.$this->xpathQueryRdf.'/rss:description)');
+ $description = $this->xpath->evaluate('string(' . $this->xpathQueryRdf . '/rss:description)');
}
if (!$description) {
@@ -330,7 +330,7 @@ public function getId()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10
&& $this->getType() !== Reader\Reader::TYPE_RSS_090
) {
- $id = $this->xpath->evaluate('string('.$this->xpathQueryRss.'/guid)');
+ $id = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/guid)');
}
if (!$id) {
@@ -390,9 +390,9 @@ public function getLinks()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10 &&
$this->getType() !== Reader\Reader::TYPE_RSS_090) {
- $list = $this->xpath->query($this->xpathQueryRss.'//link');
+ $list = $this->xpath->query($this->xpathQueryRss . '//link');
} else {
- $list = $this->xpath->query($this->xpathQueryRdf.'//rss:link');
+ $list = $this->xpath->query($this->xpathQueryRdf . '//rss:link');
}
if (!$list->length) {
@@ -421,9 +421,9 @@ public function getCategories()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10 &&
$this->getType() !== Reader\Reader::TYPE_RSS_090) {
- $list = $this->xpath->query($this->xpathQueryRss.'//category');
+ $list = $this->xpath->query($this->xpathQueryRss . '//category');
} else {
- $list = $this->xpath->query($this->xpathQueryRdf.'//rss:category');
+ $list = $this->xpath->query($this->xpathQueryRdf . '//rss:category');
}
if ($list->length) {
@@ -474,9 +474,9 @@ public function getTitle()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10
&& $this->getType() !== Reader\Reader::TYPE_RSS_090
) {
- $title = $this->xpath->evaluate('string('.$this->xpathQueryRss.'/title)');
+ $title = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/title)');
} else {
- $title = $this->xpath->evaluate('string('.$this->xpathQueryRdf.'/rss:title)');
+ $title = $this->xpath->evaluate('string(' . $this->xpathQueryRdf . '/rss:title)');
}
if (!$title) {
@@ -542,7 +542,7 @@ public function getCommentLink()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10
&& $this->getType() !== Reader\Reader::TYPE_RSS_090
) {
- $commentlink = $this->xpath->evaluate('string('.$this->xpathQueryRss.'/comments)');
+ $commentlink = $this->xpath->evaluate('string(' . $this->xpathQueryRss . '/comments)');
}
if (!$commentlink) {
@@ -465,7 +465,7 @@ public function getCommentFeedLink($type = 'atom')
$link = null;
$list = $this->getXpath()->query(
- $this->getXpathPrefix() . '//atom:link[@rel="replies" and @type="application/'.$type.'+xml"]/@href'
+ $this->getXpathPrefix() . '//atom:link[@rel="replies" and @type="application/' . $type.'+xml"]/@href'
);
if ($list->length) {
@@ -25,9 +25,9 @@ public function getContent()
if ($this->getType() !== Reader\Reader::TYPE_RSS_10
&& $this->getType() !== Reader\Reader::TYPE_RSS_090
) {
- $content = $this->xpath->evaluate('string('.$this->getXpathPrefix().'/content:encoded)');
+ $content = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/content:encoded)');
} else {
- $content = $this->xpath->evaluate('string('.$this->getXpathPrefix().'/content:encoded)');
+ $content = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/content:encoded)');
}
return $content;
}
@@ -207,10 +207,10 @@ public static function import($uri, $etag = null, $lastModified = null)
$data = $cache->getItem($cacheId);
if ($data) {
if ($etag === null) {
- $etag = $cache->getItem($cacheId.'_etag');
+ $etag = $cache->getItem($cacheId . '_etag');
}
if ($lastModified === null) {
- $lastModified = $cache->getItem($cacheId.'_lastmodified');;
+ $lastModified = $cache->getItem($cacheId . '_lastmodified');
}
if ($etag) {
$headers->addHeaderLine('If-None-Match', $etag);
@@ -100,7 +100,7 @@ protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root)
foreach ($links as $link) {
$flink = $this->dom->createElement('link');
$flink->setAttribute('rel', 'replies');
- $flink->setAttribute('type', 'application/'. $link['type'] .'+xml');
+ $flink->setAttribute('type', 'application/' . $link['type'] . '+xml');
$flink->setAttribute('href', $link['uri']);
$count = $this->getDataContainer()->getCommentCount();
if ($count !== null) {
@@ -424,23 +424,23 @@ public function filter($source)
if (isset($source[$ruleName])) {
if (is_string($ruleValue)) {
// overriding the set rule
- $processedParts['#'.$pregQuotedTargetReplacementIdentifier.$ruleName.'#'] = str_replace('\\', '\\\\', $source[$ruleName]);
+ $processedParts['#' . $pregQuotedTargetReplacementIdentifier . $ruleName . '#'] = str_replace('\\', '\\\\', $source[$ruleName]);
} elseif (is_array($ruleValue)) {
$processedPart = $source[$ruleName];
foreach ($ruleValue as $ruleFilter) {
$processedPart = $ruleFilter($processedPart);
}
- $processedParts['#'.$pregQuotedTargetReplacementIdentifier.$ruleName.'#'] = str_replace('\\', '\\\\', $processedPart);
+ $processedParts['#' . $pregQuotedTargetReplacementIdentifier . $ruleName . '#'] = str_replace('\\', '\\\\', $processedPart);
}
} elseif (is_string($ruleValue)) {
- $processedParts['#'.$pregQuotedTargetReplacementIdentifier.$ruleName.'#'] = str_replace('\\', '\\\\', $ruleValue);
+ $processedParts['#' . $pregQuotedTargetReplacementIdentifier . $ruleName . '#'] = str_replace('\\', '\\\\', $ruleValue);
}
}
// all of the values of processedParts would have been str_replace('\\', '\\\\', ..)'d to disable preg_replace backreferences
$inflectedTarget = preg_replace(array_keys($processedParts), array_values($processedParts), $this->target);
- if ($this->throwTargetExceptionsOn && (preg_match('#(?='.$pregQuotedTargetReplacementIdentifier.'[A-Za-z]{1})#', $inflectedTarget) == true)) {
+ if ($this->throwTargetExceptionsOn && (preg_match('#(?=' . $pregQuotedTargetReplacementIdentifier.'[A-Za-z]{1})#', $inflectedTarget) == true)) {
throw new Exception\RuntimeException('A replacement identifier ' . $this->targetReplacementIdentifier . ' was found inside the inflected target, perhaps a rule was not satisfied with a target source? Unsatisfied inflected target: ' . $inflectedTarget);
}
@@ -28,14 +28,14 @@ public function filter($value)
$pregQuotedSeparator = preg_quote($this->separator, '#');
if (self::hasPcreUnicodeSupport()) {
- parent::setPattern(array('#('.$pregQuotedSeparator.')(\p{L}{1})#eu','#(^\p{Ll}{1})#eu'));
+ parent::setPattern(array('#(' . $pregQuotedSeparator.')(\p{L}{1})#eu','#(^\p{Ll}{1})#eu'));
if (!extension_loaded('mbstring')) {
parent::setReplacement(array("strtoupper('\\2')","strtoupper('\\1')"));
} else {
parent::setReplacement(array("mb_strtoupper('\\2', 'UTF-8')","mb_strtoupper('\\1', 'UTF-8')"));
}
} else {
- parent::setPattern(array('#('.$pregQuotedSeparator.')([A-Za-z]{1})#e','#(^[A-Za-z]{1})#e'));
+ parent::setPattern(array('#(' . $pregQuotedSeparator.')([A-Za-z]{1})#e','#(^[A-Za-z]{1})#e'));
parent::setReplacement(array("strtoupper('\\2')","strtoupper('\\1')"));
}
@@ -123,7 +123,7 @@ public function render(ElementInterface $element)
switch ($this->labelPosition) {
case self::LABEL_PREPEND:
- $markup = $labelOpen . '<span>' . $label . '</span>'. $elementString . $labelClose;
+ $markup = $labelOpen . '<span>' . $label . '</span>' . $elementString . $labelClose;
break;
case self::LABEL_APPEND:
default:
Oops, something went wrong. Retry.

0 comments on commit ff98f65

Please sign in to comment.