src/sb/Password/Random.php
protected function randomlyCapitalize()
    {
        $chars = str_split($this->password);
        $letter_positions = Array();
        foreach ($chars as $key => $char) {
            if (!is_numeric($char)) {
                $letter_positions[] = $key;
            }
        }


        $random_letter = $letter_positions[array_rand($letter_positions)];

        $chars[$random_letter] = ucwords($chars[$random_letter]);

        $this->password = implode('', $chars);
    }
protected function randomlyCapitalize()
    {
        $chars = str_split($this->password);
        $letter_positions = Array();
        foreach ($chars as $key => $char) {
            if (!is_numeric($char)) {
                $letter_positions[] = $key;
            }
        }


        $random_letter = $letter_positions[array_rand($letter_positions)];

        $chars[$random_letter] = ucwords($chars[$random_letter]);

        $this->password = implode('', $chars);
    }
protected function randomlyCapitalize ( ) { $ chars = str_split ( $ this -> password ) ; $ letter_positions = Array ( ) ; foreach ( $ chars as $ key => $ char ) { if ( ! is_numeric ( $ char ) ) { $ letter_positions [ ] = $ key ; } } $ random_letter = $ letter_positions [ array_rand ( $ letter_positions ) ] ; $ chars [ $ random_letter ] = ucwords ( $ chars [ $ random_letter ] ) ; $ this -> password = implode ( '' , $ chars ) ; }
Randomly capitalize one of the letters in the password
Randomly capitalize one of the letters in the password