@@ -733,65 +733,47 @@ public function getDeprecatedTag(): ?DeprecatedTag
733733
734734 public function isDeprecated (): bool
735735 {
736- if ($ this ->isDeprecated === null ) {
737- $ this ->isDeprecated = $ this ->phpDocNodeResolver ->resolveIsDeprecated (
738- $ this ->phpDocNode ,
739- );
740- }
741- return $ this ->isDeprecated ;
736+ return $ this ->isDeprecated ??= $ this ->phpDocNodeResolver ->resolveIsDeprecated (
737+ $ this ->phpDocNode ,
738+ );
742739 }
743740
744741 /**
745742 * @internal
746743 */
747744 public function isNotDeprecated (): bool
748745 {
749- if ($ this ->isNotDeprecated === null ) {
750- $ this ->isNotDeprecated = $ this ->phpDocNodeResolver ->resolveIsNotDeprecated (
751- $ this ->phpDocNode ,
752- );
753- }
754- return $ this ->isNotDeprecated ;
746+ return $ this ->isNotDeprecated ??= $ this ->phpDocNodeResolver ->resolveIsNotDeprecated (
747+ $ this ->phpDocNode ,
748+ );
755749 }
756750
757751 public function isInternal (): bool
758752 {
759- if ($ this ->isInternal === null ) {
760- $ this ->isInternal = $ this ->phpDocNodeResolver ->resolveIsInternal (
761- $ this ->phpDocNode ,
762- );
763- }
764- return $ this ->isInternal ;
753+ return $ this ->isInternal ??= $ this ->phpDocNodeResolver ->resolveIsInternal (
754+ $ this ->phpDocNode ,
755+ );
765756 }
766757
767758 public function isFinal (): bool
768759 {
769- if ($ this ->isFinal === null ) {
770- $ this ->isFinal = $ this ->phpDocNodeResolver ->resolveIsFinal (
771- $ this ->phpDocNode ,
772- );
773- }
774- return $ this ->isFinal ;
760+ return $ this ->isFinal ??= $ this ->phpDocNodeResolver ->resolveIsFinal (
761+ $ this ->phpDocNode ,
762+ );
775763 }
776764
777765 public function hasConsistentConstructor (): bool
778766 {
779- if ($ this ->hasConsistentConstructor === null ) {
780- $ this ->hasConsistentConstructor = $ this ->phpDocNodeResolver ->resolveHasConsistentConstructor (
781- $ this ->phpDocNode ,
782- );
783- }
784- return $ this ->hasConsistentConstructor ;
767+ return $ this ->hasConsistentConstructor ??= $ this ->phpDocNodeResolver ->resolveHasConsistentConstructor (
768+ $ this ->phpDocNode ,
769+ );
785770 }
786771
787772 public function acceptsNamedArguments (): bool
788773 {
789- if ($ this ->acceptsNamedArguments === null ) {
790- $ this ->acceptsNamedArguments = $ this ->phpDocNodeResolver ->resolveAcceptsNamedArguments (
791- $ this ->phpDocNode ,
792- );
793- }
794- return $ this ->acceptsNamedArguments ;
774+ return $ this ->acceptsNamedArguments ??= $ this ->phpDocNodeResolver ->resolveAcceptsNamedArguments (
775+ $ this ->phpDocNode ,
776+ );
795777 }
796778
797779 public function getTemplateTypeMap (): TemplateTypeMap
@@ -826,33 +808,23 @@ public function isPure(): ?bool
826808
827809 public function isReadOnly (): bool
828810 {
829- if ($ this ->isReadOnly === null ) {
830- $ this ->isReadOnly = $ this ->phpDocNodeResolver ->resolveIsReadOnly (
831- $ this ->phpDocNode ,
832- );
833- }
834- return $ this ->isReadOnly ;
811+ return $ this ->isReadOnly ??= $ this ->phpDocNodeResolver ->resolveIsReadOnly (
812+ $ this ->phpDocNode ,
813+ );
835814 }
836815
837816 public function isImmutable (): bool
838817 {
839- if ($ this ->isImmutable === null ) {
840- $ this ->isImmutable = $ this ->phpDocNodeResolver ->resolveIsImmutable (
841- $ this ->phpDocNode ,
842- );
843- }
844- return $ this ->isImmutable ;
818+ return $ this ->isImmutable ??= $ this ->phpDocNodeResolver ->resolveIsImmutable (
819+ $ this ->phpDocNode ,
820+ );
845821 }
846822
847823 public function isAllowedPrivateMutation (): bool
848824 {
849- if ($ this ->isAllowedPrivateMutation === null ) {
850- $ this ->isAllowedPrivateMutation = $ this ->phpDocNodeResolver ->resolveAllowPrivateMutation (
851- $ this ->phpDocNode ,
852- );
853- }
854-
855- return $ this ->isAllowedPrivateMutation ;
825+ return $ this ->isAllowedPrivateMutation ??= $ this ->phpDocNodeResolver ->resolveAllowPrivateMutation (
826+ $ this ->phpDocNode ,
827+ );
856828 }
857829
858830 /**
0 commit comments