1

I'm developing WordPress plugin and stuck with code sniffer warnings. How do I fix the below warning message?

[Squiz.PHP.DisallowMultipleAssignments.Found] Assignments must be the first block of code on a line

The above error/ warning is highlighting for the below code.

$testimonial_gravatar_image = $out = $before = $after = '';

How do I define those empty variables? If I skip or remove then the error displays undefined variable etc.

$testimonial_gravatar_image is inside the while loop and $out for generating output.

Ahmed SEDDIK
  • 149
  • 12
Maqk
  • 515
  • 9
  • 26

1 Answers1

0
$testimonial_gravatar_image = '';
$out = '';
$before = '';
$after = '';