cvs: pear /File_MARC MARC.php MARCXML.php package.xml /File_MARC/MARC Record.php

From: Date: Sun, 25 Feb 2007 04:55:09 +0000
Subject: cvs: pear /File_MARC MARC.php MARCXML.php package.xml /File_MARC/MARC Record.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44865@lists.php.net to get a copy of this message
dbs Sun Feb 25 04:55:09 2007 UTC Modified files: /pear/File_MARC MARC.php MARCXML.php package.xml /pear/File_MARC/MARC Record.php Log: Fix basic syntax warnings raised by codechecker. http://cvs.php.net/viewvc.cgi/pear/File_MARC/MARC.php?r1=1.2&r2=1.3&diff_format=u Index: pear/File_MARC/MARC.php diff -u pear/File_MARC/MARC.php:1.2 pear/File_MARC/MARC.php:1.3 --- pear/File_MARC/MARC.php:1.2 Fri Dec 8 01:20:30 2006 +++ pear/File_MARC/MARC.php Sun Feb 25 04:55:09 2007 @@ -32,7 +32,7 @@ * @author Dan Scott <dscott@laurentian.ca> * @copyright 2003-2006 Oy Realnode Ab, Dan Scott * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: MARC.php,v 1.2 2006/12/08 01:20:30 dbs Exp $ + * @version CVS: $Id: MARC.php,v 1.3 2007/02/25 04:55:09 dbs Exp $ * @link http://pear.php.net/package/File_MARC * @example read.php Retrieve specific fields and subfields from a record * @example subfields.php Create new subfields and add them in specific order @@ -239,7 +239,8 @@ */ function next() { - if ($raw = $this->nextRaw()) { + $raw = $this->nextRaw(); + if ($raw) { return $this->_decode($raw); } else { return false; @@ -258,6 +259,7 @@ */ private function _decode($text) { + $matches = array(); if (!preg_match("/^(\d{5})/", $text, $matches)) { $errorMessage = File_MARC_Exception::formatError(File_MARC_Exception::$messages[File_MARC_Exception::ERROR_NONNUMERIC_LENGTH], array("record_length" => substr($text, 0, 5))); throw new File_MARC_Exception($errorMessage, File_MARC_Exception::ERROR_NONNUMERIC_LENGTH); http://cvs.php.net/viewvc.cgi/pear/File_MARC/MARCXML.php?r1=1.2&r2=1.3&diff_format=u Index: pear/File_MARC/MARCXML.php diff -u pear/File_MARC/MARCXML.php:1.2 pear/File_MARC/MARCXML.php:1.3 --- pear/File_MARC/MARCXML.php:1.2 Tue Jan 2 04:18:09 2007 +++ pear/File_MARC/MARCXML.php Sun Feb 25 04:55:09 2007 @@ -31,7 +31,7 @@ * @author Dan Scott <dscott@laurentian.ca> * @copyright 2007 Dan Scott * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: MARCXML.php,v 1.2 2007/01/02 04:18:09 dbs Exp $ + * @version CVS: $Id: MARCXML.php,v 1.3 2007/02/25 04:55:09 dbs Exp $ * @link http://pear.php.net/package/File_MARC * @example read.php Retrieve specific fields and subfields from a record * @example subfields.php Create new subfields and add them in specific order @@ -171,7 +171,8 @@ */ function next() { - if ($record = $this->source->record[$this->counter++]) { + $record = $this->source->record[$this->counter++]; + if ($record) { return $this->_decode($record); } else { return false; http://cvs.php.net/viewvc.cgi/pear/File_MARC/package.xml?r1=1.3&r2=1.4&diff_format=u Index: pear/File_MARC/package.xml diff -u pear/File_MARC/package.xml:1.3 pear/File_MARC/package.xml:1.4 --- pear/File_MARC/package.xml:1.3 Tue Jan 2 02:12:32 2007 +++ pear/File_MARC/package.xml Sun Feb 25 04:55:09 2007 @@ -25,9 +25,9 @@ <email>dbs@php.net</email> <active>yes</active> </lead> - <date>2007-01-01</date> + <date>2007-02-24</date> <version> - <release>0.1.1</release> + <release>0.1.2</release> <api>0.1.0</api> </version> <stability> @@ -36,10 +36,8 @@ </stability> <license uri="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</license> <notes> -0.1.1-alpha -* Add rudimentary File_MARC_Record->toXML() method for converting MARC21 - records to MARCXML format -* Add File_MARCXML class for reading MARCXML records +0.1.2-alpha +* Correct warnings raised by Zend Code Analyzer (thanks to Christophe Gesche's codecheck script) </notes> <contents> <dir name="/" baseinstalldir="File"> http://cvs.php.net/viewvc.cgi/pear/File_MARC/MARC/Record.php?r1=1.4&r2=1.5&diff_format=u Index: pear/File_MARC/MARC/Record.php diff -u pear/File_MARC/MARC/Record.php:1.4 pear/File_MARC/MARC/Record.php:1.5 --- pear/File_MARC/MARC/Record.php:1.4 Tue Jan 2 04:18:09 2007 +++ pear/File_MARC/MARC/Record.php Sun Feb 25 04:55:09 2007 @@ -32,7 +32,7 @@ * @author Dan Scott <dscott@laurentian.ca> * @copyright 2003-2006 Oy Realnode Ab, Dan Scott * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Record.php,v 1.4 2007/01/02 04:18:09 dbs Exp $ + * @version CVS: $Id: Record.php,v 1.5 2007/02/25 04:55:09 dbs Exp $ */ // {{{ class File_MARC_Record @@ -211,9 +211,8 @@ break; default: - $errorMessage = File_MARC_Exception::formatError(File_MARC_Exception::$messages[File_MARC_Exception::ERROR_INSERTFIELD_MODE], array("mode" => $mode)); + $errorMessage = File_MARC_Exception::formatError(File_MARC_Exception::$messages[File_MARC_Exception::ERROR_INSERTFIELD_MODE], array("mode" => $before)); throw new File_MARC_Exception($errorMessage, File_MARC_Exception::ERROR_INSERTFIELD_MODE); - return false; } return $new_field; } @@ -400,7 +399,7 @@ * * @return array warning messages */ - public function getWarnings($warning) + public function getWarnings() { return $this->warnings; }

« previous php.pear.cvs (#44865) next »