Skip to content

Commit 17244e5

Browse files
Sergey PodgornyySergey Podgornyy
authored andcommitted
Fix code style
1 parent 42ec3e2 commit 17244e5

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

src/Handlers/Str.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ public static function shift(string &$str, string $encoding = null)
5252
*
5353
* @return string
5454
*/
55-
public static function cutStart(string $str, string $subString = ' ', bool $repeat = false, bool $caseSensitive = true) : string
56-
{
55+
public static function cutStart(
56+
string $str,
57+
string $subString = ' ',
58+
bool $repeat = false,
59+
bool $caseSensitive = true
60+
) : string {
5761
$prepared = RegEx::prepare($subString, '/');
5862
$regex = sprintf(
5963
'/^%s/%s',
@@ -77,8 +81,12 @@ public static function cutStart(string $str, string $subString = ' ', bool $repe
7781
*
7882
* @return string
7983
*/
80-
public static function cutEnd(string $str, string $subString = ' ', bool $repeat = false, bool $caseSensitive = true) : string
81-
{
84+
public static function cutEnd(
85+
string $str,
86+
string $subString = ' ',
87+
bool $repeat = false,
88+
bool $caseSensitive = true
89+
) : string {
8290
$prepared = RegEx::prepare($subString, '/');
8391
$regex = sprintf(
8492
'/%s$/%s',

src/string_functions.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ function str_prepare_regex(string $string, $quotes = '/') : string
7474
*
7575
* @return string
7676
*/
77-
function str_cut_start(string $str, string $subString = ' ', bool $repeat = false, bool $caseSensitive = false) : string
78-
{
77+
function str_cut_start(
78+
string $str,
79+
string $subString = ' ',
80+
bool $repeat = false,
81+
bool $caseSensitive = false
82+
) : string {
7983
return Str::cutStart($str, $subString, $repeat, $caseSensitive);
8084
}
8185
}
@@ -91,8 +95,12 @@ function str_cut_start(string $str, string $subString = ' ', bool $repeat = fals
9195
*
9296
* @return string
9397
*/
94-
function str_cut_end(string $str, string $subString = ' ', bool $repeat = false, bool $caseSensitive = false) : string
95-
{
98+
function str_cut_end(
99+
string $str,
100+
string $subString = ' ',
101+
bool $repeat = false,
102+
bool $caseSensitive = false
103+
) : string {
96104
return Str::cutEnd($str, $subString, $repeat, $caseSensitive);
97105
}
98106
}

tests/Functions/StrTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function testWords()
122122
public function testSubstr()
123123
{
124124
$input = 'string';
125-
$funcResult = str_substr($input,2);
125+
$funcResult = str_substr($input, 2);
126126
$classResult = IlluminateStr::substr($input, 2);
127127

128128
$this->assertEquals($classResult, $funcResult);

0 commit comments

Comments
 (0)