From 7df482204339696652f981780649c3764c37ffcf Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 16 Oct 2014 12:23:16 -0400
Subject: [PATCH] Moved ISBN support into separate library.

---
 composer.json                                 |   1 +
 composer.lock                                 |  38 ++-
 .../src/VuFind/Content/AbstractBase.php       |   6 +-
 .../VuFind/Content/AuthorNotes/Syndetics.php  |   4 +-
 .../src/VuFind/Content/Excerpts/Syndetics.php |   6 +-
 module/VuFind/src/VuFind/Content/Loader.php   |   4 +-
 .../src/VuFind/Content/Reviews/Amazon.php     |   6 +-
 .../Content/Reviews/AmazonEditorial.php       |   6 +-
 .../src/VuFind/Content/Reviews/Booksite.php   |   6 +-
 .../src/VuFind/Content/Reviews/Guardian.php   |   6 +-
 .../src/VuFind/Content/Reviews/Syndetics.php  |   6 +-
 module/VuFind/src/VuFind/Cover/Generator.php  |   2 +-
 module/VuFind/src/VuFind/Cover/Loader.php     |   3 +-
 .../src/VuFind/RecordDriver/SolrDefault.php   |   2 +-
 .../VuFindTest/Content/Covers/AmazonTest.php  |   2 +-
 .../Content/Covers/BooksiteTest.php           |   2 +-
 .../Content/Covers/ContentCafeTest.php        |   2 +-
 .../Content/Covers/LibraryThingTest.php       |   2 +-
 .../Content/Covers/OpenLibraryTest.php        |   2 +-
 .../VuFindTest/Content/Covers/SummonTest.php  |   2 +-
 vendor/autoload.php                           |   2 +-
 vendor/composer/autoload_namespaces.php       |   1 +
 vendor/composer/autoload_real.php             |   8 +-
 vendor/composer/installed.json                |  38 +++
 vendor/vufind-org/vufindcode/LICENSE          | 278 ++++++++++++++++++
 vendor/vufind-org/vufindcode/README.md        |  14 +
 vendor/vufind-org/vufindcode/build.xml        |  83 ++++++
 vendor/vufind-org/vufindcode/composer.json    |  19 ++
 vendor/vufind-org/vufindcode/phpmd.xml        |  15 +
 .../vufindcode/src/VuFindCode}/ISBN.php       |  36 +--
 .../vufind-org/vufindcode/tests}/ISBNTest.php |  30 +-
 .../vufind-org/vufindcode/tests/phpunit.xml   |  13 +
 32 files changed, 567 insertions(+), 78 deletions(-)
 create mode 100644 vendor/vufind-org/vufindcode/LICENSE
 create mode 100644 vendor/vufind-org/vufindcode/README.md
 create mode 100644 vendor/vufind-org/vufindcode/build.xml
 create mode 100644 vendor/vufind-org/vufindcode/composer.json
 create mode 100644 vendor/vufind-org/vufindcode/phpmd.xml
 rename {module/VuFind/src/VuFind/Code => vendor/vufind-org/vufindcode/src/VuFindCode}/ISBN.php (86%)
 rename {module/VuFind/tests/unit-tests/src/VuFindTest/Code => vendor/vufind-org/vufindcode/tests}/ISBNTest.php (77%)
 create mode 100644 vendor/vufind-org/vufindcode/tests/phpunit.xml

diff --git a/composer.json b/composer.json
index d76eb82208f..e2af12dbd17 100644
--- a/composer.json
+++ b/composer.json
@@ -58,6 +58,7 @@
         "pear-pear.php.net/validate_ispn": "*",
         "serialssolutions/summon": "*",
         "symfony/yaml": "*",
+        "vufind-org/vufindcode": "*",
         "vufind-org/vufindhttp": "*",
         "zendframework/zendframework": "2.2.7",
         "zendframework/zendrest": "2.*",
