• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICanBoogie / Inflector / 11893132752

18 Nov 2024 01:09PM UTC coverage: 94.475% (+4.4%) from 90.058%
11893132752

push

github

olvlvl
Add StaticInflector

20 of 23 new or added lines in 2 files covered. (86.96%)

171 of 181 relevant lines covered (94.48%)

53.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.0
/lib/helpers.php
1
<?php
2

3
namespace ICanBoogie;
4

5
// Avoid conflicts with ICanBoogie/Common
6
if (!function_exists(__NAMESPACE__ . '\downcase')) {
7
    /**
8
     * @see StaticInflector::downcase()
9
     */
10
    function downcase(string $str): string
11
    {
NEW
12
        return StaticInflector::downcase($str);
×
13
    }
14
}
15

16
// Avoid conflicts with ICanBoogie/Common
17
if (!function_exists(__NAMESPACE__ . '\upcase')) {
18
    /**
19
     * @see StaticInflector::upcase()
20
     */
21
    function upcase(string $str): string
22
    {
NEW
23
        return StaticInflector::upcase($str);
×
24
    }
25
}
26

27
// Avoid conflicts with ICanBoogie/Common
28
if (!function_exists(__NAMESPACE__ . '\capitalize')) {
29
    /**
30
     * @see StaticInflector::capitalize()
31
     */
32
    function capitalize(string $str, bool $preserve_str_end = false): string
33
    {
NEW
34
        return StaticInflector::capitalize($str, $preserve_str_end);
×
35
    }
36
}
37

38
/**
39
 * @see StaticInflector::pluralize()
40
 */
41
function pluralize(string $word, string $locale = Inflector::DEFAULT_LOCALE): string
42
{
43
    return StaticInflector::pluralize($word, $locale);
268✔
44
}
45

46
/**
47
 * @see StaticInflector::singularize()
48
 */
49
function singularize(string $word, string $locale = Inflector::DEFAULT_LOCALE): string
50
{
51
    return StaticInflector::singularize($word, $locale);
268✔
52
}
53

54
/**
55
 * @see StaticInflector::camelize()
56
 */
57
function camelize(
58
    string $str,
59
    bool $uppercase_first_letter = false,
60
    string $locale = Inflector::DEFAULT_LOCALE
61
): string {
62
    return StaticInflector::camelize($str, $uppercase_first_letter, $locale);
6✔
63
}
64

65
/**
66
 * @see StaticInflector::underscore()
67
 */
68
function underscore(string $camel_cased_word, string $locale = Inflector::DEFAULT_LOCALE): string
69
{
70
    return StaticInflector::underscore($camel_cased_word, $locale);
1✔
71
}
72

73
/**
74
 * @see StaticInflector::hyphenate()
75
 */
76
function hyphenate(string $str, string $locale = Inflector::DEFAULT_LOCALE): string
77
{
78
    return StaticInflector::hyphenate($str, $locale);
1✔
79
}
80

81
/**
82
 * @see StaticInflector::humanize()
83
 */
84
function humanize(string $lower_case_and_underscored_word, string $locale = Inflector::DEFAULT_LOCALE): string
85
{
86
    return StaticInflector::humanize($lower_case_and_underscored_word, $locale);
1✔
87
}
88

89
/**
90
 * @see StaticInflector::titleize()
91
 */
92
function titleize(string $str, string $locale = Inflector::DEFAULT_LOCALE): string
93
{
94
    return StaticInflector::titleize($str, $locale);
1✔
95
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc