diff --git a/src/emitters/emitter.ts b/src/emitters/emitter.ts index bf47ab9..ab941e0 100644 --- a/src/emitters/emitter.ts +++ b/src/emitters/emitter.ts @@ -369,9 +369,7 @@ export class PHPEmitter extends Emitter { this.writeSyntaxNode(node.rhs) break case '||': - this.write('isset(') this.writeSyntaxNode(node.lhs) - this.write(')') this.write(' ? ') this.writeSyntaxNode(node.lhs) this.write(' : ') diff --git a/test/unit/emitters/emitter.spec.ts b/test/unit/emitters/emitter.spec.ts index e8a4f6d..f6d9e42 100644 --- a/test/unit/emitters/emitter.spec.ts +++ b/test/unit/emitters/emitter.spec.ts @@ -354,7 +354,7 @@ describe('PHPEmitter', function () { } }) - expect(emitter.fullText()).toEqual('isset($foo) ? $foo : $bar') + expect(emitter.fullText()).toEqual('$foo ? $foo : $bar') }) it('should write isset', function () {