diff --git a/composer.lock b/composer.lock
index e32afa327c9..04ef4572f90 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "9cd1fe9a339a11f246bbda40fadca844",
+    "hash": "828ea6c9391fbecaa3c42071bdcfe98a",
     "packages": [
         {
             "name": "aferrandini/phpqrcode",
@@ -557,6 +557,42 @@
             "homepage": "http://symfony.com",
             "time": "2014-09-22 09:14:18"
         },
+        {
+            "name": "vufind-org/vufindcode",
+            "version": "v1.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/vufind-org/vufindcode.git",
+                "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/vufind-org/vufindcode/zipball/1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0",
+                "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "VuFindCode\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Demian Katz",
+                    "email": "demian.katz@villanova.edu"
+                }
+            ],
+            "description": "Class for representing ISBNs (a VuFind support library)",
+            "time": "2014-09-17 15:48:11"
+        },
         {
             "name": "vufind-org/vufindhttp",
             "version": "v1.0.0",
diff --git a/module/VuFind/src/VuFind/Content/AbstractBase.php b/module/VuFind/src/VuFind/Content/AbstractBase.php
index 552497d4dd5..055b081abdc 100644
--- a/module/VuFind/src/VuFind/Content/AbstractBase.php
+++ b/module/VuFind/src/VuFind/Content/AbstractBase.php
@@ -69,7 +69,7 @@ abstract class AbstractBase implements \VuFindHttp\HttpServiceAwareInterface,
      * Attempt to get an ISBN-10; revert to ISBN-13 only when ISBN-10 representation
      * is impossible.
      *
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object to convert
+     * @param \VuFindCode\ISBN $isbnObj ISBN object to convert
      *
      * @return string
      */
@@ -111,9 +111,9 @@ abstract class AbstractBase implements \VuFindHttp\HttpServiceAwareInterface,
      * Load results for a particular API key and ISBN.
      *
      * @param string            $key     API key
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @return array
      */
-    abstract public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj);
+    abstract public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj);
 }
