Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Knp/Snappy/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ abstract class AbstractGenerator implements GeneratorInterface, LoggerAwareInter
* @param array $options
* @param null|array $env
*/
public function __construct($binary, array $options = [], array $env = null)
public function __construct($binary, array $options = [], ?array $env = null)
{
$this->configure();

Expand Down Expand Up @@ -380,7 +380,7 @@ abstract protected function configure();
*
* @return $this
*/
protected function addOption($name, $default = null)
protected function addOption($name, ?$default = null)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change needs to be reverted.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand. Why does it need to be reverted?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I rectified the error. Typical gnito fault.

{
if (\array_key_exists($name, $this->options)) {
throw new InvalidArgumentException(\sprintf('The option \'%s\' already exists.', $name));
Expand Down Expand Up @@ -483,7 +483,7 @@ protected function checkProcessStatus($status, $stdout, $stderr, $command)
*
* @return string The filename
*/
protected function createTemporaryFile($content = null, $extension = null)
protected function createTemporaryFile(?$content = null, ?$extension = null)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

{
$dir = \rtrim($this->getTemporaryFolder(), \DIRECTORY_SEPARATOR);

Expand Down
2 changes: 1 addition & 1 deletion src/Knp/Snappy/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Image extends AbstractGenerator
/**
* {@inheritdoc}
*/
public function __construct($binary = null, array $options = [], array $env = null)
public function __construct(?$binary = null, array $options = [], ?array $env = null)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function __construct(?$binary = null, array $options = [], ?array $env = null)
public function __construct($binary = null, array $options = [], ?array $env = null)

{
$this->setDefaultExtension('jpg');

Expand Down
2 changes: 1 addition & 1 deletion src/Knp/Snappy/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Pdf extends AbstractGenerator
/**
* {@inheritdoc}
*/
public function __construct($binary = null, array $options = [], array $env = null)
public function __construct(?$binary = null, array $options = [], ?array $env = null)
{
$this->setDefaultExtension('pdf');
$this->setOptionsWithContentCheck();
Expand Down