Skip to content

Commit 41448a6

Browse files
committed
Make private methods protected
1 parent e76d2b1 commit 41448a6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/DefaultBrowserLocale.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class DefaultBrowserLocale implements BrowserLocale
1010
*
1111
* @var array
1212
*/
13-
private $locales = [];
13+
protected $locales = [];
1414

1515
/**
1616
* Create a new DefaultBrowserLocale instance.
@@ -67,7 +67,7 @@ public function getLocales($propertyFilter = null)
6767
*
6868
* @return void
6969
*/
70-
private function parseAcceptLanguages($httpAcceptLanguages)
70+
protected function parseAcceptLanguages($httpAcceptLanguages)
7171
{
7272
foreach ($this->splitAcceptLanguages($httpAcceptLanguages) as $httpAcceptLanguage) {
7373
if ($locale = $this->parseAcceptLanguage($httpAcceptLanguage)) {
@@ -85,7 +85,7 @@ private function parseAcceptLanguages($httpAcceptLanguages)
8585
*
8686
* @return Locale|null
8787
*/
88-
private function parseAcceptLanguage($httpAcceptLanguage)
88+
protected function parseAcceptLanguage($httpAcceptLanguage)
8989
{
9090
$parts = $this->splitAcceptLanguage($httpAcceptLanguage);
9191

@@ -114,7 +114,7 @@ private function parseAcceptLanguage($httpAcceptLanguage)
114114
*
115115
* @return array
116116
*/
117-
private function splitAcceptLanguages($httpAcceptLanguages)
117+
protected function splitAcceptLanguages($httpAcceptLanguages)
118118
{
119119
return explode(',', $httpAcceptLanguages) ?: [];
120120
}
@@ -128,7 +128,7 @@ private function splitAcceptLanguages($httpAcceptLanguages)
128128
*
129129
* @return array
130130
*/
131-
private function splitAcceptLanguage($httpAcceptLanguage)
131+
protected function splitAcceptLanguage($httpAcceptLanguage)
132132
{
133133
return explode(';', trim($httpAcceptLanguage)) ?: [];
134134
}
@@ -142,7 +142,7 @@ private function splitAcceptLanguage($httpAcceptLanguage)
142142
*
143143
* @return string
144144
*/
145-
private function getLanguage($locale)
145+
protected function getLanguage($locale)
146146
{
147147
return strtolower(substr($locale, 0, 2));
148148
}
@@ -156,7 +156,7 @@ private function getLanguage($locale)
156156
*
157157
* @return string
158158
*/
159-
private function getCountry($locale)
159+
protected function getCountry($locale)
160160
{
161161
if (($divider = strpos($locale, '-')) === false){
162162
return '';
@@ -174,7 +174,7 @@ private function getCountry($locale)
174174
*
175175
* @return float
176176
*/
177-
private function getWeight($q)
177+
protected function getWeight($q)
178178
{
179179
$weight = 1.0;
180180
$parts = explode('=', $q);
@@ -191,7 +191,7 @@ private function getWeight($q)
191191
*
192192
* @return void
193193
*/
194-
private function sortLocales()
194+
protected function sortLocales()
195195
{
196196
usort($this->locales, function ($a, $b) {
197197
if ($a->weight === $b->weight) {
@@ -210,7 +210,7 @@ private function sortLocales()
210210
*
211211
* @return array
212212
*/
213-
private function filterLocaleInfo($property)
213+
protected function filterLocaleInfo($property)
214214
{
215215
$filters = ['locale', 'language', 'country', 'weight'];
216216
$locales = $this->locales;

0 commit comments

Comments
 (0)