code: private function getPublicProperty($key, \ReflectionClass $reflect)
      {
          if ($reflect->hasProperty($key)) {
  
              $property = $reflect->getProperty($key);
  
              if ($property->isPublic()) {
                  return $property;
              }
          }
  
          return null;
      }
docs: @param string           $key
  @param \ReflectionClass $reflect
  
  @return null|\ReflectionProperty