src/RunOpenCode/Bundle/DoctrineNamingStrategy/NamingStrategy/UnderscoredBundleNamePrefix.php 1 location
|
@@ 200-209 (lines=10) @@
|
| 197 |
|
* @param string $string |
| 198 |
|
* @return string |
| 199 |
|
*/ |
| 200 |
|
protected function underscore($string) |
| 201 |
|
{ |
| 202 |
|
$string = preg_replace('/(?<=[a-z])([A-Z])/', '_$1', $string); |
| 203 |
|
|
| 204 |
|
if (CASE_UPPER === $this->case) { |
| 205 |
|
return strtoupper($string); |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
return strtolower($string); |
| 209 |
|
} |
| 210 |
|
} |
| 211 |
|
|
src/RunOpenCode/Bundle/DoctrineNamingStrategy/NamingStrategy/UnderscoredClassNamespacePrefix.php 1 location
|
@@ 183-192 (lines=10) @@
|
| 180 |
|
* @param string $string |
| 181 |
|
* @return string |
| 182 |
|
*/ |
| 183 |
|
protected function underscore($string) |
| 184 |
|
{ |
| 185 |
|
$string = preg_replace('/(?<=[a-z])([A-Z])/', '_$1', $string); |
| 186 |
|
|
| 187 |
|
if (CASE_UPPER === $this->case) { |
| 188 |
|
return strtoupper($string); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
return strtolower($string); |
| 192 |
|
} |
| 193 |
|
} |
| 194 |
|
|