From e6ec22ef354062d146fa1914afbfb0722b35980b Mon Sep 17 00:00:00 2001 From: Chukwuemeka Nwobodo Date: Wed, 22 Mar 2017 03:31:12 +0100 Subject: [PATCH] Fix: Issue #2 --- src/PopplerPhp/Config.php | 2 +- src/PopplerPhp/PopplerUtil.php | 2 +- tests/PopplerUtilTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PopplerPhp/Config.php b/src/PopplerPhp/Config.php index c41719d..465d4f9 100644 --- a/src/PopplerPhp/Config.php +++ b/src/PopplerPhp/Config.php @@ -46,7 +46,7 @@ public static function getInstance() * * @return bool */ - public static function isSet($key) + public static function isKeySet($key) { return self::get($key, C::DEFAULT) != C::DEFAULT; } diff --git a/src/PopplerPhp/PopplerUtil.php b/src/PopplerPhp/PopplerUtil.php index 562ac07..ff51930 100644 --- a/src/PopplerPhp/PopplerUtil.php +++ b/src/PopplerPhp/PopplerUtil.php @@ -66,7 +66,7 @@ public function open($pdfFile) if (is_file($real_path)) { $this->source_pdf = $real_path; - if (!Config::isSet(C::OUTPUT_DIR)) { + if (!Config::isKeySet(C::OUTPUT_DIR)) { Config::setOutputDirectory(dirname($pdfFile)); } diff --git a/tests/PopplerUtilTest.php b/tests/PopplerUtilTest.php index 51c710f..d7836a5 100644 --- a/tests/PopplerUtilTest.php +++ b/tests/PopplerUtilTest.php @@ -51,7 +51,7 @@ public function testMakeOptionsMethod() public function testOutputDirMethodSetterAndGetter() { Config::setOutputDirectory(Config::getOutputDirectory(C::DEFAULT)); - $this->assertTrue(Config::isSet(C::OUTPUT_DIR)); + $this->assertTrue(Config::isKeySet(C::OUTPUT_DIR)); $source_file = __DIR__.'/sources/test1.pdf'; $cairo = new PdfToCairo($source_file);