diff --git a/example/asio-example.cpp b/example/asio-example.cpp
index 8138dea..474d261 100644
--- a/example/asio-example.cpp
+++ b/example/asio-example.cpp
@@ -230,7 +230,7 @@
         [](const std::string& req, std::string& propertyValue) {
         propertyValue = req;
         return true;
-        },
+    },
         // custom get
         [](const std::string& property) {
         auto now = std::chrono::system_clock::now();
@@ -334,7 +334,7 @@
         {
             std::cout << item.first << "\n";
         }
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTree",
@@ -355,7 +355,7 @@
         {
             std::cerr << "async_method_call should have failed!\n";
         }
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTree",
@@ -391,7 +391,7 @@
             return;
         }
         std::cout << "TestYieldFunction return " << testValue << "\n";
-        },
+    },
         "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test",
         "xyz.openbmc_project.test", "TestYieldFunction", int32_t(41));
     io.run();
diff --git a/example/coroutine-example.cpp b/example/coroutine-example.cpp
index c077acd..2302f47 100644
--- a/example/coroutine-example.cpp
+++ b/example/coroutine-example.cpp
@@ -50,9 +50,9 @@
             {
                 return std::to_string(v);
             }
-                         },
+        },
                          value)
-            << std::endl;
+                  << std::endl;
     }
 
     // Try to set the Architecture property (which won't work).
diff --git a/example/get-all-properties.cpp b/example/get-all-properties.cpp
index 711dd8b..35e9783 100644
--- a/example/get-all-properties.cpp
+++ b/example/get-all-properties.cpp
@@ -35,7 +35,7 @@
             [this](const auto& newPropertyValue, const auto&) {
             goodbyes_ = newPropertyValue;
             return true;
-            },
+        },
             [this](const auto&) { return goodbyes_; });
 
         demo_->register_property_r<uint32_t>(
@@ -84,49 +84,48 @@
                    const std::vector<std::pair<
                        std::string, std::variant<std::monostate, std::string>>>&
                        properties) -> void {
-                if (ec)
-                {
-                    logSystemErrorCode(ec);
-                    return;
-                }
-                {
-                    const std::string* greetings = nullptr;
-                    const std::string* goodbyes = nullptr;
-                    const bool success = sdbusplus::unpackPropertiesNoThrow(
-                        [this](const sdbusplus::UnpackErrorReason reason,
-                               const std::string& property) {
+            if (ec)
+            {
+                logSystemErrorCode(ec);
+                return;
+            }
+            {
+                const std::string* greetings = nullptr;
+                const std::string* goodbyes = nullptr;
+                const bool success = sdbusplus::unpackPropertiesNoThrow(
+                    [this](const sdbusplus::UnpackErrorReason reason,
+                           const std::string& property) {
                     logUnpackError(reason, property);
-                        },
-                        properties, propertyGrettingName, greetings,
-                        propertyGoodbyesName, goodbyes);
+                },
+                    properties, propertyGrettingName, greetings,
+                    propertyGoodbyesName, goodbyes);
 
-                    if (success)
-                    {
-                        std::cout << "value of greetings: " << *greetings
-                                  << "\n";
-                        std::cout << "value of goodbyes: " << *goodbyes << "\n";
-                    }
-                    else
-                    {
-                        ++fatalErrors_;
-                    }
-                }
-
-                try
+                if (success)
                 {
-                    std::string value;
-                    sdbusplus::unpackProperties(properties, propertyValueName,
-                                                value);
-
-                    std::cerr << "Error: it should fail because of "
-                                 "not matched type\n";
+                    std::cout << "value of greetings: " << *greetings << "\n";
+                    std::cout << "value of goodbyes: " << *goodbyes << "\n";
+                }
+                else
+                {
                     ++fatalErrors_;
                 }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logExpectedException(error);
-                }
-            });
+            }
+
+            try
+            {
+                std::string value;
+                sdbusplus::unpackProperties(properties, propertyValueName,
+                                            value);
+
+                std::cerr << "Error: it should fail because of "
+                             "not matched type\n";
+                ++fatalErrors_;
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logExpectedException(error);
+            }
+        });
     }
 
     void asyncGetAllProperties()
