for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Graze\CiffRenderer\GraphicResolver;
use Urbanplum\Bmp\Bmp;
/**
* Resolves an image resource from it's file path
*/
class GraphicResolverFilePath
{
* @var Bmp
private $bmp;
* @param Bmp $bmp
public function __construct(Bmp $bmp)
$this->bmp = $bmp;
}
* @param string $filePath
* @return Resource
public function __invoke($filePath)
return $this->bmp->createFromFile($filePath);
* @return callable
public static function factory()
return new static(
new Bmp()
);