Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Dompdf\Tests\Helpers; use Dompdf\Css\Style; use Dompdf\Css\Stylesheet; us..
Decoded Output download
<?php
namespace Dompdf\Tests\Helpers;
use Dompdf\Css\Style;
use Dompdf\Css\Stylesheet;
use Dompdf\Dompdf;
use Mockery\MockInterface;
class MockHelper
{
/**
* @param $properties
* @return MockInterface | Style
*/
public static function getStyleMock($properties)
{
// initialize static properties
// For now we cannot mock methods in a constructor
// https://github.com/mockery/mockery/issues/534
// $style = \Mockery::mock(Style::class, [new Stylesheet(new Dompdf())]);
new Style(new Stylesheet(new Dompdf()));
$style = \Mockery::mock(Style::class);
foreach ($properties as $property => $value) {
$style->$property = $value;
}
return $style;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Dompdf\Tests\Helpers;
use Dompdf\Css\Style;
use Dompdf\Css\Stylesheet;
use Dompdf\Dompdf;
use Mockery\MockInterface;
class MockHelper
{
/**
* @param $properties
* @return MockInterface | Style
*/
public static function getStyleMock($properties)
{
// initialize static properties
// For now we cannot mock methods in a constructor
// https://github.com/mockery/mockery/issues/534
// $style = \Mockery::mock(Style::class, [new Stylesheet(new Dompdf())]);
new Style(new Stylesheet(new Dompdf()));
$style = \Mockery::mock(Style::class);
foreach ($properties as $property => $value) {
$style->$property = $value;
}
return $style;
}
}
Function Calls
None |
Stats
MD5 | fabb96affdfc09b72512bde1cdb31b9e |
Eval Count | 0 |
Decode Time | 103 ms |