Skip to content

Commit

Permalink
Try to fix Java execution errors on Travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaillard committed Aug 9, 2016
1 parent 9054dc7 commit 1465db9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 30 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ install:
- composer install

script:
- java -classpath '/home/travis/build/gomoob/php-metadata-extractor/src/main/resources/jars/*' com.drew.imaging.ImageMetadataReader '/home/travis/build/gomoob/php-metadata-extractor/src/test/resources/elephant.jpg'
- grunt

after_script:
Expand Down
26 changes: 0 additions & 26 deletions src/main/php/Gomoob/BinaryDriver/DebugListener.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static function addTagToDirectory(Directory $directory, $tagLine)
// var_dump($nameAndDescription[0]);
// var_dump($nameAndDescription[1]);

switch ($nameAndDescription[1]) {
switch ($nameAndDescription[0]) {
case 'Interoperability Index':
break;
case 'Interoperability Version':
Expand Down
14 changes: 13 additions & 1 deletion src/main/php/Gomoob/MetadataExtractor/Metadata/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Gomoob\MetadataExtractor\Metadata;

use Gomoob\Java\Lang\NullPointerException;
use Gomoob\MetadataExtractor\Lang\Rational;

/**
* Abstract base class for all directory implementations, having methods for getting and setting tag values of various
Expand Down Expand Up @@ -163,10 +164,21 @@ public function setObject($tagType, $value)
if (!array_key_exists($tagType, $this->tagMap)) {
$this->definedTagList[$tagType] = new Tag($tagType, $this);
}

$this->tagMap[$tagType] = $value;
}

/**
* Sets a <code>Rational</code> value for the specified tag.
*
* @param tagType the tag's value as an int
* @param rational rational number
*/
public function setRational($tagType, Rational $rational)
{
$this->setObject($tagType, $rational);
}

/**
* Provides the map of tag names, hashed by tag type identifier.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public function testReadMetadata()
$metadata = ImageMetadataReader::readMetadata(realpath(TEST_RESOURCES_DIRECTORY . '/Nikon E990.jpg'));

// Checks 'Exif IFD0' directory
$directory = $metadata->getDirectories()[0];

$directory = $metadata->getDirectories()[1];
$this->assertInstanceOf(ExifIFD0Directory::class, $directory);

$tag = $directory->getTagName(ExifIFD0Directory::TAG_X_RESOLUTION);
var_dump($tag);

Expand Down

0 comments on commit 1465db9

Please sign in to comment.