Skip to content

Commit a4e107a

Browse files
authored
Fixes remaining "ts" parameters from number to string type (#105)
Also adds phpunit result cache file to gitignore list
1 parent a5381f2 commit a4e107a

File tree

13 files changed

+136
-43
lines changed

13 files changed

+136
-43
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ phpunit.xml
1111

1212
# tests
1313
generated_ci
14+
.phpunit.result.cache

generated/Client.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,9 +1996,9 @@ public function conversationsCreate(array $formParameters = [], array $headerPar
19961996
* @var string $channel conversation ID to fetch history for
19971997
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
19981998
* @var bool $inclusive include messages with latest or oldest timestamp in results only when either timestamp is specified
1999-
* @var float $latest end of time range of messages to include in results
1999+
* @var string $latest end of time range of messages to include in results
20002000
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
2001-
* @var float $oldest start of time range of messages to include in results
2001+
* @var string $oldest start of time range of messages to include in results
20022002
* @var string $token Authentication token. Requires scope: `conversations:history`
20032003
* }
20042004
*
@@ -2240,9 +2240,9 @@ public function conversationsRename(array $formParameters = [], array $headerPar
22402240
* @var string $channel conversation ID to fetch thread from
22412241
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
22422242
* @var bool $inclusive include messages with latest or oldest timestamp in results only when either timestamp is specified
2243-
* @var float $latest end of time range of messages to include in results
2243+
* @var string $latest end of time range of messages to include in results
22442244
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
2245-
* @var float $oldest start of time range of messages to include in results
2245+
* @var string $oldest start of time range of messages to include in results
22462246
* @var string $token Authentication token. Requires scope: `conversations:history`
22472247
* @var string $ts Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.
22482248
* }
@@ -2595,8 +2595,8 @@ public function filesRemoteInfo(array $queryParameters = [], string $fetch = sel
25952595
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
25962596
* @var int $limit the maximum number of items to return
25972597
* @var string $token Authentication token. Requires scope: `remote_files:read`
2598-
* @var float $ts_from filter files created after this timestamp (inclusive)
2599-
* @var float $ts_to Filter files created before this timestamp (inclusive).
2598+
* @var string $ts_from filter files created after this timestamp (inclusive)
2599+
* @var string $ts_to Filter files created before this timestamp (inclusive).
26002600
* }
26012601
*
26022602
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)

generated/Endpoint/ConversationsHistory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class ConversationsHistory extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoi
2525
* @var string $channel conversation ID to fetch history for
2626
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
2727
* @var bool $inclusive include messages with latest or oldest timestamp in results only when either timestamp is specified
28-
* @var float $latest end of time range of messages to include in results
28+
* @var string $latest end of time range of messages to include in results
2929
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
30-
* @var float $oldest start of time range of messages to include in results
30+
* @var string $oldest start of time range of messages to include in results
3131
* @var string $token Authentication token. Requires scope: `conversations:history`
3232
* }
3333
*/
@@ -70,9 +70,9 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7070
$optionsResolver->setAllowedTypes('channel', ['string']);
7171
$optionsResolver->setAllowedTypes('cursor', ['string']);
7272
$optionsResolver->setAllowedTypes('inclusive', ['bool']);
73-
$optionsResolver->setAllowedTypes('latest', ['float']);
73+
$optionsResolver->setAllowedTypes('latest', ['string']);
7474
$optionsResolver->setAllowedTypes('limit', ['int']);
75-
$optionsResolver->setAllowedTypes('oldest', ['float']);
75+
$optionsResolver->setAllowedTypes('oldest', ['string']);
7676
$optionsResolver->setAllowedTypes('token', ['string']);
7777

7878
return $optionsResolver;

generated/Endpoint/ConversationsReplies.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class ConversationsReplies extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoi
2525
* @var string $channel conversation ID to fetch thread from
2626
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
2727
* @var bool $inclusive include messages with latest or oldest timestamp in results only when either timestamp is specified
28-
* @var float $latest end of time range of messages to include in results
28+
* @var string $latest end of time range of messages to include in results
2929
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
30-
* @var float $oldest start of time range of messages to include in results
30+
* @var string $oldest start of time range of messages to include in results
3131
* @var string $token Authentication token. Requires scope: `conversations:history`
3232
* @var string $ts Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.
3333
* }
@@ -71,9 +71,9 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7171
$optionsResolver->setAllowedTypes('channel', ['string']);
7272
$optionsResolver->setAllowedTypes('cursor', ['string']);
7373
$optionsResolver->setAllowedTypes('inclusive', ['bool']);
74-
$optionsResolver->setAllowedTypes('latest', ['float']);
74+
$optionsResolver->setAllowedTypes('latest', ['string']);
7575
$optionsResolver->setAllowedTypes('limit', ['int']);
76-
$optionsResolver->setAllowedTypes('oldest', ['float']);
76+
$optionsResolver->setAllowedTypes('oldest', ['string']);
7777
$optionsResolver->setAllowedTypes('token', ['string']);
7878
$optionsResolver->setAllowedTypes('ts', ['string']);
7979

