Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Dec 3, 2012
2 parents 1e7252d + fa6d4bb commit b810ca1
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Ean5.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function getChecksum($text)
$this->checkText($text);
$checksum = 0;

for ($i = 0 ; $i < $this->barcodeLength; $i ++) {
for ($i = 0; $i < $this->barcodeLength; $i ++) {
$checksum += intval($text{$i}) * ($i % 2 ? 9 : 3);
}

Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Cache/Storage/Adapter/MemoryOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ protected function normalizeMemoryLimit($value)
switch (strtoupper($matches[2])) {
case 'G':
$value*= 1024;
// Break intentionally omitted
// no break

case 'M':
$value*= 1024;
// Break intentionally omitted
// no break

case 'K':
$value*= 1024;
// Break intentionally omitted
// no break
}

return $value;
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Code/Scanner/TokenArrayScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ protected function scan()
return $tokenIndex;
};
$MACRO_TOKEN_LOGICAL_START_INDEX = function() use (&$tokenIndex, &$docCommentIndex) {
;
return ($docCommentIndex === false) ? $tokenIndex : $docCommentIndex;
};
$MACRO_DOC_COMMENT_START = function() use (&$tokenIndex, &$docCommentIndex) {
Expand Down
4 changes: 3 additions & 1 deletion library/Zend/Feed/Reader/Extension/Syndication/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ public function getUpdateFrequencyAsTicks()
$ticks = 1;

switch ($period) {
//intentional fall through
case 'yearly':
$ticks *= 52; //TODO: fix generalisation, how?
// no break
case 'weekly':
$ticks *= 7;
// no break
case 'daily':
$ticks *= 24;
// no break
case 'hourly':
$ticks *= 3600;
break;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Form/Element/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ public function extract()
public function prepareFieldset()
{
if ($this->targetElement !== null) {
for ($i = 0 ; $i != $this->count ; ++$i) {
for ($i = 0; $i != $this->count; ++$i) {
$elementOrFieldset = $this->createNewTargetElementInstance();
$elementOrFieldset->setName($i);

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ protected function prepareValidationGroup(FieldsetInterface $formOrFieldset, arr
if (isset($data[$key])) {
$count = count($data[$key]);

for ($i = 0 ; $i != $count ; ++$i) {
for ($i = 0; $i != $count; ++$i) {
$values[] = $value;
}
}
Expand Down
5 changes: 2 additions & 3 deletions library/Zend/Memory/MemoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,13 @@ public function __construct(CacheStorage $cache = null)
switch (strtolower($memoryLimitStr[strlen($memoryLimitStr)-1])) {
case 'g':
$this->memoryLimit *= 1024;
// Break intentionally omitted
// no break
case 'm':
$this->memoryLimit *= 1024;
// Break intentionally omitted
// no break
case 'k':
$this->memoryLimit *= 1024;
break;

default:
break;
}
Expand Down
5 changes: 3 additions & 2 deletions library/Zend/Mvc/Service/ViewHelperManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$helper->setRouter($serviceLocator->get($router));

$match = $serviceLocator->get('application')
->getMvcEvent()
->getRouteMatch();
->getMvcEvent()
->getRouteMatch()
;

if ($match instanceof RouteMatch) {
$helper->setRouteMatch($match);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Validator/Hostname.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ protected function decodePunycode($encoded)
$char = 0x80;

for ($indexe = ($separator) ? ($separator + 1) : 0; $indexe < $lengthe; ++$lengthd) {
for ($old_index = $index, $pos = 1, $key = 36; 1 ; $key += 36) {
for ($old_index = $index, $pos = 1, $key = 36; 1; $key += 36) {
$hex = ord($encoded[$indexe++]);
$digit = ($hex - 48 < 10) ? $hex - 22
: (($hex - 65 < 26) ? $hex - 65
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/Cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Cycle extends AbstractHelper implements \Iterator
*
* @var array
*/
protected $pointers = array(self::DEFAULT_NAME =>-1) ;
protected $pointers = array(self::DEFAULT_NAME =>-1);

/**
* Array of values
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/HeadScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd)
$type = ($this->autoEscape) ? $this->escape($item->type) : $item->type;
$html = '<script type="' . $type . '"' . $attrString . '>';
if (!empty($item->source)) {
$html .= PHP_EOL ;
$html .= PHP_EOL;

if ($addScriptEscape) {
$html .= $indent . ' ' . $escapeStart . PHP_EOL;
Expand Down
4 changes: 2 additions & 2 deletions tests/ZendTest/Dom/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function testXpathPhpFunctionsShouldBeDisableByDefault()
try {
$this->query->queryXpath('//meta[php:functionString("strtolower", @http-equiv) = "content-type"]');
} catch (\Exception $e) {
return ;
return;
}
$this->assertFails('XPath PHPFunctions should be disable by default');
}
Expand All @@ -218,7 +218,7 @@ public function testXpathPhpFunctionsShouldBeNotCalledWhenSpecifiedFunction()
$this->query->queryXpath('//meta[php:functionString("strtolower", @http-equiv) = "content-type"]');
} catch (\Exception $e) {
// $e->getMessage() - Not allowed to call handler 'strtolower()
return ;
return;
}
$this->assertFails('Not allowed to call handler strtolower()');
}
Expand Down
20 changes: 10 additions & 10 deletions tests/ZendTest/Json/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ public function testOctalValuesAreNotSupportedInJsonNotation()
*/
public function testZf461()
{
$item1 = new Item() ;
$item2 = new Item() ;
$everything = array() ;
$everything['allItems'] = array($item1, $item2) ;
$everything['currentItem'] = $item1 ;
$item1 = new Item();
$item2 = new Item();
$everything = array();
$everything['allItems'] = array($item1, $item2);
$everything['currentItem'] = $item1;

// should not fail
$encoded = Json\Encoder::encode($everything);
Expand All @@ -403,11 +403,11 @@ public function testZf461()
*/
public function testZf4053()
{
$item1 = new Item() ;
$item2 = new Item() ;
$everything = array() ;
$everything['allItems'] = array($item1, $item2) ;
$everything['currentItem'] = $item1 ;
$item1 = new Item();
$item2 = new Item();
$everything = array();
$everything['allItems'] = array($item1, $item2);
$everything['currentItem'] = $item1;

$options = array('silenceCyclicalExceptions'=>true);

Expand Down

0 comments on commit b810ca1

Please sign in to comment.