Skip to content

Commit

Permalink
cs lint fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Jan 15, 2024
1 parent 90a6c2d commit c001d61
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
1 change: 0 additions & 1 deletion lib/Service/MattermostAPIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use GuzzleHttp\Exception\ServerException;
use OC\User\NoUserException;
use OCA\Mattermost\AppInfo\Application;
use OCA\Mattermost\Service\NetworkService;
use OCP\Constants;
use OCP\Files\File;
use OCP\Files\Folder;
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/NetworkService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
class NetworkService {

private IClient $client;
private IClient $client;

public function __construct(
private IConfig $config,
Expand Down
57 changes: 28 additions & 29 deletions tests/Service/MattermostAPIServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ public function setUp(): void {
'total_msg_count' => 2,
'extra_update_at' => 0,
'creator_id' => '',
'scheme_id' => NULL,
'props' => NULL,
'group_constrained' => NULL,
'shared' => NULL,
'scheme_id' => null,
'props' => null,
'group_constrained' => null,
'shared' => null,
'total_msg_count_root' => 2,
'policy_id' => NULL,
'policy_id' => null,
'last_root_post_at' => 1705306107804,
'team_display_name' => 'int'
],
Expand All @@ -110,14 +110,14 @@ public function setUp(): void {
'total_msg_count' => 3,
'extra_update_at' => 0,
'creator_id' => '3xqcyc8rnbbj5pjoxhjc6je7ch',
'scheme_id' => NULL,
'props' => NULL,
'group_constrained' => NULL,
'scheme_id' => null,
'props' => null,
'group_constrained' => null,
'shared' => false,
'total_msg_count_root' => 3,
'policy_id' => NULL,
'policy_id' => null,
'last_root_post_at' => 1705306156738,
'team_display_name' => NULL,
'team_display_name' => null,
'direct_message_display_name' => 'else',
'direct_message_user_name' => 'else',
'direct_message_user_id' => '3xqcyc8rnbbj5pjoxhjc6je7ch'
Expand All @@ -137,12 +137,12 @@ public function setUp(): void {
'total_msg_count' => 3,
'extra_update_at' => 0,
'creator_id' => '',
'scheme_id' => NULL,
'props' => NULL,
'group_constrained' => NULL,
'shared' => NULL,
'scheme_id' => null,
'props' => null,
'group_constrained' => null,
'shared' => null,
'total_msg_count_root' => 3,
'policy_id' => NULL,
'policy_id' => null,
'last_root_post_at' => 1705306107785,
'team_display_name' => 'int'
],
Expand All @@ -162,9 +162,9 @@ public function setUp(): void {
'allowed_domains' => '',
'invite_id' => 'cxmzfoe7o3yn8pzdfajkgps1or',
'allow_open_invite' => false,
'scheme_id' => NULL,
'group_constrained' => NULL,
'policy_id' => NULL,
'scheme_id' => null,
'group_constrained' => null,
'policy_id' => null,
'cloud_limits_archived' => false
],
[
Expand All @@ -181,9 +181,9 @@ public function setUp(): void {
'allowed_domains' => '',
'invite_id' => 'cxmzfoe7uyeh1pzdfajkgps1or',
'allow_open_invite' => false,
'scheme_id' => NULL,
'group_constrained' => NULL,
'policy_id' => NULL,
'scheme_id' => null,
'group_constrained' => null,
'policy_id' => null,
'cloud_limits_archived' => false
],
],
Expand All @@ -208,7 +208,7 @@ public function setUp(): void {
'pending_post_id' => '',
'reply_count' => 0,
'last_reply_at' => 0,
'participants' => NULL,
'participants' => null,
'metadata' => [],
],
[
Expand All @@ -231,7 +231,7 @@ public function setUp(): void {
'pending_post_id' => '',
'reply_count' => 0,
'last_reply_at' => 0,
'participants' => NULL,
'participants' => null,
'metadata' => [],
],
[
Expand All @@ -254,7 +254,7 @@ public function setUp(): void {
'pending_post_id' => '',
'reply_count' => 0,
'last_reply_at' => 0,
'participants' => NULL,
'participants' => null,
'metadata' => [],
],
[
Expand All @@ -277,7 +277,7 @@ public function setUp(): void {
'pending_post_id' => '',
'reply_count' => 0,
'last_reply_at' => 0,
'participants' => NULL,
'participants' => null,
'metadata' => [],
],
],
Expand Down Expand Up @@ -507,8 +507,7 @@ public function setUp(): void {
* @param string $id ID of the resource
* @return void
*/
private function getAPIData(string $name, string $id = NULL)
{
private function getAPIData(string $name, string $id = null) {
$data = static::$apiData[$name];

if (is_null($id)) {
Expand Down Expand Up @@ -541,7 +540,7 @@ private function setupNetworkMock() {
'prev_post_id' => '',
'has_next' => false,
'first_inaccessible_post_time' => 0,
'matches' => NULL,
'matches' => null,
];
}

Expand All @@ -556,7 +555,7 @@ private function setupNetworkMock() {
'prev_post_id' => '',
'has_next' => false,
'first_inaccessible_post_time' => 0,
'matches' => NULL,
'matches' => null,
];
} elseif (str_starts_with($endPoint, 'posts/')) {
return $this->getAPIData('posts', substr($endPoint, strlen('posts/')));
Expand Down

0 comments on commit c001d61

Please sign in to comment.