Code Duplication    Length = 10-11 lines in 3 locations

src/Material/Material.php 1 location

@@ 230-239 (lines=10) @@
227
     *
228
     * @return array
229
     */
230
    public function lists($type, $offset = 0, $count = 20)
231
    {
232
        $params = [
233
            'type' => $type,
234
            'offset' => intval($offset),
235
            'count' => min(20, $count),
236
        ];
237
238
        return $this->parseJSON('json', [self::API_LISTS, $params]);
239
    }
240
241
    /**
242
     * Get stats of materials.

src/ShakeAround/Relation.php 1 location

@@ 91-101 (lines=11) @@
88
     *
89
     * @return \EasyWeChat\Support\Collection
90
     */
91
    public function getDeviceByPageId($pageId, $begin, $count)
92
    {
93
        $params = [
94
            'type' => 2,
95
            'page_id' => intval($pageId),
96
            'begin' => intval($begin),
97
            'count' => intval($count),
98
        ];
99
100
        return $this->parseJSON('json', [self::API_RELATION_SEARCH, $params]);
101
    }
102
}
103

src/Card/Card.php 1 location

@@ 484-493 (lines=10) @@
481
     *
482
     * @return \EasyWeChat\Support\Collection
483
     */
484
    public function lists($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK')
485
    {
486
        $params = [
487
            'offset' => $offset,
488
            'count' => $count,
489
            'status_list' => $statusList,
490
        ];
491
492
        return $this->parseJSON('json', [self::API_LIST_CARD, $params]);
493
    }
494
495
    /**
496
     * 更改卡券信息接口 and 设置跟随推荐接口.