Skip to content

Commit 568c1b3

Browse files
committed
formatting
1 parent 84eaebe commit 568c1b3

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/Illuminate/Support/Str.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,20 @@ public static function beforeLast($subject, $search)
133133
}
134134

135135
/**
136-
* Get the portion of a string between a given values.
136+
* Get the portion of a string between two given values.
137137
*
138138
* @param string $subject
139-
* @param string $before
140-
* @param string $after
139+
* @param string $from
140+
* @param string $to
141141
* @return string
142142
*/
143-
public static function between($subject, $before, $after)
143+
public static function between($subject, $from, $to)
144144
{
145-
if ($before === '' || $after === '') {
145+
if ($from === '' || $to === '') {
146146
return $subject;
147147
}
148148

149-
$rightCropped = static::after($subject, $before);
150-
151-
return static::beforeLast($rightCropped, $after);
149+
return static::beforeLast(static::after($subject, $from), $to);
152150
}
153151

154152
/**

src/Illuminate/Support/Stringable.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ public function beforeLast($search)
133133
}
134134

135135
/**
136-
* Get the portion of a string between a given values.
136+
* Get the portion of a string between two given values.
137137
*
138-
* @param string $before
139-
* @param string $after
138+
* @param string $from
139+
* @param string $to
140140
* @return static
141141
*/
142-
public function between($before, $after)
142+
public function between($from, $to)
143143
{
144-
return new static(Str::between($this->value, $before, $after));
144+
return new static(Str::between($this->value, $from, $to));
145145
}
146146

147147
/**

0 commit comments

Comments
 (0)