Commit dea40afb authored by Olivier Lequeux's avatar Olivier Lequeux
Browse files

sensio fixes

parent c5d7b30f
1.1
* Sensio insights fixes
\ No newline at end of file
......@@ -9,10 +9,9 @@ namespace Lavoisier\Entries;
*/
class Entries extends \ArrayObject implements IEntries
class Entries extends \ArrayObject implements EntriesInterface
{
public function init()
{
}
......@@ -24,9 +23,9 @@ class Entries extends \ArrayObject implements IEntries
static public function getXMLNS($useLavoisierXMLNS = true)
{
if (true === $useLavoisierXMLNS) {
return IEntries::XMLNS_entries;
return EntriesInterface::XMLNS_ENTRIES;
} else {
return IEntries::XMLNS_ex_entries;
return EntriesInterface::XMLNS_EX_ENTRIES;
}
}
......@@ -92,4 +91,4 @@ class Entries extends \ArrayObject implements IEntries
return $this[$name];
}
}
\ No newline at end of file
}
......@@ -4,12 +4,12 @@ namespace Lavoisier\Entries;
/**
* @author Olivier LEQUEUX
*/
interface IEntries {
interface EntriesInterface {
// original simple entries/entry Lavoisier xsd (it's a subset of the following one)
const XMLNS_entries = "http://software.in2p3.fr/lavoisier/entries.xsd";
const XMLNS_ENTRIES = "http://software.in2p3.fr/lavoisier/entries.xsd";
// extended recursive entries/entries/.../entries/entry lavoisiercli xsd
const XMLNS_ex_entries = "https://gitlab.in2p3.fr/opsportal/lavoisiercli/raw/master/resources/ex_entries.xsd";
const XMLNS_EX_ENTRIES = "https://gitlab.in2p3.fr/opsportal/lavoisiercli/raw/master/resources/ex_entries.xsd";
function init();
......
......@@ -15,4 +15,4 @@ class CurlLException extends \Exception
}
}
\ No newline at end of file
}
......@@ -31,4 +31,4 @@ class HTTPStatusException extends \Exception
}
}
\ No newline at end of file
}
......@@ -29,4 +29,4 @@ class CSVasXMLHydrator implements IHydrator
return $result;
}
}
\ No newline at end of file
}
......@@ -8,4 +8,4 @@ class DefaultHydrator implements IHydrator{
return $str;
}
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@
namespace Lavoisier\Hydrators;
use \Lavoisier\Entries\IEntries;
use \Lavoisier\Entries\EntriesInterface;
class EntriesHydrator implements IHydrator
{
......@@ -61,7 +61,7 @@ class EntriesHydrator implements IHydrator
}
}
public function sxiToArray($sxi, IEntries $a)
public function sxiToArray($sxi, EntriesInterface $a)
{
for ($sxi->rewind(); $sxi->valid(); $sxi->next()) {
$key = $this->getAttributeKey($sxi, $a);
......@@ -109,4 +109,4 @@ class EntriesHydrator implements IHydrator
return $key;
}
}
\ No newline at end of file
}
......@@ -12,4 +12,4 @@ class StringHydrator implements IHydrator{
}
return (strval($sxObject->entry));
}
}
\ No newline at end of file
}
......@@ -44,10 +44,10 @@ class EntriesTest extends \PHPUnit_Framework_TestCase
public function getXMLNStest()
{
$this->assertEquals("http://software.in2p3.fr/lavoisier/entries.xsd", Entries::getXMLNS());
$this->assertEquals("http://software.in2p3.fr/lavoisier/entries.xsd", EntriesInterface::getXMLNS());
$this->assertEquals(
"https://gitlab.in2p3.fr/opsportal/lavoisiercli/raw/master/resources/ex_entries.xsd",
Entries::getXMLNS(true)
EntriesInterface::getXMLNS(true)
);
}
......
Markdown is supported
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