@@ -138,60 +137,59 @@
                        std::string,
                        std::variant<std::monostate, std::string, uint32_t>>>&
                        properties) -> void {
-                if (ec)
-                {
-                    logSystemErrorCode(ec);
-                    return;
-                }
-                try
-                {
-                    std::string greetings;
-                    std::string goodbyes;
-                    uint32_t value = 0u;
-                    sdbusplus::unpackProperties(properties,
-                                                propertyGrettingName, greetings,
-                                                propertyGoodbyesName, goodbyes,
-                                                propertyValueName, value);
+            if (ec)
+            {
+                logSystemErrorCode(ec);
+                return;
+            }
+            try
+            {
+                std::string greetings;
+                std::string goodbyes;
+                uint32_t value = 0u;
+                sdbusplus::unpackProperties(properties, propertyGrettingName,
+                                            greetings, propertyGoodbyesName,
+                                            goodbyes, propertyValueName, value);
 
-                    std::cout << "value of greetings: " << greetings << "\n";
-                    std::cout << "value of goodbyes: " << goodbyes << "\n";
-                    std::cout << "value of value: " << value << "\n";
-                }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logException(error);
-                }
+                std::cout << "value of greetings: " << greetings << "\n";
+                std::cout << "value of goodbyes: " << goodbyes << "\n";
+                std::cout << "value of value: " << value << "\n";
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logException(error);
+            }
 
-                try
-                {
-                    std::string unknownProperty;
-                    sdbusplus::unpackProperties(
-                        properties, "UnknownPropertyName", unknownProperty);
+            try
+            {
+                std::string unknownProperty;
+                sdbusplus::unpackProperties(properties, "UnknownPropertyName",
+                                            unknownProperty);
 
-                    std::cerr << "Error: it should fail because of "
-                                 "missing property\n";
-                    ++fatalErrors_;
-                }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logExpectedException(error);
-                }
+                std::cerr << "Error: it should fail because of "
+                             "missing property\n";
+                ++fatalErrors_;
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logExpectedException(error);
+            }
 
-                try
-                {
-                    uint32_t notMatchingType;
-                    sdbusplus::unpackProperties(
-                        properties, propertyGrettingName, notMatchingType);
+            try
+            {
+                uint32_t notMatchingType;
+                sdbusplus::unpackProperties(properties, propertyGrettingName,
+                                            notMatchingType);
 
-                    std::cerr << "Error: it should fail because of "
-                                 "not matched type\n";
-                    ++fatalErrors_;
-                }
-                catch (const sdbusplus::exception::UnpackPropertyError& error)
-                {
-                    logExpectedException(error);
-                }
-            });
+                std::cerr << "Error: it should fail because of "
+                             "not matched type\n";
+                ++fatalErrors_;
+            }
+            catch (const sdbusplus::exception::UnpackPropertyError& error)
+            {
+                logExpectedException(error);
+            }
+        });
     }
 
   private:
diff --git a/example/register-property.cpp b/example/register-property.cpp
index c22231a..e10b0f1 100644
--- a/example/register-property.cpp
+++ b/example/register-property.cpp
@@ -34,9 +34,9 @@
                 [this](const auto& newPropertyValue, const auto&) {
                 goodbyes_ = newPropertyValue;
                 return true;
-                },
+            },
                 [this](const auto&) { return goodbyes_; });
-            });
+        });
     }
 
     uint32_t fatalErrors() const
@@ -69,7 +69,7 @@
             std::cerr << "Error: it was expected to fail getProperty due "
                          "to wrong type\n";
             ++fatalErrors_;
-            });
+        });
     }
 
     void asyncReadProperties()
@@ -84,7 +84,7 @@
                 return;
             }
             std::cout << "Greetings value is: " << value << "\n";
-            });
+        });
 
         sdbusplus::asio::getProperty<std::string>(
             bus_, demoServiceName, demoObjectPath, demoInterfaceName,
@@ -96,7 +96,7 @@
                 return;
             }
             std::cout << "Goodbyes value is: " << value << "\n";
-            });
+        });
     }
 
     void asyncChangeProperty()
@@ -114,7 +114,7 @@
 
             std::cout << "Error: it was expected to fail to change greetings\n";
             ++fatalErrors_;
-            });
+        });
 
         sdbusplus::asio::setProperty(
             bus_, demoServiceName, demoObjectPath, demoInterfaceName,
@@ -130,7 +130,7 @@
             }
             std::cout << "Changed goodbyes property as expected\n";
             boost::asio::post(ioc_, [this] { asyncReadProperties(); });
-            });
+        });
     }
 
     void syncChangeGoodbyes(std::string_view value)
