Skip to content
Snippets Groups Projects
Commit 98e07b4d authored by Demian Katz's avatar Demian Katz
Browse files

Code simplification.

parent ccf9ef5c
No related merge requests found
...@@ -147,33 +147,27 @@ class Editions implements RelatedInterface ...@@ -147,33 +147,27 @@ class Editions implements RelatedInterface
protected function getQueryParts($driver) protected function getQueryParts($driver)
{ {
$parts = array(); $parts = array();
if (method_exists($driver, 'getCleanOCLCNum')) { $oclcNum = $driver->tryMethod('getCleanOCLCNum');
$oclcNum = $driver->getCleanOCLCNum(); if (!empty($oclcNum)) {
if (!empty($oclcNum)) { $oclcList = $this->wcUtils->getXOCLCNUM($oclcNum);
$oclcList = $this->wcUtils->getXOCLCNUM($oclcNum); foreach ($oclcList as $current) {
foreach ($oclcList as $current) { $parts[] = "oclc_num:" . $current;
$parts[] = "oclc_num:" . $current;
}
} }
} }
if (method_exists($driver, 'getCleanISBN')) { $isbn = $driver->tryMethod('getCleanISBN');
$isbn = $driver->getCleanISBN(); if (!empty($isbn)) {
if (!empty($isbn)) { $isbnList = $this->wcUtils->getXISBN($isbn);
$isbnList = $this->wcUtils->getXISBN($isbn); foreach ($isbnList as $current) {
foreach ($isbnList as $current) { $parts[] = 'isbn:' . $current;
$parts[] = 'isbn:' . $current;
}
} }
} }
if (method_exists($driver, 'getCleanISSN')) { $issn = $driver->tryMethod('getCleanISSN');
$issn = $driver->getCleanISSN(); if (!empty($issn)) {
if (!empty($issn)) { $issnList = $this->wcUtils->getXISSN($issn);
$issnList = $this->wcUtils->getXISSN($issn); foreach ($issnList as $current) {
foreach ($issnList as $current) { $parts[] = 'issn:' . $current;
$parts[] = 'issn:' . $current;
}
} }
} }
return $parts; return $parts;
} }
} }
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment