Skip to content

Commit 09e5cfe

Browse files
authored
Renamed id to key (#7)
* Renamed id to key * Doc fix
1 parent a68add5 commit 09e5cfe

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

src/Model/Message.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Message
3030
*
3131
* The key/phrase you write in the source code
3232
*/
33-
private $id;
33+
private $key;
3434

3535
/**
3636
* @var string
@@ -54,16 +54,16 @@ class Message
5454
private $meta = [];
5555

5656
/**
57-
* @param string $id
57+
* @param string $key
5858
* @param string $domain
5959
* @param string $locale
6060
* @param string $translation
6161
* @param array $meta
6262
*/
63-
public function __construct($id = '', $domain = '', $locale = '', $translation = '', array $meta = [])
63+
public function __construct($key = '', $domain = '', $locale = '', $translation = '', array $meta = [])
6464
{
65+
$this->key = $key;
6566
$this->domain = $domain;
66-
$this->id = $id;
6767
$this->locale = $locale;
6868
$this->translation = $translation;
6969
$this->meta = $meta;
@@ -92,19 +92,19 @@ public function setDomain($domain)
9292
/**
9393
* @return string
9494
*/
95-
public function getId()
95+
public function getKey()
9696
{
97-
return $this->id;
97+
return $this->key;
9898
}
9999

100100
/**
101-
* @param string $id
101+
* @param string $key
102102
*
103103
* @return Message
104104
*/
105-
public function setId($id)
105+
public function setKey($key)
106106
{
107-
$this->id = $id;
107+
$this->key = $key;
108108

109109
return $this;
110110
}

src/Storage.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ public function get($locale, $domain, $key);
3232
/**
3333
* Update a translation.
3434
*
35-
* @param string $locale
36-
* @param string $domain
37-
* @param string $key
38-
* @param string $message
35+
* @param Message $message
3936
*/
4037
public function update(Message $message);
4138

0 commit comments

Comments
 (0)