diff --git a/module/VuFind/src/VuFind/Content/AuthorNotes/Syndetics.php b/module/VuFind/src/VuFind/Content/AuthorNotes/Syndetics.php
index fadc75f9c6a..dbe12f8edfe 100644
--- a/module/VuFind/src/VuFind/Content/AuthorNotes/Syndetics.php
+++ b/module/VuFind/src/VuFind/Content/AuthorNotes/Syndetics.php
@@ -50,14 +50,14 @@ class Syndetics extends \VuFind\Content\AbstractSyndetics
      * Configuration:  Sources are processed in order - refer to $sourceList.
      *
      * @param string            $key     API key
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with author note data.
      * @author Joel Timothy Norman <joel.t.norman@wmich.edu>
      * @author Andrew Nagy <vufind-tech@lists.sourceforge.net>
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         $sourceList = array(
             'ANOTES' => array(
diff --git a/module/VuFind/src/VuFind/Content/Excerpts/Syndetics.php b/module/VuFind/src/VuFind/Content/Excerpts/Syndetics.php
index 68c677d1d3e..6c45eef08eb 100644
--- a/module/VuFind/src/VuFind/Content/Excerpts/Syndetics.php
+++ b/module/VuFind/src/VuFind/Content/Excerpts/Syndetics.php
@@ -49,15 +49,15 @@ class Syndetics extends \VuFind\Content\AbstractSyndetics
      * for more information.
      * Configuration:  Sources are processed in order - refer to $sourceList.
      *
-     * @param string            $key     API key
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param string           $key     API key
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with excerpt data.
      * @author Joel Timothy Norman <joel.t.norman@wmich.edu>
      * @author Andrew Nagy <vufind-tech@lists.sourceforge.net>
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         // List of syndetic excerpts
         $sourceList = array(
diff --git a/module/VuFind/src/VuFind/Content/Loader.php b/module/VuFind/src/VuFind/Content/Loader.php
index 5ff4bb0e8fe..85ecbf66ce9 100644
--- a/module/VuFind/src/VuFind/Content/Loader.php
+++ b/module/VuFind/src/VuFind/Content/Loader.php
@@ -70,13 +70,13 @@ class Loader
      *
      * @param string $isbn ISBN
      *
-     * @return \VuFind\Code\ISBN|bool
+     * @return \VuFindCode\ISBN|bool
      */
     protected function getIsbnObject($isbn)
     {
         // We can't proceed without an ISBN:
         return (empty($isbn))
-            ? false : new \VuFind\Code\ISBN($isbn);
+            ? false : new \VuFindCode\ISBN($isbn);
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/Content/Reviews/Amazon.php b/module/VuFind/src/VuFind/Content/Reviews/Amazon.php
index 215679ddcf7..2d83066aa82 100644
--- a/module/VuFind/src/VuFind/Content/Reviews/Amazon.php
+++ b/module/VuFind/src/VuFind/Content/Reviews/Amazon.php
@@ -44,14 +44,14 @@ class Amazon extends \VuFind\Content\AbstractAmazon
      * This method is responsible for connecting to Amazon AWS and abstracting
      * customer reviews for the specific ISBN
      *
-     * @param string            $key     API key
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param string           $key     API key
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with review data.
      * @author Andrew Nagy <vufind-tech@lists.sourceforge.net>
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         // TODO: rewrite this to use ZendService\Amazon.
 
diff --git a/module/VuFind/src/VuFind/Content/Reviews/AmazonEditorial.php b/module/VuFind/src/VuFind/Content/Reviews/AmazonEditorial.php
index f43a423a5d5..88cbb5d95f5 100644
--- a/module/VuFind/src/VuFind/Content/Reviews/AmazonEditorial.php
+++ b/module/VuFind/src/VuFind/Content/Reviews/AmazonEditorial.php
@@ -45,14 +45,14 @@ class AmazonEditorial extends \VuFind\Content\AbstractAmazon
      * This method is responsible for connecting to Amazon AWS and abstracting
      * editorial reviews for the specific ISBN
      *
-     * @param string            $key     API key
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param string           $key     API key
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with review data.
      * @author Andrew Nagy <vufind-tech@lists.sourceforge.net>
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         try {
             $amazon = new Amazon($key, 'US', $this->secret);
diff --git a/module/VuFind/src/VuFind/Content/Reviews/Booksite.php b/module/VuFind/src/VuFind/Content/Reviews/Booksite.php
index 10d828ac2c1..2988f97b6aa 100644
--- a/module/VuFind/src/VuFind/Content/Reviews/Booksite.php
+++ b/module/VuFind/src/VuFind/Content/Reviews/Booksite.php
@@ -69,15 +69,15 @@ class BookSite extends \VuFind\Content\AbstractBase
      *
      * Connects to Booksite's API and retrieves reviews for the specific ISBN
      *
-     * @param string            $key     API key (unused here)
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param string           $key     API key (unused here)
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with review data.
      * @author Joe Atzberger
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         $reviews = array(); // Initialize return value
 
diff --git a/module/VuFind/src/VuFind/Content/Reviews/Guardian.php b/module/VuFind/src/VuFind/Content/Reviews/Guardian.php
index 34f640aae08..09dc05add43 100644
--- a/module/VuFind/src/VuFind/Content/Reviews/Guardian.php
+++ b/module/VuFind/src/VuFind/Content/Reviews/Guardian.php
@@ -44,15 +44,15 @@ class Guardian extends \VuFind\Content\AbstractBase
      * This method is responsible for connecting to the Guardian and abstracting
      * reviews for the specific ISBN.
      *
-     * @param string            $key     API key (unused here)
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param string           $key     API key (unused here)
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with review data.
      * @author Eoghan Ó Carragáin <eoghan.ocarragain@gmail.com>
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         // Base request URL:
         $url
diff --git a/module/VuFind/src/VuFind/Content/Reviews/Syndetics.php b/module/VuFind/src/VuFind/Content/Reviews/Syndetics.php
index dfbc3dffaa4..391ab9d797c 100644
--- a/module/VuFind/src/VuFind/Content/Reviews/Syndetics.php
+++ b/module/VuFind/src/VuFind/Content/Reviews/Syndetics.php
@@ -52,15 +52,15 @@ class Syndetics extends \VuFind\Content\AbstractSyndetics
      * If your library does not like a reviewer, remove it.  If there are more
      * syndetics reviewers add another entry.
      *
-     * @param string            $key     API key (unused here)
-     * @param \VuFind\Code\ISBN $isbnObj ISBN object
+     * @param string           $key     API key (unused here)
+     * @param \VuFindCode\ISBN $isbnObj ISBN object
      *
      * @throws \Exception
      * @return array     Returns array with review data.
      * @author Joel Timothy Norman <joel.t.norman@wmich.edu>
      * @author Andrew Nagy <vufind-tech@lists.sourceforge.net>
      */
-    public function loadByIsbn($key, \VuFind\Code\ISBN $isbnObj)
+    public function loadByIsbn($key, \VuFindCode\ISBN $isbnObj)
     {
         // List of syndetic reviews
         $sourceList = array(
diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php
index 7c38107ac18..73ec22faed5 100644
--- a/module/VuFind/src/VuFind/Cover/Generator.php
+++ b/module/VuFind/src/VuFind/Cover/Generator.php
@@ -26,7 +26,7 @@
  * @link     http://vufind.org/wiki/use_of_external_content Wiki
  */
 namespace VuFind\Cover;
-use VuFind\Code\ISBN, Zend\Log\LoggerInterface, ZendService\Amazon\Amazon;
+use VuFindCode\ISBN, Zend\Log\LoggerInterface, ZendService\Amazon\Amazon;
 
 /**
  * Dynamic Book Cover Generator
diff --git a/module/VuFind/src/VuFind/Cover/Loader.php b/module/VuFind/src/VuFind/Cover/Loader.php
index 05c480c3e9a..f26d2aac9b0 100644
--- a/module/VuFind/src/VuFind/Cover/Loader.php
+++ b/module/VuFind/src/VuFind/Cover/Loader.php
@@ -27,8 +27,7 @@
  * @link     http://vufind.org/wiki/use_of_external_content Wiki
  */
 namespace VuFind\Cover;
-use VuFind\Code\ISBN,
-    VuFind\Content\Covers\PluginManager as ApiManager;
+use VuFindCode\ISBN, VuFind\Content\Covers\PluginManager as ApiManager;
 
 /**
  * Book Cover Generator
diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php
index 1c5bf2f48f6..216ca4590d3 100644
--- a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php
+++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org/wiki/vufind2:record_drivers Wiki
  */
 namespace VuFind\RecordDriver;
-use VuFind\Code\ISBN, VuFind\View\Helper\Root\RecordLink;
+use VuFindCode\ISBN, VuFind\View\Helper\Root\RecordLink;
 
 /**
  * Default model for Solr records -- used when a more specific model based on
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php
index e0394f2aeb0..016c65816fd 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org
  */
 namespace VuFindTest\Content\Covers;
-use VuFind\Code\ISBN;
+use VuFindCode\ISBN;
 
 /**
  * Unit tests for Amazon cover loader.
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/BooksiteTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/BooksiteTest.php
index bf659abd09f..e3c4a63bef1 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/BooksiteTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/BooksiteTest.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org
  */
 namespace VuFindTest\Content\Covers;
-use VuFind\Code\ISBN, VuFind\Content\Covers\Booksite;
+use VuFindCode\ISBN, VuFind\Content\Covers\Booksite;
 
 /**
  * Unit tests for Booksite cover loader.
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/ContentCafeTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/ContentCafeTest.php
index 4a3132837cd..a3f654b3ad6 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/ContentCafeTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/ContentCafeTest.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org
  */
 namespace VuFindTest\Content\Covers;
-use VuFind\Code\ISBN, VuFind\Content\Covers\ContentCafe, Zend\Config\Config;
+use VuFindCode\ISBN, VuFind\Content\Covers\ContentCafe, Zend\Config\Config;
 
 /**
  * Unit tests for ContentCafe cover loader.
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/LibraryThingTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/LibraryThingTest.php
index 51d2c43116c..dab3a0b4d14 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/LibraryThingTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/LibraryThingTest.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org
  */
 namespace VuFindTest\Content\Covers;
-use VuFind\Code\ISBN, VuFind\Content\Covers\LibraryThing;
+use VuFindCode\ISBN, VuFind\Content\Covers\LibraryThing;
 
 /**
  * Unit tests for LibraryThing cover loader.
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/OpenLibraryTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/OpenLibraryTest.php
index b2eaa5816d5..b79d57c7811 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/OpenLibraryTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/OpenLibraryTest.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org
  */
 namespace VuFindTest\Content\Covers;
-use VuFind\Code\ISBN, VuFind\Content\Covers\OpenLibrary;
+use VuFindCode\ISBN, VuFind\Content\Covers\OpenLibrary;
 
 /**
  * Unit tests for OpenLibrary cover loader.
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/SummonTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/SummonTest.php
index 937e7fbd9e9..68b60f648ea 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/SummonTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/SummonTest.php
@@ -27,7 +27,7 @@
  * @link     http://vufind.org
  */
 namespace VuFindTest\Content\Covers;
-use VuFind\Code\ISBN, VuFind\Content\Covers\Summon;
+use VuFindCode\ISBN, VuFind\Content\Covers\Summon;
 
 /**
  * Unit tests for Summon cover loader.
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 5b9cf272a45..96a93059871 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa::getLoader();
+return ComposerAutoloaderInit4c8c308ec44674e7e5ced3a451f8d817::getLoader();
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index f32f348f63c..3cf0e3872c1 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -12,6 +12,7 @@ return array(
     'ZendService' => array($vendorDir . '/zendframework/zendservice-recaptcha/library'),
     'ZendRest' => array($vendorDir . '/zendframework/zendrest/library'),
     'VuFindHttp\\' => array($vendorDir . '/vufind-org/vufindhttp/src'),
+    'VuFindCode\\' => array($vendorDir . '/vufind-org/vufindcode/src'),
     'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
     'SerialsSolutions' => array($vendorDir . '/serialssolutions/summon'),
     'ProxyManager\\' => array($vendorDir . '/ocramius/proxy-manager/src'),
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index e943ac1ba11..eae6b04b7b1 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa
+class ComposerAutoloaderInit4c8c308ec44674e7e5ced3a451f8d817
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit4c8c308ec44674e7e5ced3a451f8d817', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit4c8c308ec44674e7e5ced3a451f8d817', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         array_push($includePaths, get_include_path());
@@ -48,7 +48,7 @@ class ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa
     }
 }
 
-function composerRequire7dec02740c412b5209419ea980a0c5fa($file)
+function composerRequire4c8c308ec44674e7e5ced3a451f8d817($file)
 {
     require $file;
 }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 6a6c74b0881..6479f6891c7 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -951,5 +951,43 @@
         ],
         "description": "VuFind 2.x HTTP service library",
         "homepage": "http://vufind.org/"
+    },
+    {
+        "name": "vufind-org/vufindcode",
+        "version": "v1.0.2",
+        "version_normalized": "1.0.2.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/vufind-org/vufindcode.git",
+            "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/vufind-org/vufindcode/zipball/1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0",
+            "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.0"
+        },
+        "time": "2014-09-17 15:48:11",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "VuFindCode\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "GPL-2.0"
+        ],
+        "authors": [
+            {
+                "name": "Demian Katz",
+                "email": "demian.katz@villanova.edu"
+            }
+        ],
+        "description": "Class for representing ISBNs (a VuFind support library)"
     }
 ]
diff --git a/vendor/vufind-org/vufindcode/LICENSE b/vendor/vufind-org/vufindcode/LICENSE
new file mode 100644
index 00000000000..4eb3f1e9596
--- /dev/null
+++ b/vendor/vufind-org/vufindcode/LICENSE
@@ -0,0 +1,278 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
diff --git a/vendor/vufind-org/vufindcode/README.md b/vendor/vufind-org/vufindcode/README.md
new file mode 100644
index 00000000000..ce842843d9f
--- /dev/null
+++ b/vendor/vufind-org/vufindcode/README.md
@@ -0,0 +1,14 @@
+VuFindCode
+==========
+
+Introduction
+------------
+VuFindCode contains a simple class for dealing with ISBN codes. This is part of
+the VuFind project (http://vufind.org) but may be useful for any software dealing
+with books.
+
+
+Installation
+------------
+The recommended method for incorporating this library into your project is to use
+Composer (http://getcomposer.org).
\ No newline at end of file
diff --git a/vendor/vufind-org/vufindcode/build.xml b/vendor/vufind-org/vufindcode/build.xml
new file mode 100644
index 00000000000..4c86ad6a380
--- /dev/null
+++ b/vendor/vufind-org/vufindcode/build.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="vufindcode" basedir="." default="main">
+  <property name="tmp" value="/tmp" />
+  <property name="package"  value="${phing.project.name}" override="true" />
+  <property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" />
+  <property name="srcdir"   value="${project.basedir}" override="true" />
+
+  <!-- Main Target -->
+  <target name="main" description="main target">
+    <trycatch property="exceptionmsg">
+      <try>
+        <phingcall target="ci-tasks" />
+      </try>
+      <catch>
+        <phingcall target="shutdown" />
+        <fail>Unexpected error during continuous integration tasks -- ${exceptionmsg}</fail>
+      </catch>
+    </trycatch>
+  </target>
+
+  <!-- Continuous Integration Tasks -->
+  <target name="ci-tasks" description="continuous integration tasks">
+
+    <!-- Create dirs -->
+    <mkdir dir="${builddir}/reports"/>
+    <mkdir dir="${builddir}/reports/coverage"/>
+
+    <!-- Call standard tasks -->
+    <phingcall target="phpcs"/>
+    <phingcall target="phpunit"/>
+    <phingcall target="phpdoc"/>
+    <phingcall target="phpcpd"/>
+    <phingcall target="phpmd"/>
+    <phingcall target="pdepend"/>
+    <phingcall target="phploc"/>
+  </target>
+
+  <!-- Report rule violations with PHPMD (mess detector) -->
+  <target name="phpmd">
+    <exec command="phpmd ${srcdir}/src xml ${srcdir}/tests/phpmd.xml --exclude ${srcdir}/tests --reportfile ${builddir}/reports/phpmd.xml" />
+  </target>
+
+  <!-- Measure project with phploc -->
+  <target name="phploc">
+    <exec command="phploc --log-csv ${builddir}/reports/phploc.csv ${srcdir}/src" />
+  </target>
+
+  <!-- PHP_Depend code analysis -->
+  <target name="pdepend">
+    <exec command="pdepend --jdepend-xml=${builddir}/reports/jdepend.xml --jdepend-chart=${builddir}/reports/dependencies.svg --overview-pyramid=${builddir}/reports/pdepend-pyramid.svg ${srcdir}/src" />
+  </target>
+
+  <!-- PHP copy-and-paste detection -->
+  <target name="phpcpd">
+    <exec command="phpcpd --log-pmd ${builddir}/reports/pmd-cpd.xml --exclude tests ${srcdir}/src" />
+  </target>
+
+  <!-- PHP CodeSniffer -->
+  <target name="phpcs">
+    <exec command="phpcs --standard=PEAR --ignore=tests/* --extensions=php --report=checkstyle ${srcdir}/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
+  </target>
+
+  <!-- PHP API Documentation -->
+  <target name="phpdoc">
+    <mkdir dir="${builddir}/apidocs"/>
+    <phpdoc2 title="VuFindCode API Documentation"
+      destdir="${builddir}/apidocs">
+      <fileset dir=".">
+        <include name="src/**/*.php" />
+      </fileset>
+    </phpdoc2>
+  </target>
+
+  <!-- PHPUnit -->
+  <target name="phpunit" description="Run tests">
+    <exec dir="${srcdir}/tests" command="phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" />
+  </target>
+
+  <!-- PHPUnit without logging output -->
+  <target name="phpunitfast" description="Run tests">
+    <exec dir="${srcdir}/tests" command="phpunit -dzend.enable_gc=0" passthru="true" checkreturn="true" />
+  </target>
+</project>
diff --git a/vendor/vufind-org/vufindcode/composer.json b/vendor/vufind-org/vufindcode/composer.json
new file mode 100644
index 00000000000..570be3d393b
--- /dev/null
+++ b/vendor/vufind-org/vufindcode/composer.json
@@ -0,0 +1,19 @@
+{
+    "name": "vufind-org/vufindcode",
+    "description": "Class for representing ISBNs (a VuFind support library)",
+    "authors": [
+        {
+            "name": "Demian Katz",
+            "email": "demian.katz@villanova.edu"
+        }
+    ],
+    "autoload": {
+        "psr-0": {
+            "VuFindCode\\": "src/"
+        }
+    },
+    "require": {
+        "php": ">=5.3.0"
+    },
+    "license": "GPL-2.0"
+}
\ No newline at end of file
diff --git a/vendor/vufind-org/vufindcode/phpmd.xml b/vendor/vufind-org/vufindcode/phpmd.xml
new file mode 100644
index 00000000000..c55950cf181
--- /dev/null
+++ b/vendor/vufind-org/vufindcode/phpmd.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<ruleset name="PHPMD rules for VuFind" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">
+  <description>PHPMD rules for VuFind</description>
+  <rule ref="rulesets/codesize.xml" />
+  <!-- <rule ref="rulesets/controversial.xml" /> -->
+  <rule ref="rulesets/design.xml">
+    <exclude name="EvalExpression" />
+  </rule>
+  <rule ref="rulesets/naming.xml">
+    <exclude name="LongVariable" />
+    <exclude name="ShortVariable" />
+    <exclude name="ShortMethodName" />
+  </rule>
+  <rule ref="rulesets/unusedcode.xml" />
+</ruleset>
diff --git a/module/VuFind/src/VuFind/Code/ISBN.php b/vendor/vufind-org/vufindcode/src/VuFindCode/ISBN.php
similarity index 86%
rename from module/VuFind/src/VuFind/Code/ISBN.php
rename to vendor/vufind-org/vufindcode/src/VuFindCode/ISBN.php
index 43ca7b24597..a09f6466db6 100644
--- a/module/VuFind/src/VuFind/Code/ISBN.php
+++ b/vendor/vufind-org/vufindcode/src/VuFindCode/ISBN.php
@@ -25,7 +25,7 @@
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://www.vufind.org  Main Page
  */
-namespace VuFind\Code;
+namespace VuFindCode;
 
 /**
  * ISBN Class
@@ -97,20 +97,17 @@ class ISBN
      */
     public function get13()
     {
-        // Is it valid?
-        if ($this->isValid()) {
-            // Is it already an ISBN-13?  If so, return as-is.
-            if (strlen($this->raw) == 13) {
-                return $this->raw;
-            } else if (strlen($this->raw) == 10) {
-                // Is it an ISBN-10?  If so, convert to Bookland EAN:
-                $start = '978' . substr($this->raw, 0, 9);
-                return $start . self::getISBN13CheckDigit($start);
-            }
+        // Is it invalid?
+        if (!$this->isValid()) {
+            return false;
         }
-        
-        // If we made it this far, conversion was not possible:
-        return false;
+        // Is it an ISBN-10?  If so, convert to Bookland EAN:
+        if (strlen($this->raw) == 10) {
+            $start = '978' . substr($this->raw, 0, 9);
+            return $start . self::getISBN13CheckDigit($start);
+        }
+        // If we made it this far, it must already be an ISBN-13; return as-is.
+        return $this->raw;
     }
 
     /**
@@ -121,14 +118,9 @@ class ISBN
     public function isValid()
     {
         // If we haven't already checked validity, do so now and store the result:
-        if (is_null($this->valid)) {
-            if (self::isValidISBN10($this->raw)
-                || self::isValidISBN13($this->raw)
-            ) {
-                $this->valid = true;
-            } else {
-                $this->valid = false;
-            }
+        if (null === $this->valid) {
+            $this->valid = self::isValidISBN10($this->raw)
+                || self::isValidISBN13($this->raw);
         }
         return $this->valid;
     }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Code/ISBNTest.php b/vendor/vufind-org/vufindcode/tests/ISBNTest.php
similarity index 77%
rename from module/VuFind/tests/unit-tests/src/VuFindTest/Code/ISBNTest.php
rename to vendor/vufind-org/vufindcode/tests/ISBNTest.php
index 22d0c3c5679..7f46db50cd1 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Code/ISBNTest.php
+++ b/vendor/vufind-org/vufindcode/tests/ISBNTest.php
@@ -25,8 +25,8 @@
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://vufind.org/wiki/vufind2:unit_tests Wiki
  */
-namespace VuFindTest\Code;
-use VuFind\Code\ISBN;
+use VuFindCode\ISBN;
+require_once __DIR__ . '/../src/VuFindCode/ISBN.php';
 
 /**
  * ISBN Test Class
@@ -38,7 +38,7 @@ use VuFind\Code\ISBN;
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://vufind.org/wiki/vufind2:unit_tests Wiki
  */
-class ISBNTest extends \VuFindTest\Unit\TestCase
+class ISBNTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * Test Valid ISBN-10.
@@ -48,8 +48,8 @@ class ISBNTest extends \VuFindTest\Unit\TestCase
     public function testValidISBN10()
     {
         $isbn = new ISBN('0123456789');
-        $this->assertEquals($isbn->get10(), '0123456789');
-        $this->assertEquals($isbn->get13(), '9780123456786');
+        $this->assertEquals('0123456789', $isbn->get10());
+        $this->assertEquals('9780123456786', $isbn->get13());
         $this->assertTrue($isbn->isValid());
     }
 
@@ -61,8 +61,8 @@ class ISBNTest extends \VuFindTest\Unit\TestCase
     public function testValidISBN13()
     {
         $isbn = new ISBN('9780123456786');
-        $this->assertEquals($isbn->get10(), '0123456789');
-        $this->assertEquals($isbn->get13(), '9780123456786');
+        $this->assertEquals('0123456789', $isbn->get10());
+        $this->assertEquals('9780123456786', $isbn->get13());
         $this->assertTrue($isbn->isValid());
     }
 
@@ -74,8 +74,8 @@ class ISBNTest extends \VuFindTest\Unit\TestCase
     public function testValidISBN10WithDashes()
     {
         $isbn = new ISBN('0-12-345678-9');
-        $this->assertEquals($isbn->get10(), '0123456789');
-        $this->assertEquals($isbn->get13(), '9780123456786');
+        $this->assertEquals('0123456789', $isbn->get10());
+        $this->assertEquals('9780123456786', $isbn->get13());
         $this->assertTrue($isbn->isValid());
     }
 
@@ -88,8 +88,8 @@ class ISBNTest extends \VuFindTest\Unit\TestCase
     {
         // Valid ISBN-13 with dashes:
         $isbn = new ISBN('978-0-12-345678-6');
-        $this->assertEquals($isbn->get10(), '0123456789');
-        $this->assertEquals($isbn->get13(), '9780123456786');
+        $this->assertEquals('0123456789', $isbn->get10());
+        $this->assertEquals('9780123456786', $isbn->get13());
         $this->assertTrue($isbn->isValid());
     }
 
@@ -102,8 +102,8 @@ class ISBNTest extends \VuFindTest\Unit\TestCase
     {
         // Valid ISBN-13 outside of Bookland EAN:
         $isbn = new ISBN('9790123456785');
-        $this->assertEquals($isbn->get10(), false);
-        $this->assertEquals($isbn->get13(), '9790123456785');
+        $this->assertFalse($isbn->get10());
+        $this->assertEquals('9790123456785', $isbn->get13());
         $this->assertTrue($isbn->isValid());
     }
 
@@ -116,8 +116,8 @@ class ISBNTest extends \VuFindTest\Unit\TestCase
     {
         // Invalid ISBN-10:
         $isbn = new ISBN('2314346323');
-        $this->assertEquals($isbn->get10(), false);
-        $this->assertEquals($isbn->get13(), false);
+        $this->assertFalse($isbn->get10());
+        $this->assertFalse($isbn->get13());
         $this->assertFalse($isbn->isValid());
     }
 }
\ No newline at end of file
diff --git a/vendor/vufind-org/vufindcode/tests/phpunit.xml b/vendor/vufind-org/vufindcode/tests/phpunit.xml
new file mode 100644
index 00000000000..be9004d5160
--- /dev/null
+++ b/vendor/vufind-org/vufindcode/tests/phpunit.xml
@@ -0,0 +1,13 @@
+<phpunit backupGlobals="false">
+  <testsuites>
+    <testsuite name="AllUnitTests">
+      <directory>.</directory>
+    </testsuite>
+  </testsuites>
+
+  <filter>
+    <whitelist addUncoveredFilesFromWhitelist="true">
+      <directory suffix=".php">../src/VuFindCode</directory>
+    </whitelist>
+  </filter>
+</phpunit>
-- 
GitLab