Completed
Push — master ( f59019...093bae )
by Guillaume
04:06
created

Utils   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A snakeCase() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the circuit-breaker package
5
 *
6
 * Copyright (c) 2016 Guillaume Cavana
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * Feel free to edit as you please, and have fun.
12
 *
13
 * @author Guillaume Cavana <[email protected]>
14
 */
15
16
namespace Eljam\CircuitBreaker\Util;
17
18
/**
19
 * Class Utils.
20
 */
21
class Utils
22
{
23
    /**
24
     * snakeCase.
25
     *
26
     * @param string $word
27
     *
28
     * @return string
29
     */
30
    public static function snakeCase($word)
31
    {
32
        return strtolower(str_replace(' ', '_', $word));
33
    }
34
}
35