1

I am just to migrate my code in to PSR standard. I am not sure about how to write it inside nested condition. I am confused by line spacing. Can I use one line space after If condition ? Below is my example code.

if ($this->value) {
    if ($this->value === 'abc') {
         $x = $this->x();
    }

    $x = 'lababala';

    if ($this->value === '123') {
         $x = $this->y();
    }

    $end = new object();
}
shivanshu patel
  • 782
  • 10
  • 19

0 Answers0