Method loadImage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadImage(string $fileName)
{
if ('data:image' === substr($fileName, 0, 10)) {
$this->imageData = $this->convertToJpg($fileName);
} elseif (filter_var($fileName, FILTER_VALIDATE_URL)) {
Function loadImage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function loadImage(string $fileName)
{
if ('data:image' === substr($fileName, 0, 10)) {
$this->imageData = $this->convertToJpg($fileName);
} elseif (filter_var($fileName, FILTER_VALIDATE_URL)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Remove error control operator '@' on line 78. Open
protected function convertToJpg(string $imageData)
{
if ('data:image' === substr($imageData, 0, 10)) {
$matches = [];
preg_match('/data:image\/[a-z]+;base64,(.*)/', $imageData, $matches);
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Missing class import via use statement (line '105', column '19'). Open
$client = new \GuzzleHttp\Client();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class '\YetiForcePDF\Math' in method 'loadImage'. Open
Math::setAccurate(false);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method loadImage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (file_exists($fileName)) {
$this->imageData = $this->convertToJpg(file_get_contents($fileName));
}
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\YetiForcePDF\Math' in method 'loadImage'. Open
Math::setAccurate(true);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Composer\CaBundle\CaBundle' in method 'loadImage'. Open
$res = $client->request('GET', $fileName, ['verify' => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()]);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\YetiForcePDF\Math' in method 'loadImage'. Open
$this->ratio = Math::div($this->getWidth(), $this->getHeight());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using empty try-catch blocks in loadImage. Open
} catch (\Exception $e) {
}
- Read upRead up
- Exclude checks
EmptyCatchBlock
Since: 2.7.0
Usually empty try-catch is a bad idea because you are silently swallowing an error condition and then continuing execution. Occasionally this may be the right thing to do, but often it's a sign that a developer saw an exception, didn't know what to do about it, and so used an empty catch to silence the problem.
Example
class Foo {
public function bar()
{
try {
// ...
} catch (Exception $e) {} // empty catch block
}
}
Source https://phpmd.org/rules/design.html#emptycatchblock
Either remove or fill this block of code. Open
} catch (\Exception $e) {
}
- Read upRead up
- Exclude checks
Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.
Noncompliant Code Example
for ($i = 0; $i < 42; $i++){} // Empty on purpose or missing piece of code ?
Exceptions
When a block contains a comment, this block is not considered to be empty.
Avoid variables with short names like $bg. Configured minimum length is 3. Open
$bg = imagecreatetruecolor(imagesx($image), imagesy($image));
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $x. Configured minimum length is 3. Open
protected $x = 0;
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $y. Configured minimum length is 3. Open
protected $y = 0;
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Spaces must be used to indent lines; tabs are not allowed Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $y = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string image original height
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
ob_start();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$imageString = ob_get_contents();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Math::setAccurate(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $imageData = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
preg_match('/data:image\/[a-z]+;base64,(.*)/', $imageData, $matches);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
imagealphablending($bg, true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$res = $client->request('GET', $fileName, ['verify' => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->displayHeight = $this->height;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('data:image' === substr($imageData, 0, 10)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
imagefill($bg, 0, 0, imagecolorallocate($bg, 255, 255, 255));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
try {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected function convertToJpg(string $imageData)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$image = @imagecreatefromstring($imageData);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
imagejpeg($bg, null, 90);
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
$res = $client->request('GET', $fileName, ['verify' => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$res->getHeader('content-type');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $bitsPerComponent = 8;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->imageData = $this->convertToJpg($fileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->height = (string) $info[1];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->displayWidth = $this->width;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $ratio = '0';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Convert images to jpeg.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$matches = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif (filter_var($fileName, FILTER_VALIDATE_URL)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$client = new \GuzzleHttp\Client();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->imageData = $this->convertToJpg((string) $res->getBody());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} catch (\Exception $e) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->imageData = $this->convertToJpg(file_get_contents($fileName));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->bitsPerComponent = (string) $info['bits'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->ratio = Math::div($this->getWidth(), $this->getHeight());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Width / Height ratio.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var int bits per component
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $fileName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->width = (string) $info[0];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var int
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $height = '0';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$imageData = base64_decode($matches[1]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $imageString;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Object name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (200 === $res->getStatusCode()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $width = '0';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $imageData
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
ob_end_clean();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Load image data.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (file_exists($fileName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string Image data
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string image original width
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
imagecopy($bg, $image, 0, 0, 0, 0, imagesx($image), imagesy($image));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
imagedestroy($bg);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Text x position at current page.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Text y position at current page.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return $this
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$bg = imagecreatetruecolor(imagesx($image), imagesy($image));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function loadImage(string $fileName)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('data:image' === substr($fileName, 0, 10)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$stream = $this->imageData;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /Height ' . $this->height,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->ratio = $ratio;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->displayHeight = $displayHeight;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /ColorSpace /DeviceRGB',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getDisplayHeight()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
imagedestroy($image);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($this->imageData) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Math::setAccurate(true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return self
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $x = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var int
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$info = getimagesizefromstring($this->imageData);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->width;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* {@inheritdoc}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /Type /XObject',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getRatio()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Set width / Height ratio.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Set display height.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getHeight()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->getRawId() . ' obj',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /Subtype /Image',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'endobj',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $name = 'ImageStream';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 'Im' . $this->id;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get width / Height ratio.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get image name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /BitsPerComponent ' . $this->bitsPerComponent,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setRatio(string $ratio)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get display width.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return self
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setDisplayHeight(string $displayHeight)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getImageName()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getWidth()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /Width ' . $this->width,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /Length ' . \strlen($stream),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $displayWidth Display width
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get image height.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function render(): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
' /Filter /DCTDecode',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'>>',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'stream',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$stream,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getDisplayWidth()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->ratio;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->displayWidth;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->displayWidth = $displayWidth;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $displayHeight Display height
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return self
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->height;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'endstream',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setDisplayWidth(string $displayWidth)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get display height.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->displayHeight;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return implode("\n", [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $ratio Width / Height ratio.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Set display width.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get image width.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'<<',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks