Skip to content

Commit

Permalink
Removed confusing file_exists method call
Browse files Browse the repository at this point in the history
  • Loading branch information
tooleks committed May 15, 2017
1 parent d3d5853 commit fb8f678
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/Gd/AvgColorPicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public function getImageAvgHexByPath(string $imagePath): string
*/
private function createImageResource(string $imagePath)
{
if (!file_exists($imagePath)) {
throw new RuntimeException(sprintf('The "%s" file not exist.', $imagePath));
}

$imageCreateFunctions = [
'image/png' => 'imagecreatefrompng',
'image/jpeg' => 'imagecreatefromjpeg',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/GdAvgColorPickerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testGetImageAvgHexByPathFromPng()

public function testGetImageAvgHexByPathFromInvalidPath()
{
$this->expectException(\RuntimeException::class);
$this->expectException(\PHPUnit_Framework_Error_Warning::class);

(new AvgColorPicker)->getImageAvgHexByPath('invalid/path');
}
Expand Down

0 comments on commit fb8f678

Please sign in to comment.