From 19eb14e3ec16a3066b03de6d3f8d15bcf00bc642 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 22 Nov 2022 18:38:23 +0100 Subject: [PATCH] cs: reduce the amount of `use` statements --- src/Contract/Collection.php | 360 ++++++++++++------------------------ 1 file changed, 120 insertions(+), 240 deletions(-) diff --git a/src/Contract/Collection.php b/src/Contract/Collection.php index d0500e0f5..12abb0cc0 100644 --- a/src/Contract/Collection.php +++ b/src/Contract/Collection.php @@ -7,126 +7,6 @@ use Countable; use IteratorAggregate; use JsonSerializable; -use loophp\collection\Contract\Operation\Allable; -use loophp\collection\Contract\Operation\Appendable; -use loophp\collection\Contract\Operation\Applyable; -use loophp\collection\Contract\Operation\Associateable; -use loophp\collection\Contract\Operation\AsyncMapable; -use loophp\collection\Contract\Operation\AsyncMapNable; -use loophp\collection\Contract\Operation\Averagesable; -use loophp\collection\Contract\Operation\Cacheable; -use loophp\collection\Contract\Operation\Chunkable; -use loophp\collection\Contract\Operation\Coalesceable; -use loophp\collection\Contract\Operation\Collapseable; -use loophp\collection\Contract\Operation\Columnable; -use loophp\collection\Contract\Operation\Combinateable; -use loophp\collection\Contract\Operation\Combineable; -use loophp\collection\Contract\Operation\Compactable; -use loophp\collection\Contract\Operation\Comparable; -use loophp\collection\Contract\Operation\Containsable; -use loophp\collection\Contract\Operation\Currentable; -use loophp\collection\Contract\Operation\Cycleable; -use loophp\collection\Contract\Operation\Diffable; -use loophp\collection\Contract\Operation\Diffkeysable; -use loophp\collection\Contract\Operation\Distinctable; -use loophp\collection\Contract\Operation\Dropable; -use loophp\collection\Contract\Operation\DropWhileable; -use loophp\collection\Contract\Operation\Dumpable; -use loophp\collection\Contract\Operation\Duplicateable; -use loophp\collection\Contract\Operation\Equalsable; -use loophp\collection\Contract\Operation\Everyable; -use loophp\collection\Contract\Operation\Explodeable; -use loophp\collection\Contract\Operation\Falsyable; -use loophp\collection\Contract\Operation\Filterable; -use loophp\collection\Contract\Operation\Findable; -use loophp\collection\Contract\Operation\Firstable; -use loophp\collection\Contract\Operation\FlatMapable; -use loophp\collection\Contract\Operation\Flattenable; -use loophp\collection\Contract\Operation\Flipable; -use loophp\collection\Contract\Operation\FoldLeft1able; -use loophp\collection\Contract\Operation\FoldLeftable; -use loophp\collection\Contract\Operation\FoldRight1able; -use loophp\collection\Contract\Operation\FoldRightable; -use loophp\collection\Contract\Operation\Forgetable; -use loophp\collection\Contract\Operation\Frequencyable; -use loophp\collection\Contract\Operation\Getable; -use loophp\collection\Contract\Operation\Groupable; -use loophp\collection\Contract\Operation\GroupByable; -use loophp\collection\Contract\Operation\Hasable; -use loophp\collection\Contract\Operation\Headable; -use loophp\collection\Contract\Operation\IfThenElseable; -use loophp\collection\Contract\Operation\Implodeable; -use loophp\collection\Contract\Operation\Initable; -use loophp\collection\Contract\Operation\Initsable; -use loophp\collection\Contract\Operation\Intersectable; -use loophp\collection\Contract\Operation\Intersectkeysable; -use loophp\collection\Contract\Operation\Intersperseable; -use loophp\collection\Contract\Operation\IsEmptyable; -use loophp\collection\Contract\Operation\Keyable; -use loophp\collection\Contract\Operation\Keysable; -use loophp\collection\Contract\Operation\Lastable; -use loophp\collection\Contract\Operation\Limitable; -use loophp\collection\Contract\Operation\Linesable; -use loophp\collection\Contract\Operation\Mapable; -use loophp\collection\Contract\Operation\MapNable; -use loophp\collection\Contract\Operation\Matchable; -use loophp\collection\Contract\Operation\Matchingable; -use loophp\collection\Contract\Operation\Maxable; -use loophp\collection\Contract\Operation\Mergeable; -use loophp\collection\Contract\Operation\Minable; -use loophp\collection\Contract\Operation\Normalizeable; -use loophp\collection\Contract\Operation\Nthable; -use loophp\collection\Contract\Operation\Nullsyable; -use loophp\collection\Contract\Operation\Packable; -use loophp\collection\Contract\Operation\Padable; -use loophp\collection\Contract\Operation\Pairable; -use loophp\collection\Contract\Operation\Partitionable; -use loophp\collection\Contract\Operation\Permutateable; -use loophp\collection\Contract\Operation\Pipeable; -use loophp\collection\Contract\Operation\Pluckable; -use loophp\collection\Contract\Operation\Prependable; -use loophp\collection\Contract\Operation\Productable; -use loophp\collection\Contract\Operation\Randomable; -use loophp\collection\Contract\Operation\Rangeable; -use loophp\collection\Contract\Operation\Reduceable; -use loophp\collection\Contract\Operation\Reductionable; -use loophp\collection\Contract\Operation\Rejectable; -use loophp\collection\Contract\Operation\Reverseable; -use loophp\collection\Contract\Operation\RSampleable; -use loophp\collection\Contract\Operation\Sameable; -use loophp\collection\Contract\Operation\Scaleable; -use loophp\collection\Contract\Operation\ScanLeft1able; -use loophp\collection\Contract\Operation\ScanLeftable; -use loophp\collection\Contract\Operation\ScanRight1able; -use loophp\collection\Contract\Operation\ScanRightable; -use loophp\collection\Contract\Operation\Shuffleable; -use loophp\collection\Contract\Operation\Sinceable; -use loophp\collection\Contract\Operation\Sliceable; -use loophp\collection\Contract\Operation\Sortable; -use loophp\collection\Contract\Operation\Spanable; -use loophp\collection\Contract\Operation\Splitable; -use loophp\collection\Contract\Operation\Squashable; -use loophp\collection\Contract\Operation\Strictable; -use loophp\collection\Contract\Operation\Tailable; -use loophp\collection\Contract\Operation\Tailsable; -use loophp\collection\Contract\Operation\TakeWhileable; -use loophp\collection\Contract\Operation\Timesable; -use loophp\collection\Contract\Operation\Transposeable; -use loophp\collection\Contract\Operation\Truthyable; -use loophp\collection\Contract\Operation\Unfoldable; -use loophp\collection\Contract\Operation\Unlinesable; -use loophp\collection\Contract\Operation\Unpackable; -use loophp\collection\Contract\Operation\Unpairable; -use loophp\collection\Contract\Operation\Untilable; -use loophp\collection\Contract\Operation\Unwindowable; -use loophp\collection\Contract\Operation\Unwordsable; -use loophp\collection\Contract\Operation\Unwrapable; -use loophp\collection\Contract\Operation\Unzipable; -use loophp\collection\Contract\Operation\Whenable; -use loophp\collection\Contract\Operation\Windowable; -use loophp\collection\Contract\Operation\Wordsable; -use loophp\collection\Contract\Operation\Wrapable; -use loophp\collection\Contract\Operation\Zipable; use Traversable; /** @@ -255,129 +135,129 @@ * @template-extends IteratorAggregate */ interface Collection extends - Allable, - Appendable, - Applyable, - Associateable, - AsyncMapable, - AsyncMapNable, - Averagesable, - Cacheable, - Chunkable, - Coalesceable, - Collapseable, - Columnable, - Combinateable, - Combineable, - Compactable, - Comparable, - Containsable, + Operation\Allable, + Operation\Appendable, + Operation\Applyable, + Operation\Associateable, + Operation\AsyncMapable, + Operation\AsyncMapNable, + Operation\Averagesable, + Operation\Cacheable, + Operation\Chunkable, + Operation\Coalesceable, + Operation\Collapseable, + Operation\Columnable, + Operation\Combinateable, + Operation\Combineable, + Operation\Compactable, + Operation\Comparable, + Operation\Containsable, Countable, - Currentable, - Cycleable, - Diffable, - Diffkeysable, - Distinctable, - Dropable, - DropWhileable, - Dumpable, - Duplicateable, - Equalsable, - Everyable, - Explodeable, - Falsyable, - Filterable, - Findable, - Firstable, - FlatMapable, - Flattenable, - Flipable, - FoldLeft1able, - FoldLeftable, - FoldRight1able, - FoldRightable, - Forgetable, - Frequencyable, - Getable, - Groupable, - GroupByable, - Hasable, - Headable, - IfThenElseable, - Implodeable, - Initable, - Initsable, - Intersectable, - Intersectkeysable, - Intersperseable, - IsEmptyable, + Operation\Currentable, + Operation\Cycleable, + Operation\Diffable, + Operation\Diffkeysable, + Operation\Distinctable, + Operation\Dropable, + Operation\DropWhileable, + Operation\Dumpable, + Operation\Duplicateable, + Operation\Equalsable, + Operation\Everyable, + Operation\Explodeable, + Operation\Falsyable, + Operation\Filterable, + Operation\Findable, + Operation\Firstable, + Operation\FlatMapable, + Operation\Flattenable, + Operation\Flipable, + Operation\FoldLeft1able, + Operation\FoldLeftable, + Operation\FoldRight1able, + Operation\FoldRightable, + Operation\Forgetable, + Operation\Frequencyable, + Operation\Getable, + Operation\Groupable, + Operation\GroupByable, + Operation\Hasable, + Operation\Headable, + Operation\IfThenElseable, + Operation\Implodeable, + Operation\Initable, + Operation\Initsable, + Operation\Intersectable, + Operation\Intersectkeysable, + Operation\Intersperseable, + Operation\IsEmptyable, IteratorAggregate, JsonSerializable, - Keyable, - Keysable, - Lastable, - Limitable, - Linesable, - Mapable, - MapNable, - Matchable, - Matchingable, - Maxable, - Mergeable, - Minable, - Normalizeable, - Nthable, - Nullsyable, - Packable, - Padable, - Pairable, - Partitionable, - Permutateable, - Pipeable, - Pluckable, - Prependable, - Productable, - Randomable, - Rangeable, - Reduceable, - Reductionable, - Rejectable, - Reverseable, - RSampleable, - Sameable, - Scaleable, - ScanLeft1able, - ScanLeftable, - ScanRight1able, - ScanRightable, - Shuffleable, - Sinceable, - Sliceable, - Sortable, - Spanable, - Splitable, - Squashable, - Strictable, - Tailable, - Tailsable, - TakeWhileable, - Timesable, - Transposeable, - Truthyable, - Unfoldable, - Unlinesable, - Unpackable, - Unpairable, - Untilable, - Unwindowable, - Unwordsable, - Unwrapable, - Unzipable, - Whenable, - Windowable, - Wordsable, - Wrapable, - Zipable + Operation\Keyable, + Operation\Keysable, + Operation\Lastable, + Operation\Limitable, + Operation\Linesable, + Operation\Mapable, + Operation\MapNable, + Operation\Matchable, + Operation\Matchingable, + Operation\Maxable, + Operation\Mergeable, + Operation\Minable, + Operation\Normalizeable, + Operation\Nthable, + Operation\Nullsyable, + Operation\Packable, + Operation\Padable, + Operation\Pairable, + Operation\Partitionable, + Operation\Permutateable, + Operation\Pipeable, + Operation\Pluckable, + Operation\Prependable, + Operation\Productable, + Operation\Randomable, + Operation\Rangeable, + Operation\Reduceable, + Operation\Reductionable, + Operation\Rejectable, + Operation\Reverseable, + Operation\RSampleable, + Operation\Sameable, + Operation\Scaleable, + Operation\ScanLeft1able, + Operation\ScanLeftable, + Operation\ScanRight1able, + Operation\ScanRightable, + Operation\Shuffleable, + Operation\Sinceable, + Operation\Sliceable, + Operation\Sortable, + Operation\Spanable, + Operation\Splitable, + Operation\Squashable, + Operation\Strictable, + Operation\Tailable, + Operation\Tailsable, + Operation\TakeWhileable, + Operation\Timesable, + Operation\Transposeable, + Operation\Truthyable, + Operation\Unfoldable, + Operation\Unlinesable, + Operation\Unpackable, + Operation\Unpairable, + Operation\Untilable, + Operation\Unwindowable, + Operation\Unwordsable, + Operation\Unwrapable, + Operation\Unzipable, + Operation\Whenable, + Operation\Windowable, + Operation\Wordsable, + Operation\Wrapable, + Operation\Zipable { /** * @return Traversable