[L6] Update cursor() calls to work with new lazy collections
This commit is contained in:
parent
08bdc9705f
commit
1c5b9dbb87
5 changed files with 10 additions and 10 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Generator;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\LazyCollection;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
|
@ -172,9 +172,9 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
|
|||
* @param array $locations
|
||||
* @param int $disk
|
||||
* @param int $memory
|
||||
* @return \Generator
|
||||
* @return \Illuminate\Support\LazyCollection
|
||||
*/
|
||||
public function getNodesWithResourceUse(array $locations, int $disk, int $memory): Generator
|
||||
public function getNodesWithResourceUse(array $locations, int $disk, int $memory): LazyCollection
|
||||
{
|
||||
$instance = $this->getBuilder()
|
||||
->select(['nodes.id', 'nodes.memory', 'nodes.disk', 'nodes.memory_overallocate', 'nodes.disk_overallocate'])
|
||||
|
|
|
@ -291,7 +291,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
|
|||
* @param int[] $servers
|
||||
* @param int[] $nodes
|
||||
* @param bool $returnCount
|
||||
* @return int|\Generator
|
||||
* @return int|\Illuminate\Support\LazyCollection
|
||||
*/
|
||||
public function getServersForPowerAction(array $servers = [], array $nodes = [], bool $returnCount = false)
|
||||
{
|
||||
|
|
Reference in a new issue