Skip to content

Commit f4aba32

Browse files
authored
Merge pull request #16 from sanovskiy/dev
NamingStyle moved to sanovskiy/naming
2 parents 0a8286a + 4442e2f commit f4aba32

File tree

6 files changed

+2
-333
lines changed

6 files changed

+2
-333
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/vendor/
44
/bin/
55
/tmp/
6+
.phpunit.result.cache

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^8.0",
13+
"php": "^8.1",
1414
"sanovskiy/traitlib": "^2.0",
1515
"monolog/monolog": "*"
1616
},

src/NamingConvention.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/NamingStyle.php

Lines changed: 0 additions & 192 deletions
This file was deleted.

src/Strings.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,6 @@ class Strings
2626
return implode(DIRECTORY_SEPARATOR, $pathParts);
2727
}
2828

29-
/**
30-
* @param string $string
31-
* @param bool $firstLetterCaps
32-
* @return string
33-
* @deprecated Use NamingStyle::toCamelCase() instead. Will be removed in version 3.0.
34-
*/
35-
public static function CamelCase(string $string, bool $firstLetterCaps = true): string
36-
{
37-
trigger_error(
38-
'Method CamelCase() is deprecated and will be removed in version 3.0. Use NamingStyle::toCamelCase() instead.',
39-
E_USER_DEPRECATED
40-
);
41-
42-
$arr = array_map('ucfirst', explode('_', preg_replace('/[_-]/', '_', $string)));
43-
if (!$firstLetterCaps) {
44-
$arr[0] = strtolower($arr[0]);
45-
}
46-
return implode('', $arr);
47-
}
48-
4929
/**
5030
* @param int $num - number
5131
* @param string $genitive - for (шту)к
@@ -92,12 +72,10 @@ public static function mb_strtr(string $str, string $from, string $to): array|st
9272
*/
9373
public static function removeCommonPrefix(...$strings): array
9474
{
95-
// Если передан пустой массив, возвращаем пустой массив
9675
if (empty($strings)) {
9776
return [];
9877
}
9978

100-
// Если передана одна строка, возвращаем её без изменений
10179
if (count($strings) === 1) {
10280
return [$strings[0]];
10381
}

tests/Unit/NamingStyleTest.php

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)