toCamelCase() public method

Convert string to camel case.
public toCamelCase ( string $string, boolean $capitalizeFirstCharacter = false ) : string
$string string
$capitalizeFirstCharacter boolean
return string
Beispiel #1
0
 /**
  * Generate project test file.
  *
  * @return void
  */
 protected function projectTest()
 {
     $file = $this->file->get(__DIR__ . '/stubs/ProjectTest.txt');
     $stubs = ['{project_upper}', '{project_camel_case}', '{vendor_upper}', '{namespace}'];
     $values = [$this->projectUpper, $this->str->toCamelCase($this->projectLower), $this->vendorUpper, $this->createNamespace()];
     $content = str_replace($stubs, $values, $file);
     $this->file->makeDirectory($this->projectLower . '/tests');
     $this->file->put($this->projectLower . '/tests/' . $this->projectUpper . 'Test.php', $content);
     $this->exportIgnores[] = 'tests';
 }