generated/Endpoint/FilesRemoteList.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class FilesRemoteList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint im
2626
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
2727
* @var int $limit the maximum number of items to return
2828
* @var string $token Authentication token. Requires scope: `remote_files:read`
29-
* @var float $ts_from filter files created after this timestamp (inclusive)
30-
* @var float $ts_to Filter files created before this timestamp (inclusive).
29+
* @var string $ts_from filter files created after this timestamp (inclusive)
30+
* @var string $ts_to Filter files created before this timestamp (inclusive).
3131
* }
3232
*/
3333
public function __construct(array $queryParameters = [])
@@ -70,8 +70,8 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7070
$optionsResolver->setAllowedTypes('cursor', ['string']);
7171
$optionsResolver->setAllowedTypes('limit', ['int']);
7272
$optionsResolver->setAllowedTypes('token', ['string']);
73-
$optionsResolver->setAllowedTypes('ts_from', ['float']);
74-
$optionsResolver->setAllowedTypes('ts_to', ['float']);
73+
$optionsResolver->setAllowedTypes('ts_from', ['string']);
74+
$optionsResolver->setAllowedTypes('ts_to', ['string']);
7575

7676
return $optionsResolver;
7777
}

generated/Model/ObjsComment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ObjsComment
5252
*/
5353
protected $reactions;
5454
/**
55-
* @var string|int|null
55+
* @var int|string|null
5656
*/
5757
protected $timestamp;
5858
/**
@@ -187,15 +187,15 @@ public function setReactions(?array $reactions): self
187187
}
188188

189189
/**
190-
* @return string|int|null
190+
* @return int|string|null
191191
*/
192192
public function getTimestamp()
193193
{
194194
return $this->timestamp;
195195
}
196196

197197
/**
198-
* @param string|int|null $timestamp
198+
* @param int|string|null $timestamp
199199
*/
200200
public function setTimestamp($timestamp): self
201201
{

generated/Model/ObjsFile.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class ObjsFile
276276
*/
277277
protected $thumbTiny;
278278
/**
279-
* @var string|int|null
279+
* @var int|string|null
280280
*/
281281
protected $timestamp;
282282
/**
@@ -1125,15 +1125,15 @@ public function setThumbTiny(?string $thumbTiny): self
11251125
}
11261126

11271127
/**
1128-
* @return string|int|null
1128+
* @return int|string|null
11291129
*/
11301130
public function getTimestamp()
11311131
{
11321132
return $this->timestamp;
11331133
}
11341134

11351135
/**
1136-
* @param string|int|null $timestamp
1136+
* @param int|string|null $timestamp
11371137
*/
11381138
public function setTimestamp($timestamp): self
11391139
{

generated/Normalizer/ObjsCommentNormalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public function denormalize($data, $class, $format = null, array $context = [])
105105
}
106106
if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) {
107107
$value_2 = $data['timestamp'];
108-
if (\is_string($data['timestamp'])) {
108+
if (\is_int($data['timestamp'])) {
109109
$value_2 = $data['timestamp'];
110-
} elseif (\is_int($data['timestamp'])) {
110+
} elseif (\is_string($data['timestamp'])) {
111111
$value_2 = $data['timestamp'];
112112
}
113113
$object->setTimestamp($value_2);
@@ -154,9 +154,9 @@ public function normalize($object, $format = null, array $context = [])
154154
$data['reactions'] = $values_1;
155155
}
156156
$value_2 = $object->getTimestamp();
157-
if (\is_string($object->getTimestamp())) {
157+
if (\is_int($object->getTimestamp())) {
158158
$value_2 = $object->getTimestamp();
159-
} elseif (\is_int($object->getTimestamp())) {
159+
} elseif (\is_string($object->getTimestamp())) {
160160
$value_2 = $object->getTimestamp();
161161
}
162162
$data['timestamp'] = $value_2;

generated/Normalizer/ObjsFileNormalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ public function denormalize($data, $class, $format = null, array $context = [])
397397
}
398398
if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) {
399399
$value_5 = $data['timestamp'];
400-
if (\is_string($data['timestamp'])) {
400+
if (\is_int($data['timestamp'])) {
401401
$value_5 = $data['timestamp'];
402-
} elseif (\is_int($data['timestamp'])) {
402+
} elseif (\is_string($data['timestamp'])) {
403403
$value_5 = $data['timestamp'];
404404
}
405405
$object->setTimestamp($value_5);
@@ -665,9 +665,9 @@ public function normalize($object, $format = null, array $context = [])
665665
}
666666
if (null !== $object->getTimestamp()) {
667667
$value_5 = $object->getTimestamp();
668-
if (\is_string($object->getTimestamp())) {
668+
if (\is_int($object->getTimestamp())) {
669669
$value_5 = $object->getTimestamp();
670-
} elseif (\is_int($object->getTimestamp())) {
670+
} elseif (\is_string($object->getTimestamp())) {
671671
$value_5 = $object->getTimestamp();
672672
}
673673
$data['timestamp'] = $value_5;

generated/Runtime/Client/BaseEndpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getQueryString(): string
3838
return null !== $value ? $value : '';
3939
}, $optionsResolved);
4040

41-
return http_build_query($optionsResolved, '', '&', PHP_QUERY_RFC3986);
41+
return http_build_query($optionsResolved, '', '&', \PHP_QUERY_RFC3986);
4242
}
4343

4444
public function getHeaders(array $baseHeaders = []): array

0 commit comments

Comments
 (0)