File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,12 +31,11 @@ class DescriptorFix
3131 public static $ is_initialized = false ;
3232
3333 public static function initOnce () {
34- $ pool = \Google \Protobuf \Internal \DescriptorPool::getGeneratedPool ();
35-
3634 if (static ::$ is_initialized == true ) {
37- return ;
35+ return ;
3836 }
3937
38+ $ pool = \Google \Protobuf \Internal \DescriptorPool::getGeneratedPool ();
4039 if ($ pool instanceof \Google \Protobuf \Internal \DescriptorPool) {
4140 // add a no-op reference for "google.protobuf.DescriptorProto"
4241 $ pool ->addMessage ('google.protobuf.DescriptorProto ' , \Google \Protobuf \DescriptorProto::class)->finalizeToPool ();
Original file line number Diff line number Diff line change 2828 */
2929namespace GPBMetadata \Google \Cloud \Securitycenter \V1 {
3030
31- class KubernetesDescriptorFix
31+ class DescriptorFix
3232 {
3333 public static $ is_initialized = false ;
3434
@@ -37,19 +37,18 @@ public static function initOnce() {
3737 return ;
3838 }
3939
40- // This is required to load the descriptor for PBObject
41- \GPBMetadata \Google \Cloud \Securitycenter \V1 \Kubernetes::initOnce ();
42-
4340 $ pool = \Google \Protobuf \Internal \DescriptorPool::getGeneratedPool ();
44- $ pool ->addMessage (
45- 'google.cloud.securitycenter.v1.Kubernetes.Object ' ,
46- \Google \Cloud \SecurityCenter \V1 \Kubernetes \PBObject::class
47- )->finalizeToPool ();
41+ if ($ pool instanceof \Google \Protobuf \Internal \DescriptorPool) {
42+ $ pool ->addMessage (
43+ 'google.cloud.securitycenter.v1.Kubernetes.Object ' ,
44+ \Google \Cloud \SecurityCenter \V1 \Kubernetes \PBObject::class
45+ )->finalizeToPool ();
46+ }
4847
4948 static ::$ is_initialized = true ;
5049 }
5150 }
5251
53- KubernetesDescriptorFix ::initOnce ();
52+ DescriptorFix ::initOnce ();
5453}
5554
You can’t perform that action at this time.
0 commit comments