Skip to content

Commit 71fb403

Browse files
committed
Геттеры
1 parent ec30640 commit 71fb403

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $record = $reader->findRecord('89991234567');
1818
$record = $reader->findRecord('(999) 123-45-67');
1919
$record = $reader->findRecord('9991234567');
2020

21-
echo $record->operator();
21+
echo $record->getOperator();
2222
```
2323

2424
## Обработка ошибок

src/MobileOperatorsCodes/Record.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,31 @@ public function __construct($phoneCode, $phoneNumber, $operator, $region)
5858
/**
5959
* @return string
6060
*/
61-
public function phoneCode()
61+
public function getPhoneCode()
6262
{
6363
return $this->phoneCode;
6464
}
6565

6666
/**
6767
* @return string
6868
*/
69-
public function phoneNumber()
69+
public function getPhoneNumber()
7070
{
7171
return $this->phoneNumber;
7272
}
7373

7474
/**
7575
* @return string
7676
*/
77-
public function operator()
77+
public function getOperator()
7878
{
7979
return $this->operator;
8080
}
8181

8282
/**
8383
* @return string
8484
*/
85-
public function region()
85+
public function getRegion()
8686
{
8787
return $this->region;
8888
}
@@ -93,7 +93,7 @@ public function region()
9393
* @param string $prefix
9494
* @return string
9595
*/
96-
public function fullPhoneNumber($prefix = '+7')
96+
public function getFullPhoneNumber($prefix = '+7')
9797
{
9898
return $prefix . $this->phoneCode . $this->phoneNumber;
9999
}

0 commit comments

Comments
 (0)