Skip to content

Commit

Permalink
Update NewsStreamRecord params
Browse files Browse the repository at this point in the history
  • Loading branch information
Artiom Misiru authored and Artiom Misiru committed Jan 6, 2025
1 parent 5b7f98c commit 9d82908
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Release Notes

## [6.2.0](https://github.com/timirey/xapi-php/compare/6.0.4..6.0.5) - 2024-12-27
## [6.3.0](https://github.com/timirey/xapi-php/compare/6.3.0..6.2.0) - 2025-01-06

- Add new `topics` param to `NewsStreamRecord`.

## [6.2.0](https://github.com/timirey/xapi-php/compare/6.2.0..6.1.0) - 2024-12-27

- Add new `QuoteId` and `MarginMode`.

## [6.1.0](https://github.com/timirey/xapi-php/compare/6.0.4..6.0.5) - 2024-12-27
## [6.1.0](https://github.com/timirey/xapi-php/compare/6.1.0..6.0.5) - 2024-12-27

- Remove timeout for stream connection.

Expand Down
12 changes: 7 additions & 5 deletions src/Responses/Data/NewsStreamRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
/**
* Constructor for the NewsStreamRecord class.
*
* @param string $body Body of the news.
* @param string $key News key.
* @param integer $time Time of the news.
* @param string $title Title of the news.
* @param string $body Body of the news.
* @param string $key News key.
* @param integer $time Time of the news.
* @param string $title Title of the news.
* @param array $topics Unknown, not documented.
*/
public function __construct(

Check failure on line 27 in src/Responses/Data/NewsStreamRecord.php

View workflow job for this annotation

GitHub Actions / check-tests

Method Timirey\XApi\Responses\Data\NewsStreamRecord::__construct() has parameter $topics with no value type specified in iterable type array.
public string $body,
public string $key,
int $time,
public string $title
public string $title,
public array $topics
) {
$this->time = DateTimeHelper::fromMilliseconds($time);
}
Expand Down
4 changes: 4 additions & 0 deletions tests/Commands/FetchNewsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
'data' => [
'body' => '<html>...</html>',
'key' => '1f6da766abd29927aa854823f0105c23',
'topics' => [
'BZEN_REGULAR',
'BZEN_IRREGULAR'
],
'time' => 1262944112000,
'title' => 'Breaking trend',
],
Expand Down

0 comments on commit 9d82908

Please sign in to comment.