src/StringConverter/Types/ClassName.php
public function from(Contract $contract, string $string, callable $callback = null): string
    {
        $string = ucwords(
            $contract->recipe(
                $string,
                'upperCaseFirst',
                function ($string) use ($contract) {

                    if ($contract instanceof Camel) {
                        return $string;
                    }

                    return strtolower($string);
                }
            )
        );

        return $this->callback($string, $callback);
    }
public function from(Contract $contract, string $string, callable $callback = null): string
    {
        $string = ucwords(
            $contract->recipe(
                $string,
                'upperCaseFirst',
                function ($string) use ($contract) {

                    if ($contract instanceof Camel) {
                        return $string;
                    }

                    return strtolower($string);
                }
            )
        );

        return $this->callback($string, $callback);
    }
public function from ( Contract $ contract , string $ string , callable $ callback = null ) : string { $ string = ucwords ( $ contract -> recipe ( $ string , 'upperCaseFirst' , function ( $ string ) use ( $ contract ) { if ( $ contract instanceof Camel ) { return $ string ; } return strtolower ( $ string ) ; } ) ) ; return $ this -> callback ( $ string , $ callback ) ; }
Convert to class name.

@param  \SSD\StringConverter\Types\Contract $contract
@param  string $string
@param  callable|null $callback
@return string
Convert to class name .