Skip to content

Commit

Permalink
run format scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhn committed Feb 8, 2024
1 parent b05eacc commit b99108c
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 62 deletions.
103 changes: 51 additions & 52 deletions include/faker-cxx/Book.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,60 +62,59 @@ class Book
*/
static std::string isbn();

/**
* @brief Returns a random release year
*
* @returns int year
*
* @code
* Book::releaseYear() // 2016
* @endcode
*/
static int releaseYear();
/**
* @brief Returns a random release year
*
* @returns int year
*
* @code
* Book::releaseYear() // 2016
* @endcode
*/
static int releaseYear();

/**
* @brief Returns the full name of a translator
*
* @returns std::string full name
*
* @code
* Book::translator() // "Eric Floyd"
* @endcode
*/
static std::string translator();
/**
* @brief Returns format of book
*
* @returns BookFormat format of book
*
* @code
* Book::format() // BookFormat::paperback
* @endcode
*/
static std::string format();
/**
* @brief Returns the full name of a translator
*
* @returns std::string full name
*
* @code
* Book::translator() // "Eric Floyd"
* @endcode
*/
static std::string translator();

/**
* @brief Returns format of book
*
* @returns BookFormat format of book
*
* @code
* Book::format() // BookFormat::paperback
* @endcode
*/
static std::string format();

/*
* @brief returns a random page number (50-999)
*
* @returns int page number
*
* @code
* Book::page() // 314
* @endcode
*/
static int page();
/*
* @brief returns a random page number (50-999)
*
* @returns int page number
*
* @code
* Book::page() // 314
* @endcode
*/
static int page();

/*
* @brief returns a random book series
*
* @returns std::string book series
*
* @code
* Book::series() // "Harry Potter"
* @endcode
*/
static std::string series();
/*
* @brief returns a random book series
*
* @returns std::string book series
*
* @code
* Book::series() // "Harry Potter"
* @endcode
*/
static std::string series();
};
}

4 changes: 2 additions & 2 deletions include/faker-cxx/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class Color
* @endcode
*/
static std::string hsv();
/**

/**
* @brief Return a YUV color
*
* @returns YUV color formatted with yuv(X,X,X)
Expand Down
7 changes: 3 additions & 4 deletions include/faker-cxx/Commerce.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class Commerce
* @endcode
*/
static std::string productReview();

/**
* @brief Returns a random product rating (0-5).
*
Expand All @@ -217,7 +217,7 @@ class Commerce
* @endcode
*/
static std::string discountType();

/**
* @brief Returns random discount code within the specified range of 6 to 12 characters.
*
Expand All @@ -241,7 +241,7 @@ class Commerce
static double discountAmount();

/**
* @brief Returns a random discount percentage within the specified range of 1. to 90.
* @brief Returns a random discount percentage within the specified range of 1. to 90.
*
* @returns discountPercentage.
*
Expand All @@ -250,6 +250,5 @@ class Commerce
* @endcode
*/
static double discountPercentage();

};
}
3 changes: 1 addition & 2 deletions include/faker-cxx/Git.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class Git
*/
static std::string commitSha(unsigned length = 40);


/**
* @brief Returns a random author name and email.
*
Expand All @@ -96,6 +95,6 @@ class Git
* Git::author // {Author.name = "Rachel McLaughlin", Author.email = "[email protected]"}
* @endcode
*/
static Author author();
static Author author();
};
}
4 changes: 2 additions & 2 deletions src/common/FormatHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string>
#include <vector>

#if defined(__APPLE__) || defined(__MINGW32__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__))
#if defined(__APPLE__) || defined(__MINGW32__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__))
#include <fmt/format.h>
#else
#include <format>
Expand All @@ -16,7 +16,7 @@ namespace faker
class FormatHelper
{
public:
#if defined(__APPLE__) || defined(__MINGW32__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__))
#if defined(__APPLE__) || defined(__MINGW32__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__))
template <typename... Args>
static std::string format(fmt::format_string<Args...> fmt, Args&&... args)
{
Expand Down

0 comments on commit b99108c

Please sign in to comment.