@@ -16,10 +16,10 @@ |
||
| 16 | 16 | public static function fromArray(array $data) |
| 17 | 17 | { |
| 18 | 18 | return (new Note()) |
| 19 | - ->setId(new NoteId($data['id'])) |
|
| 20 | - ->setCategoryId(new CategoryId($data['category_id'])) |
|
| 21 | - ->setUserId(new UserId($data['user_id'])) |
|
| 22 | - ->setContent($data['content']) |
|
| 23 | - ->setTitle($data['title']); |
|
| 19 | + ->setId(new NoteId($data[ 'id' ])) |
|
| 20 | + ->setCategoryId(new CategoryId($data[ 'category_id' ])) |
|
| 21 | + ->setUserId(new UserId($data[ 'user_id' ])) |
|
| 22 | + ->setContent($data[ 'content' ]) |
|
| 23 | + ->setTitle($data[ 'title' ]); |
|
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | \ No newline at end of file |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * @var Transport |
| 16 | 16 | */ |
| 17 | 17 | private $transport; |
| 18 | - private $endpoints = []; |
|
| 18 | + private $endpoints = [ ]; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * BarenoteClient constructor. |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | $this->transport = new HttpfulTransport(); |
| 27 | 27 | $this->transport->setHost($host); |
| 28 | 28 | |
| 29 | - $this->endpoints['authentication'] = new Authentication($this->transport); |
|
| 30 | - $this->endpoints['notes'] = new Notes($this->transport); |
|
| 29 | + $this->endpoints[ 'authentication' ] = new Authentication($this->transport); |
|
| 30 | + $this->endpoints[ 'notes' ] = new Notes($this->transport); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function authenticate(string $username, string $password): Token |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | private function getAuthenticationEndpoint() |
| 46 | 46 | { |
| 47 | - return $this->endpoints['authentication']; |
|
| 47 | + return $this->endpoints[ 'authentication' ]; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function getNotesEndpoint() |
| 54 | 54 | { |
| 55 | - return $this->endpoints['notes']; |
|
| 55 | + return $this->endpoints[ 'notes' ]; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | \ No newline at end of file |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | |
| 55 | 55 | $this->notes->clear(); |
| 56 | 56 | foreach ($notes->body->notes as $note) { |
| 57 | - $this->notes->add(NoteFactory::fromArray((array)$note)); |
|
| 57 | + $this->notes->add(NoteFactory::fromArray((array) $note)); |
|
| 58 | 58 | } |
| 59 | 59 | $this->notes->update(); |
| 60 | 60 | } |