Skip to content

Commit

Permalink
Fix SensioLabs Insight issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Rabaix committed Apr 11, 2014
1 parent 00aafec commit f1899cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -9,7 +9,7 @@ php:
before_script:
- composer install --dev --prefer-source

script: phpunit --coverage-text
script: make test

matrix:
allow_failures:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
@@ -0,0 +1,5 @@
.PHONY: test test-all install update clean dev bower load assets

test:
phpunit
cd docs && sphinx-build -W -b html -d _build/doctrees . _build/html
4 changes: 2 additions & 2 deletions lib/Exporter/Source/DoctrineODMQuerySourceIterator.php
Expand Up @@ -30,7 +30,7 @@ class DoctrineODMQuerySourceIterator implements SourceIteratorInterface
protected $iterator;

protected $propertyPaths;

/**
* @var PropertyAccess
*/
Expand Down Expand Up @@ -92,7 +92,7 @@ public function current()
*/
protected function getValue($value)
{
if (is_array($value) or $value instanceof \Traversable) {
if (is_array($value) || $value instanceof \Traversable) {
$value = null;
} elseif ($value instanceof \DateTime) {
$value = $value->format($this->dateTimeFormat);
Expand Down
3 changes: 2 additions & 1 deletion lib/Exporter/Writer/XmlExcelWriter.php
Expand Up @@ -66,6 +66,7 @@ public function write(array $data)
fwrite($this->file, $this->getXmlString($header));
$this->position++;
}

fwrite($this->file, $this->getXmlString($data));
$this->position++;
}
Expand All @@ -91,7 +92,7 @@ private function getXmlString(array $fields = array())
$xmlData[] = '<Row>';
foreach ($fields as $key => $value) {
$value = htmlspecialchars($value);
//$value = htmlentities($value);

$value = str_replace(array("\r\n", "\r", "\n"), '&#10;', $value);
$dataType = 'String';
if ($this->position != 0 || !$this->showHeaders) {
Expand Down

0 comments on commit f1899cd

Please sign in to comment.