Skip to content

Commit

Permalink
PSR-2 added space after control structure
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Aug 10, 2012
1 parent bb51ce0 commit e9fab5e
Show file tree
Hide file tree
Showing 144 changed files with 374 additions and 374 deletions.
4 changes: 2 additions & 2 deletions bin/classmap_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
$zfLibraryPath = getenv('LIB_PATH') ? getenv('LIB_PATH') : __DIR__ . '/../library';
if (is_dir($zfLibraryPath)) {
// Try to load StandardAutoloader from library
if (false === include($zfLibraryPath . '/Zend/Loader/StandardAutoloader.php')) {
if (false === include ($zfLibraryPath . '/Zend/Loader/StandardAutoloader.php')) {
echo 'Unable to locate autoloader via library; aborting' . PHP_EOL;
exit(2);
}
} else {
// Try to load StandardAutoloader from include_path
if (false === include('Zend/Loader/StandardAutoloader.php')) {
if (false === include ('Zend/Loader/StandardAutoloader.php')) {
echo 'Unable to locate autoloader via include_path; aborting' . PHP_EOL;
exit(2);
}
Expand Down
6 changes: 3 additions & 3 deletions bin/pluginmap_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
$libPath = getenv('LIB_PATH') ? getenv('LIB_PATH') : __DIR__ . '/../library';
if (!is_dir($libPath)) {
// Try to load StandardAutoloader from include_path
if (false === include('Zend/Loader/StandardAutoloader.php')) {
if (false === include ('Zend/Loader/StandardAutoloader.php')) {
echo "Unable to locate autoloader via include_path; aborting" . PHP_EOL;
exit(2);
}
} else {
// Try to load StandardAutoloader from library
if (false === include($libPath . '/Zend/Loader/StandardAutoloader.php')) {
if (false === include ($libPath . '/Zend/Loader/StandardAutoloader.php')) {
echo "Unable to locate autoloader via library; aborting" . PHP_EOL;
exit(2);
}
Expand Down Expand Up @@ -130,7 +130,7 @@

// Iterate over each element in the path, and create a map of pluginname => classname
$map = new \stdClass;
foreach($l as $file) {
foreach ($l as $file) {
$namespace = empty($file->namespace) ? '' : $file->namespace . '\\';
$plugin = strtolower($file->classname);
$class = $namespace . $file->classname;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Codabar.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function calculateBarcodeWidth()
$quietZone = $this->getQuietZone();
$encodedData = 0;
$barcodeChar = str_split($this->getText());
if(count($barcodeChar) > 1) {
if (count($barcodeChar) > 1) {
foreach ($barcodeChar as $c) {
$encodedData += ((strlen($this->codingMap[$c]) + 1) * $this->barThinWidth) * $this->factor;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Royalmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function getChecksum($text)
$values = str_split($text);
$rowvalue = 0;
$colvalue = 0;
foreach($values as $row) {
foreach ($values as $row) {
$rowvalue += $this->rows[$row];
$colvalue += $this->columns[$row];
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Cache/Storage/Adapter/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ protected function putFileContent($file, $data, $nonBlocking = false, & $wouldbl
throw new Exception\RuntimeException("chmod('{$file}', 0{$oct}) failed", 0, $err);
}

if(!flock($fp, \LOCK_EX | \LOCK_NB, $wouldblock)) {
if (!flock($fp, \LOCK_EX | \LOCK_NB, $wouldblock)) {
fclose($fp);
$err = ErrorHandler::stop();
if ($wouldblock) {
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Scanner/TokenArrayScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getDocComment()
$type = $token[0];
$value = $token[1];
$lineNum = $token[2];
if(($type == T_OPEN_TAG) || ($type == T_WHITESPACE)) {
if (($type == T_OPEN_TAG) || ($type == T_WHITESPACE)) {
continue;
} elseif ($type == T_DOC_COMMENT) {
$this->docComment = $value;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Console/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function writeBox(
$this->write(str_repeat($fillChar, $width), $fillColor, $fillBgColor);
}
} else {
switch($lineStyle){
switch ($lineStyle){
case static::LINE_DOUBLE:
$lineChar = $charset::LINE_DOUBLE_NS;
break;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Platform/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function getIdentifierSeparator()
public function quoteIdentifierInFragment($identifier, array $safeWords = array())
{
$parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
foreach($parts as $i => $part) {
foreach ($parts as $i => $part) {
if ($safeWords && in_array($part, $safeWords)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Platform/Postgresql.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function getIdentifierSeparator()
public function quoteIdentifierInFragment($identifier, array $safeWords = array())
{
$parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
foreach($parts as $i => $part) {
foreach ($parts as $i => $part) {
if ($safeWords && in_array($part, $safeWords)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Platform/Sql92.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function quoteIdentifierInFragment($identifier, array $safeWords = array(
{
$parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

foreach($parts as $i => $part) {
foreach ($parts as $i => $part) {
if ($safeWords && in_array($part, $safeWords)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Platform/SqlServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function getIdentifierSeparator()
public function quoteIdentifierInFragment($identifier, array $safeWords = array())
{
$parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
foreach($parts as $i => $part) {
foreach ($parts as $i => $part) {
if ($safeWords && in_array($part, $safeWords)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Platform/Sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function getIdentifierSeparator()
public function quoteIdentifierInFragment($identifier, array $safeWords = array())
{
$parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
foreach($parts as $i => $part) {
foreach ($parts as $i => $part) {
if ($safeWords && in_array($part, $safeWords)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Debug/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function dump($var, $label=null, $echo=true)
. PHP_EOL . $output
. PHP_EOL;
} else {
if(!extension_loaded('xdebug')) {
if (!extension_loaded('xdebug')) {
$output = htmlspecialchars($output, ENT_QUOTES);
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/PubSubHubbub/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ protected function _getRequestParameters($hubUrl, $mode)
);
}
$params['hub.verify'] = array();
foreach($vmodes as $vmode) {
foreach ($vmodes as $vmode) {
$params['hub.verify'][] = $vmode;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Reader/Extension/Atom/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getContent()
$content = null;

$el = $this->getXpath()->query($this->getXpathPrefix() . '/atom:content');
if($el->length > 0) {
if ($el->length > 0) {
$el = $el->item(0);
$type = $el->getAttribute('type');
switch ($type) {
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Reader/Feed/Atom.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ protected function indexEntries()
$entries = array();
$entries = $this->xpath->evaluate('//atom:entry');

foreach($entries as $index=>$entry) {
foreach ($entries as $index=>$entry) {
$this->entries[$index] = $entry;
}
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Reader/Feed/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ protected function indexEntries()
$entries = $this->xpath->evaluate('//rss:item');
}

foreach($entries as $index=>$entry) {
foreach ($entries as $index=>$entry) {
$this->entries[$index] = $entry;
}
}
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Feed/Reader/FeedSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function addLinks(DOMNodeList $links, $uri)
}
if (!isset($this->rss) && $link->getAttribute('type') == 'application/rss+xml') {
$this->rss = $this->absolutiseUri(trim($link->getAttribute('href')), $uri);
} elseif(!isset($this->atom) && $link->getAttribute('type') == 'application/atom+xml') {
} elseif (!isset($this->atom) && $link->getAttribute('type') == 'application/atom+xml') {
$this->atom = $this->absolutiseUri(trim($link->getAttribute('href')), $uri);
} elseif(!isset($this->rdf) && $link->getAttribute('type') == 'application/rdf+xml') {
} elseif (!isset($this->rdf) && $link->getAttribute('type') == 'application/rdf+xml') {
$this->rdf = $this->absolutiseUri(trim($link->getAttribute('href')), $uri);
}
$this[] = new self(array(
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Feed/Reader/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ public static function detectType($feed, $specOnly = false)
{
if ($feed instanceof Feed\AbstractFeed) {
$dom = $feed->getDomDocument();
} elseif($feed instanceof DOMDocument) {
} elseif ($feed instanceof DOMDocument) {
$dom = $feed;
} elseif(is_string($feed) && !empty($feed)) {
} elseif (is_string($feed) && !empty($feed)) {
ErrorHandler::start(E_NOTICE|E_WARNING);
ini_set('track_errors', 1);
libxml_disable_entity_loader(true);
Expand Down Expand Up @@ -404,7 +404,7 @@ public static function detectType($feed, $specOnly = false)
$version = $xpath->evaluate('string(/rss/@version)');

if (strlen($version) > 0) {
switch($version) {
switch ($version) {
case '2.0':
$type = self::TYPE_RSS_20;
break;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function addAuthor(array $author)
*/
public function addAuthors(array $authors)
{
foreach($authors as $author) {
foreach ($authors as $author) {
$this->addAuthor($author);
}
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function addAuthor(array $author)
*/
public function addAuthors(array $authors)
{
foreach($authors as $author) {
foreach ($authors as $author) {
$this->addAuthor($author);
}
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function _appendNamespaces()
protected function _setFeedLinks(DOMDocument $dom, DOMElement $root)
{
$flinks = $this->getDataContainer()->getFeedLinks();
if(!$flinks || empty($flinks)) {
if (!$flinks || empty($flinks)) {
return;
}
foreach ($flinks as $type => $href) {
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Feed/Writer/Renderer/Entry/Atom.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function render()
*/
protected function _setTitle(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getTitle()) {
if (!$this->getDataContainer()->getTitle()) {
$message = 'Atom 1.0 entry elements MUST contain exactly one'
. ' atom:title element but a title has not been set';
$exception = new Writer\Exception\InvalidArgumentException($message);
Expand All @@ -105,7 +105,7 @@ protected function _setTitle(DOMDocument $dom, DOMElement $root)
*/
protected function _setDescription(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getDescription()) {
if (!$this->getDataContainer()->getDescription()) {
return; // unless src content or base64
}
$subtitle = $dom->createElement('summary');
Expand All @@ -127,7 +127,7 @@ protected function _setDescription(DOMDocument $dom, DOMElement $root)
*/
protected function _setDateModified(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getDateModified()) {
if (!$this->getDataContainer()->getDateModified()) {
$message = 'Atom 1.0 entry elements MUST contain exactly one'
. ' atom:updated element but a modification date has not been set';
$exception = new Writer\Exception\InvalidArgumentException($message);
Expand Down Expand Up @@ -233,7 +233,7 @@ protected function _setEnclosure(DOMDocument $dom, DOMElement $root)

protected function _setLink(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getLink()) {
if (!$this->getDataContainer()->getLink()) {
return;
}
$link = $dom->createElement('link');
Expand All @@ -253,7 +253,7 @@ protected function _setLink(DOMDocument $dom, DOMElement $root)
*/
protected function _setId(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getId()
if (!$this->getDataContainer()->getId()
&& !$this->getDataContainer()->getLink()) {
$message = 'Atom 1.0 entry elements MUST contain exactly one '
. 'atom:id element, or as an alternative, we can use the same '
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function render()
*/
protected function _setComment(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getComment()) {
if (!$this->getDataContainer()->getComment()) {
return;
}
$c = $dom->createElement('at:comment');
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Renderer/Entry/AtomDeleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function render()
*/
protected function _setComment(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getComment()) {
if (!$this->getDataContainer()->getComment()) {
return;
}
$c = $dom->createElement('at:comment');
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Feed/Writer/Renderer/Entry/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function render()
*/
protected function _setTitle(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getDescription()
if (!$this->getDataContainer()->getDescription()
&& !$this->getDataContainer()->getTitle()) {
$message = 'RSS 2.0 entry elements SHOULD contain exactly one'
. ' title element but a title has not been set. In addition, there'
Expand Down Expand Up @@ -106,7 +106,7 @@ protected function _setTitle(DOMDocument $dom, DOMElement $root)
*/
protected function _setDescription(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getDescription()
if (!$this->getDataContainer()->getDescription()
&& !$this->getDataContainer()->getTitle()) {
$message = 'RSS 2.0 entry elements SHOULD contain exactly one'
. ' description element but a description has not been set. In'
Expand Down Expand Up @@ -138,7 +138,7 @@ protected function _setDescription(DOMDocument $dom, DOMElement $root)
*/
protected function _setDateModified(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getDateModified()) {
if (!$this->getDataContainer()->getDateModified()) {
return;
}

Expand Down Expand Up @@ -252,7 +252,7 @@ protected function _setEnclosure(DOMDocument $dom, DOMElement $root)
*/
protected function _setLink(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getLink()) {
if (!$this->getDataContainer()->getLink()) {
return;
}
$link = $dom->createElement('link');
Expand All @@ -270,7 +270,7 @@ protected function _setLink(DOMDocument $dom, DOMElement $root)
*/
protected function _setId(DOMDocument $dom, DOMElement $root)
{
if(!$this->getDataContainer()->getId()
if (!$this->getDataContainer()->getId()
&& !$this->getDataContainer()->getLink()) {
return;
}
Expand Down
Loading

0 comments on commit e9fab5e

Please sign in to comment.