作者 lackoxygen

feat:res

@@ -6,7 +6,7 @@ use Illuminate\Contracts\Support\Arrayable; @@ -6,7 +6,7 @@ use Illuminate\Contracts\Support\Arrayable;
6 use Illuminate\Support\Arr; 6 use Illuminate\Support\Arr;
7 use Lackoxygen\TiktokShop\Util\Json; 7 use Lackoxygen\TiktokShop\Util\Json;
8 8
9 -class ResultSet implements Arrayable 9 +class ResultSet implements Arrayable, \Countable
10 { 10 {
11 /** 11 /**
12 * @var array|mixed 12 * @var array|mixed
@@ -78,6 +78,14 @@ class ResultSet implements Arrayable @@ -78,6 +78,14 @@ class ResultSet implements Arrayable
78 } 78 }
79 79
80 /** 80 /**
  81 + * @return int
  82 + */
  83 + public function count(): int
  84 + {
  85 + return count($this->items);
  86 + }
  87 +
  88 + /**
81 * @param $name 89 * @param $name
82 * @return $this|array|\ArrayAccess|mixed 90 * @return $this|array|\ArrayAccess|mixed
83 */ 91 */