From f55ff4ec4fa6b6d44e38abf4fb81d6c302d01732 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Sun, 10 Mar 2024 14:02:48 +0100 Subject: [PATCH 1/4] Blank line after opening tag --- .php-cs-fixer.php | 3 ++- examples/autoload.php | 4 +++- examples/run.php | 4 +++- .../Avro/Tests/Benchmark/AvroExtractorBench.php | 4 +++- .../Avro/Tests/Benchmark/AvroLoaderBench.php | 4 +++- .../src/Flow/ETL/Adapter/ChartJS/Chart.php | 4 +++- .../src/Flow/ETL/Adapter/ChartJS/functions.php | 4 +++- .../CSV/Tests/Benchmark/CSVExtractorBench.php | 4 +++- .../CSV/Tests/Benchmark/CSVLoaderBench.php | 4 +++- .../Tests/Doubles/Spy/HttpClientSpy.php | 4 +++- .../Tests/Integration/ElasticsearchTest.php | 4 +++- .../Unit/EntryIdFactory/HashIdFactoryTest.php | 4 +++- .../ETL/Adapter/Filesystem/FlysystemFactory.php | 4 +++- .../Filesystem/RemoteFileListExtractor.php | 4 +++- .../GoogleSheet/Tests/Unit/SheetRangeTest.php | 4 +++- .../JSON/Tests/Benchmark/JsonExtractorBench.php | 4 +++- .../JSON/Tests/Benchmark/JsonLoaderBench.php | 4 +++- .../Tests/Double/Spy/HttpClientSpy.php | 4 +++- .../ETL/Adapter/Parquet/ParquetExtractor.php | 4 +++- .../Flow/ETL/Adapter/Parquet/ParquetLoader.php | 4 +++- .../Flow/ETL/Adapter/Parquet/RowsNormalizer.php | 4 +++- .../Flow/ETL/Adapter/Parquet/SchemaConverter.php | 4 +++- .../Tests/Benchmark/ParquetExtractorBench.php | 4 +++- .../Tests/Benchmark/ParquetLoaderBench.php | 4 +++- .../Tests/Integration/ParquetExtractorTest.php | 4 +++- .../Parquet/Tests/Integration/ParquetTest.php | 4 +++- .../Text/Tests/Benchmark/TextExtractorBench.php | 4 +++- .../Text/Tests/Benchmark/TextLoaderBench.php | 4 +++- .../XML/Tests/Benchmark/XmlExtractorBench.php | 4 +++- src/core/etl/src/Flow/ETL/Cache.php | 4 +++- .../src/Flow/ETL/DataFrame/GroupedDataFrame.php | 4 +++- .../Flow/ETL/DataFrame/PartitionedDataFrame.php | 4 +++- src/core/etl/src/Flow/ETL/DataFrameFactory.php | 4 +++- src/core/etl/src/Flow/ETL/ErrorHandler.php | 4 +++- .../ETL/Exception/InvalidFileFormatException.php | 4 +++- .../Flow/ETL/Exception/LimitReachedException.php | 4 +++- src/core/etl/src/Flow/ETL/ExternalSort.php | 4 +++- .../src/Flow/ETL/Extractor/ArrayExtractor.php | 4 +++- .../etl/src/Flow/ETL/Extractor/Limitable.php | 4 +++- .../Flow/ETL/Extractor/LimitableExtractor.php | 4 +++- .../ETL/Extractor/LocalFileListExtractor.php | 4 +++- .../Flow/ETL/Extractor/PartitionFiltering.php | 4 +++- .../Flow/ETL/Extractor/PartitionsExtractor.php | 4 +++- src/core/etl/src/Flow/ETL/Extractor/Signal.php | 4 +++- .../Flow/ETL/Filesystem/FilesystemStreams.php | 4 +++- .../etl/src/Flow/ETL/Filesystem/LocalBuffer.php | 4 +++- .../src/Flow/ETL/Filesystem/LocalFilesystem.php | 4 +++- src/core/etl/src/Flow/ETL/Filesystem/Paths.php | 4 +++- .../etl/src/Flow/ETL/Filesystem/SaveMode.php | 4 +++- .../ETL/Filesystem/Stream/VoidStreamWrapper.php | 4 +++- src/core/etl/src/Flow/ETL/Formatter.php | 4 +++- .../Flow/ETL/Function/AggregatingFunction.php | 4 +++- .../ETL/Function/ArrayExpand/ArrayExpand.php | 4 +++- .../etl/src/Flow/ETL/Function/ArraySort/Sort.php | 4 +++- src/core/etl/src/Flow/ETL/Function/Average.php | 4 +++- .../src/Flow/ETL/Function/Between/Boundary.php | 4 +++- .../etl/src/Flow/ETL/Function/Capitalize.php | 4 +++- .../ETL/Function/CompositeScalarFunction.php | 4 +++- .../src/Flow/ETL/Function/DOMNodeAttribute.php | 4 +++- .../etl/src/Flow/ETL/Function/DOMNodeValue.php | 4 +++- src/core/etl/src/Flow/ETL/Function/DenseRank.php | 4 +++- .../etl/src/Flow/ETL/Function/ListFunctions.php | 4 +++- .../etl/src/Flow/ETL/Function/ListSelect.php | 4 +++- .../etl/src/Flow/ETL/Function/NumberFormat.php | 4 +++- src/core/etl/src/Flow/ETL/Function/Optional.php | 4 +++- src/core/etl/src/Flow/ETL/Function/Rank.php | 4 +++- src/core/etl/src/Flow/ETL/Function/RowNumber.php | 4 +++- .../src/Flow/ETL/Function/StructureFunctions.php | 4 +++- .../src/Flow/ETL/Function/StructureSelect.php | 4 +++- src/core/etl/src/Flow/ETL/Function/Sum.php | 4 +++- src/core/etl/src/Flow/ETL/Function/ToMoney.php | 4 +++- src/core/etl/src/Flow/ETL/Function/Trim/Type.php | 4 +++- src/core/etl/src/Flow/ETL/Function/XPath.php | 4 +++- src/core/etl/src/Flow/ETL/Loader/Closure.php | 4 +++- .../ETL/PHP/Type/Caster/XML/XMLConverter.php | 4 +++- .../ETL/PHP/Type/Logical/List/ListElement.php | 4 +++- .../src/Flow/ETL/PHP/Type/Logical/ListType.php | 4 +++- .../src/Flow/ETL/PHP/Type/Logical/Map/MapKey.php | 4 +++- .../Flow/ETL/PHP/Type/Logical/Map/MapValue.php | 4 +++- .../src/Flow/ETL/PHP/Type/Logical/MapType.php | 4 +++- .../Type/Logical/Structure/StructureElement.php | 1 + .../Flow/ETL/PHP/Type/Logical/StructureType.php | 4 +++- .../src/Flow/ETL/PHP/Type/Native/ArrayType.php | 1 + .../Flow/ETL/PHP/Type/Native/CallableType.php | 1 + .../src/Flow/ETL/PHP/Type/Native/NullType.php | 1 + .../Flow/ETL/PHP/Type/Native/ResourceType.php | 1 + .../src/Flow/ETL/Partition/CartesianProduct.php | 4 +++- .../src/Flow/ETL/Partition/FiltersCollection.php | 4 +++- .../Flow/ETL/Partition/ScalarFunctionFilter.php | 4 +++- src/core/etl/src/Flow/ETL/Partitions.php | 4 +++- .../src/Flow/ETL/Pipeline/BatchingPipeline.php | 4 +++- src/core/etl/src/Flow/ETL/Pipeline/Optimizer.php | 4 +++- .../Pipeline/Optimizer/BatchSizeOptimization.php | 4 +++- .../ETL/Pipeline/Optimizer/LimitOptimization.php | 4 +++- .../Flow/ETL/Pipeline/Optimizer/Optimization.php | 4 +++- .../src/Flow/ETL/Pipeline/OverridingPipeline.php | 4 +++- src/core/etl/src/Flow/ETL/Row/Comparator.php | 4 +++- .../etl/src/Flow/ETL/Row/Entry/Type/Uuid.php | 4 +++- src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php | 4 +++- .../etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php | 4 +++- src/core/etl/src/Flow/ETL/Row/EntryFactory.php | 4 +++- src/core/etl/src/Flow/ETL/RowsFactory.php | 4 +++- src/core/etl/src/Flow/ETL/SchemaValidator.php | 4 +++- src/core/etl/src/Flow/ETL/Transformation.php | 4 +++- .../Flow/ETL/Transformer/LimitTransformer.php | 4 +++- .../Flow/ETL/Transformer/UntilTransformer.php | 4 +++- src/core/etl/src/Flow/ETL/Window.php | 4 +++- src/core/etl/src/Flow/Serializer/Serializer.php | 4 +++- .../EntryFactory/NativeEntryFactoryBench.php | 4 +++- .../tests/Flow/ETL/Tests/Benchmark/RowsBench.php | 4 +++- .../Transformer/RenameEntryTransformerBench.php | 4 +++- .../ETL/Tests/Benchmark/TypeDetectorBench.php | 4 +++- .../ETL/Tests/Fixtures/without-dataframe.php | 4 +++- .../Tests/Integration/DataFrame/CacheTest.php | 4 +++- .../Integration/DataFrame/DataFrameJsonTest.php | 4 +++- .../Tests/Integration/DataFrame/DisplayTest.php | 4 +++- .../Tests/Integration/DataFrame/GroupByTest.php | 4 +++- .../ETL/Tests/Integration/DataFrame/JoinTest.php | 4 +++- .../Tests/Integration/DataFrame/LimitTest.php | 4 +++- .../Integration/DataFrame/PartitioningTest.php | 4 +++- .../Tests/Integration/DataFrame/RenameTest.php | 4 +++- .../ETL/Tests/Integration/DataFrame/SortTest.php | 4 +++- .../ETL/Tests/Integration/Function/CastTest.php | 4 +++- .../Integration/Function/ListSelectTest.php | 4 +++- .../Function/Structure/StructureSelectTest.php | 4 +++- .../Pipeline/BatchingPipelineTest.php | 4 +++- .../Pipeline/CollectingPipelineTest.php | 4 +++- .../Tests/Integration/Pipeline/OptimizerTest.php | 4 +++- .../Tests/Integration/Pipeline/PipelineTest.php | 4 +++- .../Pipeline/SynchronousPipelineTest.php | 4 +++- .../Integration/Window/WindowFunctionsTest.php | 4 +++- .../Tests/Unit/Extractor/ArrayExtractorTest.php | 4 +++- .../Extractor/LocalFileListExtractorTest.php | 4 +++- .../ETL/Tests/Unit/Function/CallMethodTest.php | 4 +++- .../Tests/Unit/Function/DOMNodeAttributeTest.php | 4 +++- .../ETL/Tests/Unit/Function/DOMNodeValueTest.php | 4 +++- .../ETL/Tests/Unit/Function/ListSelectTest.php | 4 +++- .../ETL/Tests/Unit/Function/NumberFormatTest.php | 4 +++- .../Tests/Unit/Function/StructureSelectTest.php | 4 +++- .../Flow/ETL/Tests/Unit/Function/ToMoneyTest.php | 4 +++- .../Flow/ETL/Tests/Unit/Function/XPathTest.php | 4 +++- .../Unit/PHP/Type/ArrayContentDetectorTest.php | 4 +++- .../Tests/Unit/PHP/Type/Logical/ListTypeTest.php | 4 +++- .../Tests/Unit/PHP/Type/Logical/MapTypeTest.php | 4 +++- .../Unit/PHP/Type/Logical/StructureTypeTest.php | 4 +++- .../Tests/Unit/PHP/Type/Native/ArrayTypeTest.php | 4 +++- .../Unit/PHP/Type/Native/CallableTypeTest.php | 4 +++- .../Tests/Unit/PHP/Type/Native/NullTypeTest.php | 4 +++- .../Unit/PHP/Type/Native/ResourceTypeTest.php | 4 +++- .../Unit/PHP/Type/Native/ScalarTypeTest.php | 4 +++- .../ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php | 4 +++- .../Unit/Partition/CartesianProductTest.php | 4 +++- .../Unit/Partition/ScalarFunctionFilterTest.php | 4 +++- .../Optimizer/BatchSizeOptimizationTest.php | 4 +++- .../Pipeline/Optimizer/LimitOptimizationTest.php | 4 +++- .../Tests/Unit/Row/Entry/XMLNodeEntryTest.php | 4 +++- .../src/Flow/Doctrine/Bulk/DbalPlatform.php | 4 +++- .../src/Flow/Doctrine/Bulk/Dialect/Dialect.php | 4 +++- .../Doctrine/Bulk/Tests/IntegrationTestCase.php | 1 + .../Bulk/Tests/Unit/DbalPlatformTest.php | 4 +++- src/lib/dremel/src/Flow/Dremel/DataShredded.php | 4 +++- src/lib/dremel/src/Flow/Dremel/Dremel.php | 4 +++- .../Exception/InvalidArgumentException.php | 4 +++- .../Flow/Dremel/Exception/RuntimeException.php | 4 +++- src/lib/dremel/src/Flow/Dremel/ListNode.php | 4 +++- src/lib/dremel/src/Flow/Dremel/Node.php | 4 +++- src/lib/dremel/src/Flow/Dremel/NullNode.php | 4 +++- src/lib/dremel/src/Flow/Dremel/Stack.php | 4 +++- .../Flow/Dremel/Tests/Integration/DremelTest.php | 4 +++- .../Dremel/Tests/Unit/DremelAssembleTest.php | 4 +++- .../Flow/Dremel/Tests/Unit/DremelShredTest.php | 4 +++- .../Flow/Dremel/Tests/Unit/ListNodeTest.php | 4 +++- src/lib/parquet-viewer/bin/parquet.php | 16 ++++++++++------ .../Command/ReadMetadataCommand.php | 4 +++- .../src/Flow/ParquetViewer/Parquet.php | 4 +++- .../Tests/Integration/ReadDataCommandTest.php | 4 +++- .../Tests/Integration/ReadMetadataTest.php | 4 +++- .../parquet/src/Flow/Parquet/BinaryReader.php | 4 +++- .../Parquet/BinaryReader/BinaryBufferReader.php | 4 +++- .../Parquet/BinaryWriter/BinaryBufferWriter.php | 4 +++- src/lib/parquet/src/Flow/Parquet/ByteOrder.php | 4 +++- src/lib/parquet/src/Flow/Parquet/Consts.php | 4 +++- .../parquet/src/Flow/Parquet/Data/Converter.php | 4 +++- .../Data/Converter/BytesStringConverter.php | 4 +++- .../Data/Converter/Int32DateConverter.php | 4 +++- .../Data/Converter/Int32DateTimeConverter.php | 4 +++- .../Data/Converter/Int64DateTimeConverter.php | 4 +++- .../Data/Converter/Int96DateTimeConverter.php | 4 +++- .../Parquet/Data/Converter/JsonConverter.php | 4 +++- .../Parquet/Data/Converter/TimeConverter.php | 4 +++- .../Parquet/Data/Converter/UuidConverter.php | 4 +++- .../src/Flow/Parquet/Data/DataConverter.php | 4 +++- .../src/Flow/Parquet/Data/ObjectToString.php | 4 +++- src/lib/parquet/src/Flow/Parquet/DataSize.php | 4 +++- .../Exception/DataConversionException.php | 4 +++- .../Exception/InvalidArgumentException.php | 4 +++- .../Parquet/Exception/OutOfBoundsException.php | 4 +++- .../Flow/Parquet/Exception/RuntimeException.php | 4 +++- .../Parquet/Exception/ValidationException.php | 4 +++- src/lib/parquet/src/Flow/Parquet/Option.php | 4 +++- src/lib/parquet/src/Flow/Parquet/Options.php | 4 +++- .../src/Flow/Parquet/ParquetFile/Codec.php | 4 +++- .../Parquet/ParquetFile/ColumnChunkReader.php | 4 +++- .../ColumnChunkReader/WholeChunkReader.php | 4 +++- .../Parquet/ParquetFile/ColumnChunkViewer.php | 4 +++- .../ColumnChunkViewer/WholeChunkViewer.php | 4 +++- .../Parquet/ParquetFile/ColumnPageHeader.php | 4 +++- .../Flow/Parquet/ParquetFile/Compressions.php | 4 +++- .../Flow/Parquet/ParquetFile/Data/BitWidth.php | 4 +++- .../Parquet/ParquetFile/Data/BytesConverter.php | 4 +++- .../Parquet/ParquetFile/Data/DataBuilder.php | 4 +++- .../ParquetFile/Data/PlainValueUnpacker.php | 4 +++- .../ParquetFile/Data/PlainValuesPacker.php | 4 +++- .../ParquetFile/Data/RLEBitPackedHybrid.php | 4 +++- .../src/Flow/Parquet/ParquetFile/DataCoder.php | 4 +++- .../src/Flow/Parquet/ParquetFile/Encodings.php | 4 +++- .../src/Flow/Parquet/ParquetFile/Metadata.php | 4 +++- .../Flow/Parquet/ParquetFile/Page/ColumnData.php | 4 +++- .../Flow/Parquet/ParquetFile/Page/Dictionary.php | 4 +++- .../ParquetFile/Page/Header/DataPageHeader.php | 4 +++- .../ParquetFile/Page/Header/DataPageHeaderV2.php | 4 +++- .../Page/Header/DictionaryPageHeader.php | 4 +++- .../Parquet/ParquetFile/Page/Header/Type.php | 4 +++- .../Flow/Parquet/ParquetFile/Page/PageHeader.php | 4 +++- .../src/Flow/Parquet/ParquetFile/PageReader.php | 4 +++- .../src/Flow/Parquet/ParquetFile/RowGroup.php | 4 +++- .../Parquet/ParquetFile/RowGroup/ColumnChunk.php | 4 +++- .../ParquetFile/RowGroup/StatisticsReader.php | 4 +++- .../Flow/Parquet/ParquetFile/RowGroupBuilder.php | 4 +++- .../RowGroupBuilder/ColumnChunkBuilder.php | 4 +++- .../RowGroupBuilder/ColumnChunkContainer.php | 4 +++- .../RowGroupBuilder/ColumnChunkStatistics.php | 4 +++- .../ParquetFile/RowGroupBuilder/Flattener.php | 4 +++- .../PageBuilder/DataPageBuilder.php | 4 +++- .../PageBuilder/DataPageV2Statistics.php | 4 +++- .../RowGroupBuilder/PageBuilder/Dictionary.php | 4 +++- .../PageBuilder/DictionaryBuilder.php | 4 +++- .../DictionaryBuilder/FloatDictionaryBuilder.php | 4 +++- .../ObjectDictionaryBuilder.php | 4 +++- .../ScalarDictionaryBuilder.php | 4 +++- .../PageBuilder/DictionaryPageBuilder.php | 4 +++- .../PageBuilder/RLEBitPackedPacker.php | 4 +++- .../PageBuilder/StatisticsBuilder.php | 4 +++- .../RowGroupBuilder/PageContainer.php | 4 +++- .../RowGroupBuilder/PageContainers.php | 4 +++- .../RowGroupBuilder/PageSizeCalculator.php | 4 +++- .../ParquetFile/RowGroupBuilder/PagesBuilder.php | 4 +++- .../RowGroupBuilder/RowGroupContainer.php | 4 +++- .../RowGroupBuilder/RowGroupStatistics.php | 4 +++- .../RowGroupBuilder/Statistics/Comparator.php | 4 +++- .../RowGroupBuilder/StatisticsBuilder.php | 4 +++- .../ParquetFile/RowGroupBuilder/Validator.php | 4 +++- .../Validator/ColumnDataValidator.php | 4 +++- .../Validator/DisabledValidator.php | 4 +++- .../src/Flow/Parquet/ParquetFile/RowGroups.php | 4 +++- .../src/Flow/Parquet/ParquetFile/Schema.php | 4 +++- .../Flow/Parquet/ParquetFile/Schema/Column.php | 4 +++- .../ParquetFile/Schema/ColumnPrimitiveType.php | 4 +++- .../Parquet/ParquetFile/Schema/ConvertedType.php | 4 +++- .../Parquet/ParquetFile/Schema/FlatColumn.php | 4 +++- .../Parquet/ParquetFile/Schema/ListElement.php | 4 +++- .../Parquet/ParquetFile/Schema/LogicalType.php | 4 +++- .../ParquetFile/Schema/LogicalType/Decimal.php | 4 +++- .../ParquetFile/Schema/LogicalType/Time.php | 4 +++- .../ParquetFile/Schema/LogicalType/Timestamp.php | 4 +++- .../Flow/Parquet/ParquetFile/Schema/MapKey.php | 4 +++- .../Flow/Parquet/ParquetFile/Schema/MapValue.php | 4 +++- .../Parquet/ParquetFile/Schema/NestedColumn.php | 4 +++- .../Parquet/ParquetFile/Schema/PhysicalType.php | 4 +++- .../Parquet/ParquetFile/Schema/Repetition.php | 4 +++- .../Flow/Parquet/ParquetFile/Schema/TimeUnit.php | 4 +++- .../src/Flow/Parquet/ParquetFile/Statistics.php | 4 +++- src/lib/parquet/src/Flow/Parquet/Reader.php | 4 +++- .../src/Flow/Parquet/Thrift/AesGcmCtrV1.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/AesGcmV1.php | 4 +++- .../Flow/Parquet/Thrift/BloomFilterAlgorithm.php | 4 +++- .../Parquet/Thrift/BloomFilterCompression.php | 4 +++- .../src/Flow/Parquet/Thrift/BloomFilterHash.php | 4 +++- .../Flow/Parquet/Thrift/BloomFilterHeader.php | 4 +++- .../src/Flow/Parquet/Thrift/BoundaryOrder.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/BsonType.php | 4 +++- .../src/Flow/Parquet/Thrift/ColumnChunk.php | 4 +++- .../Flow/Parquet/Thrift/ColumnCryptoMetaData.php | 4 +++- .../src/Flow/Parquet/Thrift/ColumnIndex.php | 4 +++- .../src/Flow/Parquet/Thrift/ColumnMetaData.php | 4 +++- .../src/Flow/Parquet/Thrift/ColumnOrder.php | 4 +++- .../src/Flow/Parquet/Thrift/CompressionCodec.php | 4 +++- .../src/Flow/Parquet/Thrift/ConvertedType.php | 4 +++- .../src/Flow/Parquet/Thrift/DataPageHeader.php | 4 +++- .../src/Flow/Parquet/Thrift/DataPageHeaderV2.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/DateType.php | 4 +++- .../src/Flow/Parquet/Thrift/DecimalType.php | 4 +++- .../Flow/Parquet/Thrift/DictionaryPageHeader.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/Encoding.php | 4 +++- .../Flow/Parquet/Thrift/EncryptionAlgorithm.php | 4 +++- .../Parquet/Thrift/EncryptionWithColumnKey.php | 4 +++- .../Parquet/Thrift/EncryptionWithFooterKey.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/EnumType.php | 4 +++- .../Flow/Parquet/Thrift/FieldRepetitionType.php | 4 +++- .../Flow/Parquet/Thrift/FileCryptoMetaData.php | 4 +++- .../src/Flow/Parquet/Thrift/FileMetaData.php | 4 +++- .../src/Flow/Parquet/Thrift/IndexPageHeader.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/IntType.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/JsonType.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/KeyValue.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/ListType.php | 4 +++- .../src/Flow/Parquet/Thrift/LogicalType.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/MapType.php | 4 +++- .../src/Flow/Parquet/Thrift/MicroSeconds.php | 4 +++- .../src/Flow/Parquet/Thrift/MilliSeconds.php | 4 +++- .../src/Flow/Parquet/Thrift/NanoSeconds.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/NullType.php | 4 +++- .../src/Flow/Parquet/Thrift/OffsetIndex.php | 4 +++- .../Flow/Parquet/Thrift/PageEncodingStats.php | 4 +++- .../src/Flow/Parquet/Thrift/PageHeader.php | 4 +++- .../src/Flow/Parquet/Thrift/PageLocation.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/PageType.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/RowGroup.php | 4 +++- .../src/Flow/Parquet/Thrift/SchemaElement.php | 4 +++- .../src/Flow/Parquet/Thrift/SortingColumn.php | 4 +++- .../Flow/Parquet/Thrift/SplitBlockAlgorithm.php | 4 +++- .../src/Flow/Parquet/Thrift/Statistics.php | 4 +++- .../src/Flow/Parquet/Thrift/StringType.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/TimeType.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/TimeUnit.php | 4 +++- .../src/Flow/Parquet/Thrift/TimestampType.php | 4 +++- src/lib/parquet/src/Flow/Parquet/Thrift/Type.php | 4 +++- .../src/Flow/Parquet/Thrift/TypeDefinedOrder.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/UUIDType.php | 4 +++- .../src/Flow/Parquet/Thrift/Uncompressed.php | 4 +++- .../parquet/src/Flow/Parquet/Thrift/XxHash.php | 4 +++- .../Flow/Parquet/ThriftStream/TPhpFileStream.php | 4 +++- src/lib/parquet/src/Flow/Parquet/Writer.php | 4 +++- .../Binary/BinaryReaderWriterTest.php | 4 +++- .../Tests/Integration/IO/CompressionTest.php | 4 +++- .../Integration/IO/EdgeCasesReadingTest.php | 4 +++- .../Tests/Integration/IO/ListsReadingTest.php | 4 +++- .../Tests/Integration/IO/ListsWritingTest.php | 4 +++- .../Tests/Integration/IO/MapsReadingTest.php | 4 +++- .../Tests/Integration/IO/MapsWritingTest.php | 4 +++- .../Tests/Integration/IO/SchemaReadingTest.php | 4 +++- .../Integration/IO/SimpleTypesReadingTest.php | 4 +++- .../Integration/IO/SimpleTypesWritingTest.php | 4 +++- .../Tests/Integration/IO/StructsReadingTest.php | 4 +++- .../Tests/Integration/IO/StructsWritingTest.php | 4 +++- .../Parquet/Tests/Integration/IO/WriterTest.php | 4 +++- .../Tests/Integration/IO/WriterValidatorTest.php | 4 +++- .../ParquetFile/Data/RLEBitPackedHybridTest.php | 4 +++- .../ColumnChunkStatisticsTest.php | 4 +++- .../PageBuilder/RLEBitPackedTest.php | 4 +++- .../RowGroupBuilder/PagesBuilderTest.php | 4 +++- .../Unit/BinaryReader/BinaryBufferReaderTest.php | 4 +++- .../Tests/Unit/BinaryReader/BytesTest.php | 4 +++- .../Data/Converter/Int32DateConverterTest.php | 4 +++- .../Converter/Int32DateTimeConverterTest.php | 4 +++- .../Converter/Int64DateTimeConverterTest.php | 4 +++- .../Unit/Data/Converter/TimeConverterTest.php | 4 +++- .../Unit/Data/Converter/UuidConverterTest.php | 4 +++- .../Flow/Parquet/Tests/Unit/FunctionsTest.php | 4 +++- .../Parquet/Tests/Unit/ParquetFile/CodecTest.php | 4 +++- .../ParquetFile/Data/RLEBitPackedHybridTest.php | 4 +++- .../Unit/ParquetFile/Page/ColumnDataTest.php | 4 +++- .../ColumnChunkSizeStatisticsTest.php | 4 +++- .../RowGroupBuilder/FlattenerTest.php | 4 +++- .../Unit/ParquetFile/Schema/FlatColumnTest.php | 4 +++- .../Unit/ParquetFile/Schema/NestedColumnTest.php | 4 +++- .../Tests/Unit/ParquetFile/SchemaTest.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/AccessControl.php | 4 +++- .../src/Flow/RDSL/AccessControl/AllowAll.php | 4 +++- .../src/Flow/RDSL/AccessControl/AllowList.php | 4 +++- .../rdsl/src/Flow/RDSL/AccessControl/DenyAll.php | 4 +++- .../src/Flow/RDSL/AccessControl/DenyList.php | 4 +++- .../rdsl/src/Flow/RDSL/AccessControl/Except.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Arguments.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Attribute/DSL.php | 4 +++- .../rdsl/src/Flow/RDSL/Attribute/DSLMethod.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Builder.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/DSLFunction.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/DSLNamespace.php | 4 +++- .../RDSL/Exception/InvalidArgumentException.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Executable.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Executables.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Executor.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Finder.php | 4 +++- src/lib/rdsl/src/Flow/RDSL/Method.php | 4 +++- .../tests/Flow/RDSL/Tests/Fixtures/IntObject.php | 4 +++- .../tests/Flow/RDSL/Tests/Fixtures/Literal.php | 4 +++- .../tests/Flow/RDSL/Tests/Fixtures/functions.php | 4 +++- .../Flow/RDSL/Tests/Integration/ExecutorTest.php | 4 +++- .../Tests/Unit/AccessControl/AllowAllTest.php | 4 +++- .../Tests/Unit/AccessControl/DenyAllTest.php | 4 +++- .../RDSL/Tests/Unit/AccessControl/ExceptTest.php | 4 +++- .../tests/Flow/RDSL/Tests/Unit/BuilderTest.php | 4 +++- .../tests/Flow/RDSL/Tests/Unit/DSLFinderTest.php | 4 +++- .../tests/Flow/RDSL/Tests/Unit/NamespaceTest.php | 4 +++- src/lib/snappy/polyfill.php | 1 - src/lib/snappy/src/Flow/Snappy/Snappy.php | 4 +++- .../snappy/src/Flow/Snappy/SnappyCompressor.php | 4 +++- .../src/Flow/Snappy/SnappyDecompressor.php | 4 +++- .../Flow/Snappy/Tests/Integration/SnappyTest.php | 4 +++- .../Website/Controller/DefaultController.php | 4 +++- web/landing/src/Flow/Website/Kernel.php | 4 +++- .../src/Flow/Website/Service/Examples.php | 4 +++- .../Valid/topics/topic_1/example_1/code.php | 4 +++- .../Valid/topics/topic_1/example_2/code.php | 4 +++- .../Valid/topics/topic_2/example_1/code.php | 4 +++- .../Valid/topics/topic_2/example_2/code.php | 4 +++- .../Valid/topics/topic_3/example_1/code.php | 4 +++- 408 files changed, 1215 insertions(+), 407 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 09984d9b7..84b3e2226 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,6 +7,7 @@ ->files() ->in([ __DIR__ . '/bin', + __DIR__ . '/src/*', __DIR__ . '/src/core/**/src', __DIR__ . '/src/core/**/tests', __DIR__ . '/src/adapter/**/src', @@ -32,7 +33,7 @@ ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, - 'blank_line_after_opening_tag' => false, + 'blank_line_after_opening_tag' => true, 'blank_line_before_statement' => [ 'statements' => [ 'break', diff --git a/examples/autoload.php b/examples/autoload.php index 321d4d77b..21ba218d7 100644 --- a/examples/autoload.php +++ b/examples/autoload.php @@ -1,4 +1,6 @@ -run(); -})(); \ No newline at end of file +})(); diff --git a/src/lib/parquet-viewer/src/Flow/ParquetViewer/Command/ReadMetadataCommand.php b/src/lib/parquet-viewer/src/Flow/ParquetViewer/Command/ReadMetadataCommand.php index faac7f38d..ac751b6ed 100644 --- a/src/lib/parquet-viewer/src/Flow/ParquetViewer/Command/ReadMetadataCommand.php +++ b/src/lib/parquet-viewer/src/Flow/ParquetViewer/Command/ReadMetadataCommand.php @@ -1,4 +1,6 @@ -uncompress($compressedText); } } - diff --git a/src/lib/snappy/src/Flow/Snappy/Snappy.php b/src/lib/snappy/src/Flow/Snappy/Snappy.php index 1bef5e98f..384c6fb68 100644 --- a/src/lib/snappy/src/Flow/Snappy/Snappy.php +++ b/src/lib/snappy/src/Flow/Snappy/Snappy.php @@ -1,4 +1,6 @@ - Date: Sun, 10 Mar 2024 14:05:36 +0100 Subject: [PATCH 2/4] Group imports --- .php-cs-fixer.php | 4 +- bin/flow.php | 10 +- examples/topics/aggregations/average/code.php | 9 +- examples/topics/aggregations/first/code.php | 9 +- .../topics/aggregations/group_by/code.php | 5 +- .../topics/aggregations/group_by_sum/code.php | 6 +- examples/topics/aggregations/last/code.php | 9 +- examples/topics/aggregations/max/code.php | 9 +- examples/topics/aggregations/min/code.php | 9 +- examples/topics/aggregations/sum/code.php | 9 +- examples/topics/data_frame/cache/code.php | 9 +- .../topics/data_frame/data_frame/code.php | 10 +- examples/topics/data_frame/overwrite/code.php | 6 +- examples/topics/data_source/array/code.php | 4 +- examples/topics/data_source/csv/code.php | 3 +- .../topics/data_source/data_frame/code.php | 6 +- .../topics/data_source/http_dynamic/code.php | 4 +- examples/topics/data_source/json/code.php | 3 +- examples/topics/data_source/parquet/code.php | 3 +- .../topics/data_source/sequence_date/code.php | 4 +- .../sequence_date_recurrences/code.php | 4 +- .../data_source/sequence_number/code.php | 4 +- examples/topics/data_source/xml/code.php | 4 +- examples/topics/join/left_anti/code.php | 7 +- examples/topics/join/left_anti_each/code.php | 15 +-- .../partitioning/partition_pruning/code.php | 5 +- .../topics/partitioning/partitioning/code.php | 4 +- examples/topics/partitioning/reading/code.php | 3 +- examples/topics/schema/display/code.php | 4 +- examples/topics/schema/inferring/code.php | 5 +- examples/topics/schema/validate/code.php | 8 +- .../transformations/array_expand/code.php | 10 +- .../transformations/array_unpack/code.php | 9 +- .../transformations/filter_divide/code.php | 9 +- .../transformations/filter_mod/code.php | 9 +- .../topics/transformations/literals/code.php | 8 +- examples/topics/transformations/math/code.php | 8 +- examples/topics/transformations/size/code.php | 9 +- examples/topics/transformations/sort/code.php | 5 +- .../topics/transformations/when_null/code.php | 11 +- .../topics/transformations/when_odd/code.php | 7 +- .../window_functions/dens_rank/code.php | 7 +- .../Adapter/Avro/FlixTech/AvroExtractor.php | 10 +- .../ETL/Adapter/Avro/FlixTech/AvroLoader.php | 9 +- .../Adapter/Avro/FlixTech/SchemaConverter.php | 14 +- .../src/Flow/ETL/Adapter/Avro/functions.php | 3 +- .../Tests/Benchmark/AvroExtractorBench.php | 3 +- .../Avro/Tests/Benchmark/AvroLoaderBench.php | 7 +- .../Avro/Tests/Integration/AvroTest.php | 13 +- .../Avro/Tests/Unit/SchemaConverterTest.php | 10 +- .../ETL/Adapter/ChartJS/Chart/BarChart.php | 3 +- .../ETL/Adapter/ChartJS/Chart/LineChart.php | 3 +- .../ETL/Adapter/ChartJS/Chart/PieChart.php | 3 +- .../ETL/Adapter/ChartJS/ChartJSLoader.php | 4 +- .../Flow/ETL/Adapter/ChartJS/functions.php | 7 +- .../Tests/Integration/ChartJSLoaderTest.php | 14 +- .../ChartJS/Tests/Unit/Chart/BarChartTest.php | 5 +- .../src/Flow/ETL/Adapter/CSV/CSVDetector.php | 3 +- .../src/Flow/ETL/Adapter/CSV/CSVExtractor.php | 10 +- .../src/Flow/ETL/Adapter/CSV/CSVLoader.php | 5 +- .../src/Flow/ETL/Adapter/CSV/functions.php | 6 +- .../CSV/Tests/Benchmark/CSVExtractorBench.php | 3 +- .../CSV/Tests/Benchmark/CSVLoaderBench.php | 7 +- .../Tests/Integration/CSVExtractorTest.php | 18 +-- .../Adapter/CSV/Tests/Integration/CSVTest.php | 10 +- .../Adapter/Doctrine/DbalDataFrameFactory.php | 8 +- .../Doctrine/DbalLimitOffsetExtractor.php | 3 +- .../Flow/ETL/Adapter/Doctrine/DbalLoader.php | 10 +- .../Adapter/Doctrine/DbalQueryExtractor.php | 7 +- .../Flow/ETL/Adapter/Doctrine/functions.php | 8 +- .../Tests/Context/InsertQueryCounter.php | 5 +- .../Integration/DbalDataFrameFactoryTest.php | 15 +-- .../DbalLimitOffsetExtractorTest.php | 12 +- .../Tests/Integration/DbalLoaderTest.php | 9 +- .../Integration/DbalQueryExtractorTest.php | 12 +- .../Doctrine/Tests/IntegrationTestCase.php | 6 +- .../ElasticsearchExtractor.php | 3 +- .../ElasticsearchPHP/ElasticsearchLoader.php | 5 +- .../HitsIntoRowsTransformer.php | 5 +- .../ElasticsearchPHP/SearchResults.php | 3 +- .../ETL/Adapter/Elasticsearch/functions.php | 5 +- .../Tests/Context/Elasticsearch7Context.php | 10 +- .../Tests/Context/Elasticsearch8Context.php | 7 +- .../Tests/Doubles/Spy/HttpClientSpy.php | 3 +- .../ElasticsearchExtractorTest.php | 10 +- .../ElasticsearchLoaderTest.php | 11 +- .../ElasticsearchPHP/IntegrationTest.php | 8 +- .../Tests/Integration/TestCase.php | 4 +- .../ETL/Adapter/Filesystem/AwsS3Stream.php | 3 +- .../Adapter/Filesystem/AzureBlobStream.php | 3 +- .../ETL/Adapter/Filesystem/FlysystemFS.php | 15 +-- .../Adapter/Filesystem/FlysystemFactory.php | 3 +- .../Adapter/Filesystem/FlysystemWrapper.php | 3 +- .../Filesystem/RemoteFileListExtractor.php | 11 +- .../Tests/Integration/FlysystemFSTest.php | 7 +- .../Tests/Integration/RegisterWrapperTest.php | 3 +- .../GoogleSheet/GoogleSheetExtractor.php | 7 +- .../Tests/Unit/GoogleSheetExtractorTest.php | 5 +- .../GoogleSheet/Tests/Unit/SheetRangeTest.php | 3 +- .../DynamicExtractor/NextRequestFactory.php | 3 +- .../Http/PsrHttpClientDynamicExtractor.php | 11 +- .../Http/PsrHttpClientStaticExtractor.php | 11 +- .../PsrHttpClientDynamicExtractorTest.php | 6 +- .../PsrHttpClientStaticExtractorTest.php | 4 +- .../Tests/Unit/RequestEntriesFactoryTest.php | 4 +- .../JSON/JSONMachine/JsonExtractor.php | 10 +- .../src/Flow/ETL/Adapter/JSON/JsonLoader.php | 5 +- .../src/Flow/ETL/Adapter/JSON/functions.php | 3 +- .../Tests/Benchmark/JsonExtractorBench.php | 3 +- .../JSON/Tests/Benchmark/JsonLoaderBench.php | 7 +- .../JSONMachine/JsonExtractorTest.php | 13 +- .../JSON/Tests/Integration/JsonTest.php | 4 +- .../ETL/Adapter/Logger/PsrLoggerLoader.php | 8 +- .../Logger/Tests/Unit/PsrLoggerLoaderTest.php | 5 +- .../HitsIntoRowsTransformer.php | 5 +- .../MeilisearchPHP/MeilisearchExtractor.php | 3 +- .../MeilisearchPHP/MeilisearchLoader.php | 5 +- .../MeilisearchPHP/SearchResults.php | 3 +- .../ETL/Adapter/Meilisearch/functions.php | 3 +- .../Tests/Context/MeilisearchContext.php | 4 +- .../Tests/Double/Spy/HttpClientSpy.php | 3 +- .../MeilisearchPHP/MailiSearchTest.php | 8 +- .../MeilisearchExtractorTest.php | 10 +- .../MeilisearchPHP/MeilisearchLoaderTest.php | 8 +- .../ETL/Adapter/Parquet/ParquetExtractor.php | 15 +-- .../ETL/Adapter/Parquet/ParquetLoader.php | 7 +- .../ETL/Adapter/Parquet/SchemaConverter.php | 32 +---- .../Flow/ETL/Adapter/Parquet/functions.php | 6 +- .../Tests/Benchmark/ParquetExtractorBench.php | 3 +- .../Tests/Benchmark/ParquetLoaderBench.php | 7 +- .../Integration/ParquetExtractorTest.php | 7 +- .../Parquet/Tests/Integration/ParquetTest.php | 12 +- .../Tests/Unit/FlowToParquetSchemaTest.php | 15 +-- .../Tests/Unit/ParquetToFlowSchemaTest.php | 24 +--- .../Flow/ETL/Adapter/Text/TextExtractor.php | 10 +- .../src/Flow/ETL/Adapter/Text/TextLoader.php | 4 +- .../src/Flow/ETL/Adapter/Text/functions.php | 3 +- .../Tests/Benchmark/TextExtractorBench.php | 3 +- .../Text/Tests/Benchmark/TextLoaderBench.php | 7 +- .../Tests/Integration/TextExtractorTest.php | 9 +- .../Text/Tests/Integration/TextTest.php | 4 +- .../ETL/Adapter/XML/XMLReaderExtractor.php | 10 +- .../XML/Tests/Benchmark/XmlExtractorBench.php | 3 +- .../Integration/XMLReaderExtractorTest.php | 6 +- .../etl/src/Flow/ETL/Cache/InMemoryCache.php | 3 +- .../Flow/ETL/Cache/LocalFilesystemCache.php | 6 +- src/core/etl/src/Flow/ETL/Cache/NullCache.php | 3 +- .../etl/src/Flow/ETL/Cache/PSRSimpleCache.php | 6 +- src/core/etl/src/Flow/ETL/ConfigBuilder.php | 7 +- src/core/etl/src/Flow/ETL/DSL/functions.php | 122 ++---------------- src/core/etl/src/Flow/ETL/DataFrame.php | 59 ++------- .../Flow/ETL/DataFrame/GroupedDataFrame.php | 4 +- .../ETL/DataFrame/PartitionedDataFrame.php | 5 +- .../src/Flow/ETL/ErrorHandler/IgnoreError.php | 3 +- .../src/Flow/ETL/ErrorHandler/SkipRows.php | 3 +- .../src/Flow/ETL/ErrorHandler/ThrowError.php | 3 +- .../src/Flow/ETL/ExternalSort/BufferCache.php | 3 +- .../ETL/ExternalSort/CacheExternalSort.php | 5 +- .../src/Flow/ETL/ExternalSort/CachedRow.php | 3 +- .../src/Flow/ETL/ExternalSort/MemorySort.php | 9 +- .../src/Flow/ETL/ExternalSort/RowsMinHeap.php | 4 +- .../src/Flow/ETL/Extractor/ArrayExtractor.php | 3 +- .../src/Flow/ETL/Extractor/CacheExtractor.php | 4 +- .../src/Flow/ETL/Extractor/ChainExtractor.php | 3 +- .../src/Flow/ETL/Extractor/ChunkExtractor.php | 4 +- .../ETL/Extractor/CollectingExtractor.php | 4 +- .../Flow/ETL/Extractor/DataFrameExtractor.php | 4 +- .../Flow/ETL/Extractor/GeneratorExtractor.php | 4 +- .../ETL/Extractor/LocalFileListExtractor.php | 3 +- .../Flow/ETL/Extractor/MemoryExtractor.php | 3 +- .../Flow/ETL/Extractor/PartitionFiltering.php | 4 +- .../Flow/ETL/Extractor/PipelineExtractor.php | 5 +- .../Flow/ETL/Extractor/ProcessExtractor.php | 4 +- .../Flow/ETL/Extractor/SequenceExtractor.php | 5 +- src/core/etl/src/Flow/ETL/Filesystem.php | 6 +- .../Flow/ETL/Filesystem/FilesystemStreams.php | 6 +- .../Flow/ETL/Filesystem/LocalFilesystem.php | 9 +- src/core/etl/src/Flow/ETL/Filesystem/Path.php | 6 +- .../Flow/ETL/Filesystem/Stream/FileStream.php | 3 +- .../etl/src/Flow/ETL/Formatter/ASCII/Body.php | 4 +- .../ETL/Formatter/AsciiTableFormatter.php | 3 +- .../etl/src/Flow/ETL/Function/Average.php | 13 +- src/core/etl/src/Flow/ETL/Function/Cast.php | 16 +-- .../etl/src/Flow/ETL/Function/Collect.php | 3 +- .../src/Flow/ETL/Function/CollectUnique.php | 3 +- src/core/etl/src/Flow/ETL/Function/Count.php | 10 +- .../etl/src/Flow/ETL/Function/DenseRank.php | 4 +- src/core/etl/src/Flow/ETL/Function/First.php | 3 +- src/core/etl/src/Flow/ETL/Function/IsType.php | 3 +- src/core/etl/src/Flow/ETL/Function/Last.php | 3 +- .../etl/src/Flow/ETL/Function/ListSelect.php | 4 +- src/core/etl/src/Flow/ETL/Function/Max.php | 7 +- src/core/etl/src/Flow/ETL/Function/Min.php | 7 +- src/core/etl/src/Flow/ETL/Function/Rank.php | 4 +- .../etl/src/Flow/ETL/Function/RowNumber.php | 4 +- .../src/Flow/ETL/Function/StructureSelect.php | 4 +- src/core/etl/src/Flow/ETL/Function/Sum.php | 13 +- .../etl/src/Flow/ETL/Function/ToMoney.php | 4 +- .../src/Flow/ETL/Function/WindowFunction.php | 4 +- src/core/etl/src/Flow/ETL/GroupBy.php | 7 +- .../src/Flow/ETL/Join/Comparison/Equal.php | 3 +- .../Flow/ETL/Join/Comparison/GreaterThan.php | 3 +- .../ETL/Join/Comparison/GreaterThanEqual.php | 3 +- .../Flow/ETL/Join/Comparison/Identical.php | 3 +- .../src/Flow/ETL/Join/Comparison/LessThan.php | 3 +- .../ETL/Join/Comparison/LessThanEqual.php | 3 +- src/core/etl/src/Flow/ETL/Join/Expression.php | 3 +- .../src/Flow/ETL/Loader/BranchingLoader.php | 4 +- .../src/Flow/ETL/Loader/CallbackLoader.php | 4 +- .../etl/src/Flow/ETL/Loader/MemoryLoader.php | 4 +- .../ETL/Loader/SchemaValidationLoader.php | 5 +- .../etl/src/Flow/ETL/Loader/StreamLoader.php | 5 +- .../src/Flow/ETL/Loader/TransformerLoader.php | 5 +- .../ETL/PHP/Type/ArrayContentDetector.php | 3 +- .../etl/src/Flow/ETL/PHP/Type/AutoCaster.php | 8 +- src/core/etl/src/Flow/ETL/PHP/Type/Caster.php | 29 +---- .../PHP/Type/Caster/ArrayCastingHandler.php | 3 +- .../PHP/Type/Caster/BooleanCastingHandler.php | 3 +- .../ETL/PHP/Type/Caster/CastingContext.php | 3 +- .../ETL/PHP/Type/Caster/CastingHandler.php | 3 +- .../Type/Caster/DateTimeCastingHandler.php | 3 +- .../PHP/Type/Caster/EnumCastingHandler.php | 3 +- .../PHP/Type/Caster/FloatCastingHandler.php | 3 +- .../PHP/Type/Caster/IntegerCastingHandler.php | 3 +- .../PHP/Type/Caster/JsonCastingHandler.php | 3 +- .../PHP/Type/Caster/ListCastingHandler.php | 3 +- .../ETL/PHP/Type/Caster/MapCastingHandler.php | 3 +- .../PHP/Type/Caster/NullCastingHandler.php | 3 +- .../PHP/Type/Caster/ObjectCastingHandler.php | 3 +- .../PHP/Type/Caster/StringCastingHandler.php | 3 +- .../Type/Caster/StructureCastingHandler.php | 3 +- .../PHP/Type/Caster/UuidCastingHandler.php | 3 +- .../ETL/PHP/Type/Caster/XMLCastingHandler.php | 6 +- .../ETL/PHP/Type/Logical/List/ListElement.php | 18 +-- .../Flow/ETL/PHP/Type/Logical/Map/MapKey.php | 5 +- .../ETL/PHP/Type/Logical/Map/MapValue.php | 15 +-- .../src/Flow/ETL/PHP/Type/Logical/MapType.php | 3 +- .../Logical/Structure/StructureElement.php | 3 +- .../src/Flow/ETL/PHP/Type/TypeDetector.php | 19 +-- .../etl/src/Flow/ETL/PHP/Type/TypeFactory.php | 17 +-- src/core/etl/src/Flow/ETL/Partition.php | 14 +- .../Flow/ETL/Pipeline/BatchingPipeline.php | 9 +- .../src/Flow/ETL/Pipeline/CachingPipeline.php | 6 +- .../Flow/ETL/Pipeline/CollectingPipeline.php | 7 +- .../src/Flow/ETL/Pipeline/GroupByPipeline.php | 7 +- .../src/Flow/ETL/Pipeline/NestedPipeline.php | 6 +- .../etl/src/Flow/ETL/Pipeline/Optimizer.php | 4 +- .../Optimizer/BatchSizeOptimization.php | 9 +- .../Pipeline/Optimizer/LimitOptimization.php | 20 +-- .../ETL/Pipeline/Optimizer/Optimization.php | 4 +- .../ETL/Pipeline/PartitioningPipeline.php | 10 +- src/core/etl/src/Flow/ETL/Pipeline/Pipes.php | 3 +- .../Flow/ETL/Pipeline/SynchronousPipeline.php | 7 +- .../src/Flow/ETL/Pipeline/VoidPipeline.php | 7 +- src/core/etl/src/Flow/ETL/PipelineFactory.php | 3 +- src/core/etl/src/Flow/ETL/Row.php | 6 +- src/core/etl/src/Flow/ETL/Row/Entries.php | 4 +- .../etl/src/Flow/ETL/Row/Entry/ArrayEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/BooleanEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/DateTimeEntry.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/EntryRef.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/EnumEntry.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/FloatEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/IntegerEntry.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/JsonEntry.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/ListEntry.php | 6 +- .../etl/src/Flow/ETL/Row/Entry/MapEntry.php | 6 +- .../etl/src/Flow/ETL/Row/Entry/NullEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/ObjectEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/StringEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/StructureEntry.php | 6 +- .../etl/src/Flow/ETL/Row/Entry/Type/Uuid.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/UuidEntry.php | 3 +- .../etl/src/Flow/ETL/Row/Entry/XMLEntry.php | 3 +- .../src/Flow/ETL/Row/Entry/XMLNodeEntry.php | 3 +- .../etl/src/Flow/ETL/Row/EntryFactory.php | 4 +- .../etl/src/Flow/ETL/Row/EntryReference.php | 4 +- .../ETL/Row/Factory/NativeEntryFactory.php | 43 +----- src/core/etl/src/Flow/ETL/Row/Schema.php | 4 +- .../src/Flow/ETL/Row/Schema/Definition.php | 45 +------ .../ETL/Row/Schema/SelectiveValidator.php | 3 +- .../Flow/ETL/Row/Schema/StrictValidator.php | 3 +- src/core/etl/src/Flow/ETL/Rows.php | 14 +- .../ETL/Transformer/AutoCastTransformer.php | 5 +- .../Transformer/CallbackRowTransformer.php | 5 +- .../Transformer/CrossJoinRowsTransformer.php | 5 +- .../Transformer/DropDuplicatesTransformer.php | 4 +- .../Transformer/DropPartitionsTransformer.php | 4 +- .../EntryNameStyleConverterTransformer.php | 5 +- .../Transformer/GroupToArrayTransformer.php | 5 +- .../Transformer/JoinEachRowsTransformer.php | 8 +- .../ETL/Transformer/JoinRowsTransformer.php | 8 +- .../Transformer/KeepEntriesTransformer.php | 9 +- .../Flow/ETL/Transformer/LimitTransformer.php | 7 +- .../Transformer/RemoveEntriesTransformer.php | 8 +- .../Transformer/RenameAllCaseTransformer.php | 5 +- .../Transformer/RenameEntryTransformer.php | 5 +- .../RenameStrReplaceAllEntriesTransformer.php | 5 +- .../ScalarFunctionFilterTransformer.php | 5 +- .../Transformer/ScalarFunctionTransformer.php | 5 +- .../Flow/ETL/Transformer/UntilTransformer.php | 4 +- .../Transformer/WindowFunctionTransformer.php | 7 +- .../EntryFactory/NativeEntryFactoryBench.php | 3 +- .../Flow/ETL/Tests/Benchmark/RowsBench.php | 7 +- .../RenameEntryTransformerBench.php | 7 +- .../ETL/Tests/Benchmark/TypeDetectorBench.php | 3 +- .../AddStampToStringEntryTransformer.php | 5 +- .../tests/Flow/ETL/Tests/Double/CacheSpy.php | 3 +- .../Flow/ETL/Tests/Double/EmptyExtractor.php | 4 +- .../Flow/ETL/Tests/Double/FakeExtractor.php | 27 +--- .../ETL/Tests/Fixtures/with-dataframe.php | 4 +- .../Cache/LocalFilesystemCacheTest.php | 6 +- .../Integration/Cache/PSRSimpleCacheTest.php | 3 +- .../Integration/DataFrame/AnalyzeTest.php | 8 +- .../Integration/DataFrame/BranchingTest.php | 7 +- .../Tests/Integration/DataFrame/CacheTest.php | 4 +- .../Integration/DataFrame/DisplayTest.php | 31 +---- .../Integration/DataFrame/GroupByTest.php | 23 +--- .../Tests/Integration/DataFrame/JoinTest.php | 14 +- .../Tests/Integration/DataFrame/LimitTest.php | 13 +- .../DataFrame/PartitioningTest.php | 15 +-- .../Integration/DataFrame/RenameTest.php | 12 +- .../Integration/DataFrame/SchemaTest.php | 8 +- .../Tests/Integration/DataFrame/SortTest.php | 6 +- .../NotPartitioned/AppendModeTest.php | 3 +- .../NotPartitioned/OverwriteModeTest.php | 3 +- .../Partitioned/AppendModeTest.php | 3 +- .../Partitioned/ExceptionIfExistsModeTest.php | 3 +- .../Partitioned/IgnoreModeTest.php | 3 +- .../Partitioned/OverwriteModeTest.php | 3 +- .../Filesystem/LocalFilesystemTest.php | 10 +- .../Function/AddDynamicEntriesTest.php | 4 +- .../Integration/Function/AddJsonTest.php | 5 +- .../Tests/Integration/Function/AllTest.php | 7 +- .../Tests/Integration/Function/AnyTest.php | 7 +- .../Integration/Function/ArrayExistsTest.php | 5 +- .../Integration/Function/ArrayExpandTest.php | 5 +- .../Function/ArrayGetCollectionTest.php | 4 +- .../Integration/Function/ArrayGetTest.php | 4 +- .../Function/ArrayKeyRenameTest.php | 6 +- .../Function/ArrayKeysStyleConvertTest.php | 5 +- .../Function/ArrayMergeCollectionTest.php | 5 +- .../Integration/Function/ArrayMergeTest.php | 6 +- .../Integration/Function/ArrayReverseTest.php | 5 +- .../Integration/Function/ArraySortTest.php | 6 +- .../Integration/Function/ArrayUnpackTest.php | 4 +- .../Integration/Function/BetweenTest.php | 6 +- .../Function/BinaryComparisonsTest.php | 6 +- .../Integration/Function/CapitalizeTest.php | 4 +- .../Tests/Integration/Function/CastTest.php | 5 +- .../Integration/Function/CombineTest.php | 6 +- .../Tests/Integration/Function/ConcatTest.php | 7 +- .../Integration/Function/ContainsTest.php | 5 +- .../Tests/Integration/Function/CountTest.php | 4 +- .../Integration/Function/EndsWithTest.php | 5 +- .../Tests/Integration/Function/HashTest.php | 4 +- .../Integration/Function/JsonDecodeTest.php | 5 +- .../Integration/Function/JsonEncodeTest.php | 5 +- .../Integration/Function/ListSelectTest.php | 4 +- .../Tests/Integration/Function/NotTest.php | 7 +- .../Integration/Function/PregMatchAllTest.php | 5 +- .../Integration/Function/PregMatchTest.php | 5 +- .../Integration/Function/PregReplaceTest.php | 5 +- .../Integration/Function/SanitizeTest.php | 5 +- .../Tests/Integration/Function/SizeTest.php | 4 +- .../Tests/Integration/Function/SplitTest.php | 5 +- .../Integration/Function/SprintfTest.php | 5 +- .../Integration/Function/StartsWithTest.php | 5 +- .../Tests/Integration/Function/StrPadTest.php | 4 +- .../Integration/Function/StrReplaceTest.php | 4 +- .../Structure/StructureSelectTest.php | 4 +- .../Integration/Function/ToLowerTest.php | 4 +- .../Integration/Function/ToUpperTest.php | 4 +- .../Tests/Integration/Function/TrimTest.php | 4 +- .../Tests/Integration/Function/WhenTest.php | 7 +- .../Tests/Integration/IntegrationTestCase.php | 6 +- .../Monitoring/Memory/ConfigurationTest.php | 3 +- .../Tests/Integration/PHP/Type/CasterTest.php | 9 +- .../Pipeline/BatchingPipelineTest.php | 10 +- .../Pipeline/CollectingPipelineTest.php | 9 +- .../Integration/Pipeline/OptimizerTest.php | 3 +- .../Integration/Pipeline/PipelineTest.php | 8 +- .../Pipeline/SynchronousPipelineTest.php | 3 +- .../Window/WindowFunctionsTest.php | 10 +- .../Tests/Unit/Cache/IneMemoryCacheTest.php | 3 +- .../Flow/ETL/Tests/Unit/DataFrameTest.php | 35 +---- .../ETL/Tests/Unit/ETLErrorHandlingTest.php | 17 +-- .../Unit/ExternalSort/BufferCacheTest.php | 4 +- .../Unit/Extractor/ArrayExtractorTest.php | 5 +- .../Unit/Extractor/CacheExtractorTest.php | 10 +- .../Unit/Extractor/ChainExtractorTest.php | 9 +- .../Unit/Extractor/ChunkExtractorTest.php | 3 +- .../Unit/Extractor/DataFrameExtractorTest.php | 10 +- .../Extractor/LocalFileListExtractorTest.php | 3 +- .../Unit/Extractor/MemoryExtractorTest.php | 10 +- .../Unit/Extractor/PipelineExtractorTest.php | 8 +- .../Unit/Extractor/ProcessExtractorTest.php | 9 +- .../Unit/Extractor/SequenceExtractorTest.php | 11 +- .../Unit/Formatter/ASCII/ASCIIBodyTest.php | 11 +- .../Unit/Formatter/ASCII/ASCIIHeadersTest.php | 10 +- .../Tests/Unit/Formatter/ASCIITableTest.php | 6 +- .../Flow/ETL/Tests/Unit/Function/AllTest.php | 5 +- .../Flow/ETL/Tests/Unit/Function/AnyTest.php | 5 +- .../Tests/Unit/Function/ArrayExpandTest.php | 5 +- .../Unit/Function/ArrayGetCollectionTest.php | 6 +- .../ETL/Tests/Unit/Function/ArrayGetTest.php | 6 +- .../Unit/Function/ArrayKeyRenameTest.php | 5 +- .../Function/ArrayKeysStyleConverterTest.php | 5 +- .../Function/ArrayMergeCollectionTest.php | 5 +- .../Tests/Unit/Function/ArrayMergeTest.php | 5 +- .../Tests/Unit/Function/ArrayReverseTest.php | 4 +- .../ETL/Tests/Unit/Function/ArraySortTest.php | 4 +- .../Tests/Unit/Function/ArrayUnpackTest.php | 4 +- .../ETL/Tests/Unit/Function/AverageTest.php | 10 +- .../ETL/Tests/Unit/Function/BetweenTest.php | 6 +- .../Unit/Function/BinaryComparisonsTest.php | 29 +---- .../Tests/Unit/Function/CallMethodTest.php | 6 +- .../Tests/Unit/Function/CapitalizeTest.php | 3 +- .../Flow/ETL/Tests/Unit/Function/CastTest.php | 3 +- .../ETL/Tests/Unit/Function/CollectTest.php | 4 +- .../Tests/Unit/Function/CollectUniqueTest.php | 4 +- .../ETL/Tests/Unit/Function/CombineTest.php | 3 +- .../ETL/Tests/Unit/Function/ConcatTest.php | 5 +- .../ETL/Tests/Unit/Function/CountTest.php | 11 +- .../Unit/Function/DateTimeFormatTest.php | 6 +- .../ETL/Tests/Unit/Function/DenseRankTest.php | 8 +- .../ETL/Tests/Unit/Function/ExistsTest.php | 5 +- .../ETL/Tests/Unit/Function/FirstTest.php | 5 +- .../Flow/ETL/Tests/Unit/Function/HashTest.php | 9 +- .../Tests/Unit/Function/JsonDecodeTest.php | 4 +- .../Tests/Unit/Function/JsonEncodeTest.php | 6 +- .../Flow/ETL/Tests/Unit/Function/LastTest.php | 5 +- .../Tests/Unit/Function/ListSelectTest.php | 9 +- .../Flow/ETL/Tests/Unit/Function/MathTest.php | 14 +- .../Flow/ETL/Tests/Unit/Function/MaxTest.php | 6 +- .../Flow/ETL/Tests/Unit/Function/MinTest.php | 7 +- .../Flow/ETL/Tests/Unit/Function/NotTest.php | 6 +- .../Tests/Unit/Function/NumberFormatTest.php | 6 +- .../Tests/Unit/Function/PregMatchAllTest.php | 3 +- .../ETL/Tests/Unit/Function/PregMatchTest.php | 3 +- .../Tests/Unit/Function/PregReplaceTest.php | 3 +- .../Flow/ETL/Tests/Unit/Function/RankTest.php | 8 +- .../ETL/Tests/Unit/Function/RowNumberTest.php | 8 +- .../ETL/Tests/Unit/Function/SanitizeTest.php | 5 +- .../Flow/ETL/Tests/Unit/Function/SizeTest.php | 3 +- .../ETL/Tests/Unit/Function/SplitTest.php | 3 +- .../ETL/Tests/Unit/Function/SprintfTest.php | 3 +- .../ETL/Tests/Unit/Function/StrPadTest.php | 4 +- .../Tests/Unit/Function/StrReplaceTest.php | 4 +- .../Unit/Function/StructureSelectTest.php | 10 +- .../Flow/ETL/Tests/Unit/Function/SumTest.php | 11 +- .../ETL/Tests/Unit/Function/ToDateTest.php | 6 +- .../Tests/Unit/Function/ToDateTimeTest.php | 6 +- .../ETL/Tests/Unit/Function/ToLowerTest.php | 3 +- .../ETL/Tests/Unit/Function/ToMoneyTest.php | 10 +- .../Tests/Unit/Function/ToTimeZoneTest.php | 5 +- .../ETL/Tests/Unit/Function/ToUpperTest.php | 3 +- .../Flow/ETL/Tests/Unit/Function/TrimTest.php | 4 +- .../Flow/ETL/Tests/Unit/Function/UlidTest.php | 3 +- .../Flow/ETL/Tests/Unit/Function/UuidTest.php | 4 +- .../Flow/ETL/Tests/Unit/Function/WhenTest.php | 7 +- .../tests/Flow/ETL/Tests/Unit/GroupByTest.php | 15 +-- .../Tests/Unit/Join/Comparison/NotTest.php | 3 +- .../ETL/Tests/Unit/Join/ExpressionTest.php | 3 +- .../Tests/Unit/Loader/CallbackLoaderTest.php | 9 +- .../Tests/Unit/Loader/MemoryLoaderTest.php | 9 +- .../Loader/SchemaValidationLoaderTest.php | 8 +- .../Tests/Unit/Loader/StreamLoaderTest.php | 11 +- .../Unit/Loader/TransformerLoaderTest.php | 6 +- .../PHP/Type/ArrayContentDetectorTest.php | 14 +- .../Tests/Unit/PHP/Type/AutoCasterTest.php | 3 +- .../Type/Caster/ListCastingHandlerTest.php | 4 +- .../PHP/Type/Caster/MapCastingHandlerTest.php | 6 +- .../Caster/StructureCastingHandlerTest.php | 6 +- .../PHP/Type/Logical/DateTimeTypeTest.php | 3 +- .../Unit/PHP/Type/Logical/JsonTypeTest.php | 3 +- .../Unit/PHP/Type/Logical/ListTypeTest.php | 6 +- .../Unit/PHP/Type/Logical/MapTypeTest.php | 6 +- .../PHP/Type/Logical/StructureTypeTest.php | 13 +- .../Unit/PHP/Type/Logical/UuidTypeTest.php | 3 +- .../Unit/PHP/Type/Logical/XMLNodeTypeTest.php | 3 +- .../Unit/PHP/Type/Logical/XMLTypeTest.php | 3 +- .../Unit/PHP/Type/Native/ArrayTypeTest.php | 6 +- .../Unit/PHP/Type/Native/CallableTypeTest.php | 6 +- .../Unit/PHP/Type/Native/NullTypeTest.php | 6 +- .../Unit/PHP/Type/Native/ResourceTypeTest.php | 6 +- .../Unit/PHP/Type/Native/ScalarTypeTest.php | 8 +- .../Tests/Unit/PHP/Type/TypeDetectorTest.php | 14 +- .../Tests/Unit/PHP/Type/TypeFactoryTest.php | 20 +-- .../Partition/ScalarFunctionFilterTest.php | 5 +- .../Flow/ETL/Tests/Unit/PartitionTest.php | 5 +- .../ETL/Tests/Unit/Pipeline/ClosureTest.php | 5 +- .../Unit/Pipeline/NestedPipelineTest.php | 13 +- .../Optimizer/BatchSizeOptimizationTest.php | 5 +- .../Optimizer/LimitOptimizationTest.php | 11 +- .../ETL/Tests/Unit/Pipeline/PipesTest.php | 7 +- .../ETL/Tests/Unit/PipelineFactoryTest.php | 3 +- .../Flow/ETL/Tests/Unit/Row/EntriesTest.php | 16 +-- .../Tests/Unit/Row/Entry/ArrayEntryTest.php | 3 +- .../Tests/Unit/Row/Entry/EnumEntryTest.php | 4 +- .../Tests/Unit/Row/Entry/JsonEntryTest.php | 3 +- .../Unit/Row/Entry/JsonObjectEntryTest.php | 3 +- .../Tests/Unit/Row/Entry/ListEntryTest.php | 7 +- .../ETL/Tests/Unit/Row/Entry/MapEntryTest.php | 3 +- .../Unit/Row/Entry/StructureEntryTest.php | 10 +- .../ETL/Tests/Unit/Row/EntryReferenceTest.php | 3 +- .../Row/Factory/NativeEntryFactoryTest.php | 27 +--- .../ETL/Tests/Unit/Row/ReferencesTest.php | 3 +- .../Tests/Unit/Row/Schema/DefinitionTest.php | 24 +--- .../Formatter/ASCIISchemaFormatterTest.php | 10 +- .../Row/Schema/SelectiveValidatorTest.php | 7 +- .../Unit/Row/Schema/StrictValidatorTest.php | 7 +- .../Flow/ETL/Tests/Unit/Row/SchemaTest.php | 25 +--- .../etl/tests/Flow/ETL/Tests/Unit/RowTest.php | 36 +----- .../Flow/ETL/Tests/Unit/RowsJoinTest.php | 8 +- .../tests/Flow/ETL/Tests/Unit/RowsTest.php | 39 +----- .../Flow/ETL/Tests/Unit/Stream/PathTest.php | 3 +- .../Transformer/AutoCastTransformerTest.php | 6 +- .../CallbackRowTransformerTest.php | 5 +- .../DropDuplicatesTransformerTest.php | 8 +- .../DropPartitionsTransformerTest.php | 4 +- ...EntryNameStyleConverterTransformerTest.php | 5 +- .../GroupToArrayTransformerTest.php | 5 +- .../JoinEachRowsTransformerTest.php | 12 +- .../Transformer/JoinRowsTransformerTest.php | 10 +- .../KeepEntriesTransformerTest.php | 5 +- .../RemoveEntriesTransformerTest.php | 5 +- .../RenameEntryTransformerTest.php | 5 +- .../ScalarFunctionFilterTransformerTest.php | 9 +- .../ScalarFunctionTransformerTest.php | 14 +- .../Tests/Unit/CompressingSerializerTest.php | 19 +-- .../Tests/Unit/NativePHPSerializerTest.php | 16 +-- src/functions.php | 17 ++- .../array-dot/src/Flow/ArrayDot/array_dot.php | 3 +- .../ArrayDot/Tests/Unit/ArrayDotGetTest.php | 3 +- .../src/Flow/Doctrine/Bulk/Bulk.php | 3 +- .../src/Flow/Doctrine/Bulk/BulkData.php | 3 +- .../src/Flow/Doctrine/Bulk/DbalPlatform.php | 10 +- .../Flow/Doctrine/Bulk/Dialect/Dialect.php | 3 +- .../Doctrine/Bulk/Dialect/MySQLDialect.php | 4 +- .../Bulk/Dialect/PostgreSQLDialect.php | 4 +- .../Doctrine/Bulk/Dialect/SqliteDialect.php | 4 +- .../Bulk/QueryFactory/DbalQueryFactory.php | 5 +- .../Bulk/Tests/Context/ProxyLogger.php | 5 +- .../Tests/Integration/MySqlBulkInsertTest.php | 9 +- .../Tests/Integration/MySqlBulkUpdateTest.php | 9 +- .../Integration/PostgreSqlBulkInsertTest.php | 9 +- .../Integration/PostgreSqlBulkUpdateTest.php | 9 +- .../Integration/SqliteBulkInsertTest.php | 9 +- .../Integration/SqliteBulkUpdateTest.php | 9 +- .../Bulk/Tests/IntegrationTestCase.php | 3 +- .../Bulk/Tests/MysqlIntegrationTestCase.php | 3 +- .../Tests/PostgreSqlIntegrationTestCase.php | 3 +- .../Bulk/Tests/SqliteIntegrationTestCase.php | 3 +- .../Doctrine/Bulk/Tests/Unit/BulkDataTest.php | 7 +- .../Bulk/Tests/Unit/DbalPlatformTest.php | 9 +- .../Bulk/Tests/Unit/TableDefinitionTest.php | 3 +- .../ParquetViewer/Command/ReadDataCommand.php | 4 +- .../Command/ReadMetadataCommand.php | 10 +- .../src/Flow/ParquetViewer/Parquet.php | 8 +- .../BinaryReader/BinaryBufferReader.php | 4 +- .../src/Flow/Parquet/BinaryReader/Bytes.php | 3 +- .../BinaryWriter/BinaryBufferWriter.php | 4 +- .../Data/Converter/BytesStringConverter.php | 6 +- .../Data/Converter/Int32DateConverter.php | 4 +- .../Data/Converter/Int32DateTimeConverter.php | 4 +- .../Data/Converter/Int64DateTimeConverter.php | 4 +- .../Data/Converter/Int96DateTimeConverter.php | 6 +- .../Parquet/Data/Converter/JsonConverter.php | 3 +- .../Parquet/Data/Converter/TimeConverter.php | 4 +- .../Parquet/Data/Converter/UuidConverter.php | 3 +- .../src/Flow/Parquet/Data/DataConverter.php | 9 +- .../parquet/src/Flow/Parquet/ParquetFile.php | 12 +- .../src/Flow/Parquet/ParquetFile/Codec.php | 3 +- .../ColumnChunkReader/WholeChunkReader.php | 6 +- .../ParquetFile/Data/PlainValueUnpacker.php | 4 +- .../ParquetFile/Data/PlainValuesPacker.php | 4 +- .../ParquetFile/Data/RLEBitPackedHybrid.php | 3 +- .../Flow/Parquet/ParquetFile/DataCoder.php | 11 +- .../Parquet/ParquetFile/Page/ColumnData.php | 4 +- .../Page/Header/DataPageHeaderV2.php | 3 +- .../Parquet/ParquetFile/Page/PageHeader.php | 5 +- .../Flow/Parquet/ParquetFile/PageReader.php | 7 +- .../ParquetFile/RowGroup/ColumnChunk.php | 4 +- .../ParquetFile/RowGroup/StatisticsReader.php | 3 +- .../Parquet/ParquetFile/RowGroupBuilder.php | 12 +- .../RowGroupBuilder/ColumnChunkStatistics.php | 4 +- .../ParquetFile/RowGroupBuilder/Flattener.php | 4 +- .../PageBuilder/DataPageBuilder.php | 14 +- .../PageBuilder/DictionaryBuilder.php | 8 +- .../PageBuilder/DictionaryPageBuilder.php | 7 +- .../PageBuilder/RLEBitPackedPacker.php | 3 +- .../RowGroupBuilder/PageSizeCalculator.php | 6 +- .../RowGroupBuilder/PagesBuilder.php | 9 +- .../Validator/ColumnDataValidator.php | 6 +- .../src/Flow/Parquet/ParquetFile/Schema.php | 4 +- .../ParquetFile/Schema/LogicalType.php | 4 +- src/lib/parquet/src/Flow/Parquet/Writer.php | 9 +- .../Tests/Integration/IO/CompressionTest.php | 11 +- .../Tests/Integration/IO/ListsWritingTest.php | 8 +- .../Tests/Integration/IO/MapsWritingTest.php | 8 +- .../Tests/Integration/IO/PaginationTest.php | 8 +- .../Integration/IO/SchemaReadingTest.php | 6 +- .../Integration/IO/SimpleTypesWritingTest.php | 4 +- .../Integration/IO/StructsWritingTest.php | 8 +- .../Tests/Integration/IO/WriterTest.php | 10 +- .../Data/RLEBitPackedHybridTest.php | 3 +- .../PageBuilder/RLEBitPackedTest.php | 3 +- .../RowGroupBuilder/PagesBuilderTest.php | 14 +- .../Tests/Unit/BinaryReader/BytesTest.php | 3 +- .../Tests/Unit/ParquetFile/CodecTest.php | 6 +- .../Data/RLEBitPackedHybridTest.php | 3 +- .../RowGroupBuilder/FlattenerTest.php | 6 +- .../ParquetFile/Schema/FlatColumnTest.php | 5 +- .../ParquetFile/Schema/NestedColumnTest.php | 6 +- .../Tests/Unit/ParquetFile/SchemaTest.php | 4 +- src/lib/rdsl/src/Flow/RDSL/Finder.php | 3 +- .../RDSL/Tests/Integration/ExecutorTest.php | 9 +- .../Tests/Unit/AccessControl/ExceptTest.php | 3 +- .../Flow/RDSL/Tests/Unit/BuilderTest.php | 8 +- .../Flow/RDSL/Tests/Unit/DSLFinderTest.php | 6 +- .../Website/Controller/DefaultController.php | 3 +- .../Github/ContributorsRequestFactory.php | 3 +- .../src/Flow/Website/Service/Github.php | 8 +- .../ExamplesSourceProvider.php | 3 +- 625 files changed, 959 insertions(+), 3373 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 84b3e2226..642a04185 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,7 +7,7 @@ ->files() ->in([ __DIR__ . '/bin', - __DIR__ . '/src/*', + __DIR__ . '/src', __DIR__ . '/src/core/**/src', __DIR__ . '/src/core/**/tests', __DIR__ . '/src/adapter/**/src', @@ -34,6 +34,8 @@ '@Symfony' => true, '@Symfony:risky' => true, 'blank_line_after_opening_tag' => true, + 'group_import' => true, + 'single_import_per_statement' => false, 'blank_line_before_statement' => [ 'statements' => [ 'break', diff --git a/bin/flow.php b/bin/flow.php index a875a00c4..3671d0ad0 100755 --- a/bin/flow.php +++ b/bin/flow.php @@ -3,16 +3,12 @@ declare(strict_types=1); -use Flow\ETL\DataFrame; use Flow\ETL\Exception\InvalidFileFormatException; -use Flow\ETL\FlowVersion; -use Flow\ETL\PipelineFactory; -use Flow\ParquetViewer\Command\ReadDataCommand; -use Flow\ParquetViewer\Command\ReadMetadataCommand; +use Flow\ETL\{DataFrame, FlowVersion, PipelineFactory}; +use Flow\ParquetViewer\Command\{ReadDataCommand, ReadMetadataCommand}; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\{InputArgument, InputInterface}; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; diff --git a/examples/topics/aggregations/average/code.php b/examples/topics/aggregations/average/code.php index 77fdf3bd0..e6e24da3d 100644 --- a/examples/topics/aggregations/average/code.php +++ b/examples/topics/aggregations/average/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\average; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{average, df, from_rows, int_entry, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/first/code.php b/examples/topics/aggregations/first/code.php index 9dfbe3bac..a2f3722fc 100644 --- a/examples/topics/aggregations/first/code.php +++ b/examples/topics/aggregations/first/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\first; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, first, from_rows, int_entry, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/group_by/code.php b/examples/topics/aggregations/group_by/code.php index 8a6d54de3..ce6a579f2 100644 --- a/examples/topics/aggregations/group_by/code.php +++ b/examples/topics/aggregations/group_by/code.php @@ -2,10 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_array, ref, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/group_by_sum/code.php b/examples/topics/aggregations/group_by_sum/code.php index 316e67a76..13e29813c 100644 --- a/examples/topics/aggregations/group_by_sum/code.php +++ b/examples/topics/aggregations/group_by_sum/code.php @@ -2,11 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\sum; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_array, ref, sum, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/last/code.php b/examples/topics/aggregations/last/code.php index ed9193062..8fee54226 100644 --- a/examples/topics/aggregations/last/code.php +++ b/examples/topics/aggregations/last/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\last; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, last, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/max/code.php b/examples/topics/aggregations/max/code.php index b44b6513d..e51196e49 100644 --- a/examples/topics/aggregations/max/code.php +++ b/examples/topics/aggregations/max/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\max; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, max, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/min/code.php b/examples/topics/aggregations/min/code.php index 3f86f8c3d..9143e5667 100644 --- a/examples/topics/aggregations/min/code.php +++ b/examples/topics/aggregations/min/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\min; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, min, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/aggregations/sum/code.php b/examples/topics/aggregations/sum/code.php index b3d07f194..d7fc50c26 100644 --- a/examples/topics/aggregations/sum/code.php +++ b/examples/topics/aggregations/sum/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\sum; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, ref, row, rows, sum, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_frame/cache/code.php b/examples/topics/data_frame/cache/code.php index a5723f44b..3336a0aca 100644 --- a/examples/topics/data_frame/cache/code.php +++ b/examples/topics/data_frame/cache/code.php @@ -2,18 +2,13 @@ declare(strict_types=1); -use function Flow\ETL\DSL\config_builder; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_cache; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{config_builder, df, from_cache, ref, to_output}; use Flow\ETL\Adapter\Http\DynamicExtractor\NextRequestFactory; use Flow\ETL\Adapter\Http\PsrHttpClientDynamicExtractor; use Flow\ETL\Cache\PSRSimpleCache; use Http\Client\Curl\Client; use Nyholm\Psr7\Factory\Psr17Factory; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Psr16Cache; diff --git a/examples/topics/data_frame/data_frame/code.php b/examples/topics/data_frame/data_frame/code.php index a272dde91..72724e944 100644 --- a/examples/topics/data_frame/data_frame/code.php +++ b/examples/topics/data_frame/data_frame/code.php @@ -2,15 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_expand; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{array_entry, array_expand, df, from_rows, int_entry, ref, row, rows, to_output}; // flow.phar run examples/topics/phar/data_frame/code.php // when executing data processing pipeline through phar make sure to not use any trigger, like ->run(); diff --git a/examples/topics/data_frame/overwrite/code.php b/examples/topics/data_frame/overwrite/code.php index 6ae1bd1de..f0d6772c5 100644 --- a/examples/topics/data_frame/overwrite/code.php +++ b/examples/topics/data_frame/overwrite/code.php @@ -2,10 +2,8 @@ declare(strict_types=1); -use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\Adapter\CSV\to_csv; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\overwrite; +use function Flow\ETL\Adapter\CSV\{from_csv, to_csv}; +use function Flow\ETL\DSL\{df, overwrite}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/array/code.php b/examples/topics/data_source/array/code.php index ab520440a..21d24e53c 100644 --- a/examples/topics/data_source/array/code.php +++ b/examples/topics/data_source/array/code.php @@ -2,9 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_array, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/csv/code.php b/examples/topics/data_source/csv/code.php index d68b2c7b2..462cb58b1 100644 --- a/examples/topics/data_source/csv/code.php +++ b/examples/topics/data_source/csv/code.php @@ -3,8 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/data_frame/code.php b/examples/topics/data_source/data_frame/code.php index 698c7417c..733cb3221 100644 --- a/examples/topics/data_source/data_frame/code.php +++ b/examples/topics/data_source/data_frame/code.php @@ -2,11 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\from_data_frame; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_array, from_data_frame, lit, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/http_dynamic/code.php b/examples/topics/data_source/http_dynamic/code.php index c60f4cc51..c1c2a9deb 100644 --- a/examples/topics/data_source/http_dynamic/code.php +++ b/examples/topics/data_source/http_dynamic/code.php @@ -2,9 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, ref, to_output}; use Flow\ETL\Adapter\Http\DynamicExtractor\NextRequestFactory; use Flow\ETL\Adapter\Http\PsrHttpClientDynamicExtractor; use Http\Client\Curl\Client; diff --git a/examples/topics/data_source/json/code.php b/examples/topics/data_source/json/code.php index c4e424a27..6f8809156 100644 --- a/examples/topics/data_source/json/code.php +++ b/examples/topics/data_source/json/code.php @@ -3,8 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\JSON\from_json; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/parquet/code.php b/examples/topics/data_source/parquet/code.php index f64c8da1f..6fabc00ff 100644 --- a/examples/topics/data_source/parquet/code.php +++ b/examples/topics/data_source/parquet/code.php @@ -3,8 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\Parquet\from_parquet; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/sequence_date/code.php b/examples/topics/data_source/sequence_date/code.php index 595527fd4..033d442bd 100644 --- a/examples/topics/data_source/sequence_date/code.php +++ b/examples/topics/data_source/sequence_date/code.php @@ -2,9 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_sequence_date_period; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_sequence_date_period, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/sequence_date_recurrences/code.php b/examples/topics/data_source/sequence_date_recurrences/code.php index 7e66d9e65..62e85800b 100644 --- a/examples/topics/data_source/sequence_date_recurrences/code.php +++ b/examples/topics/data_source/sequence_date_recurrences/code.php @@ -2,9 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_sequence_date_period_recurrences; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_sequence_date_period_recurrences, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/sequence_number/code.php b/examples/topics/data_source/sequence_number/code.php index 0a601dd85..ab86f36d5 100644 --- a/examples/topics/data_source/sequence_number/code.php +++ b/examples/topics/data_source/sequence_number/code.php @@ -2,9 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_sequence_number; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_sequence_number, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/data_source/xml/code.php b/examples/topics/data_source/xml/code.php index 3c9ab6e24..ca3c587d4 100644 --- a/examples/topics/data_source/xml/code.php +++ b/examples/topics/data_source/xml/code.php @@ -3,9 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\XML\from_xml; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, ref, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/join/left_anti/code.php b/examples/topics/join/left_anti/code.php index 82571fa8e..c80abe9df 100644 --- a/examples/topics/join/left_anti/code.php +++ b/examples/topics/join/left_anti/code.php @@ -2,11 +2,8 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\to_output; -use Flow\ETL\Join\Expression; -use Flow\ETL\Join\Join; +use function Flow\ETL\DSL\{data_frame, from_array, to_output}; +use Flow\ETL\Join\{Expression, Join}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/join/left_anti_each/code.php b/examples/topics/join/left_anti_each/code.php index 8e625051d..732ab7457 100644 --- a/examples/topics/join/left_anti_each/code.php +++ b/examples/topics/join/left_anti_each/code.php @@ -2,19 +2,10 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_output; -use Flow\ETL\DataFrame; -use Flow\ETL\DataFrameFactory; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{df, int_entry, str_entry, to_output}; use Flow\ETL\Join\Comparison\Equal; -use Flow\ETL\Join\Expression; -use Flow\ETL\Join\Join; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\Join\{Expression, Join}; +use Flow\ETL\{DataFrame, DataFrameFactory, Extractor, FlowContext, Row, Rows}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/partitioning/partition_pruning/code.php b/examples/topics/partitioning/partition_pruning/code.php index d51b7351d..9b145fb77 100644 --- a/examples/topics/partitioning/partition_pruning/code.php +++ b/examples/topics/partitioning/partition_pruning/code.php @@ -3,10 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, lit, ref, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/partitioning/partitioning/code.php b/examples/topics/partitioning/partitioning/code.php index a78966129..0606b6381 100644 --- a/examples/topics/partitioning/partitioning/code.php +++ b/examples/topics/partitioning/partitioning/code.php @@ -3,9 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\CSV\to_csv; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{data_frame, from_array, ref}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/partitioning/reading/code.php b/examples/topics/partitioning/reading/code.php index ffc39f6e3..e7f66f082 100644 --- a/examples/topics/partitioning/reading/code.php +++ b/examples/topics/partitioning/reading/code.php @@ -3,8 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/schema/display/code.php b/examples/topics/schema/display/code.php index 5cbb815e6..5630f6252 100644 --- a/examples/topics/schema/display/code.php +++ b/examples/topics/schema/display/code.php @@ -2,9 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_array, to_output}; use Flow\ETL\Loader\StreamLoader\Output; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/schema/inferring/code.php b/examples/topics/schema/inferring/code.php index 1024d1703..fd12fb987 100644 --- a/examples/topics/schema/inferring/code.php +++ b/examples/topics/schema/inferring/code.php @@ -3,10 +3,7 @@ declare(strict_types=1); use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\schema_from_json; -use function Flow\ETL\DSL\schema_to_json; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, schema_from_json, schema_to_json, to_output}; use Flow\ETL\Loader\StreamLoader\Output; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/schema/validate/code.php b/examples/topics/schema/validate/code.php index cba1c10bc..d8592eb96 100644 --- a/examples/topics/schema/validate/code.php +++ b/examples/topics/schema/validate/code.php @@ -2,13 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\bool_schema; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\int_schema; -use function Flow\ETL\DSL\schema; -use function Flow\ETL\DSL\str_schema; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{bool_schema, df, from_array, int_schema, schema, str_schema, to_output}; use Flow\ETL\Loader\StreamLoader\Output; use Flow\ETL\Row\Schema\Metadata; diff --git a/examples/topics/transformations/array_expand/code.php b/examples/topics/transformations/array_expand/code.php index 962a239d8..1eca2d734 100644 --- a/examples/topics/transformations/array_expand/code.php +++ b/examples/topics/transformations/array_expand/code.php @@ -2,15 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_expand; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{array_entry, array_expand, df, from_rows, int_entry, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/array_unpack/code.php b/examples/topics/transformations/array_unpack/code.php index 5b760c945..77cd889a1 100644 --- a/examples/topics/transformations/array_unpack/code.php +++ b/examples/topics/transformations/array_unpack/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{array_entry, df, from_rows, int_entry, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/filter_divide/code.php b/examples/topics/transformations/filter_divide/code.php index 822e197cf..dfdf9e158 100644 --- a/examples/topics/transformations/filter_divide/code.php +++ b/examples/topics/transformations/filter_divide/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, lit, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/filter_mod/code.php b/examples/topics/transformations/filter_mod/code.php index d6418f6b6..7f14230f6 100644 --- a/examples/topics/transformations/filter_mod/code.php +++ b/examples/topics/transformations/filter_mod/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, lit, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/literals/code.php b/examples/topics/transformations/literals/code.php index 378fea9e8..a11cac9a4 100644 --- a/examples/topics/transformations/literals/code.php +++ b/examples/topics/transformations/literals/code.php @@ -2,13 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, lit, row, rows, str_entry, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/math/code.php b/examples/topics/transformations/math/code.php index 718867767..36eeece6a 100644 --- a/examples/topics/transformations/math/code.php +++ b/examples/topics/transformations/math/code.php @@ -2,13 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{df, from_rows, int_entry, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/size/code.php b/examples/topics/transformations/size/code.php index 26161eac5..cf2409fcb 100644 --- a/examples/topics/transformations/size/code.php +++ b/examples/topics/transformations/size/code.php @@ -2,14 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{array_entry, df, from_rows, int_entry, ref, row, rows, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/sort/code.php b/examples/topics/transformations/sort/code.php index 6de535b75..87e1a8cea 100644 --- a/examples/topics/transformations/sort/code.php +++ b/examples/topics/transformations/sort/code.php @@ -2,10 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\from_sequence_number; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{data_frame, from_sequence_number, ref, to_output}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/when_null/code.php b/examples/topics/transformations/when_null/code.php index 2d03ecd01..d15f03f12 100644 --- a/examples/topics/transformations/when_null/code.php +++ b/examples/topics/transformations/when_null/code.php @@ -2,16 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\to_output; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{df, from_rows, int_entry, lit, null_entry, ref, row, rows, to_output, when}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/transformations/when_odd/code.php b/examples/topics/transformations/when_odd/code.php index 77906621c..37b2bafe1 100644 --- a/examples/topics/transformations/when_odd/code.php +++ b/examples/topics/transformations/when_odd/code.php @@ -2,12 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_sequence_number; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{df, from_sequence_number, lit, ref, to_output, when}; require __DIR__ . '/../../../autoload.php'; diff --git a/examples/topics/window_functions/dens_rank/code.php b/examples/topics/window_functions/dens_rank/code.php index 9d7224fdc..945a276a3 100644 --- a/examples/topics/window_functions/dens_rank/code.php +++ b/examples/topics/window_functions/dens_rank/code.php @@ -2,12 +2,7 @@ declare(strict_types=1); -use function Flow\ETL\DSL\data_frame; -use function Flow\ETL\DSL\dense_rank; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_output; -use function Flow\ETL\DSL\window; +use function Flow\ETL\DSL\{data_frame, dense_rank, from_array, ref, to_output, window}; require __DIR__ . '/../../../autoload.php'; diff --git a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroExtractor.php b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroExtractor.php index 6600a9684..0ea91b370 100644 --- a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroExtractor.php +++ b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroExtractor.php @@ -5,15 +5,9 @@ namespace Flow\ETL\Adapter\Avro\FlixTech; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\PartitionFiltering; -use Flow\ETL\Extractor\PartitionsExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PartitionFiltering, PartitionsExtractor, Signal}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class AvroExtractor implements Extractor, FileExtractor, LimitableExtractor, PartitionsExtractor { diff --git a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php index a05e5b756..77efe8dc5 100644 --- a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php +++ b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php @@ -5,15 +5,10 @@ namespace Flow\ETL\Adapter\Avro\FlixTech; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\Row; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, ListType, UuidType}; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Row, Rows}; final class AvroLoader implements Closure, Loader, Loader\FileLoader { diff --git a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/SchemaConverter.php b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/SchemaConverter.php index 16c4f5f2d..9da6075ed 100644 --- a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/SchemaConverter.php +++ b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/SchemaConverter.php @@ -6,19 +6,9 @@ use function Flow\ETL\DSL\type_string; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\JsonType; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\MapType; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Logical\XMLNodeType; -use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Native\EnumType; -use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Native\ScalarType; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, JsonType, ListType, MapType, StructureType, UuidType, XMLNodeType, XMLType}; +use Flow\ETL\PHP\Type\Native\{ArrayType, EnumType, ObjectType, ScalarType}; use Flow\ETL\Row\Schema; use Flow\ETL\Row\Schema\Definition; diff --git a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/functions.php b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/functions.php index cae8e7907..64a5aadb8 100644 --- a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/functions.php +++ b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/functions.php @@ -5,8 +5,7 @@ namespace Flow\ETL\DSL\Adapter\Avro; use function Flow\ETL\DSL\from_all; -use Flow\ETL\Adapter\Avro\FlixTech\AvroExtractor; -use Flow\ETL\Adapter\Avro\FlixTech\AvroLoader; +use Flow\ETL\Adapter\Avro\FlixTech\{AvroExtractor, AvroLoader}; use Flow\ETL\Extractor; use Flow\ETL\Filesystem\Path; use Flow\ETL\Row\Schema; diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroExtractorBench.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroExtractorBench.php index 6bf49aa2c..4c769deb3 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroExtractorBench.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroExtractorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\Avro\Tests\Benchmark; use function Flow\ETL\DSL\Adapter\Avro\from_avro; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use PhpBench\Attributes\Groups; #[Groups(['extractor'])] diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroLoaderBench.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroLoaderBench.php index 59179948d..37aaa96ed 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroLoaderBench.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Benchmark/AvroLoaderBench.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Adapter\Avro\Tests\Benchmark; -use function Flow\ETL\DSL\Adapter\Avro\from_avro; -use function Flow\ETL\DSL\Adapter\Avro\to_avro; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\Adapter\Avro\{from_avro, to_avro}; +use Flow\ETL\{Config, FlowContext, Rows}; use PhpBench\Attributes\Groups; #[Groups(['loader'])] diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php index 46306ebd4..f81e17e2f 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php @@ -4,20 +4,13 @@ namespace Flow\ETL\Adapter\Avro\Tests\Integration; -use function Flow\ETL\DSL\Adapter\Avro\from_avro; -use function Flow\ETL\DSL\Adapter\Avro\to_avro; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\Adapter\Avro\{from_avro, to_avro}; +use function Flow\ETL\DSL\{df, from_array, lit, type_map, type_string}; use Flow\ETL\Adapter\Avro\FlixTech\AvroExtractor; -use Flow\ETL\Config; use Flow\ETL\Extractor\Signal; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; use Flow\ETL\Tests\Double\FakeExtractor; +use Flow\ETL\{Config, Flow, FlowContext}; use PHPUnit\Framework\TestCase; final class AvroTest extends TestCase diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php index a8a70f5fd..3414374f7 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php @@ -4,17 +4,13 @@ namespace Flow\ETL\Adapter\Avro\Tests\Unit; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{type_object, type_string}; use Flow\ETL\Adapter\Avro\FlixTech\SchemaConverter; use Flow\ETL\Exception\RuntimeException; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; use Flow\ETL\Row\Schema; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/BarChart.php b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/BarChart.php index 9e14c1f66..708ce090a 100644 --- a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/BarChart.php +++ b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/BarChart.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\ChartJS\Chart; use Flow\ETL\Adapter\ChartJS\Chart; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{Reference, References}; use Flow\ETL\Rows; final class BarChart implements Chart diff --git a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/LineChart.php b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/LineChart.php index 7a96fd506..9a21be0d3 100644 --- a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/LineChart.php +++ b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/LineChart.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\ChartJS\Chart; use Flow\ETL\Adapter\ChartJS\Chart; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{Reference, References}; use Flow\ETL\Rows; final class LineChart implements Chart diff --git a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/PieChart.php b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/PieChart.php index 37a1a2c56..b87951554 100644 --- a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/PieChart.php +++ b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/Chart/PieChart.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\ChartJS\Chart; use Flow\ETL\Adapter\ChartJS\Chart; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{Reference, References}; use Flow\ETL\Rows; final class PieChart implements Chart diff --git a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php index ce29d3048..31c513575 100644 --- a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php +++ b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php @@ -5,10 +5,8 @@ namespace Flow\ETL\Adapter\ChartJS; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Rows}; final class ChartJSLoader implements Closure, Loader { diff --git a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/functions.php b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/functions.php index 2d7e16f76..0b7bacc9a 100644 --- a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/functions.php +++ b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/functions.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Adapter\ChartJS; -use Flow\ETL\Adapter\ChartJS\Chart\BarChart; -use Flow\ETL\Adapter\ChartJS\Chart\LineChart; -use Flow\ETL\Adapter\ChartJS\Chart\PieChart; +use Flow\ETL\Adapter\ChartJS\Chart\{BarChart, LineChart, PieChart}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{EntryReference, References}; function bar_chart(EntryReference $label, References $datasets) : BarChart { diff --git a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php index 074f1491d..8c7e25ada 100644 --- a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php +++ b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php @@ -4,18 +4,8 @@ namespace Flow\ETL\Adapter\ChartJS\Tests\Integration; -use function Flow\ETL\Adapter\ChartJS\bar_chart; -use function Flow\ETL\Adapter\ChartJS\line_chart; -use function Flow\ETL\Adapter\ChartJS\pie_chart; -use function Flow\ETL\Adapter\ChartJS\to_chartjs_file; -use function Flow\ETL\Adapter\ChartJS\to_chartjs_var; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\first; -use function Flow\ETL\DSL\from_memory; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\refs; -use function Flow\ETL\DSL\sum; +use function Flow\ETL\Adapter\ChartJS\{bar_chart, line_chart, pie_chart, to_chartjs_file, to_chartjs_var}; +use function Flow\ETL\DSL\{df, first, from_memory, lit, ref, refs, sum}; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php index 091ff28eb..7e4af77ab 100644 --- a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php +++ b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Adapter\ChartJS\Tests\Unit\Chart; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_memory; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\refs; +use function Flow\ETL\DSL\{df, from_memory, ref, refs}; use Flow\ETL\Adapter\ChartJS\Chart\BarChart; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVDetector.php b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVDetector.php index 8da757b54..75af6adde 100644 --- a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVDetector.php +++ b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVDetector.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\CSV; -use Flow\ETL\Adapter\CSV\Detector\Option; -use Flow\ETL\Adapter\CSV\Detector\Options; +use Flow\ETL\Adapter\CSV\Detector\{Option, Options}; use Flow\ETL\Adapter\CSV\Exception\CantDetectCSVOptions; use Flow\ETL\Exception\InvalidArgumentException; diff --git a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVExtractor.php b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVExtractor.php index 501b02fed..95f8f1969 100644 --- a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVExtractor.php +++ b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVExtractor.php @@ -5,16 +5,10 @@ namespace Flow\ETL\Adapter\CSV; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\PartitionFiltering; -use Flow\ETL\Extractor\PartitionsExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PartitionFiltering, PartitionsExtractor, Signal}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; use Flow\ETL\Row\Schema; +use Flow\ETL\{Extractor, FlowContext}; final class CSVExtractor implements Extractor, FileExtractor, LimitableExtractor, PartitionsExtractor { diff --git a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php index 1485fba91..ce3f08627 100644 --- a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php +++ b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php @@ -7,12 +7,9 @@ use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Filesystem\Path; use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\Partition; use Flow\ETL\Row\Entry; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Partition, Rows}; final class CSVLoader implements Closure, Loader, Loader\FileLoader { diff --git a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/functions.php b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/functions.php index 4b28e5bce..ceb8d3893 100644 --- a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/functions.php +++ b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/functions.php @@ -5,12 +5,10 @@ namespace Flow\ETL\Adapter\CSV; use function Flow\ETL\DSL\from_all; -use Flow\ETL\Adapter\CSV\Detector\Option; -use Flow\ETL\Adapter\CSV\Detector\Options; -use Flow\ETL\Extractor; +use Flow\ETL\Adapter\CSV\Detector\{Option, Options}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Loader; use Flow\ETL\Row\Schema; +use Flow\ETL\{Extractor, Loader}; /** * @param int<0, max> $characters_read_in_line diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVExtractorBench.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVExtractorBench.php index ec4cfa7a7..fa45c060f 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVExtractorBench.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVExtractorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\CSV\Tests\Benchmark; use function Flow\ETL\Adapter\CSV\from_csv; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use PhpBench\Attributes\Groups; #[Groups(['extractor'])] diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVLoaderBench.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVLoaderBench.php index d0e839ac8..eb21dd5c4 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVLoaderBench.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Benchmark/CSVLoaderBench.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Adapter\CSV\Tests\Benchmark; -use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\Adapter\CSV\to_csv; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use function Flow\ETL\Adapter\CSV\{from_csv, to_csv}; +use Flow\ETL\{Config, FlowContext, Rows}; use PhpBench\Attributes\Groups; #[Groups(['loader'])] diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php index 67b2bbf13..a3c99b0b2 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php @@ -4,23 +4,13 @@ namespace Flow\ETL\Adapter\CSV\Tests\Integration; -use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\Adapter\CSV\to_csv; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\print_schema; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\Adapter\CSV\{from_csv, to_csv}; +use function Flow\ETL\DSL\{df, from_array, print_schema, ref}; use Flow\ETL\Adapter\CSV\CSVExtractor; -use Flow\ETL\Config; -use Flow\ETL\ConfigBuilder; use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Extractor\Signal; -use Flow\ETL\Filesystem\LocalFilesystem; -use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\Filesystem\{LocalFilesystem, Path}; +use Flow\ETL\{Config, ConfigBuilder, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class CSVExtractorTest extends TestCase diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php index 20b08cf5e..edfb902a5 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php @@ -4,14 +4,8 @@ namespace Flow\ETL\Adapter\CSV\Tests\Integration; -use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\Adapter\CSV\to_csv; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; +use function Flow\ETL\Adapter\CSV\{from_csv, to_csv}; +use function Flow\ETL\DSL\{array_entry, df, int_entry, ref, row, rows}; use Flow\ETL\Filesystem\Path; use Flow\ETL\Flow; use Flow\ETL\Tests\Double\FakeExtractor; diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php index 3754c5b05..c11f37ea0 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Adapter\Doctrine; -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DriverManager; -use Flow\ETL\DataFrame; -use Flow\ETL\DataFrameFactory; -use Flow\ETL\Flow; -use Flow\ETL\Rows; +use Doctrine\DBAL\{Connection, DriverManager}; +use Flow\ETL\{DataFrame, DataFrameFactory, Flow, Rows}; final class DbalDataFrameFactory implements DataFrameFactory { diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLimitOffsetExtractor.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLimitOffsetExtractor.php index a259a9f39..efa0d90ec 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLimitOffsetExtractor.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLimitOffsetExtractor.php @@ -8,8 +8,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class DbalLimitOffsetExtractor implements Extractor { diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php index 7d5586930..6deb81e76 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php @@ -4,14 +4,10 @@ namespace Flow\ETL\Adapter\Doctrine; -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DriverManager; -use Flow\Doctrine\Bulk\Bulk; -use Flow\Doctrine\Bulk\BulkData; +use Doctrine\DBAL\{Connection, DriverManager}; +use Flow\Doctrine\Bulk\{Bulk, BulkData}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Rows}; final class DbalLoader implements Loader { diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalQueryExtractor.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalQueryExtractor.php index 322c45797..bfc707d86 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalQueryExtractor.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalQueryExtractor.php @@ -5,12 +5,9 @@ namespace Flow\ETL\Adapter\Doctrine; use function Flow\ETL\DSL\array_to_rows; -use Doctrine\DBAL\ArrayParameterType; -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Types\Type; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Doctrine\DBAL\{ArrayParameterType, Connection, ParameterType}; +use Flow\ETL\{Extractor, FlowContext}; final class DbalQueryExtractor implements Extractor { diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/functions.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/functions.php index a385e7db7..036ab84cc 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/functions.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/functions.php @@ -4,15 +4,11 @@ namespace Flow\ETL\Adapter\Doctrine; -use Doctrine\DBAL\ArrayParameterType as DbalArrayType; -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\ParameterType as DbalParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Doctrine\DBAL\Types\Type as DbalType; -use Flow\ETL\DataFrameFactory; +use Doctrine\DBAL\{ArrayParameterType as DbalArrayType, Connection, ParameterType as DbalParameterType}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\Loader; +use Flow\ETL\{DataFrameFactory, Extractor, Loader}; /** * @param array|Connection $connection diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Context/InsertQueryCounter.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Context/InsertQueryCounter.php index 211ebb01d..542e0fe0a 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Context/InsertQueryCounter.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Context/InsertQueryCounter.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Adapter\Doctrine\Tests\Context; -use Psr\Log\AbstractLogger; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Psr\Log\NullLogger; +use Psr\Log\{AbstractLogger, LoggerAwareInterface, LoggerAwareTrait, NullLogger}; final class InsertQueryCounter extends AbstractLogger implements LoggerAwareInterface { diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php index f0ec96b03..f0de62e6f 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php @@ -5,17 +5,12 @@ namespace Flow\ETL\Adapter\Doctrine\Tests\Integration; use function Flow\ETL\Adapter\Doctrine\dbal_dataframe_factory; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use Doctrine\DBAL\Schema\Column; -use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; -use Flow\ETL\Adapter\Doctrine\LiteralParameter; -use Flow\ETL\Adapter\Doctrine\Parameter; +use function Flow\ETL\DSL\{int_entry, ref}; +use Doctrine\DBAL\Schema\{Column, Table}; +use Doctrine\DBAL\Types\{Type, Types}; use Flow\ETL\Adapter\Doctrine\Tests\IntegrationTestCase; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\Adapter\Doctrine\{LiteralParameter, Parameter}; +use Flow\ETL\{Row, Rows}; final class DbalDataFrameFactoryTest extends IntegrationTestCase { diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php index 5d1bee24a..4f1347cb2 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php @@ -4,16 +4,12 @@ namespace Flow\ETL\Adapter\Doctrine\Tests\Integration; -use function Flow\ETL\Adapter\Doctrine\from_dbal_limit_offset; -use function Flow\ETL\Adapter\Doctrine\from_dbal_limit_offset_qb; +use function Flow\ETL\Adapter\Doctrine\{from_dbal_limit_offset, from_dbal_limit_offset_qb}; use function Flow\ETL\DSL\df; -use Doctrine\DBAL\Schema\Column; -use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; -use Flow\ETL\Adapter\Doctrine\Order; -use Flow\ETL\Adapter\Doctrine\OrderBy; +use Doctrine\DBAL\Schema\{Column, Table}; +use Doctrine\DBAL\Types\{Type, Types}; use Flow\ETL\Adapter\Doctrine\Tests\IntegrationTestCase; +use Flow\ETL\Adapter\Doctrine\{Order, OrderBy}; use Flow\ETL\Flow; final class DbalLimitOffsetExtractorTest extends IntegrationTestCase diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php index 31c6af624..a02460a67 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Adapter\Doctrine\Tests\Integration; -use function Flow\ETL\Adapter\Doctrine\to_dbal_table_insert; -use function Flow\ETL\Adapter\Doctrine\to_dbal_table_update; +use function Flow\ETL\Adapter\Doctrine\{to_dbal_table_insert, to_dbal_table_update}; use function Flow\ETL\DSL\from_array; -use Doctrine\DBAL\Schema\Column; -use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; +use Doctrine\DBAL\Schema\{Column, Table}; +use Doctrine\DBAL\Types\{Type, Types}; use Flow\ETL\Adapter\Doctrine\DbalLoader; use Flow\ETL\Adapter\Doctrine\Tests\IntegrationTestCase; use Flow\ETL\Exception\InvalidArgumentException; diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php index cd97df4da..4a0e48873 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php @@ -4,16 +4,12 @@ namespace Flow\ETL\Adapter\Doctrine\Tests\Integration; -use function Flow\ETL\Adapter\Doctrine\dbal_from_queries; -use function Flow\ETL\Adapter\Doctrine\dbal_from_query; +use function Flow\ETL\Adapter\Doctrine\{dbal_from_queries, dbal_from_query}; use function Flow\ETL\DSL\from_array; -use Doctrine\DBAL\Schema\Column; -use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; -use Flow\ETL\Adapter\Doctrine\DbalLoader; -use Flow\ETL\Adapter\Doctrine\ParametersSet; +use Doctrine\DBAL\Schema\{Column, Table}; +use Doctrine\DBAL\Types\{Type, Types}; use Flow\ETL\Adapter\Doctrine\Tests\IntegrationTestCase; +use Flow\ETL\Adapter\Doctrine\{DbalLoader, ParametersSet}; use Flow\ETL\Flow; final class DbalQueryExtractorTest extends IntegrationTestCase diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/IntegrationTestCase.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/IntegrationTestCase.php index 25181e8b3..5c8fa1c45 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/IntegrationTestCase.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/IntegrationTestCase.php @@ -4,12 +4,10 @@ namespace Flow\ETL\Adapter\Doctrine\Tests; -use Doctrine\DBAL\Configuration; -use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Logging\Middleware; use Doctrine\DBAL\Tools\DsnParser; -use Flow\ETL\Adapter\Doctrine\Tests\Context\DatabaseContext; -use Flow\ETL\Adapter\Doctrine\Tests\Context\InsertQueryCounter; +use Doctrine\DBAL\{Configuration, DriverManager}; +use Flow\ETL\Adapter\Doctrine\Tests\Context\{DatabaseContext, InsertQueryCounter}; use PHPUnit\Framework\TestCase; abstract class IntegrationTestCase extends TestCase diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchExtractor.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchExtractor.php index d0b94ccfb..26ec9b1df 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchExtractor.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchExtractor.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class ElasticsearchExtractor implements Extractor { diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php index a1f28e9fd..3c1c0c37e 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php @@ -5,10 +5,7 @@ namespace Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP; use Flow\ETL\Adapter\Elasticsearch\IdFactory; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Row, Rows}; /** * @psalm-suppress UndefinedClass diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php index 1a11ca479..039e68f95 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class HitsIntoRowsTransformer implements Transformer { diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchResults.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchResults.php index 730565218..268c1b869 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchResults.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchResults.php @@ -5,9 +5,8 @@ namespace Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP; use Elastic\Elasticsearch\Response\Elasticsearch; -use Flow\ETL\Row; use Flow\ETL\Row\EntryFactory; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; final class SearchResults { diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/functions.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/functions.php index 639dfc8cc..dca5dac52 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/functions.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/functions.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Adapter\Elasticsearch; -use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\DocumentDataSource; -use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\ElasticsearchExtractor; -use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\ElasticsearchLoader; -use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\HitsIntoRowsTransformer; +use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\{DocumentDataSource, ElasticsearchExtractor, ElasticsearchLoader, HitsIntoRowsTransformer}; use Flow\ETL\Loader; /** diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch7Context.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch7Context.php index be99ab378..2682975ed 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch7Context.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch7Context.php @@ -5,14 +5,10 @@ namespace Flow\ETL\Adapter\Elasticsearch\Tests\Context; use function Flow\ETL\Adapter\Elasticsearch\to_es_bulk_index; -use Elasticsearch\Client; -use Elasticsearch\ClientBuilder; -use Elasticsearch\Common\Exceptions\BadRequest400Exception; -use Elasticsearch\Common\Exceptions\Missing404Exception; +use Elasticsearch\Common\Exceptions\{BadRequest400Exception, Missing404Exception}; +use Elasticsearch\{Client, ClientBuilder}; use Flow\ETL\Adapter\Elasticsearch\IdFactory; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Rows}; final class Elasticsearch7Context implements ElasticsearchContext { diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch8Context.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch8Context.php index 4c3bb19f1..61ea34084 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch8Context.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Context/Elasticsearch8Context.php @@ -5,13 +5,10 @@ namespace Flow\ETL\Adapter\Elasticsearch\Tests\Context; use function Flow\ETL\Adapter\Elasticsearch\to_es_bulk_index; -use Elastic\Elasticsearch\Client; -use Elastic\Elasticsearch\ClientBuilder; use Elastic\Elasticsearch\Exception\ClientResponseException; +use Elastic\Elasticsearch\{Client, ClientBuilder}; use Flow\ETL\Adapter\Elasticsearch\IdFactory; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Rows}; final class Elasticsearch8Context implements ElasticsearchContext { diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Doubles/Spy/HttpClientSpy.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Doubles/Spy/HttpClientSpy.php index b6e943402..0c11a021e 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Doubles/Spy/HttpClientSpy.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Doubles/Spy/HttpClientSpy.php @@ -7,8 +7,7 @@ use Elastic\Elasticsearch\Response\Elasticsearch; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; final class HttpClientSpy implements ClientInterface { diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php index 0bbc1af5b..eeec2a2da 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php @@ -4,18 +4,12 @@ namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration\ElasticsearchPHP; -use function Flow\ETL\Adapter\Elasticsearch\es_hits_to_rows; -use function Flow\ETL\Adapter\Elasticsearch\from_es; -use function Flow\ETL\Adapter\Elasticsearch\to_es_bulk_index; +use function Flow\ETL\Adapter\Elasticsearch\{es_hits_to_rows, from_es, to_es_bulk_index}; use function Flow\ETL\DSL\df; use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\DocumentDataSource; use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\EntryIdFactory; use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase; -use Flow\ETL\Config; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, Flow, FlowContext, Row, Rows}; final class ElasticsearchExtractorTest extends TestCase { diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php index 8dd43bf0b..995217bc6 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php @@ -4,15 +4,10 @@ namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration\ElasticsearchPHP; -use function Flow\ETL\Adapter\Elasticsearch\to_es_bulk_index; -use function Flow\ETL\Adapter\Elasticsearch\to_es_bulk_update; -use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\EntryIdFactory; -use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\HashIdFactory; +use function Flow\ETL\Adapter\Elasticsearch\{to_es_bulk_index, to_es_bulk_update}; +use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\{EntryIdFactory, HashIdFactory}; use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; final class ElasticsearchLoaderTest extends TestCase { diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php index 4924f9b13..b34f49483 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php @@ -4,14 +4,10 @@ namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration\ElasticsearchPHP; -use function Flow\ETL\Adapter\Elasticsearch\es_hits_to_rows; -use function Flow\ETL\Adapter\Elasticsearch\from_es; -use function Flow\ETL\Adapter\Elasticsearch\to_es_bulk_index; +use function Flow\ETL\Adapter\Elasticsearch\{es_hits_to_rows, from_es, to_es_bulk_index}; use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\EntryIdFactory; use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase; -use Flow\ETL\Flow; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Flow, Row, Rows}; final class IntegrationTest extends TestCase { diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/TestCase.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/TestCase.php index a25dad1d3..b61d3c650 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/TestCase.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/TestCase.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration; -use Flow\ETL\Adapter\Elasticsearch\Tests\Context\Elasticsearch7Context; -use Flow\ETL\Adapter\Elasticsearch\Tests\Context\Elasticsearch8Context; -use Flow\ETL\Adapter\Elasticsearch\Tests\Context\ElasticsearchContext; +use Flow\ETL\Adapter\Elasticsearch\Tests\Context\{Elasticsearch7Context, Elasticsearch8Context, ElasticsearchContext}; abstract class TestCase extends \PHPUnit\Framework\TestCase { diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AwsS3Stream.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AwsS3Stream.php index 05190b27c..5c2d65c5b 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AwsS3Stream.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AwsS3Stream.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\Filesystem; use Aws\S3\S3Client; -use Flow\ETL\Exception\MissingDependencyException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{MissingDependencyException, RuntimeException}; use League\Flysystem\AwsS3V3\AwsS3V3Adapter; use League\Flysystem\Filesystem; diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AzureBlobStream.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AzureBlobStream.php index 05e5e72e4..71f244453 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AzureBlobStream.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/AzureBlobStream.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\Filesystem; -use Flow\ETL\Exception\MissingDependencyException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{MissingDependencyException, RuntimeException}; use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter; use League\Flysystem\Filesystem; use MicrosoftAzure\Storage\Blob\BlobRestProxy; diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php index 477666475..dc4da599d 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php @@ -4,19 +4,12 @@ namespace Flow\ETL\Adapter\Filesystem; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\MissingDependencyException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, MissingDependencyException, RuntimeException}; use Flow\ETL\Filesystem; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Partition\NoopFilter; -use Flow\ETL\Partition\PartitionFilter; -use League\Flysystem\DirectoryAttributes; -use League\Flysystem\FileAttributes; -use League\Flysystem\Filesystem as Flysystem; -use League\Flysystem\FilesystemException; +use Flow\ETL\Filesystem\Stream\{FileStream, Mode}; +use Flow\ETL\Partition\{NoopFilter, PartitionFilter}; +use League\Flysystem\{DirectoryAttributes, FileAttributes, Filesystem as Flysystem, FilesystemException}; final class FlysystemFS implements Filesystem { diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFactory.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFactory.php index 847a9f6c7..76d21bbf2 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFactory.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFactory.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\Filesystem; use Aws\S3\S3Client; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\MissingDependencyException; +use Flow\ETL\Exception\{InvalidArgumentException, MissingDependencyException}; use Flow\ETL\Filesystem\Path; use League\Flysystem\AwsS3V3\AwsS3V3Adapter; use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter; diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemWrapper.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemWrapper.php index 13c98386f..a566fac92 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemWrapper.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemWrapper.php @@ -5,9 +5,8 @@ namespace Flow\ETL\Adapter\Filesystem; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Filesystem\LocalBuffer; use Flow\ETL\Filesystem\Stream\StreamWrapper; -use Flow\ETL\Filesystem\TmpfileBuffer; +use Flow\ETL\Filesystem\{LocalBuffer, TmpfileBuffer}; use League\Flysystem\Filesystem; abstract class FlysystemWrapper implements StreamWrapper diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/RemoteFileListExtractor.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/RemoteFileListExtractor.php index cbd845fef..7bf954b42 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/RemoteFileListExtractor.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/RemoteFileListExtractor.php @@ -6,15 +6,10 @@ use function Flow\ETL\DSL\array_to_rows; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, Signal}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; -use League\Flysystem\DirectoryAttributes; -use League\Flysystem\FileAttributes; +use Flow\ETL\{Extractor, FlowContext}; +use League\Flysystem\{DirectoryAttributes, FileAttributes}; final class RemoteFileListExtractor implements Extractor, FileExtractor, LimitableExtractor { diff --git a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php index ca03eccd1..7f19a2b9d 100644 --- a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php +++ b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php @@ -4,14 +4,11 @@ namespace Flow\ETL\Adapter\Filesystem\Tests\Integration; -use function Flow\ETL\DSL\all; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{all, lit, ref}; use Flow\ETL\Adapter\Filesystem\FlysystemFS; use Flow\ETL\Filesystem\Path; use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Partition\NoopFilter; -use Flow\ETL\Partition\ScalarFunctionFilter; +use Flow\ETL\Partition\{NoopFilter, ScalarFunctionFilter}; use Flow\ETL\Row\Factory\NativeEntryFactory; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php index 39f1d6602..5db3d61cf 100644 --- a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php +++ b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\Filesystem\Tests\Integration; -use Flow\ETL\Adapter\Filesystem\AwsS3Stream; -use Flow\ETL\Adapter\Filesystem\AzureBlobStream; +use Flow\ETL\Adapter\Filesystem\{AwsS3Stream, AzureBlobStream}; use PHPUnit\Framework\TestCase; final class RegisterWrapperTest extends TestCase diff --git a/src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/GoogleSheetExtractor.php b/src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/GoogleSheetExtractor.php index cfa6f1a73..2bb782435 100644 --- a/src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/GoogleSheetExtractor.php +++ b/src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/GoogleSheetExtractor.php @@ -6,11 +6,8 @@ use function Flow\ETL\DSL\array_to_rows; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\Signal; -use Flow\ETL\FlowContext; +use Flow\ETL\Extractor\{Limitable, LimitableExtractor, Signal}; +use Flow\ETL\{Extractor, FlowContext}; use Google\Service\Sheets; final class GoogleSheetExtractor implements Extractor, LimitableExtractor diff --git a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php index e19c975df..3acbda782 100644 --- a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php +++ b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php @@ -6,12 +6,9 @@ use function Flow\ETL\Adapter\GoogleSheet\from_google_sheet_columns; use function Flow\ETL\DSL\str_entry; -use Flow\ETL\ConfigBuilder; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Rows; +use Flow\ETL\{ConfigBuilder, FlowContext, Row, Rows}; use Google\Service\Sheets; use Google\Service\Sheets\Resource\SpreadsheetsValues; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php index cabeb9de9..8c214436f 100644 --- a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php +++ b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\GoogleSheet\Tests\Unit; -use Flow\ETL\Adapter\GoogleSheet\Columns; -use Flow\ETL\Adapter\GoogleSheet\SheetRange; +use Flow\ETL\Adapter\GoogleSheet\{Columns, SheetRange}; use Flow\ETL\Exception\InvalidArgumentException; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/DynamicExtractor/NextRequestFactory.php b/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/DynamicExtractor/NextRequestFactory.php index 7eefae1fb..e7396ac8a 100644 --- a/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/DynamicExtractor/NextRequestFactory.php +++ b/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/DynamicExtractor/NextRequestFactory.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\Http\DynamicExtractor; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; interface NextRequestFactory { diff --git a/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientDynamicExtractor.php b/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientDynamicExtractor.php index 5bd6f1086..ffba3eccb 100644 --- a/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientDynamicExtractor.php +++ b/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientDynamicExtractor.php @@ -4,16 +4,11 @@ namespace Flow\ETL\Adapter\Http; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{array_entry, str_entry}; use Flow\ETL\Adapter\Http\DynamicExtractor\NextRequestFactory; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Row, Rows}; use Psr\Http\Client\ClientInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; final class PsrHttpClientDynamicExtractor implements Extractor { diff --git a/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientStaticExtractor.php b/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientStaticExtractor.php index 0f612800c..61323465e 100644 --- a/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientStaticExtractor.php +++ b/src/adapter/etl-adapter-http/src/Flow/ETL/Adapter/Http/PsrHttpClientStaticExtractor.php @@ -4,15 +4,10 @@ namespace Flow\ETL\Adapter\Http; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{array_entry, str_entry}; +use Flow\ETL\{Extractor, FlowContext, Row, Rows}; use Psr\Http\Client\ClientInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; final class PsrHttpClientStaticExtractor implements Extractor { diff --git a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php index 87ea24509..0cdb72a89 100644 --- a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php +++ b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php @@ -6,14 +6,12 @@ use Flow\ETL\Adapter\Http\DynamicExtractor\NextRequestFactory; use Flow\ETL\Adapter\Http\PsrHttpClientDynamicExtractor; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use Http\Mock\Client; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use PHPUnit\Framework\TestCase; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; final class PsrHttpClientDynamicExtractorTest extends TestCase { diff --git a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php index bd39c1aea..842405d69 100644 --- a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php +++ b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Adapter\HTTP\Tests\Integration; use Flow\ETL\Adapter\Http\PsrHttpClientStaticExtractor; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Rows}; use Http\Mock\Client; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; diff --git a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php index 09d782561..dbd123456 100644 --- a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php +++ b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Adapter\HTTP\Tests\Unit; use Flow\ETL\Adapter\Http\RequestEntriesFactory; -use Flow\ETL\Row\Entry\JsonEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\StringEntry; +use Flow\ETL\Row\Entry\{JsonEntry, NullEntry, StringEntry}; use Nyholm\Psr7\Factory\Psr17Factory; use PHPUnit\Framework\TestCase; use Psr\Http\Message\RequestInterface; diff --git a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JSONMachine/JsonExtractor.php b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JSONMachine/JsonExtractor.php index 54cb1d4b5..7a6a011aa 100644 --- a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JSONMachine/JsonExtractor.php +++ b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JSONMachine/JsonExtractor.php @@ -5,16 +5,10 @@ namespace Flow\ETL\Adapter\JSON\JSONMachine; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\PartitionFiltering; -use Flow\ETL\Extractor\PartitionsExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PartitionFiltering, PartitionsExtractor, Signal}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; use Flow\ETL\Row\Schema; +use Flow\ETL\{Extractor, FlowContext}; use JsonMachine\Items; use JsonMachine\JsonDecoder\ExtJsonDecoder; diff --git a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php index 2bc0e04c6..85d3f2c4c 100644 --- a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php +++ b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php @@ -7,11 +7,8 @@ use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Filesystem\Path; use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\Partition; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Partition, Rows}; final class JsonLoader implements Closure, Loader, Loader\FileLoader { diff --git a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/functions.php b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/functions.php index fa0557fc9..01ddc12c1 100644 --- a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/functions.php +++ b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/functions.php @@ -6,10 +6,9 @@ use function Flow\ETL\DSL\from_all; use Flow\ETL\Adapter\JSON\JSONMachine\JsonExtractor; -use Flow\ETL\Extractor; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Loader; use Flow\ETL\Row\Schema; +use Flow\ETL\{Extractor, Loader}; /** * @param array|Path|string $path - string is internally turned into stream diff --git a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonExtractorBench.php b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonExtractorBench.php index 2753d46dd..3b29855a6 100644 --- a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonExtractorBench.php +++ b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonExtractorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\JSON\Tests\Benchmark; use function Flow\ETL\Adapter\JSON\from_json; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use PhpBench\Attributes\Groups; #[Groups(['extractor'])] diff --git a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonLoaderBench.php b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonLoaderBench.php index 40e196d58..f548b7d9b 100644 --- a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonLoaderBench.php +++ b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Benchmark/JsonLoaderBench.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Adapter\JSON\Tests\Benchmark; -use function Flow\ETL\Adapter\JSON\from_json; -use function Flow\ETL\Adapter\JSON\to_json; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use function Flow\ETL\Adapter\JSON\{from_json, to_json}; +use Flow\ETL\{Config, FlowContext, Rows}; use PhpBench\Attributes\Groups; #[Groups(['loader'])] diff --git a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php index 4ce4f2af0..cd7ff2e78 100644 --- a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php +++ b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php @@ -4,19 +4,12 @@ namespace Flow\ETL\Adapter\JSON\Tests\Integration\JSONMachine; -use function Flow\ETL\Adapter\JSON\from_json; -use function Flow\ETL\Adapter\JSON\to_json; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\print_schema; +use function Flow\ETL\Adapter\JSON\{from_json, to_json}; +use function Flow\ETL\DSL\{df, from_array, print_schema}; use Flow\ETL\Adapter\JSON\JSONMachine\JsonExtractor; -use Flow\ETL\Config; use Flow\ETL\Extractor\Signal; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class JsonExtractorTest extends TestCase diff --git a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php index a029c69db..6e80d9e58 100644 --- a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php +++ b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php @@ -8,11 +8,9 @@ use function Flow\ETL\Adapter\Json\to_json; use function Flow\ETL\DSL\df; use Flow\ETL\Adapter\JSON\JsonLoader; -use Flow\ETL\Config; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; use Flow\ETL\Tests\Double\FakeExtractor; +use Flow\ETL\{Config, FlowContext, Rows}; use PHPUnit\Framework\TestCase; final class JsonTest extends TestCase diff --git a/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php b/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php index f1f1d97c7..00913d768 100644 --- a/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php +++ b/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Adapter\Logger; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; +use Flow\ETL\{FlowContext, Loader, Row, Rows}; +use Psr\Log\{LogLevel, LoggerInterface}; final class PsrLoggerLoader implements Loader { diff --git a/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php b/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php index 27138924f..9bd898187 100644 --- a/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php +++ b/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php @@ -5,10 +5,7 @@ namespace Flow\ETL\Adapter\Logger\Tests\Unit; use Flow\ETL\Adapter\Logger\PsrLoggerLoader; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; use Psr\Log\LogLevel; use Psr\Log\Test\TestLogger; diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php index 381c5a780..7e50ea5fd 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Adapter\Meilisearch\MeilisearchPHP; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class HitsIntoRowsTransformer implements Transformer { diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchExtractor.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchExtractor.php index 612a1b1f6..67610091e 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchExtractor.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchExtractor.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\Meilisearch\MeilisearchPHP; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; use Meilisearch\Client; final class MeilisearchExtractor implements Extractor diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php index 63469fc50..10900b336 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Adapter\Meilisearch\MeilisearchPHP; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Row, Rows}; use Meilisearch\Client; use Psr\Http\Client\ClientInterface; diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/SearchResults.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/SearchResults.php index e2435f0c7..21dcd3853 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/SearchResults.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/SearchResults.php @@ -4,9 +4,8 @@ namespace Flow\ETL\Adapter\Meilisearch\MeilisearchPHP; -use Flow\ETL\Row; use Flow\ETL\Row\EntryFactory; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; use Meilisearch\Search\SearchResult; final class SearchResults diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/functions.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/functions.php index 996bc9e58..a16e9e697 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/functions.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/functions.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Adapter\Meilisearch; -use Flow\ETL\Adapter\Meilisearch\MeilisearchPHP\MeilisearchExtractor; -use Flow\ETL\Adapter\Meilisearch\MeilisearchPHP\MeilisearchLoader; +use Flow\ETL\Adapter\Meilisearch\MeilisearchPHP\{MeilisearchExtractor, MeilisearchLoader}; use Flow\ETL\Loader; use Psr\Http\Client\ClientInterface; diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Context/MeilisearchContext.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Context/MeilisearchContext.php index d77405981..30d9a493b 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Context/MeilisearchContext.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Context/MeilisearchContext.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Adapter\Meilisearch\Tests\Context; use function Flow\ETL\Adapter\Meilisearch\to_meilisearch_bulk_index; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Rows}; use Meilisearch\Client; final class MeilisearchContext diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Double/Spy/HttpClientSpy.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Double/Spy/HttpClientSpy.php index c29a8d0f6..13eb31180 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Double/Spy/HttpClientSpy.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Double/Spy/HttpClientSpy.php @@ -6,8 +6,7 @@ use Nyholm\Psr7\Response; use Psr\Http\Client\ClientInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\{RequestInterface, ResponseInterface}; final class HttpClientSpy implements ClientInterface { diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php index 0ab4a62e1..31f0aa593 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php @@ -4,15 +4,11 @@ namespace Flow\ETL\Adapter\Meilisearch\Tests\Integration\MeilisearchPHP; -use function Flow\ETL\Adapter\Meilisearch\from_meilisearch; -use function Flow\ETL\Adapter\Meilisearch\meilisearch_hits_to_rows; -use function Flow\ETL\Adapter\Meilisearch\to_meilisearch_bulk_index; +use function Flow\ETL\Adapter\Meilisearch\{from_meilisearch, meilisearch_hits_to_rows, to_meilisearch_bulk_index}; use function Flow\ETL\DSL\from_array; use Flow\ETL\Adapter\Meilisearch\Tests\Context\MeilisearchContext; use Flow\ETL\Adapter\Meilisearch\Tests\Double\Spy\HttpClientSpy; -use Flow\ETL\Flow; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Flow, Row, Rows}; use PHPUnit\Framework\TestCase; final class MailiSearchTest extends TestCase diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php index ca802b84a..7b0788172 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php @@ -4,15 +4,9 @@ namespace Flow\ETL\Adapter\Meilisearch\Tests\Integration\MeilisearchPHP; -use function Flow\ETL\Adapter\Meilisearch\from_meilisearch; -use function Flow\ETL\Adapter\Meilisearch\meilisearch_hits_to_rows; -use function Flow\ETL\Adapter\Meilisearch\to_meilisearch_bulk_index; +use function Flow\ETL\Adapter\Meilisearch\{from_meilisearch, meilisearch_hits_to_rows, to_meilisearch_bulk_index}; use Flow\ETL\Adapter\Meilisearch\Tests\Context\MeilisearchContext; -use Flow\ETL\Config; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class MeilisearchExtractorTest extends TestCase diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php index b126b5cb2..35a89e4c9 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php @@ -4,13 +4,9 @@ namespace Flow\ETL\Adapter\Meilisearch\Tests\Integration\MeilisearchPHP; -use function Flow\ETL\Adapter\Meilisearch\to_meilisearch_bulk_index; -use function Flow\ETL\Adapter\Meilisearch\to_meilisearch_bulk_update; +use function Flow\ETL\Adapter\Meilisearch\{to_meilisearch_bulk_index, to_meilisearch_bulk_update}; use Flow\ETL\Adapter\Meilisearch\Tests\Context\MeilisearchContext; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class MeilisearchLoaderTest extends TestCase diff --git a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetExtractor.php b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetExtractor.php index f58367945..eadf7214d 100644 --- a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetExtractor.php +++ b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetExtractor.php @@ -6,20 +6,11 @@ use function Flow\ETL\DSL\array_to_rows; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\PartitionFiltering; -use Flow\ETL\Extractor\PartitionsExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PartitionFiltering, PartitionsExtractor, Signal}; use Flow\ETL\Filesystem\Path; use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\FlowContext; -use Flow\Parquet\ByteOrder; -use Flow\Parquet\Options; -use Flow\Parquet\ParquetFile; -use Flow\Parquet\Reader; +use Flow\ETL\{Extractor, FlowContext}; +use Flow\Parquet\{ByteOrder, Options, ParquetFile, Reader}; final class ParquetExtractor implements Extractor, FileExtractor, LimitableExtractor, PartitionsExtractor { diff --git a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php index 0546de506..da38526a0 100644 --- a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php +++ b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php @@ -5,15 +5,12 @@ namespace Flow\ETL\Adapter\Parquet; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; use Flow\ETL\PHP\Type\Caster; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; -use Flow\Parquet\Options; +use Flow\ETL\{FlowContext, Loader, Rows}; use Flow\Parquet\ParquetFile\Compressions; -use Flow\Parquet\Writer; +use Flow\Parquet\{Options, Writer}; final class ParquetLoader implements Closure, Loader, Loader\FileLoader { diff --git a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/SchemaConverter.php b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/SchemaConverter.php index 9a3ebf139..5232b0eca 100644 --- a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/SchemaConverter.php +++ b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/SchemaConverter.php @@ -4,36 +4,16 @@ namespace Flow\ETL\Adapter\Parquet; -use function Flow\ETL\DSL\list_schema; -use function Flow\ETL\DSL\map_schema; -use function Flow\ETL\DSL\struct_schema; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\structure_element; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_object; +use function Flow\ETL\DSL\{list_schema, map_schema, struct_schema, struct_type, structure_element, type_list, type_map, type_object}; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\JsonType; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Logical\XMLNodeType; -use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Native\ScalarType; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, JsonType, ListType, MapType, StructureType, UuidType, XMLNodeType, XMLType}; +use Flow\ETL\PHP\Type\Native\{ObjectType, ScalarType}; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Schema; +use Flow\ETL\Row\{Entry, Schema}; use Flow\Parquet\ParquetFile\Schema as ParquetSchema; -use Flow\Parquet\ParquetFile\Schema\Column; -use Flow\Parquet\ParquetFile\Schema\FlatColumn; -use Flow\Parquet\ParquetFile\Schema\ListElement; -use Flow\Parquet\ParquetFile\Schema\NestedColumn; +use Flow\Parquet\ParquetFile\Schema\{Column, FlatColumn, ListElement, NestedColumn}; final class SchemaConverter { diff --git a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/functions.php b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/functions.php index 5447e7f12..b299cb323 100644 --- a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/functions.php +++ b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/functions.php @@ -6,13 +6,11 @@ use function Flow\ETL\DSL\from_all; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Loader; use Flow\ETL\Row\Schema; -use Flow\Parquet\ByteOrder; -use Flow\Parquet\Options; +use Flow\ETL\{Extractor, Loader}; use Flow\Parquet\ParquetFile\Compressions; +use Flow\Parquet\{ByteOrder, Options}; /** * @param array|Path|string $uri diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetExtractorBench.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetExtractorBench.php index 4c08fd96e..e5d2767d2 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetExtractorBench.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetExtractorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\Parquet\Tests\Benchmark; use function Flow\ETL\Adapter\Parquet\from_parquet; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use PhpBench\Attributes\Groups; #[Groups(['extractor'])] diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetLoaderBench.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetLoaderBench.php index ae8f70a42..2230d422f 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetLoaderBench.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Benchmark/ParquetLoaderBench.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Adapter\Parquet\Tests\Benchmark; -use function Flow\ETL\Adapter\Parquet\from_parquet; -use function Flow\ETL\Adapter\Parquet\to_parquet; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use function Flow\ETL\Adapter\Parquet\{from_parquet, to_parquet}; +use Flow\ETL\{Config, FlowContext, Rows}; use PhpBench\Attributes\Groups; #[Groups(['loader'])] diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php index d2b4c3e0e..830299168 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php @@ -7,13 +7,10 @@ use function Flow\ETL\Adapter\Parquet\to_parquet; use function Flow\ETL\DSL\from_array; use Flow\ETL\Adapter\Parquet\ParquetExtractor; -use Flow\ETL\Config; use Flow\ETL\Extractor\Signal; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\Parquet\Options; -use Flow\Parquet\Reader; +use Flow\ETL\{Config, Flow, FlowContext}; +use Flow\Parquet\{Options, Reader}; use PHPUnit\Framework\TestCase; final class ParquetExtractorTest extends TestCase diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php index dc64f29ef..9eae7db60 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php @@ -4,16 +4,10 @@ namespace Flow\ETL\Adapter\Parquet\Tests\Integration; -use function Flow\ETL\Adapter\Parquet\from_parquet; -use function Flow\ETL\Adapter\Parquet\to_parquet; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\json_schema; -use function Flow\ETL\DSL\schema; -use function Flow\ETL\DSL\str_schema; -use Flow\ETL\Flow; -use Flow\ETL\Row; +use function Flow\ETL\Adapter\Parquet\{from_parquet, to_parquet}; +use function Flow\ETL\DSL\{df, from_array, json_schema, schema, str_schema}; use Flow\ETL\Tests\Double\FakeExtractor; +use Flow\ETL\{Flow, Row}; use Flow\Parquet\ParquetFile\Compressions; use Flow\Parquet\Reader; use PHPUnit\Framework\TestCase; diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php index e1e47c7ca..fc6925749 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php @@ -4,23 +4,16 @@ namespace Flow\ETL\Adapter\Parquet\Tests\Unit; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{type_boolean, type_int, type_object, type_string}; use Flow\ETL\Adapter\Parquet\SchemaConverter; use Flow\ETL\Exception\RuntimeException; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; use Flow\ETL\Row\Schema; use Flow\Parquet\ParquetFile\Schema as ParquetSchema; -use Flow\Parquet\ParquetFile\Schema\FlatColumn; -use Flow\Parquet\ParquetFile\Schema\NestedColumn; +use Flow\Parquet\ParquetFile\Schema\{FlatColumn, NestedColumn}; use PHPUnit\Framework\TestCase; final class FlowToParquetSchemaTest extends TestCase diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php index cc988722c..881f95152 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php @@ -4,30 +4,10 @@ namespace Flow\ETL\Adapter\Parquet\Tests\Unit; -use function Flow\ETL\DSL\bool_schema; -use function Flow\ETL\DSL\datetime_schema; -use function Flow\ETL\DSL\float_schema; -use function Flow\ETL\DSL\int_schema; -use function Flow\ETL\DSL\json_schema; -use function Flow\ETL\DSL\list_schema; -use function Flow\ETL\DSL\map_schema; -use function Flow\ETL\DSL\object_schema; -use function Flow\ETL\DSL\str_schema; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_schema; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_structure; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\uuid_schema; +use function Flow\ETL\DSL\{bool_schema, datetime_schema, float_schema, int_schema, json_schema, list_schema, map_schema, object_schema, str_schema, struct_element, struct_schema, type_boolean, type_int, type_list, type_map, type_object, type_string, type_structure, type_uuid, uuid_schema}; use Flow\ETL\Adapter\Parquet\SchemaConverter; use Flow\Parquet\ParquetFile\Schema; -use Flow\Parquet\ParquetFile\Schema\MapKey; -use Flow\Parquet\ParquetFile\Schema\MapValue; +use Flow\Parquet\ParquetFile\Schema\{MapKey, MapValue}; use PHPUnit\Framework\TestCase; final class ParquetToFlowSchemaTest extends TestCase diff --git a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php index 2c0f2136a..475ff7e15 100644 --- a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php +++ b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextExtractor.php @@ -5,15 +5,9 @@ namespace Flow\ETL\Adapter\Text; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\PartitionFiltering; -use Flow\ETL\Extractor\PartitionsExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PartitionFiltering, PartitionsExtractor, Signal}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class TextExtractor implements Extractor, FileExtractor, LimitableExtractor, PartitionsExtractor { diff --git a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php index 4a5dc6be7..4ab4be2db 100644 --- a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php +++ b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php @@ -6,10 +6,8 @@ use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Rows}; final class TextLoader implements Closure, Loader, Loader\FileLoader { diff --git a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/functions.php b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/functions.php index 8eb7c1dda..91ddbbce8 100644 --- a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/functions.php +++ b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/functions.php @@ -4,9 +4,8 @@ namespace Flow\ETL\Adapter\Text; -use Flow\ETL\Extractor; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Loader; +use Flow\ETL\{Extractor, Loader}; /** * @param array|Path|string $path diff --git a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextExtractorBench.php b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextExtractorBench.php index 736f4edba..a317f3439 100644 --- a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextExtractorBench.php +++ b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextExtractorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\Text\Tests\Benchmark; use function Flow\ETL\Adapter\Text\from_text; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use PhpBench\Attributes\Groups; #[Groups(['extractor'])] diff --git a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextLoaderBench.php b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextLoaderBench.php index b770b49cd..a42660de9 100644 --- a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextLoaderBench.php +++ b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Benchmark/TextLoaderBench.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Adapter\Text\Tests\Benchmark; -use function Flow\ETL\Adapter\Text\from_text; -use function Flow\ETL\Adapter\Text\to_text; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use function Flow\ETL\Adapter\Text\{from_text, to_text}; +use Flow\ETL\{Config, FlowContext, Rows}; use PhpBench\Attributes\Groups; #[Groups(['loader'])] diff --git a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php index 67dd6ae66..a6e8bf98f 100644 --- a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php +++ b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php @@ -4,17 +4,12 @@ namespace Flow\ETL\Adapter\Text\Tests\Integration; -use function Flow\ETL\Adapter\Text\from_text; -use function Flow\ETL\Adapter\Text\to_text; +use function Flow\ETL\Adapter\Text\{from_text, to_text}; use function Flow\ETL\DSL\from_array; use Flow\ETL\Adapter\Text\TextExtractor; -use Flow\ETL\Config; use Flow\ETL\Extractor\Signal; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class TextExtractorTest extends TestCase diff --git a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php index e61d4bb09..4efa272c7 100644 --- a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php +++ b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php @@ -6,9 +6,7 @@ use function Flow\ETL\Adapter\Text\to_text; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Flow, Row, Rows}; use PHPUnit\Framework\TestCase; final class TextTest extends TestCase diff --git a/src/adapter/etl-adapter-xml/src/Flow/ETL/Adapter/XML/XMLReaderExtractor.php b/src/adapter/etl-adapter-xml/src/Flow/ETL/Adapter/XML/XMLReaderExtractor.php index 1fe97544a..5b78387fa 100644 --- a/src/adapter/etl-adapter-xml/src/Flow/ETL/Adapter/XML/XMLReaderExtractor.php +++ b/src/adapter/etl-adapter-xml/src/Flow/ETL/Adapter/XML/XMLReaderExtractor.php @@ -5,15 +5,9 @@ namespace Flow\ETL\Adapter\XML; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\Extractor\FileExtractor; -use Flow\ETL\Extractor\Limitable; -use Flow\ETL\Extractor\LimitableExtractor; -use Flow\ETL\Extractor\PartitionFiltering; -use Flow\ETL\Extractor\PartitionsExtractor; -use Flow\ETL\Extractor\Signal; +use Flow\ETL\Extractor\{FileExtractor, Limitable, LimitableExtractor, PartitionFiltering, PartitionsExtractor, Signal}; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class XMLReaderExtractor implements Extractor, FileExtractor, LimitableExtractor, PartitionsExtractor { diff --git a/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Benchmark/XmlExtractorBench.php b/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Benchmark/XmlExtractorBench.php index 0a5da1d18..a91b7bb6b 100644 --- a/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Benchmark/XmlExtractorBench.php +++ b/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Benchmark/XmlExtractorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Adapter\XML\Tests\Benchmark; use function Flow\ETL\Adapter\XML\from_xml; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use Flow\ETL\{Config, FlowContext}; use PhpBench\Attributes\Groups; #[Groups(['extractor'])] diff --git a/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php b/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php index 6900657d5..c3e2b7c20 100644 --- a/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php +++ b/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php @@ -7,13 +7,9 @@ use function Flow\ETL\Adapter\XML\from_xml; use function Flow\ETL\DSL\xml_entry; use Flow\ETL\Adapter\XML\XMLReaderExtractor; -use Flow\ETL\Config; use Flow\ETL\Extractor\Signal; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class XMLReaderExtractorTest extends TestCase diff --git a/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php b/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php index a82399e65..2e19dfb20 100644 --- a/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Cache; -use Flow\ETL\Cache; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, Rows}; final class InMemoryCache implements Cache { diff --git a/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php b/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php index d19f17d58..2f08b9ab2 100644 --- a/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Cache; -use Flow\ETL\Cache; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Rows; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; +use Flow\ETL\{Cache, Rows}; use Flow\Serializer\Serializer; /** diff --git a/src/core/etl/src/Flow/ETL/Cache/NullCache.php b/src/core/etl/src/Flow/ETL/Cache/NullCache.php index 054113a6a..3096023a8 100644 --- a/src/core/etl/src/Flow/ETL/Cache/NullCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/NullCache.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Cache; -use Flow\ETL\Cache; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, Rows}; final class NullCache implements Cache { diff --git a/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php b/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php index e14849317..67ac226bd 100644 --- a/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Cache; -use Flow\ETL\Cache; -use Flow\ETL\Rows; -use Flow\Serializer\NativePHPSerializer; -use Flow\Serializer\Serializer; +use Flow\ETL\{Cache, Rows}; +use Flow\Serializer\{NativePHPSerializer, Serializer}; use Psr\SimpleCache\CacheInterface; final class PSRSimpleCache implements Cache diff --git a/src/core/etl/src/Flow/ETL/ConfigBuilder.php b/src/core/etl/src/Flow/ETL/ConfigBuilder.php index 4b083ac0a..942c4c13a 100644 --- a/src/core/etl/src/Flow/ETL/ConfigBuilder.php +++ b/src/core/etl/src/Flow/ETL/ConfigBuilder.php @@ -6,14 +6,11 @@ use Flow\ETL\Cache\LocalFilesystemCache; use Flow\ETL\ExternalSort\MemorySort; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\LocalFilesystem; +use Flow\ETL\Filesystem\{FilesystemStreams, LocalFilesystem}; use Flow\ETL\Monitoring\Memory\Unit; use Flow\ETL\Pipeline\Optimizer; use Flow\ETL\Row\Factory\NativeEntryFactory; -use Flow\Serializer\CompressingSerializer; -use Flow\Serializer\NativePHPSerializer; -use Flow\Serializer\Serializer; +use Flow\Serializer\{CompressingSerializer, NativePHPSerializer, Serializer}; final class ConfigBuilder { diff --git a/src/core/etl/src/Flow/ETL/DSL/functions.php b/src/core/etl/src/Flow/ETL/DSL/functions.php index 58fe76b04..6d940d367 100644 --- a/src/core/etl/src/Flow/ETL/DSL/functions.php +++ b/src/core/etl/src/Flow/ETL/DSL/functions.php @@ -4,128 +4,30 @@ namespace Flow\ETL\DSL; -use Flow\ETL\Config; -use Flow\ETL\ConfigBuilder; -use Flow\ETL\DataFrame; -use Flow\ETL\ErrorHandler\IgnoreError; -use Flow\ETL\ErrorHandler\SkipRows; -use Flow\ETL\ErrorHandler\ThrowError; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\InvalidLogicException; -use Flow\ETL\Exception\SchemaDefinitionNotFoundException; -use Flow\ETL\Extractor; +use Flow\ETL\ErrorHandler\{IgnoreError, SkipRows, ThrowError}; +use Flow\ETL\Exception\{InvalidArgumentException, InvalidLogicException, SchemaDefinitionNotFoundException}; use Flow\ETL\Extractor\LocalFileListExtractor; -use Flow\ETL\Filesystem\Path; -use Flow\ETL\Filesystem\SaveMode; use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Formatter; -use Flow\ETL\Function\All; -use Flow\ETL\Function\Any; -use Flow\ETL\Function\ArrayExists; +use Flow\ETL\Filesystem\{Path, SaveMode}; use Flow\ETL\Function\ArrayExpand\ArrayExpand; -use Flow\ETL\Function\ArrayGet; -use Flow\ETL\Function\ArrayGetCollection; -use Flow\ETL\Function\ArrayKeyRename; -use Flow\ETL\Function\ArrayKeysStyleConvert; -use Flow\ETL\Function\ArrayMerge; -use Flow\ETL\Function\ArrayMergeCollection; -use Flow\ETL\Function\ArrayReverse; -use Flow\ETL\Function\ArraySort; use Flow\ETL\Function\ArraySort\Sort; -use Flow\ETL\Function\ArrayUnpack; -use Flow\ETL\Function\Average; -use Flow\ETL\Function\Between; use Flow\ETL\Function\Between\Boundary; -use Flow\ETL\Function\CallMethod; -use Flow\ETL\Function\Capitalize; -use Flow\ETL\Function\Cast; -use Flow\ETL\Function\Collect; -use Flow\ETL\Function\CollectUnique; -use Flow\ETL\Function\Combine; -use Flow\ETL\Function\Concat; -use Flow\ETL\Function\Count; -use Flow\ETL\Function\DateTimeFormat; -use Flow\ETL\Function\DenseRank; -use Flow\ETL\Function\Exists; -use Flow\ETL\Function\First; -use Flow\ETL\Function\Hash; -use Flow\ETL\Function\Last; -use Flow\ETL\Function\ListFunctions; -use Flow\ETL\Function\Literal; -use Flow\ETL\Function\Max; -use Flow\ETL\Function\Min; -use Flow\ETL\Function\Not; -use Flow\ETL\Function\Now; -use Flow\ETL\Function\NumberFormat; -use Flow\ETL\Function\Optional; -use Flow\ETL\Function\PregMatch; -use Flow\ETL\Function\PregMatchAll; -use Flow\ETL\Function\PregReplace; -use Flow\ETL\Function\Rank; -use Flow\ETL\Function\Round; -use Flow\ETL\Function\RowNumber; -use Flow\ETL\Function\Sanitize; -use Flow\ETL\Function\ScalarFunction; -use Flow\ETL\Function\Size; -use Flow\ETL\Function\Split; -use Flow\ETL\Function\Sprintf; -use Flow\ETL\Function\StructureFunctions; use Flow\ETL\Function\StyleConverter\StringStyles; -use Flow\ETL\Function\Sum; -use Flow\ETL\Function\ToDate; -use Flow\ETL\Function\ToDateTime; -use Flow\ETL\Function\ToLower; -use Flow\ETL\Function\ToMoney; -use Flow\ETL\Function\ToTimeZone; -use Flow\ETL\Function\ToUpper; -use Flow\ETL\Function\Ulid; -use Flow\ETL\Function\Uuid; -use Flow\ETL\Function\When; -use Flow\ETL\Loader; -use Flow\ETL\Loader\CallbackLoader; -use Flow\ETL\Loader\MemoryLoader; -use Flow\ETL\Loader\StreamLoader; +use Flow\ETL\Function\{All, Any, ArrayExists, ArrayGet, ArrayGetCollection, ArrayKeyRename, ArrayKeysStyleConvert, ArrayMerge, ArrayMergeCollection, ArrayReverse, ArraySort, ArrayUnpack, Average, Between, CallMethod, Capitalize, Cast, Collect, CollectUnique, Combine, Concat, Count, DateTimeFormat, DenseRank, Exists, First, Hash, Last, ListFunctions, Literal, Max, Min, Not, Now, NumberFormat, Optional, PregMatch, PregMatchAll, PregReplace, Rank, Round, RowNumber, Sanitize, ScalarFunction, Size, Split, Sprintf, StructureFunctions, Sum, ToDate, ToDateTime, ToLower, ToMoney, ToTimeZone, ToUpper, Ulid, Uuid, When}; use Flow\ETL\Loader\StreamLoader\Output; -use Flow\ETL\Loader\TransformerLoader; +use Flow\ETL\Loader\{CallbackLoader, MemoryLoader, StreamLoader, TransformerLoader}; use Flow\ETL\Memory\Memory; -use Flow\ETL\Partition; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\JsonType; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Logical\XMLNodeType; -use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Native\CallableType; -use Flow\ETL\PHP\Type\Native\EnumType; -use Flow\ETL\PHP\Type\Native\NullType; -use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Native\ResourceType; -use Flow\ETL\PHP\Type\Native\ScalarType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeDetector; -use Flow\ETL\Pipeline; -use Flow\ETL\Row; -use Flow\ETL\Row\EntryFactory; -use Flow\ETL\Row\EntryReference; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, JsonType, ListType, MapType, StructureType, UuidType, XMLNodeType, XMLType}; +use Flow\ETL\PHP\Type\Native\{ArrayType, CallableType, EnumType, NullType, ObjectType, ResourceType, ScalarType}; +use Flow\ETL\PHP\Type\{Type, TypeDetector}; use Flow\ETL\Row\Factory\NativeEntryFactory; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Row\Schema; -use Flow\ETL\Row\Schema\Definition; use Flow\ETL\Row\Schema\Formatter\ASCIISchemaFormatter; -use Flow\ETL\Row\Schema\SchemaFormatter; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; -use Flow\ETL\Window; +use Flow\ETL\Row\Schema\{Definition, SchemaFormatter}; +use Flow\ETL\Row\{EntryFactory, EntryReference, Reference, References, Schema}; +use Flow\ETL\{Config, ConfigBuilder, DataFrame, Extractor, Flow, FlowContext, Formatter, Loader, Partition, Pipeline, Row, Rows, Transformer, Window}; /** * Alias for data_frame() : Flow. diff --git a/src/core/etl/src/Flow/ETL/DataFrame.php b/src/core/etl/src/Flow/ETL/DataFrame.php index 057f295cb..1c28e84f3 100644 --- a/src/core/etl/src/Flow/ETL/DataFrame.php +++ b/src/core/etl/src/Flow/ETL/DataFrame.php @@ -5,62 +5,25 @@ namespace Flow\ETL; use function Flow\ETL\DSL\to_output; -use Flow\ETL\DataFrame\GroupedDataFrame; -use Flow\ETL\DataFrame\PartitionedDataFrame; -use Flow\ETL\Dataset\Report; -use Flow\ETL\Dataset\Statistics; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\InvalidFileFormatException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\DataFrame\{GroupedDataFrame, PartitionedDataFrame}; +use Flow\ETL\Dataset\{Report, Statistics}; +use Flow\ETL\Exception\{InvalidArgumentException, InvalidFileFormatException, RuntimeException}; use Flow\ETL\Extractor\PartitionsExtractor; use Flow\ETL\Filesystem\SaveMode; use Flow\ETL\Formatter\AsciiTableFormatter; -use Flow\ETL\Function\AggregatingFunction; -use Flow\ETL\Function\ScalarFunction; -use Flow\ETL\Function\WindowFunction; -use Flow\ETL\Join\Expression; -use Flow\ETL\Join\Join; +use Flow\ETL\Function\{AggregatingFunction, ScalarFunction, WindowFunction}; +use Flow\ETL\Join\{Expression, Join}; use Flow\ETL\Loader\SchemaValidationLoader; use Flow\ETL\Loader\StreamLoader\Output; use Flow\ETL\Partition\ScalarFunctionFilter; -use Flow\ETL\PHP\Type\AutoCaster; -use Flow\ETL\PHP\Type\Caster; -use Flow\ETL\Pipeline\BatchingPipeline; -use Flow\ETL\Pipeline\CachingPipeline; -use Flow\ETL\Pipeline\CollectingPipeline; -use Flow\ETL\Pipeline\GroupByPipeline; -use Flow\ETL\Pipeline\PartitioningPipeline; -use Flow\ETL\Pipeline\VoidPipeline; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Row\Schema; -use Flow\ETL\Transformer\AutoCastTransformer; -use Flow\ETL\Transformer\CallbackRowTransformer; -use Flow\ETL\Transformer\CrossJoinRowsTransformer; -use Flow\ETL\Transformer\DropDuplicatesTransformer; -use Flow\ETL\Transformer\DropPartitionsTransformer; -use Flow\ETL\Transformer\EntryNameStyleConverterTransformer; -use Flow\ETL\Transformer\JoinEachRowsTransformer; -use Flow\ETL\Transformer\JoinRowsTransformer; -use Flow\ETL\Transformer\KeepEntriesTransformer; -use Flow\ETL\Transformer\LimitTransformer; -use Flow\ETL\Transformer\RemoveEntriesTransformer; -use Flow\ETL\Transformer\RenameAllCaseTransformer; -use Flow\ETL\Transformer\RenameEntryTransformer; -use Flow\ETL\Transformer\RenameStrReplaceAllEntriesTransformer; -use Flow\ETL\Transformer\ScalarFunctionFilterTransformer; -use Flow\ETL\Transformer\ScalarFunctionTransformer; +use Flow\ETL\PHP\Type\{AutoCaster, Caster}; +use Flow\ETL\Pipeline\{BatchingPipeline, CachingPipeline, CollectingPipeline, GroupByPipeline, PartitioningPipeline, VoidPipeline}; +use Flow\ETL\Row\{Reference, References, Schema}; use Flow\ETL\Transformer\StyleConverter\StringStyles; -use Flow\ETL\Transformer\UntilTransformer; -use Flow\ETL\Transformer\WindowFunctionTransformer; -use Flow\RDSL\AccessControl\AllowAll; -use Flow\RDSL\AccessControl\AllowList; -use Flow\RDSL\AccessControl\DenyAll; +use Flow\ETL\Transformer\{AutoCastTransformer, CallbackRowTransformer, CrossJoinRowsTransformer, DropDuplicatesTransformer, DropPartitionsTransformer, EntryNameStyleConverterTransformer, JoinEachRowsTransformer, JoinRowsTransformer, KeepEntriesTransformer, LimitTransformer, RemoveEntriesTransformer, RenameAllCaseTransformer, RenameEntryTransformer, RenameStrReplaceAllEntriesTransformer, ScalarFunctionFilterTransformer, ScalarFunctionTransformer, UntilTransformer, WindowFunctionTransformer}; +use Flow\RDSL\AccessControl\{AllowAll, AllowList, DenyAll}; use Flow\RDSL\Attribute\DSLMethod; -use Flow\RDSL\Builder; -use Flow\RDSL\DSLNamespace; -use Flow\RDSL\Executor; -use Flow\RDSL\Finder; +use Flow\RDSL\{Builder, DSLNamespace, Executor, Finder}; final class DataFrame { diff --git a/src/core/etl/src/Flow/ETL/DataFrame/GroupedDataFrame.php b/src/core/etl/src/Flow/ETL/DataFrame/GroupedDataFrame.php index 259b66adc..8fa4f94a0 100644 --- a/src/core/etl/src/Flow/ETL/DataFrame/GroupedDataFrame.php +++ b/src/core/etl/src/Flow/ETL/DataFrame/GroupedDataFrame.php @@ -4,11 +4,9 @@ namespace Flow\ETL\DataFrame; -use Flow\ETL\DataFrame; use Flow\ETL\Function\AggregatingFunction; -use Flow\ETL\Loader; use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; +use Flow\ETL\{DataFrame, Loader, Rows}; /** * @method DataFrame write(Loader $loader) diff --git a/src/core/etl/src/Flow/ETL/DataFrame/PartitionedDataFrame.php b/src/core/etl/src/Flow/ETL/DataFrame/PartitionedDataFrame.php index 8f5c8a43f..b91bbf1de 100644 --- a/src/core/etl/src/Flow/ETL/DataFrame/PartitionedDataFrame.php +++ b/src/core/etl/src/Flow/ETL/DataFrame/PartitionedDataFrame.php @@ -4,13 +4,10 @@ namespace Flow\ETL\DataFrame; -use Flow\ETL\DataFrame; use Flow\ETL\Dataset\Report; use Flow\ETL\Filesystem\SaveMode; -use Flow\ETL\Formatter; use Flow\ETL\Formatter\AsciiTableFormatter; -use Flow\ETL\Loader; -use Flow\ETL\Rows; +use Flow\ETL\{DataFrame, Formatter, Loader, Rows}; final class PartitionedDataFrame { diff --git a/src/core/etl/src/Flow/ETL/ErrorHandler/IgnoreError.php b/src/core/etl/src/Flow/ETL/ErrorHandler/IgnoreError.php index 60286e600..1609b3341 100644 --- a/src/core/etl/src/Flow/ETL/ErrorHandler/IgnoreError.php +++ b/src/core/etl/src/Flow/ETL/ErrorHandler/IgnoreError.php @@ -4,8 +4,7 @@ namespace Flow\ETL\ErrorHandler; -use Flow\ETL\ErrorHandler; -use Flow\ETL\Rows; +use Flow\ETL\{ErrorHandler, Rows}; final class IgnoreError implements ErrorHandler { diff --git a/src/core/etl/src/Flow/ETL/ErrorHandler/SkipRows.php b/src/core/etl/src/Flow/ETL/ErrorHandler/SkipRows.php index ece3d5e4a..3fb3b6020 100644 --- a/src/core/etl/src/Flow/ETL/ErrorHandler/SkipRows.php +++ b/src/core/etl/src/Flow/ETL/ErrorHandler/SkipRows.php @@ -4,8 +4,7 @@ namespace Flow\ETL\ErrorHandler; -use Flow\ETL\ErrorHandler; -use Flow\ETL\Rows; +use Flow\ETL\{ErrorHandler, Rows}; final class SkipRows implements ErrorHandler { diff --git a/src/core/etl/src/Flow/ETL/ErrorHandler/ThrowError.php b/src/core/etl/src/Flow/ETL/ErrorHandler/ThrowError.php index d4a908511..a6d0134ea 100644 --- a/src/core/etl/src/Flow/ETL/ErrorHandler/ThrowError.php +++ b/src/core/etl/src/Flow/ETL/ErrorHandler/ThrowError.php @@ -4,8 +4,7 @@ namespace Flow\ETL\ErrorHandler; -use Flow\ETL\ErrorHandler; -use Flow\ETL\Rows; +use Flow\ETL\{ErrorHandler, Rows}; final class ThrowError implements ErrorHandler { diff --git a/src/core/etl/src/Flow/ETL/ExternalSort/BufferCache.php b/src/core/etl/src/Flow/ETL/ExternalSort/BufferCache.php index 633dd60ee..306c97402 100644 --- a/src/core/etl/src/Flow/ETL/ExternalSort/BufferCache.php +++ b/src/core/etl/src/Flow/ETL/ExternalSort/BufferCache.php @@ -4,8 +4,7 @@ namespace Flow\ETL\ExternalSort; -use Flow\ETL\Cache; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, Rows}; /** * @internal diff --git a/src/core/etl/src/Flow/ETL/ExternalSort/CacheExternalSort.php b/src/core/etl/src/Flow/ETL/ExternalSort/CacheExternalSort.php index a99efcb6e..cb949acb5 100644 --- a/src/core/etl/src/Flow/ETL/ExternalSort/CacheExternalSort.php +++ b/src/core/etl/src/Flow/ETL/ExternalSort/CacheExternalSort.php @@ -4,12 +4,9 @@ namespace Flow\ETL\ExternalSort; -use Flow\ETL\Cache; -use Flow\ETL\ExternalSort; -use Flow\ETL\Extractor; use Flow\ETL\Extractor\CacheExtractor; use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, ExternalSort, Extractor, Rows}; /** * External sorting is explained here:. diff --git a/src/core/etl/src/Flow/ETL/ExternalSort/CachedRow.php b/src/core/etl/src/Flow/ETL/ExternalSort/CachedRow.php index ced0380d2..ed60fedcb 100644 --- a/src/core/etl/src/Flow/ETL/ExternalSort/CachedRow.php +++ b/src/core/etl/src/Flow/ETL/ExternalSort/CachedRow.php @@ -5,8 +5,7 @@ namespace Flow\ETL\ExternalSort; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; final class CachedRow { diff --git a/src/core/etl/src/Flow/ETL/ExternalSort/MemorySort.php b/src/core/etl/src/Flow/ETL/ExternalSort/MemorySort.php index 159469c4e..c185543eb 100644 --- a/src/core/etl/src/Flow/ETL/ExternalSort/MemorySort.php +++ b/src/core/etl/src/Flow/ETL/ExternalSort/MemorySort.php @@ -4,14 +4,9 @@ namespace Flow\ETL\ExternalSort; -use Flow\ETL\Cache; -use Flow\ETL\ExternalSort; -use Flow\ETL\Extractor; -use Flow\ETL\Monitoring\Memory\Configuration; -use Flow\ETL\Monitoring\Memory\Consumption; -use Flow\ETL\Monitoring\Memory\Unit; +use Flow\ETL\Monitoring\Memory\{Configuration, Consumption, Unit}; use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, ExternalSort, Extractor, Rows}; /** * This implementation of external sort will try to read from cache until it reaches memory limit. diff --git a/src/core/etl/src/Flow/ETL/ExternalSort/RowsMinHeap.php b/src/core/etl/src/Flow/ETL/ExternalSort/RowsMinHeap.php index 1a477cfe0..aa57b40ee 100644 --- a/src/core/etl/src/Flow/ETL/ExternalSort/RowsMinHeap.php +++ b/src/core/etl/src/Flow/ETL/ExternalSort/RowsMinHeap.php @@ -5,9 +5,7 @@ namespace Flow\ETL\ExternalSort; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Row\SortOrder; +use Flow\ETL\Row\{Reference, References, SortOrder}; /** * @template HeapElement diff --git a/src/core/etl/src/Flow/ETL/Extractor/ArrayExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/ArrayExtractor.php index f2e27d69a..3e0c33f43 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/ArrayExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/ArrayExtractor.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Extractor; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class ArrayExtractor implements Extractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/CacheExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/CacheExtractor.php index 12a49f2c0..efbadb43c 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/CacheExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/CacheExtractor.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Rows}; final class CacheExtractor implements Extractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/ChainExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/ChainExtractor.php index c71d773cf..7138554a3 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/ChainExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/ChainExtractor.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class ChainExtractor implements Extractor, OverridingExtractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/ChunkExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/ChunkExtractor.php index 1a7fbec78..8345abc9f 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/ChunkExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/ChunkExtractor.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Rows}; final class ChunkExtractor implements Extractor, OverridingExtractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/CollectingExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/CollectingExtractor.php index fde68b557..a2d93d0e8 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/CollectingExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/CollectingExtractor.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Rows}; final class CollectingExtractor implements Extractor, OverridingExtractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/DataFrameExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/DataFrameExtractor.php index ab770846a..06557a30f 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/DataFrameExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/DataFrameExtractor.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\DataFrame; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use Flow\ETL\{DataFrame, Extractor, FlowContext}; final class DataFrameExtractor implements Extractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/GeneratorExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/GeneratorExtractor.php index b766a97e0..7ef169250 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/GeneratorExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/GeneratorExtractor.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Extractor; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Rows}; /** * @internal diff --git a/src/core/etl/src/Flow/ETL/Extractor/LocalFileListExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/LocalFileListExtractor.php index 6316a9a91..89527c4f5 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/LocalFileListExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/LocalFileListExtractor.php @@ -6,9 +6,8 @@ use function Flow\ETL\DSL\array_to_rows; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; use Flow\ETL\Filesystem\Path; -use Flow\ETL\FlowContext; +use Flow\ETL\{Extractor, FlowContext}; final class LocalFileListExtractor implements Extractor, FileExtractor, LimitableExtractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/MemoryExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/MemoryExtractor.php index f66e730b9..9f4e8762a 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/MemoryExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/MemoryExtractor.php @@ -5,9 +5,8 @@ namespace Flow\ETL\Extractor; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; use Flow\ETL\Memory\Memory; +use Flow\ETL\{Extractor, FlowContext}; final class MemoryExtractor implements Extractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/PartitionFiltering.php b/src/core/etl/src/Flow/ETL/Extractor/PartitionFiltering.php index ae5ea9c4d..7b1eb59d4 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/PartitionFiltering.php +++ b/src/core/etl/src/Flow/ETL/Extractor/PartitionFiltering.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Partition\FiltersCollection; -use Flow\ETL\Partition\NoopFilter; -use Flow\ETL\Partition\PartitionFilter; +use Flow\ETL\Partition\{FiltersCollection, NoopFilter, PartitionFilter}; trait PartitionFiltering { diff --git a/src/core/etl/src/Flow/ETL/Extractor/PipelineExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/PipelineExtractor.php index cc78061cd..72a323dc5 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/PipelineExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/PipelineExtractor.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Pipeline; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Pipeline, Rows}; final class PipelineExtractor implements Extractor { diff --git a/src/core/etl/src/Flow/ETL/Extractor/ProcessExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/ProcessExtractor.php index 6d40f618c..0ad0a832c 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/ProcessExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/ProcessExtractor.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Rows}; /** * @internal diff --git a/src/core/etl/src/Flow/ETL/Extractor/SequenceExtractor.php b/src/core/etl/src/Flow/ETL/Extractor/SequenceExtractor.php index e5a71d628..32e4df23b 100644 --- a/src/core/etl/src/Flow/ETL/Extractor/SequenceExtractor.php +++ b/src/core/etl/src/Flow/ETL/Extractor/SequenceExtractor.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Extractor; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Row, Rows}; final class SequenceExtractor implements Extractor { diff --git a/src/core/etl/src/Flow/ETL/Filesystem.php b/src/core/etl/src/Flow/ETL/Filesystem.php index 9696d298e..8c5c7e501 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem.php +++ b/src/core/etl/src/Flow/ETL/Filesystem.php @@ -5,10 +5,8 @@ namespace Flow\ETL; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Partition\NoopFilter; -use Flow\ETL\Partition\PartitionFilter; +use Flow\ETL\Filesystem\Stream\{FileStream, Mode}; +use Flow\ETL\Partition\{NoopFilter, PartitionFilter}; interface Filesystem { diff --git a/src/core/etl/src/Flow/ETL/Filesystem/FilesystemStreams.php b/src/core/etl/src/Flow/ETL/Filesystem/FilesystemStreams.php index de897eb93..6b13e0696 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem/FilesystemStreams.php +++ b/src/core/etl/src/Flow/ETL/Filesystem/FilesystemStreams.php @@ -5,10 +5,8 @@ namespace Flow\ETL\Filesystem; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Filesystem; -use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Partition; +use Flow\ETL\Filesystem\Stream\{FileStream, Mode}; +use Flow\ETL\{Filesystem, Partition}; /** * @psalm-suppress MissingTemplateParam diff --git a/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php b/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php index ff443eae7..92a0d4e50 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php +++ b/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Filesystem; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\Filesystem; -use Flow\ETL\Filesystem\Stream\FileStream; -use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Partition\NoopFilter; -use Flow\ETL\Partition\PartitionFilter; +use Flow\ETL\Filesystem\Stream\{FileStream, Mode}; +use Flow\ETL\Partition\{NoopFilter, PartitionFilter}; use Webmozart\Glob\Glob; final class LocalFilesystem implements Filesystem diff --git a/src/core/etl/src/Flow/ETL/Filesystem/Path.php b/src/core/etl/src/Flow/ETL/Filesystem/Path.php index 927406a8e..81a873caf 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem/Path.php +++ b/src/core/etl/src/Flow/ETL/Filesystem/Path.php @@ -4,11 +4,9 @@ namespace Flow\ETL\Filesystem; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\Filesystem\Stream\ResourceContext; -use Flow\ETL\Partition; -use Flow\ETL\Partitions; +use Flow\ETL\{Partition, Partitions}; final class Path { diff --git a/src/core/etl/src/Flow/ETL/Filesystem/Stream/FileStream.php b/src/core/etl/src/Flow/ETL/Filesystem/Stream/FileStream.php index b20454c38..d1b8f2615 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem/Stream/FileStream.php +++ b/src/core/etl/src/Flow/ETL/Filesystem/Stream/FileStream.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Filesystem\Stream; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\Filesystem\Path; final class FileStream diff --git a/src/core/etl/src/Flow/ETL/Formatter/ASCII/Body.php b/src/core/etl/src/Flow/ETL/Formatter/ASCII/Body.php index 1e832c2f0..4f78ed59d 100644 --- a/src/core/etl/src/Flow/ETL/Formatter/ASCII/Body.php +++ b/src/core/etl/src/Flow/ETL/Formatter/ASCII/Body.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Formatter\ASCII; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Partition; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Partition, Row, Rows}; final class Body { diff --git a/src/core/etl/src/Flow/ETL/Formatter/AsciiTableFormatter.php b/src/core/etl/src/Flow/ETL/Formatter/AsciiTableFormatter.php index cfcd78b98..78c3f0303 100644 --- a/src/core/etl/src/Flow/ETL/Formatter/AsciiTableFormatter.php +++ b/src/core/etl/src/Flow/ETL/Formatter/AsciiTableFormatter.php @@ -4,9 +4,8 @@ namespace Flow\ETL\Formatter; -use Flow\ETL\Formatter; use Flow\ETL\Formatter\ASCII\ASCIITable; -use Flow\ETL\Rows; +use Flow\ETL\{Formatter, Rows}; final class AsciiTableFormatter implements Formatter { diff --git a/src/core/etl/src/Flow/ETL/Function/Average.php b/src/core/etl/src/Flow/ETL/Function/Average.php index f9c4e57c5..6449f20af 100644 --- a/src/core/etl/src/Flow/ETL/Function/Average.php +++ b/src/core/etl/src/Flow/ETL/Function/Average.php @@ -4,15 +4,10 @@ namespace Flow\ETL\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\integer_entry; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use function Flow\ETL\DSL\{float_entry, integer_entry}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; +use Flow\ETL\Row\{Entry, Reference}; +use Flow\ETL\{Row, Rows, Window}; final class Average implements AggregatingFunction, WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/Cast.php b/src/core/etl/src/Flow/ETL/Function/Cast.php index e2966b3ea..80d452bdb 100644 --- a/src/core/etl/src/Flow/ETL/Function/Cast.php +++ b/src/core/etl/src/Flow/ETL/Function/Cast.php @@ -4,19 +4,9 @@ namespace Flow\ETL\Function; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_xml; -use Flow\ETL\Exception\CastingException; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Caster; -use Flow\ETL\PHP\Type\Type; +use function Flow\ETL\DSL\{type_array, type_boolean, type_datetime, type_float, type_integer, type_json, type_object, type_string, type_xml}; +use Flow\ETL\Exception\{CastingException, InvalidArgumentException}; +use Flow\ETL\PHP\Type\{Caster, Type}; use Flow\ETL\Row; final class Cast extends ScalarFunctionChain diff --git a/src/core/etl/src/Flow/ETL/Function/Collect.php b/src/core/etl/src/Flow/ETL/Function/Collect.php index b1a683008..634e11ede 100644 --- a/src/core/etl/src/Flow/ETL/Function/Collect.php +++ b/src/core/etl/src/Flow/ETL/Function/Collect.php @@ -7,8 +7,7 @@ use function Flow\ETL\DSL\array_entry; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class Collect implements AggregatingFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/CollectUnique.php b/src/core/etl/src/Flow/ETL/Function/CollectUnique.php index 10ac47860..b6bd5390d 100644 --- a/src/core/etl/src/Flow/ETL/Function/CollectUnique.php +++ b/src/core/etl/src/Flow/ETL/Function/CollectUnique.php @@ -7,8 +7,7 @@ use function Flow\ETL\DSL\array_entry; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class CollectUnique implements AggregatingFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/Count.php b/src/core/etl/src/Flow/ETL/Function/Count.php index 5757f53b6..ae3f16a33 100644 --- a/src/core/etl/src/Flow/ETL/Function/Count.php +++ b/src/core/etl/src/Flow/ETL/Function/Count.php @@ -5,13 +5,9 @@ namespace Flow\ETL\Function; use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; +use Flow\ETL\Row\{Entry, Reference}; +use Flow\ETL\{Row, Rows, Window}; final class Count implements AggregatingFunction, WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/DenseRank.php b/src/core/etl/src/Flow/ETL/Function/DenseRank.php index a4b97d3f2..519b8867f 100644 --- a/src/core/etl/src/Flow/ETL/Function/DenseRank.php +++ b/src/core/etl/src/Flow/ETL/Function/DenseRank.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Function; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use Flow\ETL\{Row, Rows, Window}; final class DenseRank implements WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/First.php b/src/core/etl/src/Flow/ETL/Function/First.php index 0a334c444..8811da1e0 100644 --- a/src/core/etl/src/Flow/ETL/Function/First.php +++ b/src/core/etl/src/Flow/ETL/Function/First.php @@ -6,8 +6,7 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class First implements AggregatingFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/IsType.php b/src/core/etl/src/Flow/ETL/Function/IsType.php index d0b13a755..5e6e9528a 100644 --- a/src/core/etl/src/Flow/ETL/Function/IsType.php +++ b/src/core/etl/src/Flow/ETL/Function/IsType.php @@ -6,8 +6,7 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class IsType extends ScalarFunctionChain { diff --git a/src/core/etl/src/Flow/ETL/Function/Last.php b/src/core/etl/src/Flow/ETL/Function/Last.php index b59b716ab..ce3707b9d 100644 --- a/src/core/etl/src/Flow/ETL/Function/Last.php +++ b/src/core/etl/src/Flow/ETL/Function/Last.php @@ -6,8 +6,7 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class Last implements AggregatingFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/ListSelect.php b/src/core/etl/src/Flow/ETL/Function/ListSelect.php index a0bfd088e..44d4e792c 100644 --- a/src/core/etl/src/Flow/ETL/Function/ListSelect.php +++ b/src/core/etl/src/Flow/ETL/Function/ListSelect.php @@ -6,9 +6,7 @@ use Flow\ETL\Row; use Flow\ETL\Row\Entry\ListEntry; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{EntryReference, Reference, References}; final class ListSelect implements ScalarFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/Max.php b/src/core/etl/src/Flow/ETL/Function/Max.php index bce0a8bb1..6593cbfe5 100644 --- a/src/core/etl/src/Flow/ETL/Function/Max.php +++ b/src/core/etl/src/Flow/ETL/Function/Max.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; +use function Flow\ETL\DSL\{float_entry, int_entry, null_entry}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class Max implements AggregatingFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/Min.php b/src/core/etl/src/Flow/ETL/Function/Min.php index c1e288b3e..602a7fde9 100644 --- a/src/core/etl/src/Flow/ETL/Function/Min.php +++ b/src/core/etl/src/Flow/ETL/Function/Min.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; +use function Flow\ETL\DSL\{float_entry, int_entry, null_entry}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{Entry, Reference}; final class Min implements AggregatingFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/Rank.php b/src/core/etl/src/Flow/ETL/Function/Rank.php index f6cb548a2..bfb1e4d91 100644 --- a/src/core/etl/src/Flow/ETL/Function/Rank.php +++ b/src/core/etl/src/Flow/ETL/Function/Rank.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Function; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use Flow\ETL\{Row, Rows, Window}; final class Rank implements WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/RowNumber.php b/src/core/etl/src/Flow/ETL/Function/RowNumber.php index e33fea7cb..27ebc6294 100644 --- a/src/core/etl/src/Flow/ETL/Function/RowNumber.php +++ b/src/core/etl/src/Flow/ETL/Function/RowNumber.php @@ -5,9 +5,7 @@ namespace Flow\ETL\Function; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use Flow\ETL\{Row, Rows, Window}; final class RowNumber implements WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/StructureSelect.php b/src/core/etl/src/Flow/ETL/Function/StructureSelect.php index 8809b0a36..fb488218a 100644 --- a/src/core/etl/src/Flow/ETL/Function/StructureSelect.php +++ b/src/core/etl/src/Flow/ETL/Function/StructureSelect.php @@ -6,9 +6,7 @@ use Flow\ETL\Row; use Flow\ETL\Row\Entry\StructureEntry; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{EntryReference, Reference, References}; final class StructureSelect implements ScalarFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/Sum.php b/src/core/etl/src/Flow/ETL/Function/Sum.php index 20bcf0581..479c383ce 100644 --- a/src/core/etl/src/Flow/ETL/Function/Sum.php +++ b/src/core/etl/src/Flow/ETL/Function/Sum.php @@ -4,15 +4,10 @@ namespace Flow\ETL\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use function Flow\ETL\DSL\{float_entry, int_entry}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; +use Flow\ETL\Row\{Entry, Reference}; +use Flow\ETL\{Row, Rows, Window}; final class Sum implements AggregatingFunction, WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/Function/ToMoney.php b/src/core/etl/src/Flow/ETL/Function/ToMoney.php index b7475e581..8023788ea 100644 --- a/src/core/etl/src/Flow/ETL/Function/ToMoney.php +++ b/src/core/etl/src/Flow/ETL/Function/ToMoney.php @@ -7,10 +7,8 @@ use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Row; use Money\Currencies\ISOCurrencies; -use Money\Currency; -use Money\Money; -use Money\MoneyParser; use Money\Parser\DecimalMoneyParser; +use Money\{Currency, Money, MoneyParser}; if (!\interface_exists(MoneyParser::class)) { throw new RuntimeException("Money\MoneyParser class not found, please add moneyphp/money dependency to the project first."); diff --git a/src/core/etl/src/Flow/ETL/Function/WindowFunction.php b/src/core/etl/src/Flow/ETL/Function/WindowFunction.php index c229432f1..4d229e17e 100644 --- a/src/core/etl/src/Flow/ETL/Function/WindowFunction.php +++ b/src/core/etl/src/Flow/ETL/Function/WindowFunction.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Function; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Window; +use Flow\ETL\{Row, Rows, Window}; interface WindowFunction { diff --git a/src/core/etl/src/Flow/ETL/GroupBy.php b/src/core/etl/src/Flow/ETL/GroupBy.php index 662f95b33..776046d26 100644 --- a/src/core/etl/src/Flow/ETL/GroupBy.php +++ b/src/core/etl/src/Flow/ETL/GroupBy.php @@ -5,12 +5,9 @@ namespace Flow\ETL; use function Flow\ETL\DSL\array_to_rows; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\Function\AggregatingFunction; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; +use Flow\ETL\Row\{Entry, Reference, References}; final class GroupBy { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php b/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php index d52c91d69..3fbb4ad87 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php @@ -6,8 +6,7 @@ use Flow\ETL\Join\Comparison; use Flow\ETL\Row; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; final class Equal implements Comparison { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php index 313ffedf4..88f558e90 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php @@ -6,8 +6,7 @@ use Flow\ETL\Join\Comparison; use Flow\ETL\Row; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; final class GreaterThan implements Comparison { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php index ba2f39df7..109c8f087 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php @@ -6,8 +6,7 @@ use Flow\ETL\Join\Comparison; use Flow\ETL\Row; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; final class GreaterThanEqual implements Comparison { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php b/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php index 99aeda531..54f2a524e 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php @@ -6,8 +6,7 @@ use Flow\ETL\Join\Comparison; use Flow\ETL\Row; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; final class Identical implements Comparison { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php index 6bb6a9c32..d3038de78 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php @@ -6,8 +6,7 @@ use Flow\ETL\Join\Comparison; use Flow\ETL\Row; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; final class LessThan implements Comparison { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php index e595ccc43..073effdbf 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php @@ -6,8 +6,7 @@ use Flow\ETL\Join\Comparison; use Flow\ETL\Row; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; final class LessThanEqual implements Comparison { diff --git a/src/core/etl/src/Flow/ETL/Join/Expression.php b/src/core/etl/src/Flow/ETL/Join/Expression.php index b6dd4d679..4c01f4a2d 100644 --- a/src/core/etl/src/Flow/ETL/Join/Expression.php +++ b/src/core/etl/src/Flow/ETL/Join/Expression.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Join; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Join\Comparison\All; -use Flow\ETL\Join\Comparison\Identical; +use Flow\ETL\Join\Comparison\{All, Identical}; use Flow\ETL\Row; use Flow\ETL\Row\Reference; diff --git a/src/core/etl/src/Flow/ETL/Loader/BranchingLoader.php b/src/core/etl/src/Flow/ETL/Loader/BranchingLoader.php index 0e1166dac..308889131 100644 --- a/src/core/etl/src/Flow/ETL/Loader/BranchingLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/BranchingLoader.php @@ -4,11 +4,9 @@ namespace Flow\ETL\Loader; -use Flow\ETL\FlowContext; use Flow\ETL\Function\ScalarFunction; -use Flow\ETL\Loader; -use Flow\ETL\Rows; use Flow\ETL\Transformer\ScalarFunctionFilterTransformer; +use Flow\ETL\{FlowContext, Loader, Rows}; final class BranchingLoader implements Closure, Loader, OverridingLoader { diff --git a/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php b/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php index 91740503d..84a47182e 100644 --- a/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Loader; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Rows}; final class CallbackLoader implements Loader { diff --git a/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php b/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php index ba2264ead..89df909c2 100644 --- a/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Loader; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Memory\Memory; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Loader, Rows}; final class MemoryLoader implements Loader { diff --git a/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php b/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php index ac3860ee3..fee310797 100644 --- a/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php @@ -5,11 +5,8 @@ namespace Flow\ETL\Loader; use Flow\ETL\Exception\SchemaValidationException; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; -use Flow\ETL\SchemaValidator; +use Flow\ETL\{FlowContext, Loader, Rows, SchemaValidator}; final class SchemaValidationLoader implements Loader { diff --git a/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php b/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php index 51ac02d9c..85c3bda80 100644 --- a/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php @@ -6,13 +6,10 @@ use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\FlowContext; -use Flow\ETL\Formatter; -use Flow\ETL\Loader; use Flow\ETL\Loader\StreamLoader\Output; use Flow\ETL\Row\Schema\Formatter\ASCIISchemaFormatter; use Flow\ETL\Row\Schema\SchemaFormatter; -use Flow\ETL\Rows; +use Flow\ETL\{FlowContext, Formatter, Loader, Rows}; final class StreamLoader implements Loader { diff --git a/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php b/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php index 0426345e5..7901bfb8d 100644 --- a/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Loader; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Loader, Rows, Transformer}; final class TransformerLoader implements Loader, OverridingLoader { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/ArrayContentDetector.php b/src/core/etl/src/Flow/ETL/PHP/Type/ArrayContentDetector.php index e53b5d3c9..1911e472e 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/ArrayContentDetector.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/ArrayContentDetector.php @@ -4,8 +4,7 @@ namespace Flow\ETL\PHP\Type; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_null; +use function Flow\ETL\DSL\{type_array, type_null}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ScalarType; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/AutoCaster.php b/src/core/etl/src/Flow/ETL/PHP/Type/AutoCaster.php index 99f1abdf4..61218566f 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/AutoCaster.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/AutoCaster.php @@ -4,13 +4,7 @@ namespace Flow\ETL\PHP\Type; -use function Flow\ETL\DSL\get_type; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_uuid; +use function Flow\ETL\DSL\{get_type, type_boolean, type_datetime, type_float, type_integer, type_json, type_uuid}; use Flow\ETL\PHP\Type\Caster\StringCastingHandler\StringTypeChecker; final class AutoCaster diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster.php index c1670226b..29009d244 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster.php @@ -4,34 +4,9 @@ namespace Flow\ETL\PHP\Type; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_null; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\type_xml; +use function Flow\ETL\DSL\{type_array, type_boolean, type_datetime, type_float, type_integer, type_json, type_null, type_string, type_uuid, type_xml}; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\PHP\Type\Caster\ArrayCastingHandler; -use Flow\ETL\PHP\Type\Caster\BooleanCastingHandler; -use Flow\ETL\PHP\Type\Caster\CastingContext; -use Flow\ETL\PHP\Type\Caster\CastingHandler; -use Flow\ETL\PHP\Type\Caster\DateTimeCastingHandler; -use Flow\ETL\PHP\Type\Caster\EnumCastingHandler; -use Flow\ETL\PHP\Type\Caster\FloatCastingHandler; -use Flow\ETL\PHP\Type\Caster\IntegerCastingHandler; -use Flow\ETL\PHP\Type\Caster\JsonCastingHandler; -use Flow\ETL\PHP\Type\Caster\ListCastingHandler; -use Flow\ETL\PHP\Type\Caster\MapCastingHandler; -use Flow\ETL\PHP\Type\Caster\NullCastingHandler; -use Flow\ETL\PHP\Type\Caster\ObjectCastingHandler; -use Flow\ETL\PHP\Type\Caster\StringCastingHandler; -use Flow\ETL\PHP\Type\Caster\StructureCastingHandler; -use Flow\ETL\PHP\Type\Caster\UuidCastingHandler; -use Flow\ETL\PHP\Type\Caster\XMLCastingHandler; +use Flow\ETL\PHP\Type\Caster\{ArrayCastingHandler, BooleanCastingHandler, CastingContext, CastingHandler, DateTimeCastingHandler, EnumCastingHandler, FloatCastingHandler, IntegerCastingHandler, JsonCastingHandler, ListCastingHandler, MapCastingHandler, NullCastingHandler, ObjectCastingHandler, StringCastingHandler, StructureCastingHandler, UuidCastingHandler, XMLCastingHandler}; final class Caster { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ArrayCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ArrayCastingHandler.php index 7ac885ced..05e17c968 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ArrayCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ArrayCastingHandler.php @@ -5,10 +5,9 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Caster\XML\XMLConverter; use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class ArrayCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/BooleanCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/BooleanCastingHandler.php index 3af29cbfe..1d6482df7 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/BooleanCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/BooleanCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\ScalarType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class BooleanCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingContext.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingContext.php index 295512098..7aa33a4c6 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingContext.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingContext.php @@ -5,8 +5,7 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class CastingContext { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingHandler.php index 0bee5a76d..31f8b8a50 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/CastingHandler.php @@ -4,8 +4,7 @@ namespace Flow\ETL\PHP\Type\Caster; -use Flow\ETL\PHP\Type\Caster; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; interface CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/DateTimeCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/DateTimeCastingHandler.php index 5263af97a..38189a327 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/DateTimeCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/DateTimeCastingHandler.php @@ -6,9 +6,8 @@ use function Flow\ETL\DSL\type_datetime; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class DateTimeCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/EnumCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/EnumCastingHandler.php index 44cc721dc..cf806c0a4 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/EnumCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/EnumCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\EnumType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class EnumCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/FloatCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/FloatCastingHandler.php index 48edae6a1..7e3fbec54 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/FloatCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/FloatCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\ScalarType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class FloatCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/IntegerCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/IntegerCastingHandler.php index 59e79ac36..bbece0b14 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/IntegerCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/IntegerCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\ScalarType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class IntegerCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/JsonCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/JsonCastingHandler.php index 4c1a2bf1d..329d1fd3a 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/JsonCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/JsonCastingHandler.php @@ -6,9 +6,8 @@ use function Flow\ETL\DSL\type_json; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\JsonType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class JsonCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ListCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ListCastingHandler.php index e6a049ec6..4ff5ba450 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ListCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ListCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class ListCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/MapCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/MapCastingHandler.php index ce57f70b3..9ffda9ce1 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/MapCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/MapCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class MapCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/NullCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/NullCastingHandler.php index a4e6f8b98..cbdfc78f9 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/NullCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/NullCastingHandler.php @@ -4,9 +4,8 @@ namespace Flow\ETL\PHP\Type\Caster; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\NullType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class NullCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ObjectCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ObjectCastingHandler.php index 57d0c3490..4df5d494d 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ObjectCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/ObjectCastingHandler.php @@ -6,9 +6,8 @@ use function Flow\ETL\DSL\type_object; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class ObjectCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StringCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StringCastingHandler.php index 190017b39..8742f5421 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StringCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StringCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Native\ScalarType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class StringCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StructureCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StructureCastingHandler.php index 0b4c69d1c..79d736032 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StructureCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/StructureCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class StructureCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/UuidCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/UuidCastingHandler.php index 32fb9c635..a25007d86 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/UuidCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/UuidCastingHandler.php @@ -5,9 +5,8 @@ namespace Flow\ETL\PHP\Type\Caster; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; use Flow\ETL\Row\Entry\Type\Uuid; final class UuidCastingHandler implements CastingHandler diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/XMLCastingHandler.php b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/XMLCastingHandler.php index ad2afe3c4..0c5c7e14e 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Caster/XMLCastingHandler.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Caster/XMLCastingHandler.php @@ -4,12 +4,10 @@ namespace Flow\ETL\PHP\Type\Caster; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_xml; +use function Flow\ETL\DSL\{type_string, type_xml}; use Flow\ETL\Exception\CastingException; -use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Type; +use Flow\ETL\PHP\Type\{Caster, Type}; final class XMLCastingHandler implements CastingHandler { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/List/ListElement.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/List/ListElement.php index dcd6d3006..15756b4a7 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/List/ListElement.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/List/ListElement.php @@ -4,22 +4,10 @@ namespace Flow\ETL\PHP\Type\Logical\List; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\type_xml; -use function Flow\ETL\DSL\type_xml_node; +use function Flow\ETL\DSL\{type_boolean, type_datetime, type_float, type_int, type_json, type_object, type_string, type_uuid, type_xml, type_xml_node}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeFactory; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; +use Flow\ETL\PHP\Type\{Type, TypeFactory}; final class ListElement { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapKey.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapKey.php index e0c7bf3e8..61934c493 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapKey.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapKey.php @@ -4,10 +4,7 @@ namespace Flow\ETL\PHP\Type\Logical\Map; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_uuid; +use function Flow\ETL\DSL\{type_datetime, type_int, type_string, type_uuid}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\LogicalType; use Flow\ETL\PHP\Type\Native\ScalarType; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapValue.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapValue.php index c91b005e4..de736e526 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapValue.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Map/MapValue.php @@ -4,19 +4,10 @@ namespace Flow\ETL\PHP\Type\Logical\Map; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_xml; -use function Flow\ETL\DSL\type_xml_node; +use function Flow\ETL\DSL\{type_boolean, type_datetime, type_float, type_int, type_object, type_string, type_xml, type_xml_node}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeFactory; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType}; +use Flow\ETL\PHP\Type\{Type, TypeFactory}; final class MapValue { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php index faca259a0..4e469fb7f 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php @@ -5,8 +5,7 @@ namespace Flow\ETL\PHP\Type\Logical; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Native\NullType; use Flow\ETL\PHP\Type\Type; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Structure/StructureElement.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Structure/StructureElement.php index 6949b9690..5c3c50265 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Structure/StructureElement.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/Structure/StructureElement.php @@ -5,8 +5,7 @@ namespace Flow\ETL\PHP\Type\Logical\Structure; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeFactory; +use Flow\ETL\PHP\Type\{Type, TypeFactory}; final class StructureElement { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/TypeDetector.php b/src/core/etl/src/Flow/ETL/PHP/Type/TypeDetector.php index bddaf7335..b47aac762 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/TypeDetector.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/TypeDetector.php @@ -4,25 +4,12 @@ namespace Flow\ETL\PHP\Type; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_null; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\type_xml; -use function Flow\ETL\DSL\type_xml_node; +use function Flow\ETL\DSL\{type_array, type_boolean, type_datetime, type_float, type_int, type_json, type_null, type_object, type_string, type_uuid, type_xml, type_xml_node}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Native\EnumType; +use Flow\ETL\PHP\Type\Logical\{ListType, StructureType}; +use Flow\ETL\PHP\Type\Native\{ArrayType, EnumType}; final class TypeDetector { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/TypeFactory.php b/src/core/etl/src/Flow/ETL/PHP/Type/TypeFactory.php index fdfba65b1..beed6f4db 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/TypeFactory.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/TypeFactory.php @@ -5,21 +5,8 @@ namespace Flow\ETL\PHP\Type; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\JsonType; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Logical\XMLNodeType; -use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Native\CallableType; -use Flow\ETL\PHP\Type\Native\EnumType; -use Flow\ETL\PHP\Type\Native\NullType; -use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Native\ResourceType; -use Flow\ETL\PHP\Type\Native\ScalarType; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, JsonType, ListType, MapType, StructureType, UuidType, XMLNodeType, XMLType}; +use Flow\ETL\PHP\Type\Native\{ArrayType, CallableType, EnumType, NullType, ObjectType, ResourceType, ScalarType}; final class TypeFactory { diff --git a/src/core/etl/src/Flow/ETL/Partition.php b/src/core/etl/src/Flow/ETL/Partition.php index 5a5d5e483..4463f0b2c 100644 --- a/src/core/etl/src/Flow/ETL/Partition.php +++ b/src/core/etl/src/Flow/ETL/Partition.php @@ -5,18 +5,8 @@ namespace Flow\ETL; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Row\Entry\ArrayEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\JsonEntry; -use Flow\ETL\Row\Entry\ListEntry; -use Flow\ETL\Row\Entry\MapEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\ObjectEntry; -use Flow\ETL\Row\Entry\StructureEntry; -use Flow\ETL\Row\Entry\XMLEntry; -use Flow\ETL\Row\Entry\XMLNodeEntry; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\Entry\{ArrayEntry, DateTimeEntry, JsonEntry, ListEntry, MapEntry, NullEntry, ObjectEntry, StructureEntry, XMLEntry, XMLNodeEntry}; +use Flow\ETL\Row\{EntryReference, Reference}; final class Partition { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/BatchingPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/BatchingPipeline.php index 1978c138b..a81b07dd4 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/BatchingPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/BatchingPipeline.php @@ -4,14 +4,9 @@ namespace Flow\ETL\Pipeline; -use function Flow\ETL\DSL\chunks_from; -use function Flow\ETL\DSL\from_pipeline; +use function Flow\ETL\DSL\{chunks_from, from_pipeline}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Pipeline, Transformer}; final class BatchingPipeline implements OverridingPipeline, Pipeline { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/CachingPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/CachingPipeline.php index 3589bd29f..d4b538055 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/CachingPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/CachingPipeline.php @@ -5,11 +5,7 @@ namespace Flow\ETL\Pipeline; use function Flow\ETL\DSL\from_rows; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Pipeline, Transformer}; final class CachingPipeline implements OverridingPipeline, Pipeline { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/CollectingPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/CollectingPipeline.php index 3716c2148..6f249ad9b 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/CollectingPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/CollectingPipeline.php @@ -6,12 +6,7 @@ use function Flow\ETL\DSL\from_rows; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Pipeline, Rows, Transformer}; /** * @internal diff --git a/src/core/etl/src/Flow/ETL/Pipeline/GroupByPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/GroupByPipeline.php index 322ea9216..89b090d35 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/GroupByPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/GroupByPipeline.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Pipeline; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\GroupBy; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, GroupBy, Loader, Pipeline, Transformer}; final class GroupByPipeline implements OverridingPipeline, Pipeline { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/NestedPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/NestedPipeline.php index d168ce0af..affe1809d 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/NestedPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/NestedPipeline.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Pipeline; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Pipeline, Transformer}; final class NestedPipeline implements OverridingPipeline, Pipeline { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer.php b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer.php index ed3dc7440..d7a29723a 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Pipeline; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; use Flow\ETL\Pipeline\Optimizer\Optimization; -use Flow\ETL\Transformer; +use Flow\ETL\{Loader, Pipeline, Transformer}; final class Optimizer { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/BatchSizeOptimization.php b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/BatchSizeOptimization.php index c5669e56f..bd3ac8ce8 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/BatchSizeOptimization.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/BatchSizeOptimization.php @@ -4,13 +4,8 @@ namespace Flow\ETL\Pipeline\Optimizer; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Pipeline\BatchingPipeline; -use Flow\ETL\Pipeline\CollectingPipeline; -use Flow\ETL\Pipeline\OverridingPipeline; -use Flow\ETL\Pipeline\PartitioningPipeline; -use Flow\ETL\Transformer; +use Flow\ETL\Pipeline\{BatchingPipeline, CollectingPipeline, OverridingPipeline, PartitioningPipeline}; +use Flow\ETL\{Loader, Pipeline, Transformer}; /** * The goal of this optimizer is to detect if there is a loader that supports batching and optimize pipeline to use it. diff --git a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/LimitOptimization.php b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/LimitOptimization.php index 9c82d67d4..5644a4b1f 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/LimitOptimization.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/LimitOptimization.php @@ -6,23 +6,9 @@ use Flow\ETL\Extractor\LimitableExtractor; use Flow\ETL\Function\ScalarFunction\ExpandResults; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Pipeline\BatchingPipeline; -use Flow\ETL\Pipeline\CollectingPipeline; -use Flow\ETL\Pipeline\NestedPipeline; -use Flow\ETL\Pipeline\SynchronousPipeline; -use Flow\ETL\Pipeline\VoidPipeline; -use Flow\ETL\Transformer; -use Flow\ETL\Transformer\CallbackRowTransformer; -use Flow\ETL\Transformer\EntryNameStyleConverterTransformer; -use Flow\ETL\Transformer\KeepEntriesTransformer; -use Flow\ETL\Transformer\LimitTransformer; -use Flow\ETL\Transformer\RemoveEntriesTransformer; -use Flow\ETL\Transformer\RenameAllCaseTransformer; -use Flow\ETL\Transformer\RenameEntryTransformer; -use Flow\ETL\Transformer\RenameStrReplaceAllEntriesTransformer; -use Flow\ETL\Transformer\ScalarFunctionTransformer; +use Flow\ETL\Pipeline\{BatchingPipeline, CollectingPipeline, NestedPipeline, SynchronousPipeline, VoidPipeline}; +use Flow\ETL\Transformer\{CallbackRowTransformer, EntryNameStyleConverterTransformer, KeepEntriesTransformer, LimitTransformer, RemoveEntriesTransformer, RenameAllCaseTransformer, RenameEntryTransformer, RenameStrReplaceAllEntriesTransformer, ScalarFunctionTransformer}; +use Flow\ETL\{Loader, Pipeline, Transformer}; final class LimitOptimization implements Optimization { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/Optimization.php b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/Optimization.php index 851221356..b1edd761f 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/Optimization.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/Optimizer/Optimization.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Pipeline\Optimizer; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Transformer; +use Flow\ETL\{Loader, Pipeline, Transformer}; interface Optimization { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/PartitioningPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/PartitioningPipeline.php index 636a8300c..c8ed9a11e 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/PartitioningPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/PartitioningPipeline.php @@ -4,17 +4,11 @@ namespace Flow\ETL\Pipeline; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\from_cache; +use function Flow\ETL\DSL\{from_all, from_cache}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; use Flow\ETL\Extractor\CollectingExtractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Partition; -use Flow\ETL\Pipeline; use Flow\ETL\Row\Reference; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Partition, Pipeline, Transformer}; final class PartitioningPipeline implements OverridingPipeline, Pipeline { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php b/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php index 629fc1ec0..10b3c1ee0 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Pipeline; -use Flow\ETL\Loader; -use Flow\ETL\Transformer; +use Flow\ETL\{Loader, Transformer}; final class Pipes { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/SynchronousPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/SynchronousPipeline.php index 429e9651e..5551beb42 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/SynchronousPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/SynchronousPipeline.php @@ -6,14 +6,9 @@ use function Flow\ETL\DSL\from_rows; use Flow\ETL\Exception\LimitReachedException; -use Flow\ETL\Extractor; use Flow\ETL\Extractor\Signal; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\Pipeline; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Pipeline, Rows, Transformer}; final class SynchronousPipeline implements Pipeline { diff --git a/src/core/etl/src/Flow/ETL/Pipeline/VoidPipeline.php b/src/core/etl/src/Flow/ETL/Pipeline/VoidPipeline.php index 29e688075..6349526b8 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/VoidPipeline.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/VoidPipeline.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Pipeline; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{Extractor, FlowContext, Loader, Pipeline, Rows, Transformer}; final class VoidPipeline implements OverridingPipeline, Pipeline { diff --git a/src/core/etl/src/Flow/ETL/PipelineFactory.php b/src/core/etl/src/Flow/ETL/PipelineFactory.php index 03b81c2e4..b61073707 100644 --- a/src/core/etl/src/Flow/ETL/PipelineFactory.php +++ b/src/core/etl/src/Flow/ETL/PipelineFactory.php @@ -4,8 +4,7 @@ namespace Flow\ETL; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\InvalidFileFormatException; +use Flow\ETL\Exception\{InvalidArgumentException, InvalidFileFormatException}; final class PipelineFactory { diff --git a/src/core/etl/src/Flow/ETL/Row.php b/src/core/etl/src/Flow/ETL/Row.php index 04906e505..fbbd1aaf1 100644 --- a/src/core/etl/src/Flow/ETL/Row.php +++ b/src/core/etl/src/Flow/ETL/Row.php @@ -5,11 +5,7 @@ namespace Flow\ETL; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Row\Entries; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Row\Schema; +use Flow\ETL\Row\{Entries, Entry, Reference, References, Schema}; final class Row { diff --git a/src/core/etl/src/Flow/ETL/Row/Entries.php b/src/core/etl/src/Flow/ETL/Row/Entries.php index 9e7941b16..8034b2dd1 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entries.php +++ b/src/core/etl/src/Flow/ETL/Row/Entries.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Row; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\InvalidLogicException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, InvalidLogicException, RuntimeException}; /** * @implements \ArrayAccess diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php index 99275dc25..4c9b1fce9 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php @@ -9,9 +9,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ArrayType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php index 282660767..f9c0e6406 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ScalarType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php index b63a1470d..627634573 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\DateTimeType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry<\DateTimeInterface> diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/EntryRef.php b/src/core/etl/src/Flow/ETL/Row/Entry/EntryRef.php index 9045bf233..6b2b69e50 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/EntryRef.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/EntryRef.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Row\Entry; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\Row\{EntryReference, Reference}; trait EntryRef { diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php index d89cb8d08..94cd87212 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php @@ -6,9 +6,8 @@ use Flow\ETL\PHP\Type\Native\EnumType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry<\UnitEnum> diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php index e7c1697d0..b1ded4205 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ScalarType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php index 511c4fb1b..f4dce77e0 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ScalarType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php index 0c34f3857..4cd7f482a 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php @@ -9,9 +9,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\JsonType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php index 46fd47800..9e42561d0 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php @@ -7,11 +7,9 @@ use Flow\ArrayComparison\ArrayComparison; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeDetector; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\PHP\Type\{Type, TypeDetector}; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @template T diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php index dd01d82f9..4796a73c6 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php @@ -7,11 +7,9 @@ use Flow\ArrayComparison\ArrayComparison; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeDetector; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\PHP\Type\{Type, TypeDetector}; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @template T diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php index f82a6a495..abb2602ac 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php @@ -7,9 +7,8 @@ use function Flow\ETL\DSL\type_null; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php index e5cbcdc14..8aa793a8e 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ObjectType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php index 20df3d200..c8bd4a942 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Native\ScalarType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php index 13b6a1911..1592e88e6 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php @@ -7,11 +7,9 @@ use Flow\ArrayComparison\ArrayComparison; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeDetector; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; +use Flow\ETL\PHP\Type\{Type, TypeDetector}; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry> diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/Type/Uuid.php b/src/core/etl/src/Flow/ETL/Row/Entry/Type/Uuid.php index 841c3bab1..3fd13f37a 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/Type/Uuid.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/Type/Uuid.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Row\Entry\Type; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; final class Uuid implements \Stringable { diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php index 6b955f87f..bedefd2d1 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\UuidType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php index 1d85dfc0d..459a4cfa3 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php @@ -8,9 +8,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\XMLType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry<\DOMDocument> diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php index 4faffbb50..a07b0566d 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php @@ -7,9 +7,8 @@ use function Flow\ETL\DSL\type_xml_node; use Flow\ETL\PHP\Type\Logical\XMLNodeType; use Flow\ETL\PHP\Type\Type; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Definition; +use Flow\ETL\Row\{Entry, Reference}; /** * @implements Entry<\DOMNode> diff --git a/src/core/etl/src/Flow/ETL/Row/EntryFactory.php b/src/core/etl/src/Flow/ETL/Row/EntryFactory.php index 1ddd15e75..b893aca87 100644 --- a/src/core/etl/src/Flow/ETL/Row/EntryFactory.php +++ b/src/core/etl/src/Flow/ETL/Row/EntryFactory.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Row; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Exception\SchemaDefinitionNotFoundException; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException, SchemaDefinitionNotFoundException}; interface EntryFactory { diff --git a/src/core/etl/src/Flow/ETL/Row/EntryReference.php b/src/core/etl/src/Flow/ETL/Row/EntryReference.php index 31161ca1e..0e0765c67 100644 --- a/src/core/etl/src/Flow/ETL/Row/EntryReference.php +++ b/src/core/etl/src/Flow/ETL/Row/EntryReference.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Row; -use Flow\ETL\Function\ListFunctions; -use Flow\ETL\Function\ScalarFunctionChain; -use Flow\ETL\Function\StructureFunctions; +use Flow\ETL\Function\{ListFunctions, ScalarFunctionChain, StructureFunctions}; use Flow\ETL\Row; final class EntryReference extends ScalarFunctionChain implements Reference diff --git a/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php b/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php index 84e5e45af..3d6710c37 100644 --- a/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php +++ b/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php @@ -4,44 +4,13 @@ namespace Flow\ETL\Row\Factory; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\enum_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\json_entry; -use function Flow\ETL\DSL\json_object_entry; -use function Flow\ETL\DSL\map_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\obj_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\uuid_entry; -use function Flow\ETL\DSL\xml_entry; -use function Flow\ETL\DSL\xml_node_entry; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\Exception\SchemaDefinitionNotFoundException; -use Flow\ETL\PHP\Type\Caster; +use function Flow\ETL\DSL\{array_entry, bool_entry, datetime_entry, enum_entry, float_entry, int_entry, json_entry, json_object_entry, map_entry, null_entry, obj_entry, object_entry, str_entry, struct_entry, uuid_entry, xml_entry, xml_node_entry}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException, SchemaDefinitionNotFoundException}; use Flow\ETL\PHP\Type\Caster\StringCastingHandler\StringTypeChecker; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\JsonType; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Logical\XMLNodeType; -use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Native\EnumType; -use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Native\ScalarType; -use Flow\ETL\PHP\Type\TypeDetector; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\EntryFactory; -use Flow\ETL\Row\Schema; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, JsonType, ListType, MapType, StructureType, UuidType, XMLNodeType, XMLType}; +use Flow\ETL\PHP\Type\Native\{ArrayType, EnumType, ObjectType, ScalarType}; +use Flow\ETL\PHP\Type\{Caster, TypeDetector}; +use Flow\ETL\Row\{Entry, EntryFactory, Schema}; use Ramsey\Uuid\UuidInterface; use Symfony\Component\Uid\Uuid; diff --git a/src/core/etl/src/Flow/ETL/Row/Schema.php b/src/core/etl/src/Flow/ETL/Row/Schema.php index 6d755e0ad..c4f63536b 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Row; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\SchemaDefinitionNotFoundException; -use Flow\ETL\Exception\SchemaDefinitionNotUniqueException; +use Flow\ETL\Exception\{InvalidArgumentException, SchemaDefinitionNotFoundException, SchemaDefinitionNotUniqueException}; use Flow\ETL\Row\Schema\Definition; final class Schema implements \Countable diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php b/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php index b4001ed6b..30203add1 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php @@ -4,46 +4,13 @@ namespace Flow\ETL\Row\Schema; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_enum; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_null; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\type_xml; -use function Flow\ETL\DSL\type_xml_node; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\MapType; -use Flow\ETL\PHP\Type\Logical\StructureType; +use function Flow\ETL\DSL\{type_array, type_boolean, type_datetime, type_enum, type_float, type_int, type_json, type_list, type_null, type_string, type_uuid, type_xml, type_xml_node}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Type; -use Flow\ETL\PHP\Type\TypeFactory; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Entry\ArrayEntry; -use Flow\ETL\Row\Entry\BooleanEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\EnumEntry; -use Flow\ETL\Row\Entry\FloatEntry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\JsonEntry; -use Flow\ETL\Row\Entry\ListEntry; -use Flow\ETL\Row\Entry\MapEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\ObjectEntry; -use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Row\Entry\StructureEntry; -use Flow\ETL\Row\Entry\UuidEntry; -use Flow\ETL\Row\Entry\XMLEntry; -use Flow\ETL\Row\Entry\XMLNodeEntry; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Reference; +use Flow\ETL\PHP\Type\{Type, TypeFactory}; +use Flow\ETL\Row\Entry\{ArrayEntry, BooleanEntry, DateTimeEntry, EnumEntry, FloatEntry, IntegerEntry, JsonEntry, ListEntry, MapEntry, NullEntry, ObjectEntry, StringEntry, StructureEntry, UuidEntry, XMLEntry, XMLNodeEntry}; +use Flow\ETL\Row\{Entry, EntryReference, Reference}; final class Definition { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php b/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php index 61bf09d7f..d97f5cb98 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php @@ -6,8 +6,7 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; -use Flow\ETL\SchemaValidator; +use Flow\ETL\{Rows, SchemaValidator}; /** * Matches only entries defined in the schema, ignoring every other entries in the row. diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php b/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php index 57978224b..50e79122b 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Row\Schema; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; -use Flow\ETL\SchemaValidator; +use Flow\ETL\{Rows, SchemaValidator}; /** * Matches all entries in the schema, if row comes with any extra entry it will fail validation. diff --git a/src/core/etl/src/Flow/ETL/Rows.php b/src/core/etl/src/Flow/ETL/Rows.php index 6c90f8626..282afc371 100644 --- a/src/core/etl/src/Flow/ETL/Rows.php +++ b/src/core/etl/src/Flow/ETL/Rows.php @@ -4,22 +4,14 @@ namespace Flow\ETL; -use function Flow\ETL\DSL\array_to_rows; -use function Flow\ETL\DSL\null_entry; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use function Flow\ETL\DSL\{array_to_rows, null_entry}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\Join\Expression; use Flow\ETL\Partition\CartesianProduct; -use Flow\ETL\Row\Comparator; use Flow\ETL\Row\Comparator\NativeComparator; -use Flow\ETL\Row\Entries; use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\EntryFactory; use Flow\ETL\Row\Factory\NativeEntryFactory; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Row\Schema; -use Flow\ETL\Row\SortOrder; +use Flow\ETL\Row\{Comparator, Entries, EntryFactory, Reference, References, Schema, SortOrder}; /** * @implements \ArrayAccess diff --git a/src/core/etl/src/Flow/ETL/Transformer/AutoCastTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/AutoCastTransformer.php index 825a5b597..e39230ca9 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/AutoCastTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/AutoCastTransformer.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; use Flow\ETL\PHP\Type\AutoCaster; -use Flow\ETL\Row; use Flow\ETL\Row\Entry; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class AutoCastTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php index 30132976b..8f6fc75a0 100755 --- a/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class CallbackRowTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php index df023ad90..bede453a7 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\DataFrame; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{DataFrame, FlowContext, Rows, Transformer}; final class CrossJoinRowsTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php index c28d91305..d996efa92 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php @@ -5,11 +5,9 @@ namespace Flow\ETL\Transformer; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\FlowContext; use Flow\ETL\Row\Reference; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; use Flow\ETL\Transformer\DropDuplicates\Hashes; +use Flow\ETL\{FlowContext, Rows, Transformer}; final class DropDuplicatesTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/DropPartitionsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/DropPartitionsTransformer.php index dc69891c0..52ee75592 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/DropPartitionsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/DropPartitionsTransformer.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Rows, Transformer}; final class DropPartitionsTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php index 8fb994b09..3a42b3d1b 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php @@ -5,12 +5,9 @@ namespace Flow\ETL\Transformer; use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; use Flow\ETL\Row\Entry; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; use Flow\ETL\Transformer\StyleConverter\StringStyles; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; use Jawira\CaseConverter\Convert; final class EntryNameStyleConverterTransformer implements Transformer diff --git a/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php index 2c976a0e2..a495508e0 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; use Flow\ETL\Row\Entry; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class GroupToArrayTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php index 741145471..e1815e1bb 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\DataFrameFactory; -use Flow\ETL\FlowContext; -use Flow\ETL\Join\Expression; -use Flow\ETL\Join\Join; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\Join\{Expression, Join}; +use Flow\ETL\{DataFrameFactory, FlowContext, Rows, Transformer}; final class JoinEachRowsTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php index 07fa30bbf..d290e6f3d 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\DataFrame; -use Flow\ETL\FlowContext; -use Flow\ETL\Join\Expression; -use Flow\ETL\Join\Join; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\Join\{Expression, Join}; +use Flow\ETL\{DataFrame, FlowContext, Rows, Transformer}; final class JoinRowsTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php index f8811598c..ef1a7a204 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php @@ -5,13 +5,8 @@ namespace Flow\ETL\Transformer; use function Flow\ETL\DSL\null_entry; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\Row\{Entry, Reference, References}; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class KeepEntriesTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php index dddcc38a8..6804d2c48 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\LimitReachedException; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\Exception\{InvalidArgumentException, LimitReachedException}; +use Flow\ETL\{FlowContext, Rows, Transformer}; final class LimitTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php index 040c27850..c585edeac 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Row\Reference; -use Flow\ETL\Row\References; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\Row\{Reference, References}; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class RemoveEntriesTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php index b7ca1ce31..634bfec3a 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class RenameAllCaseTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php index 9e7af1501..61bb4463f 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class RenameEntryTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php index d1e4cb631..0b51c4320 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class RenameStrReplaceAllEntriesTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php index d7d01db94..bf24def99 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; use Flow\ETL\Function\ScalarFunction; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class ScalarFunctionFilterTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php index 4889f8cd9..8b919f6cb 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\FlowContext; use Flow\ETL\Function\ScalarFunction; use Flow\ETL\Function\ScalarFunction\ExpandResults; -use Flow\ETL\Row; use Flow\ETL\Row\Entries; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class ScalarFunctionTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php index dbe18cf19..6a3ac3d47 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php @@ -5,10 +5,8 @@ namespace Flow\ETL\Transformer; use Flow\ETL\Exception\LimitReachedException; -use Flow\ETL\FlowContext; use Flow\ETL\Function\ScalarFunction; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Rows, Transformer}; final class UntilTransformer implements Transformer { diff --git a/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php index 4ea29fb3a..17ba7ed91 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\FlowContext; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\Function\WindowFunction; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Rows, Transformer}; final class WindowFunctionTransformer implements Transformer { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/EntryFactory/NativeEntryFactoryBench.php b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/EntryFactory/NativeEntryFactoryBench.php index 9638d5081..257fa2bf8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/EntryFactory/NativeEntryFactoryBench.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/EntryFactory/NativeEntryFactoryBench.php @@ -6,8 +6,7 @@ use function Flow\ETL\DSL\array_to_rows; use Flow\ETL\Row\Factory\NativeEntryFactory; -use PhpBench\Attributes\Groups; -use PhpBench\Attributes\ParamProviders; +use PhpBench\Attributes\{Groups, ParamProviders}; #[Groups(['building_blocks'])] final class NativeEntryFactoryBench diff --git a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/RowsBench.php b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/RowsBench.php index 64342c664..9bd261d29 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/RowsBench.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/RowsBench.php @@ -5,12 +5,9 @@ namespace Flow\ETL\Tests\Benchmark; use function Flow\ETL\DSL\ref; -use Flow\ETL\Row; use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Rows; -use PhpBench\Attributes\BeforeMethods; -use PhpBench\Attributes\Groups; -use PhpBench\Attributes\Revs; +use Flow\ETL\{Row, Rows}; +use PhpBench\Attributes\{BeforeMethods, Groups, Revs}; #[BeforeMethods('setUp')] #[Revs(2)] diff --git a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/Transformer/RenameEntryTransformerBench.php b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/Transformer/RenameEntryTransformerBench.php index 66e8da182..fae2c4023 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/Transformer/RenameEntryTransformerBench.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/Transformer/RenameEntryTransformerBench.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Tests\Benchmark\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; use Flow\ETL\Transformer\RenameEntryTransformer; -use PhpBench\Attributes\BeforeMethods; -use PhpBench\Attributes\Groups; +use Flow\ETL\{Config, FlowContext, Rows}; +use PhpBench\Attributes\{BeforeMethods, Groups}; #[BeforeMethods('setUp')] #[Groups(['transformer'])] diff --git a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/TypeDetectorBench.php b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/TypeDetectorBench.php index abc9e7106..f1c7ed20f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Benchmark/TypeDetectorBench.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Benchmark/TypeDetectorBench.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Benchmark; use function Flow\ETL\DSL\get_type; -use PhpBench\Attributes\Groups; -use PhpBench\Attributes\ParamProviders; +use PhpBench\Attributes\{Groups, ParamProviders}; #[Groups(['building_blocks'])] final class TypeDetectorBench diff --git a/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php b/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php index 43fd352a6..ae9d53007 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Tests\Double; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{FlowContext, Row, Rows, Transformer}; final class AddStampToStringEntryTransformer implements Transformer { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php b/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php index 0aa3e2637..17edb53ec 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Double; -use Flow\ETL\Cache; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, Rows}; final class CacheSpy implements Cache { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Double/EmptyExtractor.php b/src/core/etl/tests/Flow/ETL/Tests/Double/EmptyExtractor.php index 728538645..10dcb204b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Double/EmptyExtractor.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Double/EmptyExtractor.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Double; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use Flow\ETL\{Extractor, FlowContext, Rows}; final class EmptyExtractor implements Extractor { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Double/FakeExtractor.php b/src/core/etl/tests/Flow/ETL/Tests/Double/FakeExtractor.php index be8a8e92e..ac9513ab0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Double/FakeExtractor.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Double/FakeExtractor.php @@ -4,32 +4,9 @@ namespace Flow\ETL\Tests\Double; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\enum_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\json_entry; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\map_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\uuid_entry; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{array_entry, bool_entry, datetime_entry, enum_entry, float_entry, int_entry, json_entry, list_entry, map_entry, null_entry, object_entry, row, rows, struct_element, struct_entry, struct_type, type_datetime, type_float, type_int, type_list, type_map, type_string, uuid_entry}; use Flow\ETL\Tests\Fixtures\Enum\BackedStringEnum; +use Flow\ETL\{Extractor, FlowContext}; use Ramsey\Uuid\Uuid; final class FakeExtractor implements Extractor diff --git a/src/core/etl/tests/Flow/ETL/Tests/Fixtures/with-dataframe.php b/src/core/etl/tests/Flow/ETL/Tests/Fixtures/with-dataframe.php index 7d7f73768..ca2e374f9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Fixtures/with-dataframe.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Fixtures/with-dataframe.php @@ -3,9 +3,7 @@ declare(strict_types=1); use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Flow; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Flow, Row, Rows}; return (new Flow())->process( new Rows( diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php index 724173c7c..3095642fd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php @@ -5,12 +5,10 @@ namespace Flow\ETL\Tests\Integration\Cache; use Flow\ETL\Cache\LocalFilesystemCache; -use Flow\ETL\Row; use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Rows; use Flow\ETL\Tests\Integration\IntegrationTestCase; -use Flow\Serializer\CompressingSerializer; -use Flow\Serializer\NativePHPSerializer; +use Flow\ETL\{Row, Rows}; +use Flow\Serializer\{CompressingSerializer, NativePHPSerializer}; final class LocalFilesystemCacheTest extends IntegrationTestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php index 1065084d7..2ee29bcdd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php @@ -6,9 +6,8 @@ use function Flow\ETL\DSL\int_entry; use Flow\ETL\Cache\PSRSimpleCache; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Tests\Integration\IntegrationTestCase; +use Flow\ETL\{Row, Rows}; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Psr16Cache; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php index 241ced742..06933cadc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php @@ -5,13 +5,7 @@ namespace Flow\ETL\Tests\Integration\DataFrame; use function Flow\ETL\Adapter\Text\from_text; -use function Flow\ETL\DSL\datetime_schema; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\float_schema; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\int_schema; -use function Flow\ETL\DSL\schema; -use function Flow\ETL\DSL\str_schema; +use function Flow\ETL\DSL\{datetime_schema, df, float_schema, from_array, int_schema, schema, str_schema}; use Flow\ETL\Tests\Integration\IntegrationTestCase; final class AnalyzeTest extends IntegrationTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php index e406fe03c..30a94467f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_branch; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{df, from_array, lit, ref, to_branch, to_memory}; use Flow\ETL\Memory\ArrayMemory; use Flow\ETL\Tests\Integration\IntegrationTestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php index 95ca95d54..10c672f49 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\config_builder; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_cache; +use function Flow\ETL\DSL\{config_builder, df, from_cache}; use Flow\ETL\Cache\PSRSimpleCache; use Flow\ETL\Config; use Flow\ETL\Tests\Double\FakeExtractor; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php index 582ab4be0..087bcfd06 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php @@ -4,37 +4,10 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\enum_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\map_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\string_entry; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\xml_entry; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{array_entry, bool_entry, datetime_entry, df, enum_entry, float_entry, from_array, from_rows, int_entry, list_entry, map_entry, null_entry, object_entry, ref, row, rows, str_entry, string_entry, struct_element, struct_entry, struct_type, type_int, type_list, type_map, type_string, xml_entry}; use Flow\ETL\Tests\Fixtures\Enum\BackedStringEnum; use Flow\ETL\Tests\Integration\IntegrationTestCase; +use Flow\ETL\{Extractor, FlowContext, Rows}; final class DisplayTest extends IntegrationTestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php index af70684e2..87aaf59e3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php @@ -4,29 +4,10 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\average; -use function Flow\ETL\DSL\count; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\from_memory; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\integer_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\max; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\rank; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\sum; -use function Flow\ETL\DSL\window; -use Flow\ETL\Loader; +use function Flow\ETL\DSL\{average, count, df, float_entry, from_all, from_array, from_memory, from_rows, int_entry, integer_entry, lit, max, null_entry, rank, ref, str_entry, sum, window}; use Flow\ETL\Memory\ArrayMemory; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Tests\Integration\IntegrationTestCase; +use Flow\ETL\{Loader, Row, Rows}; use Ramsey\Uuid\Uuid; final class GroupByTest extends IntegrationTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php index fd3eb29a5..d027c2f2d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php @@ -4,20 +4,10 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\string_entry; -use Flow\ETL\DataFrame; -use Flow\ETL\DataFrameFactory; -use Flow\ETL\Flow; +use function Flow\ETL\DSL\{bool_entry, df, from_rows, int_entry, str_entry, string_entry}; use Flow\ETL\Join\Expression; -use Flow\ETL\Loader; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Tests\Integration\IntegrationTestCase; +use Flow\ETL\{DataFrame, DataFrameFactory, Flow, Loader, Row, Rows}; final class JoinTest extends IntegrationTestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php index df707fb01..34b27a684 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php @@ -4,18 +4,11 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{df, from_array, from_rows, ref}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry\ArrayEntry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Rows; +use Flow\ETL\Row\Entry\{ArrayEntry, IntegerEntry}; use Flow\ETL\Tests\Integration\IntegrationTestCase; +use Flow\ETL\{Extractor, FlowContext, Row, Rows}; final class LimitTest extends IntegrationTestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php index e17ebf498..ef7350450 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php @@ -5,20 +5,9 @@ namespace Flow\ETL\Tests\Integration\DataFrame; use function Flow\ETL\Adapter\Text\from_text; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\partition; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\rows_partitioned; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Partition; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{df, from_array, from_rows, int_entry, lit, partition, ref, row, rows, rows_partitioned, str_entry}; use Flow\ETL\Tests\Integration\IntegrationTestCase; +use Flow\ETL\{Partition, Rows}; final class PartitioningTest extends IntegrationTestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php index b618a9985..c10479ff0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php @@ -4,18 +4,10 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{array_entry, bool_entry, df, from_rows, int_entry, null_entry, ref, str_entry}; use Flow\ETL\Tests\Integration\IntegrationTestCase; use Flow\ETL\Transformer\StyleConverter\StringStyles; +use Flow\ETL\{Row, Rows}; final class RenameTest extends IntegrationTestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php index e69f8e174..1e1cf5ada 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php @@ -4,13 +4,7 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\array_to_rows; -use function Flow\ETL\DSL\bool_schema; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_schema; -use function Flow\ETL\DSL\schema; -use function Flow\ETL\DSL\str_schema; +use function Flow\ETL\DSL\{array_to_rows, bool_schema, df, from_rows, int_schema, schema, str_schema}; use Flow\ETL\Tests\Integration\IntegrationTestCase; final class SchemaTest extends IntegrationTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php index 45a8d3c68..91a9a2c88 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php @@ -4,13 +4,11 @@ namespace Flow\ETL\Tests\Integration\DataFrame; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{df, ref}; use Flow\ETL\Config; use Flow\ETL\ExternalSort\MemorySort; use Flow\ETL\Monitoring\Memory\Unit; -use Flow\ETL\Tests\Double\CacheSpy; -use Flow\ETL\Tests\Double\FakeExtractor; +use Flow\ETL\Tests\Double\{CacheSpy, FakeExtractor}; use Flow\ETL\Tests\Integration\IntegrationTestCase; final class SortTest extends IntegrationTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php index 7f63c20ce..d0ccfebfb 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\NotPartitioned; use function Flow\ETL\DSL\append; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{FilesystemStreams, Path}; use Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\FilesystemStreamsTestCase; final class AppendModeTest extends FilesystemStreamsTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php index c88d48594..13308c0c5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\NotPartitioned; use function Flow\ETL\DSL\overwrite; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{FilesystemStreams, Path}; use Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\FilesystemStreamsTestCase; final class OverwriteModeTest extends FilesystemStreamsTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php index 98f80c260..2a555fa0c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\Partitioned; use function Flow\ETL\DSL\append; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{FilesystemStreams, Path}; use Flow\ETL\Partition; use Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\FilesystemStreamsTestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php index b995dd766..51f657787 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\Partitioned; use function Flow\ETL\DSL\exception_if_exists; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{FilesystemStreams, Path}; use Flow\ETL\Partition; use Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\FilesystemStreamsTestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php index d9ace0e12..aee0d8d60 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\Partitioned; use function Flow\ETL\DSL\ignore; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{FilesystemStreams, Path}; use Flow\ETL\Partition; use Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\FilesystemStreamsTestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php index cb001a3c5..3e00781e2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\Partitioned; use function Flow\ETL\DSL\overwrite; -use Flow\ETL\Filesystem\FilesystemStreams; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{FilesystemStreams, Path}; use Flow\ETL\Partition; use Flow\ETL\Tests\Integration\Filesystem\FilesystemStreams\FilesystemStreamsTestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php index d047db0fd..e991b20c7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php @@ -4,14 +4,10 @@ namespace Flow\ETL\Tests\Integration\Filesystem; -use function Flow\ETL\DSL\all; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use Flow\ETL\Filesystem\LocalFilesystem; -use Flow\ETL\Filesystem\Path; +use function Flow\ETL\DSL\{all, lit, ref}; use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\Partition\NoopFilter; -use Flow\ETL\Partition\ScalarFunctionFilter; +use Flow\ETL\Filesystem\{LocalFilesystem, Path}; +use Flow\ETL\Partition\{NoopFilter, ScalarFunctionFilter}; use Flow\ETL\Row\Factory\NativeEntryFactory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php index 6e2a75209..0a039b28d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php index c50a382ca..3c11ebc10 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php index 62bfd1f71..ab5b37c61 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\all; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{all, from_array, lit, ref, to_memory, when}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php index c15b49b81..bfe10aa50 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\any; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{any, from_array, lit, ref, to_memory, when}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php index b4c85670f..228563d01 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_exists; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_exists, from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php index cb97d0298..961a4726e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_expand; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_expand, from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Function\ArrayExpand\ArrayExpand; use Flow\ETL\Memory\ArrayMemory; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php index bc1623772..ff86feb00 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php index a09c600bc..1733ae084 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php index 48a8ad5f5..2f90ed4f3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_key_rename; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\optional; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_key_rename, from_array, optional, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php index 7dadb7383..f4578b997 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_keys_style_convert; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_keys_style_convert, from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php index a4be92a52..74d81855c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\optional; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, optional, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php index 8ec2c060f..66b82fea0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_merge; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\optional; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_merge, from_array, optional, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php index 587144268..2ab88221f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\optional; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, optional, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php index 7c7bfefca..6c0c601b2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_sort; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\optional; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_sort, from_array, optional, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php index 3ca8ad06f..740910710 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php index 27650db5f..f8dbd9b38 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{df, from_array, lit, ref, to_memory}; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php index b8e7a2849..59e9e1afc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory, when}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use Flow\ETL\Row\Entry\StringEntry; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php index 71c02213f..bd29b44da 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php index f163b14f2..0dc82e8f9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{df, from_array, ref, to_memory}; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php index 485e9e02d..ff3509cdd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\combine; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\optional; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{combine, from_array, optional, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php index 1e1952970..d6d6b1961 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\array_get; -use function Flow\ETL\DSL\concat; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{array_get, concat, from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php index 6c7c7b9f8..0f90dd4b3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php index 9f40a29b5..42de6ce37 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php index c30ccf5ed..04c20b89e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php index feb8fbadf..93959e2a9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php index 5093e82f5..d375f565b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php index ee3bc4330..1e7c64a58 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php index 98262a5cc..26cba8376 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\list_ref; +use function Flow\ETL\DSL\{df, from_array, list_ref}; use PHPUnit\Framework\TestCase; final class ListSelectTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php index 1005863c7..13fecd7e7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\not; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{from_array, lit, not, ref, to_memory, when}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php index a6f8ec996..df68cad8e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php index 81bf778d1..c78fb32b8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php index 18a1ac98d..d1b9bceea 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php index 5d10497d8..0d7524af9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php index 80bf392d5..7752895f6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php index 9c9a41da0..89f09cc94 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\split; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, split, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php index 4f741c588..9d598195c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php index 950002b9f..1446c0f1e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, lit, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php index 5e69a8654..2c4d97ea7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php index 210f5a3d4..b814f4408 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php index b746daadf..2f7424d22 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function\Structure; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\structure_ref; +use function Flow\ETL\DSL\{df, from_array, structure_ref}; use PHPUnit\Framework\TestCase; final class StructureSelectTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php index 11c347fbb..67d0b9850 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php index 9114cd6f1..9dadb3dd1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php index 45110c665..7dbf0369d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; +use function Flow\ETL\DSL\{from_array, ref, to_memory}; use Flow\ETL\Flow; use Flow\ETL\Function\Trim\Type; use Flow\ETL\Memory\ArrayMemory; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php index d61ee8eb7..72b5fc592 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Integration\Function; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_sequence_number; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\to_memory; -use function Flow\ETL\DSL\when; +use function Flow\ETL\DSL\{df, from_sequence_number, lit, ref, to_memory, when}; use Flow\ETL\Memory\ArrayMemory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/IntegrationTestCase.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/IntegrationTestCase.php index 7106282cb..6099c487e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/IntegrationTestCase.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/IntegrationTestCase.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Tests\Integration; -use Flow\ETL\Config; -use Flow\ETL\Filesystem; -use Flow\ETL\Filesystem\LocalFilesystem; -use Flow\ETL\Filesystem\Path; +use Flow\ETL\Filesystem\{LocalFilesystem, Path}; +use Flow\ETL\{Config, Filesystem}; use PHPUnit\Framework\TestCase; abstract class IntegrationTestCase extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php index 96c1e3206..ab7895c8e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Integration\Monitoring\Memory; -use Flow\ETL\Monitoring\Memory\Configuration; -use Flow\ETL\Monitoring\Memory\Unit; +use Flow\ETL\Monitoring\Memory\{Configuration, Unit}; use Flow\ETL\Tests\Integration\IntegrationTestCase; final class ConfigurationTest extends IntegrationTestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php index 20a490cdc..4a4770a76 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php @@ -4,14 +4,7 @@ namespace Flow\ETL\Tests\Integration\PHP\Type; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_null; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\type_xml; +use function Flow\ETL\DSL\{type_boolean, type_datetime, type_integer, type_json, type_null, type_string, type_uuid, type_xml}; use Flow\ETL\PHP\Type\Caster; use Flow\ETL\Row\Entry\Type\Uuid; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php index 9e7273d62..3fba3f473 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php @@ -4,13 +4,9 @@ namespace Flow\ETL\Tests\Integration\Pipeline; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\from_array; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Pipeline\BatchingPipeline; -use Flow\ETL\Pipeline\SynchronousPipeline; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{from_all, from_array}; +use Flow\ETL\Pipeline\{BatchingPipeline, SynchronousPipeline}; +use Flow\ETL\{Config, FlowContext, Rows}; use PHPUnit\Framework\TestCase; final class BatchingPipelineTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php index d8a359e64..66781fa84 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Tests\Integration\Pipeline; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\from_array; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Pipeline\CollectingPipeline; -use Flow\ETL\Pipeline\SynchronousPipeline; +use function Flow\ETL\DSL\{from_all, from_array}; +use Flow\ETL\Pipeline\{CollectingPipeline, SynchronousPipeline}; +use Flow\ETL\{Config, FlowContext}; use PHPUnit\Framework\TestCase; final class CollectingPipelineTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php index 1b5e80e4c..296f30b23 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Integration\Pipeline; use function Flow\ETL\DSL\ref; -use Flow\ETL\Pipeline\Optimizer; -use Flow\ETL\Pipeline\SynchronousPipeline; +use Flow\ETL\Pipeline\{Optimizer, SynchronousPipeline}; use Flow\ETL\Transformer\KeepEntriesTransformer; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php index 720aaad2f..a781f6113 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Tests\Integration\Pipeline; -use Flow\ETL\GroupBy; -use Flow\ETL\Loader; -use Flow\ETL\Pipeline\CollectingPipeline; -use Flow\ETL\Pipeline\GroupByPipeline; -use Flow\ETL\Pipeline\SynchronousPipeline; -use Flow\ETL\Transformer; +use Flow\ETL\Pipeline\{CollectingPipeline, GroupByPipeline, SynchronousPipeline}; +use Flow\ETL\{GroupBy, Loader, Transformer}; use PHPUnit\Framework\TestCase; final class PipelineTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php index c36a08517..e93cd7d2f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Integration\Pipeline; -use function Flow\ETL\Adapter\CSV\from_csv; -use function Flow\ETL\Adapter\CSV\to_csv; +use function Flow\ETL\Adapter\CSV\{from_csv, to_csv}; use function Flow\ETL\DSL\from_array; use Flow\ETL\Flow; use Flow\ETL\Tests\Integration\IntegrationTestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php index 3d12fc87e..f1fc0bd36 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php @@ -4,14 +4,8 @@ namespace Flow\ETL\Tests\Integration\Window; -use function Flow\ETL\DSL\dense_rank; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\rank; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\window; -use Flow\ETL\Flow; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{dense_rank, from_all, from_array, rank, ref, window}; +use Flow\ETL\{Flow, Rows}; use PHPUnit\Framework\TestCase; final class WindowFunctionsTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php index 107320f45..c1bdf0755 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php @@ -6,8 +6,7 @@ use function Flow\ETL\DSL\int_entry; use Flow\ETL\Cache\InMemoryCache; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class IneMemoryCacheTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php index d3b6df89a..42119da8c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php @@ -4,40 +4,13 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\average; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\from_array; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\refs; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_callable; -use Flow\ETL\DataFrame; +use function Flow\ETL\DSL\{array_entry, average, bool_entry, df, float_entry, from_all, from_array, from_rows, int_entry, lit, null_entry, ref, refs, str_entry, to_callable}; use Flow\ETL\ErrorHandler\IgnoreError; -use Flow\ETL\Extractor; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry\BooleanEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\StringEntry; +use Flow\ETL\Row\Entry\{BooleanEntry, DateTimeEntry, IntegerEntry, NullEntry, StringEntry}; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; use Flow\ETL\Tests\Double\AddStampToStringEntryTransformer; -use Flow\ETL\Transformation; -use Flow\ETL\Transformer; -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\TestCase; +use Flow\ETL\{DataFrame, Extractor, Flow, FlowContext, Loader, Row, Rows, Transformation, Transformer}; +use PHPUnit\Framework\{Assert, TestCase}; final class DataFrameTest extends TestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php index 1e11b791b..02a95c594 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php @@ -4,20 +4,9 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\ignore_error_handler; -use function Flow\ETL\DSL\skip_rows_handler; -use function Flow\ETL\DSL\throw_error_handler; -use Flow\ETL\Extractor; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Row; -use Flow\ETL\Row\Entry\BooleanEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use function Flow\ETL\DSL\{ignore_error_handler, skip_rows_handler, throw_error_handler}; +use Flow\ETL\Row\Entry\{BooleanEntry, DateTimeEntry, IntegerEntry, NullEntry}; +use Flow\ETL\{Extractor, Flow, FlowContext, Loader, Row, Rows, Transformer}; use PHPUnit\Framework\TestCase; final class ETLErrorHandlingTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php index 350242f76..fe34173b2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php @@ -5,10 +5,8 @@ namespace Flow\ETL\Tests\Unit\ExternalSort; use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Cache; use Flow\ETL\ExternalSort\BufferCache; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Cache, Row, Rows}; use PHPUnit\Framework\Constraint\Callback; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php index 4d437ea9f..ab90cbbb4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\config; -use function Flow\ETL\DSL\config_builder; -use function Flow\ETL\DSL\execution_context; -use function Flow\ETL\DSL\from_array; +use function Flow\ETL\DSL\{config, config_builder, execution_context, from_array}; use PHPUnit\Framework\TestCase; final class ArrayExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php index 2ad435a9a..3f8f017f7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php @@ -4,14 +4,8 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\from_cache; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Cache; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{from_cache, from_rows, int_entry}; +use Flow\ETL\{Cache, Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class CacheExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php index eb5367e03..10f3aa110 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php @@ -4,13 +4,8 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\from_all; -use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Config; -use Flow\ETL\Extractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{from_all, int_entry}; +use Flow\ETL\{Config, Extractor, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class ChainExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php index bd4d2b3b5..847f19999 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php @@ -4,10 +4,9 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use Flow\ETL\Config; use Flow\ETL\Extractor\ChunkExtractor; -use Flow\ETL\FlowContext; use Flow\ETL\Tests\Double\FakeExtractor; +use Flow\ETL\{Config, FlowContext}; use PHPUnit\Framework\TestCase; final class ChunkExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php index 6ef7e4f8c..a2c656065 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php @@ -4,14 +4,8 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\df; -use function Flow\ETL\DSL\from_data_frame; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{df, from_data_frame, from_rows, row, rows, str_entry}; +use Flow\ETL\{Config, FlowContext}; use PHPUnit\Framework\TestCase; final class DataFrameExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php index a31a9d117..d37ec8efc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\flow_context; -use function Flow\ETL\DSL\local_files; +use function Flow\ETL\DSL\{flow_context, local_files}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Extractor\Signal; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php index 278b1dfd1..a9b8890d2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php @@ -4,15 +4,9 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\from_memory; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_memory; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{from_memory, int_entry, str_entry, to_memory}; use Flow\ETL\Memory\ArrayMemory; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class MemoryExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php index c930ebcbd..5ae5122ea 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php @@ -5,13 +5,9 @@ namespace Flow\ETL\Tests\Unit\Extractor; use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Config; -use Flow\ETL\Extractor\PipelineExtractor; -use Flow\ETL\Extractor\ProcessExtractor; -use Flow\ETL\FlowContext; +use Flow\ETL\Extractor\{PipelineExtractor, ProcessExtractor}; use Flow\ETL\Pipeline\SynchronousPipeline; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class PipelineExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php index 9023f8838..5f0b35f39 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php @@ -4,13 +4,8 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\from_rows; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{from_rows, int_entry, str_entry}; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class ProcessExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php index 80a61026d..f4e149ff9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php @@ -4,15 +4,8 @@ namespace Flow\ETL\Tests\Unit\Extractor; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\from_sequence_date_period; -use function Flow\ETL\DSL\from_sequence_date_period_recurrences; -use function Flow\ETL\DSL\from_sequence_number; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{datetime_entry, float_entry, from_sequence_date_period, from_sequence_date_period_recurrences, from_sequence_number}; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class SequenceExtractorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php index 8331ebce7..a215f16de 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php @@ -4,15 +4,8 @@ namespace Flow\ETL\Tests\Unit\Formatter\ASCII; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\string_entry; -use Flow\ETL\Formatter\ASCII\ASCIIBody; -use Flow\ETL\Formatter\ASCII\Body; -use Flow\ETL\Formatter\ASCII\Headers; +use function Flow\ETL\DSL\{float_entry, int_entry, ref, row, rows, string_entry}; +use Flow\ETL\Formatter\ASCII\{ASCIIBody, Body, Headers}; use PHPUnit\Framework\TestCase; final class ASCIIBodyTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php index 1cf2348fc..9e36e3e30 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php @@ -4,13 +4,9 @@ namespace Flow\ETL\Tests\Unit\Formatter\ASCII; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use Flow\ETL\Formatter\ASCII\ASCIIHeaders; -use Flow\ETL\Formatter\ASCII\Body; -use Flow\ETL\Formatter\ASCII\Headers; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{float_entry, int_entry}; +use Flow\ETL\Formatter\ASCII\{ASCIIHeaders, Body, Headers}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class ASCIIHeadersTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php index d3a335055..0e0778e3a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php @@ -4,11 +4,9 @@ namespace Flow\ETL\Tests\Unit\Formatter; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{int_entry, str_entry}; use Flow\ETL\Formatter\ASCII\ASCIITable; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class ASCIITableTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php index 1dce31a9c..c122b8e3d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\all; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{all, lit, null_entry, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php index 9169e620f..88dd0d752 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\any; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{any, lit, null_entry, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php index 39346cf22..2a9d4a60b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_expand; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, array_expand, int_entry, ref}; use Flow\ETL\Function\ArrayExpand\ArrayExpand; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php index d29140221..74e358e69 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_get_collection; -use function Flow\ETL\DSL\array_get_collection_first; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, array_get_collection, array_get_collection_first, int_entry, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php index 70bd2af53..bdf2d5617 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_exists; -use function Flow\ETL\DSL\array_get; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, array_exists, array_get, int_entry, ref}; use Flow\ArrayDot\Exception\InvalidPathException; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php index 940db5df2..44b5be413 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_key_rename; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, array_key_rename, int_entry, ref}; use Flow\ArrayDot\Exception\InvalidPathException; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php index 96dd65604..70bb38f1d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_keys_style_convert; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, array_keys_style_convert, int_entry, ref}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php index 87286de39..8f32f6f69 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_merge_collection; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, array_merge_collection, int_entry, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php index 20eaf6a30..b0bb02a43 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, int_entry, lit, ref}; use Flow\ETL\Function\ArrayMerge; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php index 410cedb66..af2868bff 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, int_entry, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php index 49cd881f6..86f173491 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{array_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php index 51a8766f7..2424fbb2f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, int_entry, ref}; use Flow\ETL\Function\ArrayUnpack; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php index 1cb678a18..7325bec4b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php @@ -4,14 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\average; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\window; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{average, int_entry, null_entry, ref, str_entry, window}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class AverageTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php index c12295fa0..c07559697 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\between; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; +use function Flow\ETL\DSL\{between, int_entry, lit, ref, row}; use Flow\ETL\Function\Between\Boundary; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php index 6b9d617ad..3f6f5b2c4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php @@ -4,33 +4,10 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Function\Contains; -use Flow\ETL\Function\EndsWith; -use Flow\ETL\Function\Equals; -use Flow\ETL\Function\GreaterThan; -use Flow\ETL\Function\GreaterThanEqual; -use Flow\ETL\Function\IsIn; -use Flow\ETL\Function\IsNotNull; -use Flow\ETL\Function\IsNotNumeric; -use Flow\ETL\Function\IsNull; -use Flow\ETL\Function\IsNumeric; -use Flow\ETL\Function\IsType; -use Flow\ETL\Function\LessThan; -use Flow\ETL\Function\LessThanEqual; -use Flow\ETL\Function\NotEquals; -use Flow\ETL\Function\NotSame; -use Flow\ETL\Function\Same; -use Flow\ETL\Function\StartsWith; +use function Flow\ETL\DSL\{array_entry, datetime_entry, int_entry, lit, null_entry, ref, str_entry}; +use Flow\ETL\Function\{Contains, EndsWith, Equals, GreaterThan, GreaterThanEqual, IsIn, IsNotNull, IsNotNumeric, IsNull, IsNumeric, IsType, LessThan, LessThanEqual, NotEquals, NotSame, Same, StartsWith}; use Flow\ETL\Row; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\StringEntry; +use Flow\ETL\Row\Entry\{IntegerEntry, StringEntry}; use PHPUnit\Framework\TestCase; final class BinaryComparisonsTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php index d7ce234cc..c06300915 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\call_method; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{call_method, datetime_entry, null_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php index 4477f8c7d..2e38f113b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php index aabdc7c40..d2951385e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\cast; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{cast, ref}; use Flow\ETL\Row; use Flow\ETL\Row\Entry\Type\Uuid; use Flow\ETL\Row\Factory\NativeEntryFactory; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php index 7ed1b363f..08cfdc64a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\collect; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{collect, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php index 4c6f44a07..78da61c74 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\collect_unique; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{collect_unique, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php index 3c47298be..cc4448c88 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\combine; -use function Flow\ETL\DSL\lit; +use function Flow\ETL\DSL\{combine, lit}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php index f042c9a2a..9b99b0dbe 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\concat; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, concat, lit, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php index 3ee7df8a6..9cd86ce49 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php @@ -4,15 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\count; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\window; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{count, float_entry, int_entry, null_entry, ref, str_entry, window}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class CountTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php index 9cfc62d51..40b61db38 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\date_time_format; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\now; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{date_time_format, datetime_entry, now, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php index 09349bff4..d28b689c9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\dense_rank; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\window; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{dense_rank, int_entry, ref, window}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class DenseRankTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php index 72636c9a1..c4bdaa64f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{lit, null_entry, ref, str_entry}; use Flow\ETL\Function\Exists; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php index 5002fff0e..8beb0132a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\first; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{first, null_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php index b4335b980..27950f6d4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php @@ -4,14 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\concat; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\hash; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{array_entry, concat, datetime_entry, hash, lit, null_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php index 2e58cb640..2843d277b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{int_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php index 7af060ed7..f11c9c8ca 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{array_entry, datetime_entry, int_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php index aa8044c12..fcbf816f8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\last; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{last, null_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php index 6c38e2afc..cec04631c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php @@ -4,14 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{list_entry, ref, row, struct_element, struct_type, type_int, type_list, type_string}; use Flow\ETL\Function\ListSelect; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php index 0a40b3d02..baa93e8cc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php @@ -4,18 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use Flow\ETL\Function\Divide; -use Flow\ETL\Function\Minus; -use Flow\ETL\Function\Mod; -use Flow\ETL\Function\Multiply; -use Flow\ETL\Function\Plus; -use Flow\ETL\Function\Power; -use Flow\ETL\Function\Round; +use function Flow\ETL\DSL\{float_entry, int_entry, lit, ref, row}; +use Flow\ETL\Function\{Divide, Minus, Mod, Multiply, Plus, Power, Round}; use PHPUnit\Framework\TestCase; final class MathTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php index f990d01d2..ab9a37fec 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{float_entry, int_entry, null_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php index fcbaaeabd..727b57f22 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\min; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{float_entry, int_entry, min, null_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php index 54818e8a0..4d330d742 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\not; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_entry, int_entry, lit, not, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php index 0a2073751..0323c9850 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{float_entry, int_entry, lit, ref, str_entry}; use Flow\ETL\Function\NumberFormat; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php index c2814d58a..b93bfce9e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\regex_match_all; +use function Flow\ETL\DSL\{lit, regex_match_all}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php index 5d1247bca..b6a487171 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\regex_match; +use function Flow\ETL\DSL\{lit, regex_match}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php index 488c3bdf7..9cdb4ec92 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\regex_replace; +use function Flow\ETL\DSL\{lit, regex_replace}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php index 815804e78..1cfedc162 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\rank; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\window; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{int_entry, rank, ref, window}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class RankTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php index 28d389134..85fd5b67b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php @@ -4,12 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row_number; -use function Flow\ETL\DSL\window; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{int_entry, ref, row_number, window}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class RowNumberTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php index ffc5c9efd..dbe9f496b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{int_entry, lit, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php index d2d07890f..198477cd4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\size; +use function Flow\ETL\DSL\{lit, size}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php index 8c71b39cf..e98608c7b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\split; +use function Flow\ETL\DSL\{lit, split}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php index df64b37a4..8672d4233 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\sprintf; +use function Flow\ETL\DSL\{lit, sprintf}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php index a40872588..64e678652 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{int_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php index e38a4d567..54f8006ed 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{int_entry, ref, str_entry}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php index ec77eb990..cad4b4bb0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php @@ -4,15 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{list_entry, ref, row, struct_element, struct_entry, struct_type, type_int, type_list, type_string}; use Flow\ETL\Function\StructureSelect; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php index 038198065..9481a43c7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php @@ -4,15 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\sum; -use function Flow\ETL\DSL\window; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{float_entry, int_entry, null_entry, ref, str_entry, sum, window}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class SumTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php index c445e7931..0e1dc0015 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_date; +use function Flow\ETL\DSL\{datetime_entry, int_entry, ref, str_entry, to_date}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php index 925653c59..8eb3ee420 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_date_time; +use function Flow\ETL\DSL\{datetime_entry, int_entry, ref, str_entry, to_date_time}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php index dbbdee36d..97f7129ba 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\lower; +use function Flow\ETL\DSL\{lit, lower}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php index 1947c5a55..d643935dd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php @@ -4,16 +4,10 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{bool_entry, float_entry, int_entry, null_entry, ref, str_entry}; use Flow\ETL\Function\ToMoney; use Flow\ETL\Row; -use Money\Currency; -use Money\Money; +use Money\{Currency, Money}; use PHPUnit\Framework\TestCase; final class ToMoneyTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php index 26b0b5ff9..1f601672f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_timezone; +use function Flow\ETL\DSL\{lit, ref, str_entry, to_timezone}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php index 4d2a9e1a1..96c6f6712 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\upper; +use function Flow\ETL\DSL\{lit, upper}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php index 382bcfb5e..345373e76 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{int_entry, ref, str_entry}; use Flow\ETL\Function\Trim\Type; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php index c844c829a..7a17f523f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ulid; +use function Flow\ETL\DSL\{lit, ulid}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; use Symfony\Component\Uid\Ulid; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php index db0b046f6..0ebe1deed 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\uuid_v4; -use function Flow\ETL\DSL\uuid_v7; +use function Flow\ETL\DSL\{lit, uuid_v4, uuid_v7}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php index 5d636b45e..75ff1d5b9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Tests\Unit\Function; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use Flow\ETL\Function\Literal; -use Flow\ETL\Function\When; +use function Flow\ETL\DSL\{int_entry, lit, ref}; +use Flow\ETL\Function\{Literal, When}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php index 7ac6b575f..97e951dcb 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php @@ -4,18 +4,9 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\sum; -use Flow\ETL\Config; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; -use Flow\ETL\FlowContext; -use Flow\ETL\GroupBy; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{int_entry, null_entry, ref, str_entry, sum}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; +use Flow\ETL\{Config, FlowContext, GroupBy, Row, Rows}; use PHPUnit\Framework\TestCase; final class GroupByTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php index 1a74dab67..a1b26e0cd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php @@ -6,8 +6,7 @@ use function Flow\ETL\DSL\datetime_entry; use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase; -use Flow\ETL\Join\Comparison\Equal; -use Flow\ETL\Join\Comparison\Not; +use Flow\ETL\Join\Comparison\{Equal, Not}; use Flow\ETL\Row; final class NotTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php index b783b20eb..6d0ca1cd3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Join; -use function Flow\ETL\DSL\col; -use function Flow\ETL\DSL\int_entry; +use function Flow\ETL\DSL\{col, int_entry}; use Flow\ETL\Join\Comparison\Equal; use Flow\ETL\Join\Expression; use Flow\ETL\Row; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php index e0c755ddd..cef844ad6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php @@ -4,13 +4,8 @@ namespace Flow\ETL\Tests\Unit\Loader; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_callable; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{int_entry, str_entry, to_callable}; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class CallbackLoaderTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php index 3e1639ae4..51f28d93e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php @@ -4,14 +4,9 @@ namespace Flow\ETL\Tests\Unit\Loader; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_memory; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{int_entry, str_entry, to_memory}; use Flow\ETL\Memory\ArrayMemory; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class MemoryLoaderTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/SchemaValidationLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/SchemaValidationLoaderTest.php index 3aab38e40..fe1cb2d91 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/SchemaValidationLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/SchemaValidationLoaderTest.php @@ -4,15 +4,11 @@ namespace Flow\ETL\Tests\Unit\Loader; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Config; +use function Flow\ETL\DSL\{int_entry, str_entry}; use Flow\ETL\Exception\SchemaValidationException; -use Flow\ETL\FlowContext; use Flow\ETL\Loader\SchemaValidationLoader; -use Flow\ETL\Row; use Flow\ETL\Row\Schema; -use Flow\ETL\Rows; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class SchemaValidationLoaderTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php index d5cbcaafb..3ed5390dc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php @@ -4,18 +4,11 @@ namespace Flow\ETL\Tests\Unit\Loader; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\to_output; -use function Flow\ETL\DSL\to_stream; -use Flow\ETL\Config; +use function Flow\ETL\DSL\{int_entry, ref, row, rows, str_entry, to_output, to_stream}; use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Filesystem\Stream\Mode; -use Flow\ETL\FlowContext; use Flow\ETL\Loader\StreamLoader; +use Flow\ETL\{Config, FlowContext}; use PHPUnit\Framework\TestCase; final class StreamLoaderTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php index 9ba377d46..f1cc2ae23 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php @@ -5,11 +5,7 @@ namespace Flow\ETL\Tests\Unit\Loader; use function Flow\ETL\DSL\to_transformation; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; -use Flow\ETL\Rows; -use Flow\ETL\Transformer; +use Flow\ETL\{Config, FlowContext, Loader, Rows, Transformer}; use PHPUnit\Framework\TestCase; final class TransformerLoaderTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php index 40deb8652..80a7bcdff 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php @@ -4,19 +4,13 @@ namespace Flow\ETL\Tests\Unit\PHP\Type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_null; -use function Flow\ETL\DSL\type_string; -use Flow\ETL\PHP\Type\ArrayContentDetector; +use function Flow\ETL\DSL\{type_int, type_null, type_string}; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Types; +use Flow\ETL\PHP\Type\{ArrayContentDetector, Types}; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php index b7de528b6..dc1a7c124 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type; -use Flow\ETL\PHP\Type\AutoCaster; -use Flow\ETL\PHP\Type\Caster; +use Flow\ETL\PHP\Type\{AutoCaster, Caster}; use PHPUnit\Framework\TestCase; final class AutoCasterTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php index e8a296a5a..a7040d90b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Caster; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; +use function Flow\ETL\DSL\{type_float, type_int, type_list}; use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Caster\ListCastingHandler; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php index 3537d4e8c..afda1daa2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Caster; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{type_float, type_int, type_integer, type_map, type_string}; use Flow\ETL\Exception\CastingException; use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Caster\MapCastingHandler; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php index e9728d63b..02fcbd707 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php @@ -4,11 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Caster; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\structure_element; -use function Flow\ETL\DSL\structure_type; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{struct_type, structure_element, structure_type, type_integer, type_string}; use Flow\ETL\PHP\Type\Caster; use Flow\ETL\PHP\Type\Caster\StructureCastingHandler; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php index 12f6e8e2d..a71a6634f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_int; +use function Flow\ETL\DSL\{type_datetime, type_int}; use PHPUnit\Framework\TestCase; final class DateTimeTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php index cc7607ed5..8f84a7a03 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_json; +use function Flow\ETL\DSL\{type_int, type_json}; use PHPUnit\Framework\TestCase; final class JsonTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php index ff238ff80..cadbd35b5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php @@ -5,10 +5,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType}; use PHPUnit\Framework\TestCase; final class ListTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php index 4715c4aae..850d373a2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php @@ -5,10 +5,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType}; use PHPUnit\Framework\TestCase; final class MapTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php index aa312aca6..63afac402 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php @@ -4,18 +4,11 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{struct_element, struct_type, type_boolean, type_float, type_int, type_string}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType}; use PHPUnit\Framework\TestCase; final class StructureTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php index 8ffe10c69..aaa9f32e4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_uuid; +use function Flow\ETL\DSL\{type_int, type_uuid}; use PHPUnit\Framework\TestCase; use Ramsey\Uuid\Uuid; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php index a922cbb21..79de7bc08 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_xml_node; +use function Flow\ETL\DSL\{type_int, type_xml_node}; use PHPUnit\Framework\TestCase; final class XMLNodeTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php index d174cc7e8..b8d946099 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Logical; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_xml; +use function Flow\ETL\DSL\{type_int, type_xml}; use PHPUnit\Framework\TestCase; final class XMLTypeTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php index 3568cc09b..7716833f2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Native; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_float; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use function Flow\ETL\DSL\{type_array, type_float}; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use Flow\ETL\PHP\Type\Native\ArrayType; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php index 89457be52..acd774108 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Native; -use function Flow\ETL\DSL\type_callable; -use function Flow\ETL\DSL\type_float; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use function Flow\ETL\DSL\{type_callable, type_float}; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php index e9cf6b90b..1885a6430 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Native; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_null; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use function Flow\ETL\DSL\{type_float, type_null}; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php index b93912f57..27772bc5b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Native; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_resource; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use function Flow\ETL\DSL\{type_float, type_resource}; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php index 671ba7aa5..841f5807c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php @@ -4,13 +4,9 @@ namespace Flow\ETL\Tests\Unit\PHP\Type\Native; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{type_boolean, type_float, type_int, type_string}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php index a442e2b04..e977fdf9a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php @@ -4,18 +4,8 @@ namespace Flow\ETL\Tests\Unit\PHP\Type; -use Flow\ETL\PHP\Type\Logical\DateTimeType; -use Flow\ETL\PHP\Type\Logical\JsonType; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\PHP\Type\Logical\UuidType; -use Flow\ETL\PHP\Type\Logical\XMLNodeType; -use Flow\ETL\PHP\Type\Logical\XMLType; -use Flow\ETL\PHP\Type\Native\ArrayType; -use Flow\ETL\PHP\Type\Native\EnumType; -use Flow\ETL\PHP\Type\Native\NullType; -use Flow\ETL\PHP\Type\Native\ObjectType; -use Flow\ETL\PHP\Type\Native\ScalarType; +use Flow\ETL\PHP\Type\Logical\{DateTimeType, JsonType, ListType, StructureType, UuidType, XMLNodeType, XMLType}; +use Flow\ETL\PHP\Type\Native\{ArrayType, EnumType, NullType, ObjectType, ScalarType}; use Flow\ETL\PHP\Type\TypeDetector; use Flow\ETL\Row\Entry\Type\Uuid; use Flow\ETL\Tests\Fixtures\Enum\BasicEnum; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php index 93bc08e92..2ae4c5eb4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php @@ -4,25 +4,7 @@ namespace Flow\ETL\Tests\Unit\PHP\Type; -use function Flow\ETL\DSL\structure_element; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_callable; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_enum; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_integer; -use function Flow\ETL\DSL\type_json; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_null; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_resource; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_structure; -use function Flow\ETL\DSL\type_uuid; -use function Flow\ETL\DSL\type_xml; -use function Flow\ETL\DSL\type_xml_node; +use function Flow\ETL\DSL\{structure_element, type_array, type_boolean, type_callable, type_datetime, type_enum, type_float, type_integer, type_json, type_list, type_map, type_null, type_object, type_resource, type_string, type_structure, type_uuid, type_xml, type_xml_node}; use Flow\ETL\PHP\Type\TypeFactory; use Flow\ETL\Tests\Unit\PHP\Type\Fixtures\SomeEnum; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php index a7185b9c5..47e668e5d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit\Partition; -use function Flow\ETL\DSL\all; -use function Flow\ETL\DSL\any; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{all, any, lit, ref}; use Flow\ETL\Partition; use Flow\ETL\Partition\ScalarFunctionFilter; use Flow\ETL\Row\Factory\NativeEntryFactory; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php index b61cdbc26..f1e357856 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php @@ -4,10 +4,7 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\xml_entry; +use function Flow\ETL\DSL\{datetime_entry, ref, row, xml_entry}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Partition; use Flow\ETL\Row\Entry\XMLEntry; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php index a32c518ea..0d0c6db7d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Tests\Unit\Pipeline; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; -use Flow\ETL\Loader; use Flow\ETL\Loader\Closure; -use Flow\ETL\Rows; use Flow\ETL\Tests\Double\FakeExtractor; +use Flow\ETL\{Flow, FlowContext, Loader, Rows}; use PHPUnit\Framework\TestCase; final class ClosureTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php index 1cf252af2..67b050c22 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php @@ -4,18 +4,11 @@ namespace Flow\ETL\Tests\Unit\Pipeline; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use Flow\ETL\Config; +use function Flow\ETL\DSL\{bool_entry, int_entry, lit}; use Flow\ETL\Extractor\ProcessExtractor; -use Flow\ETL\FlowContext; -use Flow\ETL\Pipeline\BatchingPipeline; -use Flow\ETL\Pipeline\NestedPipeline; -use Flow\ETL\Pipeline\SynchronousPipeline; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\Pipeline\{BatchingPipeline, NestedPipeline, SynchronousPipeline}; use Flow\ETL\Transformer\ScalarFunctionTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class NestedPipelineTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php index 12651e3b1..fa32b86e4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php @@ -6,11 +6,8 @@ use Flow\ETL\Adapter\Doctrine\DbalLoader; use Flow\ETL\Loader\StreamLoader; -use Flow\ETL\Pipeline\BatchingPipeline; -use Flow\ETL\Pipeline\CollectingPipeline; -use Flow\ETL\Pipeline\NestedPipeline; use Flow\ETL\Pipeline\Optimizer\BatchSizeOptimization; -use Flow\ETL\Pipeline\SynchronousPipeline; +use Flow\ETL\Pipeline\{BatchingPipeline, CollectingPipeline, NestedPipeline, SynchronousPipeline}; use Flow\ETL\Transformer; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php index 05f568de1..276651d06 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php @@ -8,16 +8,9 @@ use Flow\ETL\Adapter\CSV\CSVExtractor; use Flow\ETL\Filesystem\Path; use Flow\ETL\GroupBy; -use Flow\ETL\Pipeline\GroupByPipeline; -use Flow\ETL\Pipeline\Optimizer; use Flow\ETL\Pipeline\Optimizer\LimitOptimization; -use Flow\ETL\Pipeline\PartitioningPipeline; -use Flow\ETL\Pipeline\SynchronousPipeline; -use Flow\ETL\Transformer\DropDuplicatesTransformer; -use Flow\ETL\Transformer\KeepEntriesTransformer; -use Flow\ETL\Transformer\LimitTransformer; -use Flow\ETL\Transformer\RenameEntryTransformer; -use Flow\ETL\Transformer\ScalarFunctionTransformer; +use Flow\ETL\Pipeline\{GroupByPipeline, Optimizer, PartitioningPipeline, SynchronousPipeline}; +use Flow\ETL\Transformer\{DropDuplicatesTransformer, KeepEntriesTransformer, LimitTransformer, RenameEntryTransformer, ScalarFunctionTransformer}; use PHPUnit\Framework\TestCase; final class LimitOptimizationTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php index 704bcbbfe..3e860f249 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php @@ -4,14 +4,11 @@ namespace Flow\ETL\Tests\Unit\Pipeline; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\to_memory; -use function Flow\ETL\DSL\to_output; +use function Flow\ETL\DSL\{lit, to_memory, to_output}; use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase; use Flow\ETL\Memory\ArrayMemory; use Flow\ETL\Pipeline\Pipes; -use Flow\ETL\Transformer\DropDuplicatesTransformer; -use Flow\ETL\Transformer\ScalarFunctionTransformer; +use Flow\ETL\Transformer\{DropDuplicatesTransformer, ScalarFunctionTransformer}; final class PipesTest extends TestCase { diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PipelineFactoryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PipelineFactoryTest.php index c1152de1c..2cb090055 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PipelineFactoryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PipelineFactoryTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\InvalidFileFormatException; +use Flow\ETL\Exception\{InvalidArgumentException, InvalidFileFormatException}; use Flow\ETL\PipelineFactory; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php index 59b579f0e..0de6c5513 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php @@ -4,22 +4,12 @@ namespace Flow\ETL\Tests\Unit\Row; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use function Flow\ETL\DSL\{bool_entry, int_entry, type_int, type_string}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; use Flow\ETL\PHP\Type\Logical\StructureType; use Flow\ETL\Row\Entries; -use Flow\ETL\Row\Entry\BooleanEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\EnumEntry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Row\Entry\StructureEntry; +use Flow\ETL\Row\Entry\{BooleanEntry, DateTimeEntry, EnumEntry, IntegerEntry, NullEntry, StringEntry, StructureEntry}; use Flow\ETL\Tests\Fixtures\Enum\BasicEnum; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php index 0b202d675..91f93e9b1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Row\Entry; -use Flow\ETL\Row\Entry\ArrayEntry; -use Flow\ETL\Row\Entry\IntegerEntry; +use Flow\ETL\Row\Entry\{ArrayEntry, IntegerEntry}; use PHPUnit\Framework\TestCase; final class ArrayEntryTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php index 608021126..85ff6d777 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php @@ -6,9 +6,7 @@ use Flow\ETL\Row\Entry\EnumEntry; use Flow\ETL\Row\Schema\Definition; -use Flow\ETL\Tests\Fixtures\Enum\BackedIntEnum; -use Flow\ETL\Tests\Fixtures\Enum\BackedStringEnum; -use Flow\ETL\Tests\Fixtures\Enum\BasicEnum; +use Flow\ETL\Tests\Fixtures\Enum\{BackedIntEnum, BackedStringEnum, BasicEnum}; use PHPUnit\Framework\TestCase; final class EnumEntryTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php index 1a3b59608..9558b955b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Unit\Row\Entry; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\JsonEntry; +use Flow\ETL\Row\Entry\{IntegerEntry, JsonEntry}; use PHPUnit\Framework\TestCase; final class JsonEntryTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php index ad3ed9e45..20be2d141 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Row\Entry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\JsonEntry; +use Flow\ETL\Row\Entry\{IntegerEntry, JsonEntry}; use PHPUnit\Framework\TestCase; final class JsonObjectEntryTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php index 88b01da3e..1eb1049c6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php @@ -4,12 +4,7 @@ namespace Flow\ETL\Tests\Unit\Row\Entry; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\type_boolean; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{list_entry, type_boolean, type_datetime, type_int, type_list, type_string}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Logical\List\ListElement; use Flow\ETL\PHP\Type\Logical\ListType; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php index b2543c8e1..b6dc8553a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php @@ -5,8 +5,7 @@ namespace Flow\ETL\Tests\Unit\Row\Entry; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use Flow\ETL\Row\Entry\MapEntry; use Flow\ETL\Row\Schema\Definition; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php index e0ff59f54..22003135a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php @@ -4,15 +4,9 @@ namespace Flow\ETL\Tests\Unit\Row\Entry; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_array; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{struct_element, struct_entry, struct_type, type_array, type_int, type_string}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\MapType; use Flow\ETL\Row\Entry\StructureEntry; use Flow\ETL\Row\Schema\Definition; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php index d857ff10e..d3b11feb4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Row; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{int_entry, ref}; use Flow\ETL\Row; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php index 6dba6e781..11e7bbd61 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php @@ -4,32 +4,11 @@ namespace Flow\ETL\Tests\Unit\Row\Factory; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\enum_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\json_entry; -use function Flow\ETL\DSL\json_object_entry; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\uuid_entry; -use function Flow\ETL\DSL\xml_entry; -use Flow\ETL\Exception\CastingException; -use Flow\ETL\Exception\SchemaDefinitionNotFoundException; +use function Flow\ETL\DSL\{array_entry, bool_entry, datetime_entry, enum_entry, float_entry, int_entry, json_entry, json_object_entry, list_entry, null_entry, object_entry, str_entry, type_datetime, type_float, type_int, type_list, type_object, type_string, uuid_entry, xml_entry}; +use Flow\ETL\Exception\{CastingException, SchemaDefinitionNotFoundException}; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; +use Flow\ETL\PHP\Type\Logical\{ListType, StructureType}; use Flow\ETL\Row\Entry\StructureEntry; use Flow\ETL\Row\Factory\NativeEntryFactory; use Flow\ETL\Row\Schema; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php index 0be837b10..b7b0869fd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php @@ -4,8 +4,7 @@ namespace Flow\ETL\Tests\Unit\Row; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\refs; +use function Flow\ETL\DSL\{ref, refs}; use Flow\ETL\Row\References; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php index 3aa4fc7c9..e99e58d72 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php @@ -4,27 +4,11 @@ namespace Flow\ETL\Tests\Unit\Row\Schema; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_schema; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_datetime; -use function Flow\ETL\DSL\type_float; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_structure; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use function Flow\ETL\DSL\{int_entry, null_entry, str_entry, struct_element, struct_entry, struct_schema, struct_type, type_datetime, type_float, type_int, type_list, type_map, type_string, type_structure}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\Row\Schema\Definition; -use Flow\ETL\Row\Schema\Metadata; +use Flow\ETL\PHP\Type\Logical\{ListType, StructureType}; +use Flow\ETL\Row\Schema\{Definition, Metadata}; use PHPUnit\Framework\TestCase; final class DefinitionTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php index ad9fd74aa..2aea7d9b4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php @@ -4,15 +4,11 @@ namespace Flow\ETL\Tests\Unit\Row\Schema\Formatter; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{type_int, type_string}; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; use Flow\ETL\Row\Schema; use Flow\ETL\Row\Schema\Formatter\ASCIISchemaFormatter; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php index 2634f34a0..3420ba67c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Tests\Unit\Row\Schema; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Row; +use function Flow\ETL\DSL\{bool_entry, int_entry, str_entry}; use Flow\ETL\Row\Schema; use Flow\ETL\Row\Schema\SelectiveValidator; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class SelectiveValidatorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php index 803f7eaeb..9f74a439d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php @@ -4,13 +4,10 @@ namespace Flow\ETL\Tests\Unit\Row\Schema; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Row; +use function Flow\ETL\DSL\{bool_entry, int_entry, str_entry}; use Flow\ETL\Row\Schema; use Flow\ETL\Row\Schema\StrictValidator; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class StrictValidatorTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php index 06fc51b01..679824404 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php @@ -4,28 +4,9 @@ namespace Flow\ETL\Tests\Unit\Row; -use function Flow\ETL\DSL\bool_schema; -use function Flow\ETL\DSL\int_schema; -use function Flow\ETL\DSL\json_schema; -use function Flow\ETL\DSL\list_schema; -use function Flow\ETL\DSL\map_schema; -use function Flow\ETL\DSL\schema; -use function Flow\ETL\DSL\schema_from_json; -use function Flow\ETL\DSL\schema_to_json; -use function Flow\ETL\DSL\str_schema; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\structure_schema; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_string; -use function Flow\ETL\DSL\type_structure; -use function Flow\ETL\DSL\uuid_schema; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\SchemaDefinitionNotFoundException; -use Flow\ETL\Exception\SchemaDefinitionNotUniqueException; -use Flow\ETL\Row\EntryReference; -use Flow\ETL\Row\Schema; +use function Flow\ETL\DSL\{bool_schema, int_schema, json_schema, list_schema, map_schema, schema, schema_from_json, schema_to_json, str_schema, struct_element, structure_schema, type_int, type_list, type_map, type_string, type_structure, uuid_schema}; +use Flow\ETL\Exception\{InvalidArgumentException, SchemaDefinitionNotFoundException, SchemaDefinitionNotUniqueException}; +use Flow\ETL\Row\{EntryReference, Schema}; use PHPUnit\Framework\TestCase; final class SchemaTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php index 81d4e9300..c80198482 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php @@ -4,40 +4,12 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\map_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_map; -use function Flow\ETL\DSL\type_object; -use function Flow\ETL\DSL\type_string; +use function Flow\ETL\DSL\{array_entry, bool_entry, datetime_entry, float_entry, int_entry, list_entry, map_entry, null_entry, object_entry, row, str_entry, struct_element, struct_entry, struct_type, type_int, type_list, type_map, type_object, type_string}; use Flow\ETL\PHP\Type\Logical\List\ListElement; -use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\PHP\Type\Logical\Map\MapKey; -use Flow\ETL\PHP\Type\Logical\Map\MapValue; -use Flow\ETL\PHP\Type\Logical\MapType; +use Flow\ETL\PHP\Type\Logical\Map\{MapKey, MapValue}; use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; -use Flow\ETL\PHP\Type\Logical\StructureType; -use Flow\ETL\Row\Entry\ArrayEntry; -use Flow\ETL\Row\Entry\BooleanEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\IntegerEntry; -use Flow\ETL\Row\Entry\MapEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Row\Entry\StructureEntry; +use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType}; +use Flow\ETL\Row\Entry\{ArrayEntry, BooleanEntry, DateTimeEntry, IntegerEntry, MapEntry, NullEntry, StringEntry, StructureEntry}; use Flow\ETL\Row\Schema; use Flow\ETL\Row\Schema\Definition; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php index b8c23d0c7..f96032afb 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php @@ -4,14 +4,10 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\str_entry; +use function Flow\ETL\DSL\{bool_entry, int_entry, null_entry, str_entry}; use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Join\Expression; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class RowsJoinTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php index 073a8bba7..87576c2c4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php @@ -4,42 +4,15 @@ namespace Flow\ETL\Tests\Unit; -use function Flow\ETL\DSL\array_entry; -use function Flow\ETL\DSL\array_to_rows; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\bool_schema; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\int_schema; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\partition; -use function Flow\ETL\DSL\partitions; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\row; -use function Flow\ETL\DSL\rows; -use function Flow\ETL\DSL\rows_partitioned; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\str_schema; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_string; -use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; +use function Flow\ETL\DSL\{array_entry, array_to_rows, bool_entry, bool_schema, datetime_entry, int_entry, int_schema, list_entry, null_entry, partition, partitions, ref, row, rows, rows_partitioned, str_entry, str_schema, type_int, type_list, type_string}; +use Flow\ETL\Exception\{InvalidArgumentException, RuntimeException}; use Flow\ETL\PHP\Type\Logical\List\ListElement; use Flow\ETL\PHP\Type\Logical\ListType; -use Flow\ETL\Row; -use Flow\ETL\Row\Comparator; -use Flow\ETL\Row\Comparator\NativeComparator; -use Flow\ETL\Row\Comparator\WeakObjectComparator; -use Flow\ETL\Row\Entry\BooleanEntry; -use Flow\ETL\Row\Entry\DateTimeEntry; -use Flow\ETL\Row\Entry\NullEntry; -use Flow\ETL\Row\Entry\ObjectEntry; -use Flow\ETL\Row\Entry\StringEntry; -use Flow\ETL\Row\Schema; +use Flow\ETL\Row\Comparator\{NativeComparator, WeakObjectComparator}; +use Flow\ETL\Row\Entry\{BooleanEntry, DateTimeEntry, NullEntry, ObjectEntry, StringEntry}; use Flow\ETL\Row\Schema\Definition; -use Flow\ETL\Rows; +use Flow\ETL\Row\{Comparator, Schema}; +use Flow\ETL\{Row, Rows}; use PHPUnit\Framework\TestCase; final class RowsTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php index 0024396c8..5372fc8cd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php @@ -6,8 +6,7 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Filesystem\Path; -use Flow\ETL\Partition; -use Flow\ETL\Partitions; +use Flow\ETL\{Partition, Partitions}; use PHPUnit\Framework\TestCase; final class PathTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php index 56b8e5b84..6dd1e0043 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php @@ -4,10 +4,8 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\array_to_rows; -use function Flow\ETL\DSL\flow_context; -use Flow\ETL\PHP\Type\AutoCaster; -use Flow\ETL\PHP\Type\Caster; +use function Flow\ETL\DSL\{array_to_rows, flow_context}; +use Flow\ETL\PHP\Type\{AutoCaster, Caster}; use Flow\ETL\Transformer\AutoCastTransformer; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php index 21b312302..305b6a9ce 100755 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; use Flow\ETL\Row\Entry; -use Flow\ETL\Rows; use Flow\ETL\Transformer\CallbackRowTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; class CallbackRowTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php index cdf1c27f5..b91525169 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php @@ -4,14 +4,10 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Config; +use function Flow\ETL\DSL\{int_entry, str_entry}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\DropDuplicatesTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class DropDuplicatesTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php index 0c33bbdd7..253cea81e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php @@ -4,9 +4,7 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\array_to_rows; -use function Flow\ETL\DSL\flow_context; -use function Flow\ETL\DSL\ref; +use function Flow\ETL\DSL\{array_to_rows, flow_context, ref}; use Flow\ETL\Transformer\DropPartitionsTransformer; use PHPUnit\Framework\TestCase; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php index c1b123c0f..f686e8f53 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php @@ -4,12 +4,9 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\EntryNameStyleConverterTransformer; use Flow\ETL\Transformer\StyleConverter\StringStyles; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class EntryNameStyleConverterTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php index dc541991d..6195e45b1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\GroupToArrayTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class GroupToArrayTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php index f25c03ec4..d5682533e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php @@ -4,18 +4,10 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Config; -use Flow\ETL\DataFrame; -use Flow\ETL\DataFrameFactory; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{int_entry, null_entry, str_entry}; use Flow\ETL\Join\Expression; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\JoinEachRowsTransformer; +use Flow\ETL\{Config, DataFrame, DataFrameFactory, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class JoinEachRowsTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php index 53d102704..46d5072bf 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php @@ -4,16 +4,10 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\str_entry; -use Flow\ETL\Config; -use Flow\ETL\Flow; -use Flow\ETL\FlowContext; +use function Flow\ETL\DSL\{int_entry, null_entry, str_entry}; use Flow\ETL\Join\Expression; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\JoinRowsTransformer; +use Flow\ETL\{Config, Flow, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class JoinRowsTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php index 0d8501fea..70ab84773 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\KeepEntriesTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class KeepEntriesTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php index d5e298a10..728176ee2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\RemoveEntriesTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class RemoveEntriesTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php index eea38f8df..410dbb21b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php @@ -4,11 +4,8 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\RenameEntryTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class RenameEntryTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php index d5922a831..f676fb584 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php @@ -4,14 +4,9 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use Flow\ETL\Config; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{int_entry, lit, ref}; use Flow\ETL\Transformer\ScalarFunctionFilterTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class ScalarFunctionFilterTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php index f40a53b79..fe1e886c0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php @@ -4,20 +4,10 @@ namespace Flow\ETL\Tests\Unit\Transformer; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\list_entry; -use function Flow\ETL\DSL\lit; -use function Flow\ETL\DSL\ref; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\type_list; -use function Flow\ETL\DSL\type_xml_node; -use function Flow\ETL\DSL\xml_entry; -use Flow\ETL\Config; +use function Flow\ETL\DSL\{int_entry, list_entry, lit, ref, str_entry, type_list, type_xml_node, xml_entry}; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\FlowContext; -use Flow\ETL\Row; -use Flow\ETL\Rows; use Flow\ETL\Transformer\ScalarFunctionTransformer; +use Flow\ETL\{Config, FlowContext, Row, Rows}; use PHPUnit\Framework\TestCase; final class ScalarFunctionTransformerTest extends TestCase diff --git a/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php b/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php index 7e552e1bb..dcf253493 100644 --- a/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php +++ b/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php @@ -4,22 +4,9 @@ namespace Flow\Serializer\Tests\Unit; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; -use Flow\ETL\Row; -use Flow\ETL\Rows; -use Flow\Serializer\CompressingSerializer; -use Flow\Serializer\NativePHPSerializer; +use function Flow\ETL\DSL\{bool_entry, datetime_entry, float_entry, int_entry, null_entry, object_entry, str_entry, struct_element, struct_entry, struct_type, type_int, type_string}; +use Flow\ETL\{Row, Rows}; +use Flow\Serializer\{CompressingSerializer, NativePHPSerializer}; use PHPUnit\Framework\TestCase; final class CompressingSerializerTest extends TestCase diff --git a/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php b/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php index ffbdb9727..f251ee232 100644 --- a/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php +++ b/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php @@ -4,20 +4,8 @@ namespace Flow\Serializer\Tests\Unit; -use function Flow\ETL\DSL\bool_entry; -use function Flow\ETL\DSL\datetime_entry; -use function Flow\ETL\DSL\float_entry; -use function Flow\ETL\DSL\int_entry; -use function Flow\ETL\DSL\null_entry; -use function Flow\ETL\DSL\object_entry; -use function Flow\ETL\DSL\str_entry; -use function Flow\ETL\DSL\struct_element; -use function Flow\ETL\DSL\struct_entry; -use function Flow\ETL\DSL\struct_type; -use function Flow\ETL\DSL\type_int; -use function Flow\ETL\DSL\type_string; -use Flow\ETL\Row; -use Flow\ETL\Rows; +use function Flow\ETL\DSL\{bool_entry, datetime_entry, float_entry, int_entry, null_entry, object_entry, str_entry, struct_element, struct_entry, struct_type, type_int, type_string}; +use Flow\ETL\{Row, Rows}; use Flow\Serializer\NativePHPSerializer; use PHPUnit\Framework\TestCase; diff --git a/src/functions.php b/src/functions.php index ddfa22007..36349c0c1 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1,32 +1,35 @@ Date: Sun, 10 Mar 2024 14:21:10 +0100 Subject: [PATCH 3/4] Disable native function invocation --- .php-cs-fixer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 642a04185..23fe143a9 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -77,7 +77,7 @@ 'multiline_comment_opening_closing' => true, 'multiline_whitespace_before_semicolons' => true, 'native_constant_invocation' => false, - 'native_function_invocation' => ['include' => ['@all']], // todo + 'native_function_invocation' => false, 'new_with_parentheses' => false, 'nullable_type_declaration_for_default_null_value' => true, 'no_extra_blank_lines' => true, // todo? From b70d7df18a161056c58aa291c779596c71117091 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Sun, 10 Mar 2024 14:23:27 +0100 Subject: [PATCH 4/4] Updated cs fixer rules --- .php-cs-fixer.php | 3 +- .../Avro/Tests/Integration/AvroTest.php | 20 +- .../Avro/Tests/Unit/SchemaConverterTest.php | 2 +- .../Avro/Tests/Unit/ValueConverterTest.php | 8 +- .../Tests/Integration/ChartJSLoaderTest.php | 14 +- .../ChartJS/Tests/Unit/Chart/BarChartTest.php | 2 +- .../CSV/Tests/Integration/CSVDetectorTest.php | 4 +- .../Tests/Integration/CSVExtractorTest.php | 52 ++-- .../Adapter/CSV/Tests/Integration/CSVTest.php | 2 +- .../CSV/Tests/Unit/Detector/OptionTest.php | 2 +- .../Integration/DbalDataFrameFactoryTest.php | 2 +- .../DbalLimitOffsetExtractorTest.php | 8 +- .../Tests/Integration/DbalLoaderTest.php | 20 +- .../Integration/DbalQueryExtractorTest.php | 6 +- .../Adapter/Doctrine/Tests/Unit/PagesTest.php | 6 +- .../ElasticsearchExtractorTest.php | 18 +- .../ElasticsearchLoaderTest.php | 18 +- .../ElasticsearchPHP/IntegrationTest.php | 4 +- .../Tests/Integration/ElasticsearchTest.php | 4 +- .../Unit/EntryIdFactory/HashIdFactoryTest.php | 4 +- .../Tests/Integration/FlysystemFSTest.php | 50 ++-- .../Tests/Integration/RegisterWrapperTest.php | 8 +- .../Tests/Unit/GoogleSheetExtractorTest.php | 14 +- .../GoogleSheet/Tests/Unit/SheetRangeTest.php | 6 +- .../PsrHttpClientDynamicExtractorTest.php | 18 +- .../PsrHttpClientStaticExtractorTest.php | 4 +- .../Tests/Unit/RequestEntriesFactoryTest.php | 2 +- .../JSONMachine/JsonExtractorTest.php | 34 +-- .../JSON/Tests/Integration/JsonTest.php | 4 +- .../Tests/Unit/Logger/DumpLoggerTest.php | 4 +- .../Logger/Tests/Unit/PsrLoggerLoaderTest.php | 4 +- .../MeilisearchPHP/MailiSearchTest.php | 6 +- .../MeilisearchExtractorTest.php | 16 +- .../MeilisearchPHP/MeilisearchLoaderTest.php | 14 +- .../Integration/ParquetExtractorTest.php | 18 +- .../Parquet/Tests/Integration/ParquetTest.php | 12 +- .../Tests/Unit/FlowToParquetSchemaTest.php | 2 +- .../Tests/Unit/ParquetToFlowSchemaTest.php | 8 +- .../Tests/Integration/TextExtractorTest.php | 22 +- .../Text/Tests/Integration/TextTest.php | 2 +- .../Integration/XMLReaderExtractorTest.php | 24 +- .../Tests/Unit/ArrayComparisonTest.php | 6 +- .../Tests/Unit/ArraySortByKeyTest.php | 2 +- .../Cache/LocalFilesystemCacheTest.php | 18 +- .../Integration/Cache/PSRSimpleCacheTest.php | 6 +- .../Integration/DataFrame/AnalyzeTest.php | 16 +- .../Integration/DataFrame/BranchingTest.php | 4 +- .../Tests/Integration/DataFrame/CacheTest.php | 6 +- .../DataFrame/DataFrameJsonTest.php | 2 +- .../Integration/DataFrame/DisplayTest.php | 10 +- .../Integration/DataFrame/GroupByTest.php | 24 +- .../Tests/Integration/DataFrame/JoinTest.php | 12 +- .../Tests/Integration/DataFrame/LimitTest.php | 16 +- .../DataFrame/PartitioningTest.php | 12 +- .../Integration/DataFrame/RenameTest.php | 14 +- .../Integration/DataFrame/SchemaTest.php | 4 +- .../Tests/Integration/DataFrame/SortTest.php | 12 +- .../FilesystemStreamsTest.php | 20 +- .../NotPartitioned/AppendModeTest.php | 14 +- .../ExceptionIfExistsModeTest.php | 4 +- .../NotPartitioned/IgnoreModeTest.php | 8 +- .../NotPartitioned/OverwriteModeTest.php | 14 +- .../Partitioned/AppendModeTest.php | 18 +- .../Partitioned/ExceptionIfExistsModeTest.php | 12 +- .../Partitioned/IgnoreModeTest.php | 18 +- .../Partitioned/OverwriteModeTest.php | 18 +- .../Filesystem/LocalFilesystemTest.php | 50 ++-- .../Integration/Filesystem/RealpathTest.php | 2 +- .../Function/AddDynamicEntriesTest.php | 2 +- .../Integration/Function/AddJsonTest.php | 8 +- .../Tests/Integration/Function/AllTest.php | 2 +- .../Tests/Integration/Function/AnyTest.php | 2 +- .../Integration/Function/ArrayExistsTest.php | 2 +- .../Integration/Function/ArrayExpandTest.php | 6 +- .../Function/ArrayGetCollectionTest.php | 2 +- .../Integration/Function/ArrayGetTest.php | 2 +- .../Function/ArrayKeyRenameTest.php | 2 +- .../Function/ArrayKeysStyleConvertTest.php | 2 +- .../Function/ArrayMergeCollectionTest.php | 2 +- .../Integration/Function/ArrayMergeTest.php | 2 +- .../Integration/Function/ArrayReverseTest.php | 2 +- .../Integration/Function/ArraySortTest.php | 2 +- .../Integration/Function/ArrayUnpackTest.php | 2 +- .../Integration/Function/BetweenTest.php | 2 +- .../Function/BinaryComparisonsTest.php | 2 +- .../Integration/Function/CapitalizeTest.php | 2 +- .../Tests/Integration/Function/CastTest.php | 2 +- .../Integration/Function/CombineTest.php | 2 +- .../Tests/Integration/Function/ConcatTest.php | 4 +- .../Integration/Function/ContainsTest.php | 6 +- .../Tests/Integration/Function/CountTest.php | 6 +- .../Integration/Function/EndsWithTest.php | 6 +- .../Tests/Integration/Function/HashTest.php | 4 +- .../Integration/Function/JsonDecodeTest.php | 2 +- .../Integration/Function/JsonEncodeTest.php | 4 +- .../Integration/Function/ListSelectTest.php | 2 +- .../Tests/Integration/Function/NotTest.php | 2 +- .../Integration/Function/PregMatchAllTest.php | 8 +- .../Integration/Function/PregMatchTest.php | 6 +- .../Integration/Function/PregReplaceTest.php | 6 +- .../Integration/Function/SanitizeTest.php | 6 +- .../Tests/Integration/Function/SizeTest.php | 6 +- .../Tests/Integration/Function/SplitTest.php | 6 +- .../Integration/Function/SprintfTest.php | 6 +- .../Integration/Function/StartsWithTest.php | 6 +- .../Tests/Integration/Function/StrPadTest.php | 4 +- .../Integration/Function/StrReplaceTest.php | 4 +- .../Structure/StructureSelectTest.php | 2 +- .../Integration/Function/ToLowerTest.php | 4 +- .../Integration/Function/ToUpperTest.php | 4 +- .../Tests/Integration/Function/TrimTest.php | 10 +- .../Tests/Integration/Function/WhenTest.php | 2 +- .../Monitoring/Memory/ConfigurationTest.php | 22 +- .../Tests/Integration/PHP/Type/CasterTest.php | 16 +- .../Pipeline/BatchingPipelineTest.php | 8 +- .../Pipeline/CollectingPipelineTest.php | 2 +- .../Integration/Pipeline/OptimizerTest.php | 2 +- .../Integration/Pipeline/PipelineTest.php | 2 +- .../Pipeline/SynchronousPipelineTest.php | 2 +- .../Window/WindowFunctionsTest.php | 4 +- .../Tests/Unit/Cache/IneMemoryCacheTest.php | 16 +- .../CaseConverter/ArrayKeyConverterTest.php | 2 +- .../Flow/ETL/Tests/Unit/DataFrameTest.php | 42 +-- .../ETL/Tests/Unit/ETLErrorHandlingTest.php | 4 +- .../Unit/ExternalSort/BufferCacheTest.php | 6 +- .../Unit/Extractor/ArrayExtractorTest.php | 12 +- .../Unit/Extractor/CacheExtractorTest.php | 22 +- .../Unit/Extractor/ChainExtractorTest.php | 2 +- .../Unit/Extractor/ChunkExtractorTest.php | 4 +- .../Unit/Extractor/DataFrameExtractorTest.php | 2 +- .../Extractor/LocalFileListExtractorTest.php | 16 +- .../Unit/Extractor/MemoryExtractorTest.php | 2 +- .../Unit/Extractor/PipelineExtractorTest.php | 2 +- .../Unit/Extractor/ProcessExtractorTest.php | 2 +- .../Unit/Extractor/SequenceExtractorTest.php | 6 +- .../Unit/Formatter/ASCII/ASCIIBodyTest.php | 4 +- .../Unit/Formatter/ASCII/ASCIIHeadersTest.php | 2 +- .../Unit/Formatter/ASCII/ASCIIValueTest.php | 10 +- .../Tests/Unit/Formatter/ASCIITableTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/AllTest.php | 10 +- .../Flow/ETL/Tests/Unit/Function/AnyTest.php | 8 +- .../Tests/Unit/Function/ArrayExpandTest.php | 8 +- .../Unit/Function/ArrayGetCollectionTest.php | 10 +- .../ETL/Tests/Unit/Function/ArrayGetTest.php | 14 +- .../Unit/Function/ArrayKeyRenameTest.php | 8 +- .../Function/ArrayKeysStyleConverterTest.php | 4 +- .../Function/ArrayMergeCollectionTest.php | 6 +- .../Tests/Unit/Function/ArrayMergeTest.php | 8 +- .../Tests/Unit/Function/ArrayReverseTest.php | 4 +- .../ETL/Tests/Unit/Function/ArraySortTest.php | 8 +- .../Tests/Unit/Function/ArrayUnpackTest.php | 2 +- .../ETL/Tests/Unit/Function/AverageTest.php | 12 +- .../ETL/Tests/Unit/Function/BetweenTest.php | 24 +- .../Unit/Function/BinaryComparisonsTest.php | 92 +++--- .../Tests/Unit/Function/CallMethodTest.php | 10 +- .../Tests/Unit/Function/CapitalizeTest.php | 2 +- .../Flow/ETL/Tests/Unit/Function/CastTest.php | 12 +- .../ETL/Tests/Unit/Function/CollectTest.php | 2 +- .../Tests/Unit/Function/CollectUniqueTest.php | 2 +- .../ETL/Tests/Unit/Function/CombineTest.php | 10 +- .../ETL/Tests/Unit/Function/ConcatTest.php | 6 +- .../ETL/Tests/Unit/Function/CountTest.php | 10 +- .../Unit/Function/DOMNodeAttributeTest.php | 4 +- .../Tests/Unit/Function/DOMNodeValueTest.php | 4 +- .../Unit/Function/DateTimeFormatTest.php | 6 +- .../ETL/Tests/Unit/Function/DenseRankTest.php | 12 +- .../ETL/Tests/Unit/Function/ExistsTest.php | 8 +- .../ETL/Tests/Unit/Function/FirstTest.php | 4 +- .../Flow/ETL/Tests/Unit/Function/HashTest.php | 10 +- .../Tests/Unit/Function/JsonDecodeTest.php | 6 +- .../Tests/Unit/Function/JsonEncodeTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/LastTest.php | 4 +- .../Tests/Unit/Function/ListSelectTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/MathTest.php | 16 +- .../Flow/ETL/Tests/Unit/Function/MaxTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/MinTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/NotTest.php | 6 +- .../Tests/Unit/Function/NumberFormatTest.php | 10 +- .../Tests/Unit/Function/PregMatchAllTest.php | 10 +- .../ETL/Tests/Unit/Function/PregMatchTest.php | 8 +- .../Tests/Unit/Function/PregReplaceTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/RankTest.php | 14 +- .../ETL/Tests/Unit/Function/RowNumberTest.php | 2 +- .../ETL/Tests/Unit/Function/SanitizeTest.php | 10 +- .../Flow/ETL/Tests/Unit/Function/SizeTest.php | 6 +- .../ETL/Tests/Unit/Function/SplitTest.php | 6 +- .../ETL/Tests/Unit/Function/SprintfTest.php | 4 +- .../ETL/Tests/Unit/Function/StrPadTest.php | 4 +- .../Tests/Unit/Function/StrReplaceTest.php | 6 +- .../Unit/Function/StructureSelectTest.php | 10 +- .../Flow/ETL/Tests/Unit/Function/SumTest.php | 8 +- .../ETL/Tests/Unit/Function/ToDateTest.php | 6 +- .../Tests/Unit/Function/ToDateTimeTest.php | 6 +- .../ETL/Tests/Unit/Function/ToLowerTest.php | 4 +- .../ETL/Tests/Unit/Function/ToMoneyTest.php | 10 +- .../Tests/Unit/Function/ToTimeZoneTest.php | 6 +- .../ETL/Tests/Unit/Function/ToUpperTest.php | 4 +- .../Flow/ETL/Tests/Unit/Function/TrimTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/UlidTest.php | 8 +- .../Flow/ETL/Tests/Unit/Function/UuidTest.php | 18 +- .../Flow/ETL/Tests/Unit/Function/WhenTest.php | 6 +- .../ETL/Tests/Unit/Function/XPathTest.php | 8 +- .../tests/Flow/ETL/Tests/Unit/GroupByTest.php | 6 +- .../Tests/Unit/Join/Comparison/AllTest.php | 4 +- .../Tests/Unit/Join/Comparison/AnyTest.php | 4 +- .../Tests/Unit/Join/Comparison/EqualTest.php | 4 +- .../Unit/Join/Comparison/GreaterTest.php | 6 +- .../Join/Comparison/GreaterThanEqualTest.php | 6 +- .../Unit/Join/Comparison/IdenticalTest.php | 4 +- .../Tests/Unit/Join/Comparison/LessTest.php | 6 +- .../Join/Comparison/LessThanEqualTest.php | 6 +- .../Tests/Unit/Join/Comparison/NotTest.php | 4 +- .../ETL/Tests/Unit/Join/ExpressionTest.php | 8 +- .../Tests/Unit/Loader/CallbackLoaderTest.php | 2 +- .../Tests/Unit/Loader/MemoryLoaderTest.php | 2 +- .../Tests/Unit/Loader/StreamLoaderTest.php | 8 +- .../Unit/Loader/TransformerLoaderTest.php | 4 +- .../ETL/Tests/Unit/Memory/ArrayMemoryTest.php | 14 +- .../Tests/Unit/Monitoring/Memory/UnitTest.php | 24 +- .../PHP/Type/ArrayContentDetectorTest.php | 6 +- .../Tests/Unit/PHP/Type/AutoCasterTest.php | 2 +- .../Type/Caster/ArrayCastingHandlerTest.php | 12 +- .../Type/Caster/BooleanCastingHandlerTest.php | 2 +- .../Caster/DateTimeCastingHandlerTest.php | 2 +- .../Type/Caster/EnumCastingHandlerTest.php | 2 +- .../Type/Caster/FloatCastingHandlerTest.php | 2 +- .../Type/Caster/IntegerCastingHandlerTest.php | 2 +- .../Type/Caster/JsonCastingHandlerTest.php | 6 +- .../Type/Caster/ListCastingHandlerTest.php | 4 +- .../PHP/Type/Caster/MapCastingHandlerTest.php | 6 +- .../Type/Caster/ObjectCastingHandlerTest.php | 4 +- .../StringTypeCheckerTest.php | 98 +++--- .../Type/Caster/StringCastingHandlerTest.php | 2 +- .../Caster/StructureCastingHandlerTest.php | 6 +- .../Type/Caster/UuidCastingHandlerTest.php | 4 +- .../PHP/Type/Caster/XMLCastingHandlerTest.php | 2 +- .../PHP/Type/Logical/DateTimeTypeTest.php | 16 +- .../Unit/PHP/Type/Logical/JsonTypeTest.php | 14 +- .../Unit/PHP/Type/Logical/ListTypeTest.php | 26 +- .../Unit/PHP/Type/Logical/MapTypeTest.php | 24 +- .../PHP/Type/Logical/StructureTypeTest.php | 26 +- .../Unit/PHP/Type/Logical/UuidTypeTest.php | 20 +- .../Unit/PHP/Type/Logical/XMLNodeTypeTest.php | 16 +- .../Unit/PHP/Type/Logical/XMLTypeTest.php | 16 +- .../Unit/PHP/Type/Native/ArrayTypeTest.php | 28 +- .../Unit/PHP/Type/Native/CallableTypeTest.php | 20 +- .../Unit/PHP/Type/Native/NullTypeTest.php | 16 +- .../Unit/PHP/Type/Native/ResourceTypeTest.php | 20 +- .../Unit/PHP/Type/Native/ScalarTypeTest.php | 44 +-- .../Tests/Unit/PHP/Type/TypeDetectorTest.php | 12 +- .../Tests/Unit/PHP/Type/TypeFactoryTest.php | 36 +-- .../Unit/Partition/CartesianProductTest.php | 12 +- .../Partition/ScalarFunctionFilterTest.php | 22 +- .../Flow/ETL/Tests/Unit/PartitionTest.php | 14 +- .../ETL/Tests/Unit/Pipeline/ClosureTest.php | 4 +- .../Unit/Pipeline/NestedPipelineTest.php | 2 +- .../Optimizer/BatchSizeOptimizationTest.php | 12 +- .../Optimizer/LimitOptimizationTest.php | 28 +- .../ETL/Tests/Unit/Pipeline/PipesTest.php | 10 +- .../Row/Comparator/NativeComparatorTest.php | 4 +- .../Comparator/WeakObjectComparatorTest.php | 4 +- .../Flow/ETL/Tests/Unit/Row/EntriesTest.php | 64 ++-- .../Tests/Unit/Row/Entry/ArrayEntryTest.php | 14 +- .../Tests/Unit/Row/Entry/BooleanEntryTest.php | 10 +- .../Unit/Row/Entry/DateTimeEntryTest.php | 14 +- .../Tests/Unit/Row/Entry/EnumEntryTest.php | 24 +- .../Tests/Unit/Row/Entry/FloatEntryTest.php | 12 +- .../Tests/Unit/Row/Entry/IntegerEntryTest.php | 12 +- .../Tests/Unit/Row/Entry/JsonEntryTest.php | 20 +- .../Unit/Row/Entry/JsonObjectEntryTest.php | 10 +- .../Tests/Unit/Row/Entry/ListEntryTest.php | 20 +- .../ETL/Tests/Unit/Row/Entry/MapEntryTest.php | 20 +- .../Tests/Unit/Row/Entry/NullEntryTest.php | 10 +- .../Tests/Unit/Row/Entry/ObjectEntryTest.php | 12 +- .../Tests/Unit/Row/Entry/StringEntryTest.php | 14 +- .../Unit/Row/Entry/StructureEntryTest.php | 16 +- .../Tests/Unit/Row/Entry/UuidEntryTest.php | 12 +- .../ETL/Tests/Unit/Row/Entry/XMLEntryTest.php | 16 +- .../Tests/Unit/Row/Entry/XMLNodeEntryTest.php | 2 +- .../ETL/Tests/Unit/Row/EntryReferenceTest.php | 12 +- .../Row/Factory/NativeEntryFactoryTest.php | 82 ++--- .../ETL/Tests/Unit/Row/ReferencesTest.php | 12 +- .../Tests/Unit/Row/Schema/DefinitionTest.php | 50 ++-- .../Formatter/ASCIISchemaFormatterTest.php | 4 +- .../Tests/Unit/Row/Schema/MetadataTest.php | 10 +- .../Row/Schema/SelectiveValidatorTest.php | 8 +- .../Unit/Row/Schema/StrictValidatorTest.php | 10 +- .../Flow/ETL/Tests/Unit/Row/SchemaTest.php | 28 +- .../etl/tests/Flow/ETL/Tests/Unit/RowTest.php | 24 +- .../Flow/ETL/Tests/Unit/RowsJoinTest.php | 30 +- .../tests/Flow/ETL/Tests/Unit/RowsTest.php | 206 ++++++------- .../Flow/ETL/Tests/Unit/Stream/PathTest.php | 52 ++-- .../Transformer/AutoCastTransformerTest.php | 2 +- .../CallbackRowTransformerTest.php | 2 +- .../DropDuplicatesTransformerTest.php | 6 +- .../DropPartitionsTransformerTest.php | 12 +- ...EntryNameStyleConverterTransformerTest.php | 2 +- .../GroupToArrayTransformerTest.php | 2 +- .../JoinEachRowsTransformerTest.php | 6 +- .../Transformer/JoinRowsTransformerTest.php | 6 +- .../KeepEntriesTransformerTest.php | 4 +- .../RemoveEntriesTransformerTest.php | 4 +- .../RenameEntryTransformerTest.php | 2 +- .../ScalarFunctionFilterTransformerTest.php | 18 +- .../ScalarFunctionTransformerTest.php | 12 +- .../Tests/Unit/CompressingSerializerTest.php | 4 +- .../Tests/Unit/NativePHPSerializerTest.php | 2 +- .../ArrayDot/Tests/Unit/ArrayDotGetTest.php | 58 ++-- .../Tests/Unit/ArrayDotRenameTest.php | 10 +- .../ArrayDot/Tests/Unit/ArrayDotSetTest.php | 8 +- .../ArrayDot/Tests/Unit/ArrayDotStepsTest.php | 18 +- .../Tests/Integration/MySqlBulkInsertTest.php | 24 +- .../Tests/Integration/MySqlBulkUpdateTest.php | 2 +- .../Integration/PostgreSqlBulkInsertTest.php | 30 +- .../Integration/PostgreSqlBulkUpdateTest.php | 6 +- .../Integration/SqliteBulkInsertTest.php | 24 +- .../Integration/SqliteBulkUpdateTest.php | 2 +- .../Doctrine/Bulk/Tests/Unit/BulkDataTest.php | 10 +- .../Doctrine/Bulk/Tests/Unit/ColumnsTest.php | 14 +- .../Bulk/Tests/Unit/DbalPlatformTest.php | 10 +- .../Bulk/Tests/Unit/TableDefinitionTest.php | 4 +- .../Dremel/Tests/Integration/DremelTest.php | 28 +- .../Dremel/Tests/Unit/DremelAssembleTest.php | 20 +- .../Dremel/Tests/Unit/DremelShredTest.php | 10 +- .../Flow/Dremel/Tests/Unit/ListNodeTest.php | 18 +- .../Tests/Integration/ReadDataCommandTest.php | 4 +- .../Tests/Integration/ReadMetadataTest.php | 16 +- .../Binary/BinaryReaderWriterTest.php | 6 +- .../Tests/Integration/IO/CompressionTest.php | 12 +- .../Integration/IO/EdgeCasesReadingTest.php | 6 +- .../Tests/Integration/IO/ListsReadingTest.php | 106 +++---- .../Tests/Integration/IO/ListsWritingTest.php | 14 +- .../Tests/Integration/IO/MapsReadingTest.php | 140 ++++----- .../Tests/Integration/IO/MapsWritingTest.php | 6 +- .../Tests/Integration/IO/PaginationTest.php | 10 +- .../Integration/IO/SchemaReadingTest.php | 10 +- .../Integration/IO/SimpleTypesReadingTest.php | 280 +++++++++--------- .../Integration/IO/SimpleTypesWritingTest.php | 100 +++---- .../Integration/IO/StructsReadingTest.php | 224 +++++++------- .../Integration/IO/StructsWritingTest.php | 6 +- .../Tests/Integration/IO/WriterTest.php | 66 ++--- .../Data/RLEBitPackedHybridTest.php | 26 +- .../ColumnChunkStatisticsTest.php | 120 ++++---- .../PageBuilder/RLEBitPackedTest.php | 4 +- .../RowGroupBuilder/PagesBuilderTest.php | 26 +- .../BinaryReader/BinaryBufferReaderTest.php | 4 +- .../Tests/Unit/BinaryReader/BytesTest.php | 26 +- .../Data/Converter/Int32DateConverterTest.php | 2 +- .../Converter/Int32DateTimeConverterTest.php | 2 +- .../Converter/Int64DateTimeConverterTest.php | 2 +- .../Unit/Data/Converter/TimeConverterTest.php | 2 +- .../Unit/Data/Converter/UuidConverterTest.php | 2 +- .../Flow/Parquet/Tests/Unit/FunctionsTest.php | 2 +- .../Tests/Unit/ParquetFile/CodecTest.php | 6 +- .../Data/RLEBitPackedHybridTest.php | 32 +- .../Unit/ParquetFile/Page/ColumnDataTest.php | 12 +- .../ColumnChunkSizeStatisticsTest.php | 18 +- .../RowGroupBuilder/FlattenerTest.php | 30 +- .../ParquetFile/Schema/FlatColumnTest.php | 12 +- .../ParquetFile/Schema/NestedColumnTest.php | 26 +- .../Tests/Unit/ParquetFile/SchemaTest.php | 22 +- .../RDSL/Tests/Integration/ExecutorTest.php | 4 +- .../Tests/Unit/AccessControl/AllowAllTest.php | 6 +- .../Tests/Unit/AccessControl/DenyAllTest.php | 6 +- .../Tests/Unit/AccessControl/ExceptTest.php | 6 +- .../Flow/RDSL/Tests/Unit/BuilderTest.php | 6 +- .../Flow/RDSL/Tests/Unit/NamespaceTest.php | 2 +- .../Snappy/Tests/Integration/SnappyTest.php | 16 +- .../Tests/Integration/ExamplesTest.php | 6 +- 369 files changed, 2570 insertions(+), 2569 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 23fe143a9..462f5707b 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -132,7 +132,6 @@ 'phpdoc_order' => true, 'phpdoc_to_comment' => false, 'phpdoc_types_order' => true, - 'php_unit_method_casing' => ['case' => 'snake_case'], 'protected_to_private' => true, 'return_assignment' => false, 'return_type_declaration' => ['space_before' => 'one'], @@ -142,5 +141,7 @@ 'ternary_to_null_coalescing' => true, 'yoda_style' => false, 'void_return' => true, + 'php_unit_method_casing' => ['case' => 'snake_case'], + 'php_unit_test_case_static_method_calls' => ['call_type' => 'static'], ]) ->setFinder($finder); diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php index f81e17e2f..567113de2 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration/AvroTest.php @@ -31,7 +31,7 @@ public function test_limit() : void $extractor = new AvroExtractor(Path::realpath($path)); $extractor->changeLimit(2); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -54,16 +54,16 @@ public function test_signal_stop() : void $generator = $extractor->extract(new FlowContext(Config::default())); - $this->assertSame([['id' => 1]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 1]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => 2]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 2]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => 3]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 3]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->send(Signal::STOP); - $this->assertFalse($generator->valid()); + self::assertFalse($generator->valid()); } public function test_using_pattern_path() : void @@ -86,9 +86,9 @@ public function test_writing_and_reading_avro_with_all_supported_types() : void ->write(to_avro($path)) ->run(); - $this->assertFileExists($path); + self::assertFileExists($path); - $this->assertEquals( + self::assertEquals( 100, Flow::setUp(Config::builder()->putInputIntoRows()->build()) ->read(from_avro($path)) diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php index 3414374f7..f1305b41e 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/SchemaConverterTest.php @@ -18,7 +18,7 @@ final class SchemaConverterTest extends TestCase { public function test_convert_etl_entries_to_avro_json() : void { - $this->assertSame( + self::assertSame( <<<'AVRO_JSON' {"name":"row","type":"record","fields":[{"name":"integer","type":"int"},{"name":"boolean","type":"boolean"},{"name":"string","type":"string"},{"name":"float","type":"float"},{"name":"datetime","type":"long","logicalType":"timestamp-micros"},{"name":"json","type":"string"},{"name":"list","type":{"type":"array","items":"string"}},{"name":"structure","type":{"name":"Structure","type":"record","fields":[{"name":"a","type":"string"}]}},{"name":"map","type":{"type":"map","values":"int"}}]} AVRO_JSON diff --git a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/ValueConverterTest.php b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/ValueConverterTest.php index ea431c080..7ecf2c066 100644 --- a/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/ValueConverterTest.php +++ b/src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Unit/ValueConverterTest.php @@ -20,7 +20,7 @@ public function test_datetime_value() : void ], ]); - $this->assertEquals( + self::assertEquals( ['datetime_entry' => new \DateTimeImmutable('2022-01-01 00:00:00')], $converter->convert(['datetime_entry' => (int) (new \DateTimeImmutable('2022-01-01 00:00:00'))->format('Uu')]) ); @@ -44,7 +44,7 @@ public function test_list_of_datetimes() : void ], ]); - $this->assertEquals( + self::assertEquals( ['list_of_datetimes' => [new \DateTimeImmutable('2022-01-01 00:00:00'), new \DateTimeImmutable('2022-01-02 00:00:00')]], $converter->convert(['list_of_datetimes' => [ (int) (new \DateTimeImmutable('2022-01-01 00:00:00'))->format('Uu'), @@ -63,7 +63,7 @@ public function test_list_of_ints() : void ], ]); - $this->assertSame( + self::assertSame( ['list_of_ints' => [1, 2, 3]], $converter->convert(['list_of_ints' => [1, 2, 3]]) ); @@ -79,7 +79,7 @@ public function test_simple_scalar_value() : void ], ]); - $this->assertSame( + self::assertSame( ['string_entry' => 'some_string'], $converter->convert(['string_entry' => 'some_string']) ); diff --git a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php index 8c7e25ada..1d4f86348 100644 --- a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php +++ b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Integration/ChartJSLoaderTest.php @@ -43,7 +43,7 @@ public function test_loading_data_to_bar_chart() : void ) ->run(); - $this->assertSame( + self::assertSame( [ 'type' => 'bar', 'data' => [ @@ -78,7 +78,7 @@ public function test_loading_data_to_bar_chart() : void ], $chart->data(), ); - $this->assertFileExists($output); + self::assertFileExists($output); } public function test_loading_data_to_bar_chart_output_variable() : void @@ -115,7 +115,7 @@ public function test_loading_data_to_bar_chart_output_variable() : void ) ->run(); - $this->assertSame( + self::assertSame( [ 'type' => 'bar', 'data' => [ @@ -184,7 +184,7 @@ public function test_loading_data_to_line_chart() : void ) ->run(); - $this->assertSame( + self::assertSame( [ 'type' => 'line', 'data' => [ @@ -219,7 +219,7 @@ public function test_loading_data_to_line_chart() : void ], $chart->data(), ); - $this->assertFileExists($output); + self::assertFileExists($output); } public function test_loading_data_to_pie_chart() : void @@ -266,7 +266,7 @@ public function test_loading_data_to_pie_chart() : void ) ->run(); - $this->assertSame( + self::assertSame( [ 'type' => 'pie', 'data' => [ @@ -291,6 +291,6 @@ public function test_loading_data_to_pie_chart() : void ], $chart->data(), ); - $this->assertFileExists($output); + self::assertFileExists($output); } } diff --git a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php index 7e4af77ab..f741050f9 100644 --- a/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php +++ b/src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit/Chart/BarChartTest.php @@ -32,7 +32,7 @@ public function test_collecting_data_from_rows() : void $chart->collect($rows); - $this->assertSame( + self::assertSame( [ 'type' => 'bar', 'data' => [ diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVDetectorTest.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVDetectorTest.php index e332b64de..5728c8e83 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVDetectorTest.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVDetectorTest.php @@ -52,7 +52,7 @@ public function test_detecting_enclosures(string $enclosure) : void { $detector = new CSVDetector($this->createResource(',', $enclosure)); - $this->assertSame($enclosure, $detector->detect()->enclosure); + self::assertSame($enclosure, $detector->detect()->enclosure); } #[DataProvider('separator_provider')] @@ -60,7 +60,7 @@ public function test_detecting_separators(string $separator) : void { $detector = new CSVDetector($this->createResource($separator)); - $this->assertSame($separator, $detector->detect()->separator); + self::assertSame($separator, $detector->detect()->separator); } /** diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php index a3c99b0b2..0f617c394 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVExtractorTest.php @@ -22,7 +22,7 @@ public function test_extracting_csv_empty_columns_as_empty_strings() : void empty_to_null: false, ); - $this->assertSame( + self::assertSame( [ [ [ @@ -54,7 +54,7 @@ public function test_extracting_csv_empty_columns_as_null() : void __DIR__ . '/../Fixtures/file_with_empty_columns.csv' ); - $this->assertSame( + self::assertSame( [ [ [ @@ -84,7 +84,7 @@ public function test_extracting_csv_empty_headers() : void __DIR__ . '/../Fixtures/file_with_empty_headers.csv' ); - $this->assertSame( + self::assertSame( [ [ ['e00' => null, 'name' => null, 'active' => 'false'], @@ -123,7 +123,7 @@ public function test_extracting_csv_files_from_directory_recursively() : void $total += $rows->count(); } - $this->assertSame(1998, $total); + self::assertSame(1998, $total); } public function test_extracting_csv_files_with_header() : void @@ -135,7 +135,7 @@ public function test_extracting_csv_files_with_header() : void ->fetch(); foreach ($rows as $row) { - $this->assertSame( + self::assertSame( [ 'Year', 'Industry_aggregation_NZSIOC', @@ -153,7 +153,7 @@ public function test_extracting_csv_files_with_header() : void ); } - $this->assertSame(998, $rows->count()); + self::assertSame(998, $rows->count()); } public function test_extracting_csv_files_with_schema() : void @@ -170,7 +170,7 @@ public function test_extracting_csv_files_with_schema() : void ->fetch(); foreach ($rows as $row) { - $this->assertSame( + self::assertSame( [ 'Year', 'Industry_aggregation_NZSIOC', @@ -188,10 +188,10 @@ public function test_extracting_csv_files_with_schema() : void ); } - $this->assertSame(998, $rows->count()); - $this->assertEquals($schema, $rows->schema()); + self::assertSame(998, $rows->count()); + self::assertEquals($schema, $rows->schema()); - $this->assertSame( + self::assertSame( <<<'SCHEMA' schema |-- Year: integer @@ -231,7 +231,7 @@ public function test_extracting_csv_files_without_header() : void $total += $rows->count(); } - $this->assertSame(999, $total); + self::assertSame(999, $total); } public function test_extracting_csv_with_corrupted_row() : void @@ -240,7 +240,7 @@ public function test_extracting_csv_with_corrupted_row() : void ->extract(from_csv(__DIR__ . '/../Fixtures/corrupted_row.csv')) ->fetch(); - $this->assertSame(3, $rows->count()); + self::assertSame(3, $rows->count()); } public function test_extracting_csv_with_more_columns_than_headers() : void @@ -262,7 +262,7 @@ public function test_extracting_csv_with_more_columns_than_headers() : void $total += $rows->count(); } - $this->assertSame(1, $total); + self::assertSame(1, $total); } public function test_extracting_csv_with_more_headers_than_columns() : void @@ -284,12 +284,12 @@ public function test_extracting_csv_with_more_headers_than_columns() : void $total += $rows->count(); } - $this->assertSame(1, $total); + self::assertSame(1, $total); } public function test_extracting_csv_with_more_than_1000_characters_per_line_splits_rows() : void { - $this->assertCount( + self::assertCount( 2, df() ->read(from_csv(__DIR__ . '/../Fixtures/more_than_1000_characters_per_line.csv')) @@ -301,7 +301,7 @@ public function test_extracting_csv_with_more_than_1000_characters_per_line_spli public function test_extracting_csv_with_more_than_1000_characters_per_line_with_increased_read_in_line_option() : void { - $this->assertCount( + self::assertCount( 1, df() ->read(from_csv(__DIR__ . '/../Fixtures/more_than_1000_characters_per_line.csv', characters_read_in_line: 2000)) @@ -326,7 +326,7 @@ public function test_limit() : void $extractor = new CSVExtractor(Path::realpath($path)); $extractor->changeLimit(2); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -342,7 +342,7 @@ public function test_load_not_existing_file_throws_exception() : void public function test_loading_data_from_all_partitions() : void { - $this->assertSame( + self::assertSame( [ ['group' => '1', 'id' => 1, 'value' => 'a'], ['group' => '1', 'id' => 2, 'value' => 'b'], @@ -364,7 +364,7 @@ public function test_loading_data_from_all_partitions() : void public function test_loading_data_from_all_with_local_fs() : void { - $this->assertSame( + self::assertSame( [ ['group' => '1', 'id' => 1, 'value' => 'a'], ['group' => '1', 'id' => 2, 'value' => 'b'], @@ -400,15 +400,15 @@ public function test_signal_stop() : void $generator = $extractor->extract(new FlowContext(Config::default())); - $this->assertSame([['id' => '1']], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => '1']], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => '2']], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => '2']], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => '3']], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => '3']], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->send(Signal::STOP); - $this->assertFalse($generator->valid()); + self::assertFalse($generator->valid()); } } diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php index edfb902a5..76220bc11 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Integration/CSVTest.php @@ -44,7 +44,7 @@ public function test_loading_csv_files() : void ->load(to_csv($path)) ->run(); - $this->assertEquals( + self::assertEquals( 100, df()->read(from_csv($path))->count() ); diff --git a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Unit/Detector/OptionTest.php b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Unit/Detector/OptionTest.php index 0ca9f7a60..c96656dcc 100644 --- a/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Unit/Detector/OptionTest.php +++ b/src/adapter/etl-adapter-csv/tests/Flow/ETL/Adapter/CSV/Tests/Unit/Detector/OptionTest.php @@ -32,6 +32,6 @@ public function test_score() : void $option->parse('a,b,c'); $option->parse('a,b,c'); - $this->assertSame(301000, $option->score()); + self::assertSame(301000, $option->score()); } } diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php index f0de62e6f..077ecdd13 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalDataFrameFactoryTest.php @@ -49,7 +49,7 @@ public function test_create_loader_with_invalid_operation() : void ->select('id') ->fetch(); - $this->assertSame( + self::assertSame( [ ['id' => 1], ], diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php index 4f1347cb2..f2058d8fe 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLimitOffsetExtractorTest.php @@ -39,7 +39,7 @@ public function test_extracting_entire_table() : void )) ->fetch(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'name_1', 'description' => 'description_1'], ['id' => 2, 'name' => 'name_2', 'description' => 'description_2'], @@ -83,7 +83,7 @@ public function test_extracting_entire_table_using_qb() : void ) ->fetch(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'name_1', 'description' => 'description_1'], ['id' => 2, 'name' => 'name_2', 'description' => 'description_2'], @@ -124,7 +124,7 @@ public function test_extracting_limited_number_of_rows_from_table() : void )) ->fetch(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'name_1', 'description' => 'description_1'], ['id' => 2, 'name' => 'name_2', 'description' => 'description_2'], @@ -164,7 +164,7 @@ public function test_extracting_selected_columns() : void )) ->fetch(); - $this->assertSame( + self::assertSame( [ ['name' => 'name_1'], ['name' => 'name_2'], diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php index a02460a67..fc14ea831 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php @@ -81,7 +81,7 @@ public function test_inserts_multiple_rows_at_once() : void ->load($loader) ->run(); - $this->assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); + self::assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); } public function test_inserts_multiple_rows_at_once_using_existing_connection() : void @@ -111,8 +111,8 @@ public function test_inserts_multiple_rows_at_once_using_existing_connection() : ->load($loader) ->run(); - $this->assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); - $this->assertEquals(1, $this->pgsqlDatabaseContext->numberOfExecutedInsertQueries()); + self::assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); + self::assertEquals(1, $this->pgsqlDatabaseContext->numberOfExecutedInsertQueries()); } public function test_inserts_multiple_rows_in_two_insert_queries() : void @@ -138,7 +138,7 @@ public function test_inserts_multiple_rows_in_two_insert_queries() : void ->load(to_dbal_table_insert($this->connectionParams(), $table)) ->run(); - $this->assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); + self::assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); } public function test_inserts_new_rows_and_skip_already_existed() : void @@ -174,8 +174,8 @@ public function test_inserts_new_rows_and_skip_already_existed() : void ->load(to_dbal_table_insert($this->connectionParams(), $table, ['skip_conflicts' => true])) ->run(); - $this->assertEquals(4, $this->pgsqlDatabaseContext->tableCount($table)); - $this->assertEquals( + self::assertEquals(4, $this->pgsqlDatabaseContext->tableCount($table)); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One'], ['id' => 2, 'name' => 'Name Two', 'description' => 'Description Two'], @@ -221,8 +221,8 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_primar ->load(to_dbal_table_insert($this->connectionParams(), $table, ['constraint' => 'flow_doctrine_bulk_test_pkey'])) ->run(); - $this->assertEquals(4, $this->pgsqlDatabaseContext->tableCount($table)); - $this->assertEquals( + self::assertEquals(4, $this->pgsqlDatabaseContext->tableCount($table)); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One'], ['id' => 2, 'name' => 'New Name Two', 'description' => 'New Description Two'], @@ -269,7 +269,7 @@ public function test_update_multiple_rows_at_once() : void ->load($updateLoader) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'Changed Name One', 'description' => 'Description One'], ['id' => 2, 'name' => 'Name Two', 'description' => 'Description Two'], @@ -278,6 +278,6 @@ public function test_update_multiple_rows_at_once() : void $this->pgsqlDatabaseContext->selectAll('flow_doctrine_bulk_test') ); - $this->assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); + self::assertEquals(3, $this->pgsqlDatabaseContext->tableCount($table)); } } diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php index 4a0e48873..ab1b5deca 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalQueryExtractorTest.php @@ -43,7 +43,7 @@ public function test_extracting_multiple_rows_at_once() : void ) )->fetch(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One'], ['id' => 2, 'name' => 'Name Two', 'description' => 'Description Two'], @@ -97,8 +97,8 @@ public function test_extracting_multiple_rows_multiple_times() : void ) )->fetch(); - $this->assertSame(10, $rows->count()); - $this->assertSame( + self::assertSame(10, $rows->count()); + self::assertSame( [ ['id' => 1, 'name' => 'Name', 'description' => 'Description'], ['id' => 2, 'name' => 'Name', 'description' => 'Description'], diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Unit/PagesTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Unit/PagesTest.php index 53c0e6d10..616303352 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Unit/PagesTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Unit/PagesTest.php @@ -11,16 +11,16 @@ final class PagesTest extends TestCase { public function test_total_even_pages() : void { - $this->assertSame(100, (new Pages(1000, 10))->pages()); + self::assertSame(100, (new Pages(1000, 10))->pages()); } public function test_total_pages_with_last_page_not_full() : void { - $this->assertSame(100, (new Pages(999, 10))->pages()); + self::assertSame(100, (new Pages(999, 10))->pages()); } public function test_total_pages_with_less_elements_than_page_size() : void { - $this->assertSame(1, (new Pages(8, 10))->pages()); + self::assertSame(1, (new Pages(8, 10))->pages()); } } diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php index eeec2a2da..316b88f1a 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchExtractorTest.php @@ -67,7 +67,7 @@ public function test_empty_extraction() : void ->read(from_es($this->elasticsearchContext->clientConfig(), $params, $pitParams)) ->fetch(); - $this->assertCount(0, $results); + self::assertCount(0, $results); } public function test_extraction_index_with_from_and_size() : void @@ -106,11 +106,11 @@ public function test_extraction_index_with_from_and_size() : void ->transform(es_hits_to_rows(DocumentDataSource::fields)) ->fetch(); - $this->assertCount(2000, $results); - $this->assertArrayHasKey('id', $results->first()->toArray()); - $this->assertArrayHasKey('position', $results->first()->toArray()); - $this->assertArrayNotHasKey('active', $results->first()->toArray()); - $this->assertArrayNotHasKey('name', $results->first()->toArray()); + self::assertCount(2000, $results); + self::assertArrayHasKey('id', $results->first()->toArray()); + self::assertArrayHasKey('position', $results->first()->toArray()); + self::assertArrayNotHasKey('active', $results->first()->toArray()); + self::assertArrayNotHasKey('name', $results->first()->toArray()); } public function test_extraction_index_with_search_after() : void @@ -146,7 +146,7 @@ public function test_extraction_index_with_search_after() : void ->extract(from_es($this->elasticsearchContext->clientConfig(), $params)) ->fetch(); - $this->assertCount(3, $results); + self::assertCount(3, $results); } public function test_extraction_index_with_search_after_with_point_in_time() : void @@ -187,7 +187,7 @@ public function test_extraction_index_with_search_after_with_point_in_time() : v ->extract(from_es($this->elasticsearchContext->clientConfig(), $params, $pitParams)) ->fetch(); - $this->assertCount(3, $results); + self::assertCount(3, $results); } public function test_extraction_whole_index_with_point_in_time() : void @@ -228,6 +228,6 @@ public function test_extraction_whole_index_with_point_in_time() : void ->extract(from_es($this->elasticsearchContext->clientConfig(), $params, $pitParams)) ->fetch(); - $this->assertCount(3, $results); + self::assertCount(3, $results); } } diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php index 995217bc6..344c22d97 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/ElasticsearchLoaderTest.php @@ -44,7 +44,7 @@ public function test_empty_rows() : void $response = $this->elasticsearchContext->client()->search($params); - $this->assertSame(0, $response['hits']['total']['value']); + self::assertSame(0, $response['hits']['total']['value']); } public function test_integration_with_entry_factory() : void @@ -81,12 +81,12 @@ public function test_integration_with_entry_factory() : void $response = $this->elasticsearchContext->client()->search($params); - $this->assertSame(4, $response['hits']['total']['value']); + self::assertSame(4, $response['hits']['total']['value']); $names = \array_map(fn (array $hit) : string => $hit['_source']['name'], $response['hits']['hits']); \sort($names); - $this->assertSame(['Dawid', 'Norbert', 'Tomek', 'Łukasz'], $names); + self::assertSame(['Dawid', 'Norbert', 'Tomek', 'Łukasz'], $names); } public function test_integration_with_json_entry() : void @@ -111,11 +111,11 @@ public function test_integration_with_json_entry() : void $response = $this->elasticsearchContext->client()->search($params); - $this->assertSame(1, $response['hits']['total']['value']); + self::assertSame(1, $response['hits']['total']['value']); $json = \array_map(fn (array $hit) : array => $hit['_source']['json'], $response['hits']['hits']); - $this->assertSame([['foo' => 'bar']], $json); + self::assertSame([['foo' => 'bar']], $json); } public function test_integration_with_partial_update_id_factory() : void @@ -151,11 +151,11 @@ public function test_integration_with_partial_update_id_factory() : void $response = $this->elasticsearchContext->client()->search($params); - $this->assertSame(1, $response['hits']['total']['value']); + self::assertSame(1, $response['hits']['total']['value']); $data = \array_map(fn (array $hit) : array => $hit['_source'], $response['hits']['hits']); - $this->assertSame( + self::assertSame( [ [ 'id' => 1, @@ -206,11 +206,11 @@ public function test_integration_with_sha1_id_factory() : void $response = $this->elasticsearchContext->client()->search($params); - $this->assertSame(4, $response['hits']['total']['value']); + self::assertSame(4, $response['hits']['total']['value']); $names = \array_map(fn (array $hit) : string => $hit['_source']['name'], $response['hits']['hits']); \sort($names); - $this->assertSame(['Dawid', 'Norbert', 'Tomek', 'Łukasz'], $names); + self::assertSame(['Dawid', 'Norbert', 'Tomek', 'Łukasz'], $names); } } diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php index b34f49483..50442bf47 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchPHP/IntegrationTest.php @@ -77,8 +77,8 @@ public function test_loading_and_extraction_with_limit_and_transformation() : vo ) ->fetch(); - $this->assertCount($limit, $results); - $this->assertSame( + self::assertCount($limit, $results); + self::assertSame( \array_map( static fn (int $i) : array => [ 'id' => \sha1((string) $i), diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchTest.php index 95e81b0a1..9bd41aece 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Integration/ElasticsearchTest.php @@ -15,7 +15,7 @@ final class ElasticsearchTest extends TestCase public function test_batch_size_when_its_not_explicitly_set() : void { if ($this->elasticsearchContext->version() <= 7) { - $this->markTestSkipped('httpClient option is not accepted in Elasticsearch 7'); + self::markTestSkipped('httpClient option is not accepted in Elasticsearch 7'); } (new Flow()) @@ -39,7 +39,7 @@ public function test_batch_size_when_its_not_explicitly_set() : void ) ->run(); - $this->assertCount( + self::assertCount( 1, $httpClient->requests ); diff --git a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Unit/EntryIdFactory/HashIdFactoryTest.php b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Unit/EntryIdFactory/HashIdFactoryTest.php index 889140328..4b7025620 100644 --- a/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Unit/EntryIdFactory/HashIdFactoryTest.php +++ b/src/adapter/etl-adapter-elasticsearch/tests/Flow/ETL/Adapter/Elasticsearch/Tests/Unit/EntryIdFactory/HashIdFactoryTest.php @@ -16,7 +16,7 @@ public function test_create_row() : void { $factory = new HashIdFactory('first_name', 'last_name'); - $this->assertEquals( + self::assertEquals( new Row\Entry\StringEntry( 'id', \hash('xxh128', 'John:Doe') @@ -31,7 +31,7 @@ public function test_create_row_with_different_hash() : void { $factory = (new HashIdFactory('first_name', 'last_name'))->withAlgorithm('sha1'); - $this->assertEquals( + self::assertEquals( new Row\Entry\StringEntry( 'id', \sha1('John:Doe') diff --git a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php index 7f19a2b9d..cf25028a3 100644 --- a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php +++ b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/FlysystemFSTest.php @@ -26,7 +26,7 @@ public function test_append_mode() : void \fwrite($appendStream->resource(), "some more data to make file not empty\n"); $appendStream->close(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'STRING' some data to make file not empty some more data to make file not empty @@ -35,33 +35,33 @@ public function test_append_mode() : void ); $fs->rm($stream->path()); - $this->assertFalse($fs->exists($stream->path())); + self::assertFalse($fs->exists($stream->path())); } public function test_dir_exists() : void { - $this->assertTrue((new FlysystemFS())->exists(new Path(__DIR__))); - $this->assertFalse((new FlysystemFS())->exists(new Path(__DIR__ . '/not_existing_directory'))); + self::assertTrue((new FlysystemFS())->exists(new Path(__DIR__))); + self::assertFalse((new FlysystemFS())->exists(new Path(__DIR__ . '/not_existing_directory'))); } public function test_fie_exists() : void { - $this->assertTrue((new FlysystemFS())->exists(new Path(__FILE__))); - $this->assertFalse((new FlysystemFS())->exists(new Path(__DIR__ . '/not_existing_file.php'))); + self::assertTrue((new FlysystemFS())->exists(new Path(__FILE__))); + self::assertFalse((new FlysystemFS())->exists(new Path(__DIR__ . '/not_existing_file.php'))); } public function test_file_pattern_exists() : void { - $this->assertTrue((new FlysystemFS())->exists(new Path(__DIR__ . '/**/*.txt'))); - $this->assertFalse((new FlysystemFS())->exists(new Path(__DIR__ . '/**/*.pdf'))); + self::assertTrue((new FlysystemFS())->exists(new Path(__DIR__ . '/**/*.txt'))); + self::assertFalse((new FlysystemFS())->exists(new Path(__DIR__ . '/**/*.pdf'))); } public function test_open_file_stream_for_existing_file() : void { $stream = (new FlysystemFS())->open(new Path(__FILE__), Mode::READ); - $this->assertIsResource($stream->resource()); - $this->assertSame( + self::assertIsResource($stream->resource()); + self::assertSame( \file_get_contents(__FILE__), \stream_get_contents($stream->resource()) ); @@ -73,7 +73,7 @@ public function test_open_file_stream_for_non_existing_file() : void $stream = (new FlysystemFS())->open(new Path($path), Mode::WRITE); - $this->assertIsResource($stream->resource()); + self::assertIsResource($stream->resource()); } public function test_reading_multi_partitioned_path() : void @@ -96,7 +96,7 @@ public function test_reading_multi_partitioned_path() : void ); \sort($paths); - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/multi_partitions/date=2022-01-02/country=pl/file.txt'), new Path(__DIR__ . '/Fixtures/multi_partitions/date=2022-01-03/country=pl/file.txt'), @@ -110,7 +110,7 @@ public function test_reading_partitioned_folder() : void $paths = \iterator_to_array((new FlysystemFS())->scan(new Path(__DIR__ . '/Fixtures/partitioned**/*.txt'), new NoopFilter())); \sort($paths); - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/partitioned/partition_01=a/file_01.txt'), new Path(__DIR__ . '/Fixtures/partitioned/partition_01=b/file_02.txt'), @@ -121,7 +121,7 @@ public function test_reading_partitioned_folder() : void public function test_reading_partitioned_folder_with_partitions_filtering() : void { - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/partitioned/partition_01=b/file_02.txt'), ], @@ -140,7 +140,7 @@ public function test_reading_partitioned_folder_with_pattern() : void $paths = \iterator_to_array((new FlysystemFS())->scan(new Path(__DIR__ . '/Fixtures/partitioned/partition_01=*/*.txt'), new NoopFilter())); \sort($paths); - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/partitioned/partition_01=a/file_01.txt'), new Path(__DIR__ . '/Fixtures/partitioned/partition_01=b/file_02.txt'), @@ -159,11 +159,11 @@ public function test_remove_directory_with_content_when_exists() : void \fwrite($stream->resource(), 'some data to make file not empty'); $stream->close(); - $this->assertTrue($fs->exists($dirPath)); - $this->assertTrue($fs->exists($stream->path())); + self::assertTrue($fs->exists($dirPath)); + self::assertTrue($fs->exists($stream->path())); $fs->rm($dirPath); - $this->assertFalse($fs->exists($dirPath)); - $this->assertFalse($fs->exists($stream->path())); + self::assertFalse($fs->exists($dirPath)); + self::assertFalse($fs->exists($stream->path())); } public function test_remove_file_when_exists() : void @@ -174,9 +174,9 @@ public function test_remove_file_when_exists() : void \fwrite($stream->resource(), 'some data to make file not empty'); $stream->close(); - $this->assertTrue($fs->exists($stream->path())); + self::assertTrue($fs->exists($stream->path())); $fs->rm($stream->path()); - $this->assertFalse($fs->exists($stream->path())); + self::assertFalse($fs->exists($stream->path())); } public function test_remove_pattern() : void @@ -189,11 +189,11 @@ public function test_remove_pattern() : void \fwrite($stream->resource(), 'some data to make file not empty'); $stream->close(); - $this->assertTrue($fs->exists($dirPath)); - $this->assertTrue($fs->exists($stream->path())); + self::assertTrue($fs->exists($dirPath)); + self::assertTrue($fs->exists($stream->path())); $fs->rm(Path::realpath($dirPath->path() . '/*.txt')); - $this->assertTrue($fs->exists($dirPath)); - $this->assertFalse($fs->exists($stream->path())); + self::assertTrue($fs->exists($dirPath)); + self::assertFalse($fs->exists($stream->path())); $fs->rm($dirPath); } } diff --git a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php index 5db3d61cf..bf86d8281 100644 --- a/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php +++ b/src/adapter/etl-adapter-filesystem/tests/Flow/ETL/Adapter/Filesystem/Tests/Integration/RegisterWrapperTest.php @@ -22,13 +22,13 @@ protected function tearDown() : void public function test_registering_wrappers() : void { - $this->assertFalse(\in_array('flow-aws-s3', \stream_get_wrappers(), true)); - $this->assertFalse(\in_array('flow-azure-blob', \stream_get_wrappers(), true)); + self::assertFalse(\in_array('flow-aws-s3', \stream_get_wrappers(), true)); + self::assertFalse(\in_array('flow-azure-blob', \stream_get_wrappers(), true)); AwsS3Stream::register(); AzureBlobStream::register(); - $this->assertTrue(\in_array('flow-aws-s3', \stream_get_wrappers(), true)); - $this->assertTrue(\in_array('flow-azure-blob', \stream_get_wrappers(), true)); + self::assertTrue(\in_array('flow-aws-s3', \stream_get_wrappers(), true)); + self::assertTrue(\in_array('flow-azure-blob', \stream_get_wrappers(), true)); } } diff --git a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php index 3acbda782..990861714 100644 --- a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php +++ b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/GoogleSheetExtractorTest.php @@ -39,17 +39,17 @@ public function test_its_stop_fetching_data_if_processed_row_count_is_less_then_ ]); $service->spreadsheets_values = ($spreadsheetsValues = $this->createMock(SpreadsheetsValues::class)); - $spreadsheetsValues->expects($this->exactly(2)) + $spreadsheetsValues->expects(self::exactly(2)) ->method('get') ->willReturnOnConsecutiveCalls($firstValueRangeMock, $secondValueRangeMock); /** @var array $rowsArray */ $rowsArray = \iterator_to_array($extractor->extract(new FlowContext((new ConfigBuilder())->putInputIntoRows()->build()))); - $this->assertCount(2, $rowsArray); - $this->assertSame(1, $rowsArray[0]->count()); - $this->assertEquals(Row::create($sheetNameEntry, $spreadSheetIdEntry, str_entry('header', 'row1')), $rowsArray[0]->first()); - $this->assertSame(1, $rowsArray[1]->count()); - $this->assertEquals(Row::create($sheetNameEntry, $spreadSheetIdEntry, str_entry('header', 'row2')), $rowsArray[1]->first()); + self::assertCount(2, $rowsArray); + self::assertSame(1, $rowsArray[0]->count()); + self::assertEquals(Row::create($sheetNameEntry, $spreadSheetIdEntry, str_entry('header', 'row1')), $rowsArray[0]->first()); + self::assertSame(1, $rowsArray[1]->count()); + self::assertEquals(Row::create($sheetNameEntry, $spreadSheetIdEntry, str_entry('header', 'row2')), $rowsArray[1]->first()); } public function test_rows_in_batch_must_be_positive_integer() : void @@ -86,6 +86,6 @@ public function test_works_for_no_data() : void $spreadsheetsValues->method('get')->willReturn($ValueRangeMock); /** @var array $rowsArray */ $rowsArray = \iterator_to_array($extractor->extract(new FlowContext((new ConfigBuilder())->build()))); - $this->assertCount(0, $rowsArray); + self::assertCount(0, $rowsArray); } } diff --git a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php index 8c214436f..a12e9a924 100644 --- a/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php +++ b/src/adapter/etl-adapter-google-sheet/tests/Flow/ETL/Adapter/GoogleSheet/Tests/Unit/SheetRangeTest.php @@ -60,8 +60,8 @@ public function test_assertions(int $startRow, int $endRow, string $expectedExce public function test_next_rows_range() : void { $range = new SheetRange(new Columns('Sheet2', 'A', 'B'), 1, 10); - $this->assertSame('Sheet2!A11:B20', $range->nextRows(10)->toString()); - $this->assertSame('Sheet2!A21:B40', $range->nextRows(10)->nextRows(20)->toString()); + self::assertSame('Sheet2!A11:B20', $range->nextRows(10)->toString()); + self::assertSame('Sheet2!A21:B40', $range->nextRows(10)->nextRows(20)->toString()); } /** @@ -69,6 +69,6 @@ public function test_next_rows_range() : void */ public function test_range_to_string(SheetRange $range, string $expectedStringRange) : void { - $this->assertSame($expectedStringRange, $range->toString()); + self::assertSame($expectedStringRange, $range->toString()); } } diff --git a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php index 0cdb72a89..c86371061 100644 --- a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php +++ b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientDynamicExtractorTest.php @@ -46,14 +46,14 @@ public function create(?ResponseInterface $previousResponse = null) : ?RequestIn $body = \json_decode($rows->current()->first()->valueOf('response_body'), true, 512, JSON_THROW_ON_ERROR); - $this->assertSame(1, $rows->current()->count()); - $this->assertSame('flow-php', $body['login'], \json_encode($body, JSON_THROW_ON_ERROR)); - $this->assertSame(73_495_297, $body['id'], \json_encode($body, JSON_THROW_ON_ERROR)); - $this->assertSame(['GitHub.com'], $rows->current()->first()->valueOf('response_headers')['Server']); - $this->assertSame(200, $rows->current()->first()->valueOf('response_status_code')); - $this->assertSame('1.1', $rows->current()->first()->valueOf('response_protocol_version')); - $this->assertSame('OK', $rows->current()->first()->valueOf('response_reason_phrase')); - $this->assertSame('https://api.github.com/orgs/flow-php', $rows->current()->first()->valueOf('request_uri')); - $this->assertSame('GET', $rows->current()->first()->valueOf('request_method')); + self::assertSame(1, $rows->current()->count()); + self::assertSame('flow-php', $body['login'], \json_encode($body, JSON_THROW_ON_ERROR)); + self::assertSame(73_495_297, $body['id'], \json_encode($body, JSON_THROW_ON_ERROR)); + self::assertSame(['GitHub.com'], $rows->current()->first()->valueOf('response_headers')['Server']); + self::assertSame(200, $rows->current()->first()->valueOf('response_status_code')); + self::assertSame('1.1', $rows->current()->first()->valueOf('response_protocol_version')); + self::assertSame('OK', $rows->current()->first()->valueOf('response_reason_phrase')); + self::assertSame('https://api.github.com/orgs/flow-php', $rows->current()->first()->valueOf('request_uri')); + self::assertSame('GET', $rows->current()->first()->valueOf('request_method')); } } diff --git a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php index 842405d69..9f3c75fbe 100644 --- a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php +++ b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Integration/PsrHttpClientStaticExtractorTest.php @@ -51,7 +51,7 @@ public function test_http_extractor() : void $norbertResponseBody = \json_decode($norbertRows->first()->valueOf('response_body'), true, 512, JSON_THROW_ON_ERROR); $tomekResponseBody = \json_decode($tomekRows->first()->valueOf('response_body'), true, 512, JSON_THROW_ON_ERROR); - $this->assertSame('norberttech', $norbertResponseBody['login']); - $this->assertSame('tomaszhanc', $tomekResponseBody['login']); + self::assertSame('norberttech', $norbertResponseBody['login']); + self::assertSame('tomaszhanc', $tomekResponseBody['login']); } } diff --git a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php index dbd123456..266382344 100644 --- a/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php +++ b/src/adapter/etl-adapter-http/tests/Flow/ETL/Adapter/HTTP/Tests/Unit/RequestEntriesFactoryTest.php @@ -51,7 +51,7 @@ public function test_uses_expected_entry_for_request_body(string $expectedReques { $entryFactory = new RequestEntriesFactory(); - $this->assertInstanceOf( + self::assertInstanceOf( $expectedRequestBodyEntryClass, $entryFactory->create($request)->get('request_body') ); diff --git a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php index cd7ff2e78..dfcac3314 100644 --- a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php +++ b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JSONMachine/JsonExtractorTest.php @@ -21,7 +21,7 @@ public function test_extracting_json_from_local_file_stream() : void ->fetch(); foreach ($rows as $row) { - $this->assertSame( + self::assertSame( [ 'timezones', 'latlng', @@ -34,7 +34,7 @@ public function test_extracting_json_from_local_file_stream() : void ); } - $this->assertSame(247, $rows->count()); + self::assertSame(247, $rows->count()); } public function test_extracting_json_from_local_file_stream_using_pointer() : void @@ -44,7 +44,7 @@ public function test_extracting_json_from_local_file_stream_using_pointer() : vo ->fetch(); foreach ($rows as $row) { - $this->assertSame( + self::assertSame( [ 'timezones', 'latlng', @@ -57,7 +57,7 @@ public function test_extracting_json_from_local_file_stream_using_pointer() : vo ); } - $this->assertSame(247, $rows->count()); + self::assertSame(247, $rows->count()); } public function test_extracting_json_from_local_file_stream_with_schema() : void @@ -73,7 +73,7 @@ public function test_extracting_json_from_local_file_stream_with_schema() : void ->fetch(); foreach ($rows as $row) { - $this->assertSame( + self::assertSame( [ 'timezones', 'latlng', @@ -85,9 +85,9 @@ public function test_extracting_json_from_local_file_stream_with_schema() : void ); } - $this->assertSame(247, $rows->count()); - $this->assertEquals($schema, $rows->schema()); - $this->assertSame( + self::assertSame(247, $rows->count()); + self::assertEquals($schema, $rows->schema()); + self::assertSame( <<<'SCHEMA' schema |-- timezones: list @@ -126,7 +126,7 @@ public function test_extracting_json_from_local_file_string_uri() : void $total += $rows->count(); } - $this->assertSame(247, $total); + self::assertSame(247, $total); } public function test_limit() : void @@ -144,7 +144,7 @@ public function test_limit() : void $extractor = new JsonExtractor(Path::realpath($path)); $extractor->changeLimit(2); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -166,16 +166,16 @@ public function test_signal_stop() : void $generator = $extractor->extract(new FlowContext(Config::default())); - $this->assertSame([['id' => 1]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 1]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => 2]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 2]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => 3]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 3]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->send(Signal::STOP); - $this->assertFalse($generator->valid()); + self::assertFalse($generator->valid()); } public function test_using_pattern_path() : void diff --git a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php index 6e80d9e58..dcc4fb0d1 100644 --- a/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php +++ b/src/adapter/etl-adapter-json/tests/Flow/ETL/Adapter/JSON/Tests/Integration/JsonTest.php @@ -28,7 +28,7 @@ public function test_json_loader() : void ->write(to_json($path)) ->run(); - $this->assertEquals( + self::assertEquals( 100, df()->read(from_json($path))->count() ); @@ -48,7 +48,7 @@ public function test_json_loader_loading_empty_string() : void $loader->closure($context); - $this->assertJsonStringEqualsJsonString( + self::assertJsonStringEqualsJsonString( <<<'JSON' [ ] diff --git a/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/Logger/DumpLoggerTest.php b/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/Logger/DumpLoggerTest.php index d8111f647..06bea66e2 100644 --- a/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/Logger/DumpLoggerTest.php +++ b/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/Logger/DumpLoggerTest.php @@ -12,7 +12,7 @@ final class DumpLoggerTest extends TestCase public function test_logger() : void { if (\extension_loaded('xdebug')) { - $this->markTestSkipped('Xdebug extension is loaded and it will affect DumpLogger'); + self::markTestSkipped('Xdebug extension is loaded and it will affect DumpLogger'); } $logger = new DumpLogger(); @@ -22,7 +22,7 @@ public function test_logger() : void $output = \ob_get_contents(); \ob_end_clean(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'OUTPUT' array(1) { ["error"]=> diff --git a/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php b/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php index 9bd898187..bd2610a3e 100644 --- a/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php +++ b/src/adapter/etl-adapter-logger/tests/Flow/ETL/Adapter/Logger/Tests/Unit/PsrLoggerLoaderTest.php @@ -25,7 +25,7 @@ public function test_psr_logger_loader() : void ) ), new FlowContext(Config::default())); - $this->assertTrue($logger->hasErrorRecords()); - $this->assertTrue($logger->hasError('row log')); + self::assertTrue($logger->hasErrorRecords()); + self::assertTrue($logger->hasError('row log')); } } diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php index 31f0aa593..8f7aa4fcd 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MailiSearchTest.php @@ -58,7 +58,7 @@ public function test_batch_size_when_its_not_explicitly_set() : void ) ->run(); - $this->assertCount( + self::assertCount( 2, // second request is to check if the first one was processed $httpClient->requests ); @@ -98,8 +98,8 @@ public function test_loading_and_extraction_with_limit_and_transformation() : vo ) ->fetch(); - $this->assertCount($limit, $results); - $this->assertSame( + self::assertCount($limit, $results); + self::assertSame( \array_map( static fn (int $i) : array => [ 'id' => \sha1((string) $i), diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php index 7b0788172..e0590bc6e 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchExtractorTest.php @@ -51,7 +51,7 @@ public function test_empty_extraction() : void ->extract(from_meilisearch($this->meilisearchContext->clientConfig(), $params, self::INDEX_NAME)) ->fetch(); - $this->assertCount(0, $results); + self::assertCount(0, $results); } public function test_extraction_index_with_from_and_size() : void @@ -84,11 +84,11 @@ public function test_extraction_index_with_from_and_size() : void ->transform(meilisearch_hits_to_rows()) ->fetch(); - $this->assertCount(999, $results); - $this->assertArrayHasKey('id', $results->first()->toArray()); - $this->assertArrayHasKey('position', $results->first()->toArray()); - $this->assertArrayNotHasKey('active', $results->first()->toArray()); - $this->assertArrayNotHasKey('name', $results->first()->toArray()); + self::assertCount(999, $results); + self::assertArrayHasKey('id', $results->first()->toArray()); + self::assertArrayHasKey('position', $results->first()->toArray()); + self::assertArrayNotHasKey('active', $results->first()->toArray()); + self::assertArrayNotHasKey('name', $results->first()->toArray()); } public function test_extraction_index_with_sort() : void @@ -118,7 +118,7 @@ public function test_extraction_index_with_sort() : void ->extract(from_meilisearch($this->meilisearchContext->clientConfig(), $params, self::INDEX_NAME)) ->fetch(); - $this->assertCount(999, $results); - $this->assertSame(999, $results->first()->toArray()['position']); + self::assertCount(999, $results); + self::assertSame(999, $results->first()->toArray()['position']); } } diff --git a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php index 35a89e4c9..71f26325b 100644 --- a/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php +++ b/src/adapter/etl-adapter-meilisearch/tests/Flow/ETL/Adapter/Meilisearch/Tests/Integration/MeilisearchPHP/MeilisearchLoaderTest.php @@ -35,7 +35,7 @@ public function test_empty_rows() : void $response = $this->meilisearchContext->client()->index(self::INDEX_NAME)->search('', ['page' => 1]); - $this->assertCount(0, $response->getHits()); + self::assertCount(0, $response->getHits()); } public function test_integration_with_entry_factory() : void @@ -62,12 +62,12 @@ public function test_integration_with_entry_factory() : void $response = $this->meilisearchContext->client()->index(self::INDEX_NAME)->search(''); - $this->assertSame(4, $response->getEstimatedTotalHits()); + self::assertSame(4, $response->getEstimatedTotalHits()); $names = \array_map(static fn (array $hit) : string => $hit['name'], $response->getHits()); \sort($names); - $this->assertSame(['Dawid', 'Norbert', 'Tomek', 'Łukasz'], $names); + self::assertSame(['Dawid', 'Norbert', 'Tomek', 'Łukasz'], $names); } public function test_integration_with_json_entry() : void @@ -82,11 +82,11 @@ public function test_integration_with_json_entry() : void $response = $this->meilisearchContext->client()->index(self::INDEX_NAME)->search(''); - $this->assertSame(1, $response->getEstimatedTotalHits()); + self::assertSame(1, $response->getEstimatedTotalHits()); $json = \array_map(static fn (array $hit) : array => $hit['json'], $response->getHits()); - $this->assertSame([['foo' => 'bar']], $json); + self::assertSame([['foo' => 'bar']], $json); } public function test_integration_with_partial_update_id_factory() : void @@ -111,11 +111,11 @@ public function test_integration_with_partial_update_id_factory() : void $response = $this->meilisearchContext->client()->index(self::INDEX_NAME)->search(''); - $this->assertSame(1, $response->getEstimatedTotalHits()); + self::assertSame(1, $response->getEstimatedTotalHits()); $data = \array_map(static fn (array $hit) : array => $hit, $response->getHits()); - $this->assertSame( + self::assertSame( [ [ 'id' => 1, diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php index 830299168..c36e1cbd1 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetExtractorTest.php @@ -30,7 +30,7 @@ public function test_limit() : void $extractor = new ParquetExtractor(Path::realpath($path), Options::default()); $extractor->changeLimit(2); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -46,7 +46,7 @@ public function test_reading_file_from_given_offset() : void offset: $totalRows - 100 ); - $this->assertCount( + self::assertCount( 100, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -68,15 +68,15 @@ public function test_signal_stop() : void $generator = $extractor->extract(new FlowContext(Config::default())); - $this->assertSame([['id' => 1]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 1]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => 2]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 2]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['id' => 3]], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['id' => 3]], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->send(Signal::STOP); - $this->assertFalse($generator->valid()); + self::assertFalse($generator->valid()); } } diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php index 9eae7db60..4aa52db78 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration/ParquetTest.php @@ -26,7 +26,7 @@ public function test_writing_to_file() : void ->write(to_parquet($path)) ->run(); - $this->assertEquals( + self::assertEquals( 10, (new Flow()) ->read(from_parquet($path)) @@ -34,13 +34,13 @@ public function test_writing_to_file() : void ); $parquetFile = (new Reader())->read($path); - $this->assertNotEmpty($parquetFile->metadata()->columnChunks()); + self::assertNotEmpty($parquetFile->metadata()->columnChunks()); foreach ($parquetFile->metadata()->columnChunks() as $columnChunk) { - $this->assertSame(Compressions::SNAPPY, $columnChunk->codec()); + self::assertSame(Compressions::SNAPPY, $columnChunk->codec()); } - $this->assertFileExists($path); + self::assertFileExists($path); $this->removeFile($path); } @@ -64,7 +64,7 @@ public function test_writing_with_provided_schema() : void ) ->run(); - $this->assertEquals( + self::assertEquals( [ ['id' => '1', 'name' => 'test', 'uuid' => new Row\Entry\Type\Uuid('26fd21b0-6080-4d6c-bdb4-1214f1feffef'), 'json' => '[{"id":1,"name":"test"},{"id":2,"name":"test"}]'], ['id' => '2', 'name' => 'test', 'uuid' => new Row\Entry\Type\Uuid('26fd21b0-6080-4d6c-bdb4-1214f1feffef'), 'json' => '[{"id":1,"name":"test"},{"id":2,"name":"test"}]'], @@ -75,7 +75,7 @@ public function test_writing_with_provided_schema() : void ->toArray() ); - $this->assertFileExists($path); + self::assertFileExists($path); $this->removeFile($path); } diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php index fc6925749..ec589c639 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/FlowToParquetSchemaTest.php @@ -30,7 +30,7 @@ public function test_convert_array_entry_to_parquet_array() : void public function test_convert_etl_entries_to_parquet_fields() : void { - $this->assertEquals( + self::assertEquals( ParquetSchema::with( FlatColumn::int64('integer'), FlatColumn::boolean('boolean'), diff --git a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php index 881f95152..a941333a5 100644 --- a/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php +++ b/src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Unit/ParquetToFlowSchemaTest.php @@ -31,7 +31,7 @@ public function test_converting_flat_fields_to_flow_schema() : void Schema\FlatColumn::json('json'), )); - $this->assertEquals( + self::assertEquals( \Flow\ETL\DSL\schema( int_schema('int32', true), int_schema('int64', true), @@ -58,7 +58,7 @@ public function test_converting_list_to_flow_schema() : void Schema\NestedColumn::list('list', Schema\ListElement::string()), )); - $this->assertEquals( + self::assertEquals( \Flow\ETL\DSL\schema( list_schema('list', type_list(type_string(true), true)) ), @@ -74,7 +74,7 @@ public function test_converting_map_to_flow_schema() : void Schema\NestedColumn::map('map', MapKey::string(), MapValue::int64()), )); - $this->assertEquals( + self::assertEquals( \Flow\ETL\DSL\schema( map_schema('map', type_map(type_string(), type_int(true), true)) ), @@ -97,7 +97,7 @@ public function test_converting_struct_to_flow_schema() : void ), )); - $this->assertEquals( + self::assertEquals( \Flow\ETL\DSL\schema( struct_schema( 'struct', diff --git a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php index a6e8bf98f..0d4a07f3c 100644 --- a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php +++ b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextExtractorTest.php @@ -23,10 +23,10 @@ public function test_extracting_text_file() : void ->fetch(); foreach ($rows as $row) { - $this->assertInstanceOf(Row\Entry\StringEntry::class, $row->get('text')); + self::assertInstanceOf(Row\Entry\StringEntry::class, $row->get('text')); } - $this->assertSame(1024, $rows->count()); + self::assertSame(1024, $rows->count()); } public function test_extracting_text_files_from_directory() : void @@ -48,7 +48,7 @@ public function test_extracting_text_files_from_directory() : void $total += $rows->count(); } - $this->assertSame(2048, $total); + self::assertSame(2048, $total); } public function test_limit() : void @@ -65,7 +65,7 @@ public function test_limit() : void $extractor = new TextExtractor(Path::realpath($path)); $extractor->changeLimit(2); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -86,15 +86,15 @@ public function test_signal_stop() : void $extractor = new TextExtractor(Path::realpath($path)); $generator = $extractor->extract(new FlowContext(Config::default())); - $this->assertSame([['text' => '1']], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['text' => '1']], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['text' => '2']], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['text' => '2']], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame([['text' => '3']], $generator->current()->toArray()); - $this->assertTrue($generator->valid()); + self::assertSame([['text' => '3']], $generator->current()->toArray()); + self::assertTrue($generator->valid()); $generator->send(Signal::STOP); - $this->assertFalse($generator->valid()); + self::assertFalse($generator->valid()); } } diff --git a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php index 4efa272c7..feafce261 100644 --- a/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php +++ b/src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration/TextTest.php @@ -26,7 +26,7 @@ public function test_loading_text_files() : void ->write(to_text($path)) ->run(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TEXT' Norbert Tomek diff --git a/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php b/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php index c3e2b7c20..0d9630452 100644 --- a/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php +++ b/src/adapter/etl-adapter-xml/tests/Flow/ETL/Adapter/XML/Tests/Integration/XMLReaderExtractorTest.php @@ -47,7 +47,7 @@ public function test_limit() : void $extractor = new XMLReaderExtractor(Path::realpath($path), 'items/item'); $extractor->changeLimit(2); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -55,7 +55,7 @@ public function test_limit() : void public function test_reading_deep_xml() : void { - $this->assertEquals( + self::assertEquals( new Rows( Row::create(xml_entry( 'node', @@ -89,7 +89,7 @@ public function test_reading_xml() : void $xml = new \DOMDocument(); $xml->load(__DIR__ . '/../Fixtures/simple_items.xml'); - $this->assertEquals( + self::assertEquals( (new Rows(Row::create(xml_entry('node', $xml)))), (new Flow()) ->read(from_xml(__DIR__ . '/../Fixtures/simple_items.xml')) @@ -99,7 +99,7 @@ public function test_reading_xml() : void public function test_reading_xml_each_collection_item() : void { - $this->assertEquals( + self::assertEquals( new Rows( Row::create(xml_entry('node', '1')), Row::create(xml_entry('node', '2')), @@ -137,7 +137,7 @@ public function test_reading_xml_from_path() : void XML); - $this->assertEquals( + self::assertEquals( new Rows(Row::create(xml_entry('node', $xml))), (new Flow()) ->read(from_xml(__DIR__ . '/../Fixtures/simple_items.xml', 'root/items')) @@ -179,15 +179,15 @@ public function test_signal_stop() : void $generator = $extractor->extract(new FlowContext(Config::default())); - $this->assertSame('1', $generator->current()->first()->valueOf('node')->getElementsByTagName('id')[0]->nodeValue); - $this->assertTrue($generator->valid()); + self::assertSame('1', $generator->current()->first()->valueOf('node')->getElementsByTagName('id')[0]->nodeValue); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame('2', $generator->current()->first()->valueOf('node')->getElementsByTagName('id')[0]->nodeValue); - $this->assertTrue($generator->valid()); + self::assertSame('2', $generator->current()->first()->valueOf('node')->getElementsByTagName('id')[0]->nodeValue); + self::assertTrue($generator->valid()); $generator->next(); - $this->assertSame('3', $generator->current()->first()->valueOf('node')->getElementsByTagName('id')[0]->nodeValue); - $this->assertTrue($generator->valid()); + self::assertSame('3', $generator->current()->first()->valueOf('node')->getElementsByTagName('id')[0]->nodeValue); + self::assertTrue($generator->valid()); $generator->send(Signal::STOP); - $this->assertFalse($generator->valid()); + self::assertFalse($generator->valid()); } } diff --git a/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArrayComparisonTest.php b/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArrayComparisonTest.php index 99cf0356a..e28667211 100644 --- a/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArrayComparisonTest.php +++ b/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArrayComparisonTest.php @@ -137,7 +137,7 @@ public function not_equal_arrays() : \Generator public function test_compare_arrays() : void { - $this->assertSame( + self::assertSame( -1, (new ArrayComparison())->compare([1, 2, 3], [4, 5, 6]) ); @@ -148,7 +148,7 @@ public function test_compare_arrays() : void */ public function test_equals(array $a, array $b) : void { - $this->assertTrue((new ArrayComparison())->equals($a, $b)); + self::assertTrue((new ArrayComparison())->equals($a, $b)); } /** @@ -156,6 +156,6 @@ public function test_equals(array $a, array $b) : void */ public function test_not_equals(array $a, array $b) : void { - $this->assertFalse((new ArrayComparison())->equals($a, $b)); + self::assertFalse((new ArrayComparison())->equals($a, $b)); } } diff --git a/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArraySortByKeyTest.php b/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArraySortByKeyTest.php index b58311227..68474303a 100644 --- a/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArraySortByKeyTest.php +++ b/src/core/etl/tests/Flow/ArrayComparison/Tests/Unit/ArraySortByKeyTest.php @@ -116,7 +116,7 @@ public function test_sorts_array_by_key(array $origin, array $sorted) : void { // serialize to JSON to be sure that array is sorted exactly as expected - $this->assertEquals( + self::assertEquals( \json_encode($sorted, JSON_THROW_ON_ERROR), \json_encode((new ArraySortByKey)($origin), JSON_THROW_ON_ERROR), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php index 3095642fd..481d0f089 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/LocalFilesystemCacheTest.php @@ -16,20 +16,20 @@ public function test_cleaning_cache() : void { $cache = new LocalFilesystemCache($this->cacheDir, new CompressingSerializer(new NativePHPSerializer())); - $this->assertFalse($cache->has('test')); + self::assertFalse($cache->has('test')); $cache->add('test', new Rows(Row::create(new IntegerEntry('id', 1)))); $cache->add('test', new Rows(Row::create(new IntegerEntry('id', 2)))); - $this->assertTrue($cache->has('test')); + self::assertTrue($cache->has('test')); $cache->clear('test'); - $this->assertCount( + self::assertCount( 0, \iterator_to_array($cache->read('test')) ); - $this->assertFalse($cache->has('test')); + self::assertFalse($cache->has('test')); } public function test_cleaning_different_cache_id() : void @@ -41,7 +41,7 @@ public function test_cleaning_different_cache_id() : void $cache->clear('other-test'); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($cache->read('test')) ); @@ -51,7 +51,7 @@ public function test_reading_empty_cache() : void { $cache = new LocalFilesystemCache($this->cacheDir, new CompressingSerializer(new NativePHPSerializer())); - $this->assertCount( + self::assertCount( 0, \iterator_to_array($cache->read('test')) ); @@ -64,7 +64,7 @@ public function test_writing_to_cache() : void $cache->add('test', new Rows(Row::create(new IntegerEntry('id', 1)))); $cache->add('test', new Rows(Row::create(new IntegerEntry('id', 2)))); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($cache->read('test')) ); @@ -77,11 +77,11 @@ public function test_writing_to_cache_with_different_ids() : void $cache->add('test', new Rows(Row::create(new IntegerEntry('id', 1)))); $cache->add('other-test', new Rows(Row::create(new IntegerEntry('id', 2)))); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($cache->read('test')) ); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($cache->read('other-test')) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php index 2ee29bcdd..fb7988a9b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Cache/PSRSimpleCacheTest.php @@ -21,16 +21,16 @@ public function test_saving_to_psr_simple_cache_implementation() : void ), ); - $this->assertFalse($cache->has('test')); + self::assertFalse($cache->has('test')); $cache->add('test', new Rows(Row::create(int_entry('id', 1)))); $cache->add('test', new Rows(Row::create(int_entry('id', 2)))); $cache->add('test', new Rows(Row::create(int_entry('id', 3)))); - $this->assertCount( + self::assertCount( 3, \iterator_to_array($cache->read('test')) ); - $this->assertTrue($cache->has('test')); + self::assertTrue($cache->has('test')); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php index 06933cadc..72d7b7848 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/AnalyzeTest.php @@ -23,8 +23,8 @@ public function test_analyzing_csv_file_with_auto_cast() : void ->autoCast() ->run(analyze: true); - $this->assertSame(5, $report->statistics()->totalRows()); - $this->assertEquals( + self::assertSame(5, $report->statistics()->totalRows()); + self::assertEquals( schema( int_schema('Index'), datetime_schema('Date'), @@ -36,7 +36,7 @@ public function test_analyzing_csv_file_with_auto_cast() : void ), $report->schema() ); - $this->assertSame(7, $report->schema()->count()); + self::assertSame(7, $report->schema()->count()); } public function test_analyzing_csv_file_with_limit() : void @@ -52,8 +52,8 @@ public function test_analyzing_csv_file_with_limit() : void ->limit(2) ->run(analyze: true); - $this->assertSame(2, $report->statistics()->totalRows()); - $this->assertEquals( + self::assertSame(2, $report->statistics()->totalRows()); + self::assertEquals( schema( str_schema('Index'), str_schema('Date'), @@ -65,7 +65,7 @@ public function test_analyzing_csv_file_with_limit() : void ), $report->schema() ); - $this->assertSame(7, $report->schema()->count()); + self::assertSame(7, $report->schema()->count()); } public function test_analyzing_partitioned_datasets() : void @@ -74,8 +74,8 @@ public function test_analyzing_partitioned_datasets() : void ->read(from_text(__DIR__ . '/Fixtures/Partitioning/multi_partition_pruning_test/year=*/month=*/day=*/*.txt')) ->run(analyze: true); - $this->assertSame(7, $report->statistics()->totalRows()); - $this->assertEquals( + self::assertSame(7, $report->statistics()->totalRows()); + self::assertEquals( schema( str_schema('year'), str_schema('month'), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php index 30a94467f..85779a2e4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/BranchingTest.php @@ -35,7 +35,7 @@ public function test_branching() : void ) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'group' => 'A'], ['id' => 3, 'group' => 'A'], @@ -43,7 +43,7 @@ public function test_branching() : void ], $memoryA->dump(), ); - $this->assertSame( + self::assertSame( [ ['id' => 2, 'group' => 'B'], ['id' => 4, 'group' => 'B'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php index 10c672f49..ecee6d20a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/CacheTest.php @@ -24,7 +24,7 @@ public function test_cache() : void $cacheContent = \array_values(\array_diff(\scandir($this->cacheDir), ['..', '.'])); - $this->assertContains('test_etl_cache', $cacheContent); + self::assertContains('test_etl_cache', $cacheContent); } public function test_psr_cache() : void @@ -39,9 +39,9 @@ public function test_psr_cache() : void $cachedRows = df(Config::builder()->cache($adapter)->build())->from(from_cache('test_etl_cache'))->fetch(); - $this->assertCount($rowsets, $cachedRows); + self::assertCount($rowsets, $cachedRows); $adapter->clear('test_etl_cache'); - $this->assertCount(0, \iterator_to_array($adapter->read('test_etl_cache'))); + self::assertCount(0, \iterator_to_array($adapter->read('test_etl_cache'))); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DataFrameJsonTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DataFrameJsonTest.php index d5e712623..9c7d232d6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DataFrameJsonTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DataFrameJsonTest.php @@ -37,7 +37,7 @@ public function test_building_data_frame_from_json() : void JSON ); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'Norbert', 'active' => true], ['id' => 2, 'name' => 'Michal', 'active' => true], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php index 087bcfd06..f1d789b40 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/DisplayTest.php @@ -64,7 +64,7 @@ enum_entry('enum', BackedStringEnum::three), }) ->collect(); - $this->assertSame( + self::assertSame( <<<'ASCIITABLE' +------+--------+-----+---------+----------------------+-------+----------------------+---------+-------------------+----------------------+----------------------+-------+----------------------+ | id | price | 100 | deleted | created-at | phase | array | list | map | items | object | enum | xml | @@ -121,7 +121,7 @@ public function extract(FlowContext $context) : \Generator ->collect() ->partitionBy(ref('group')); - $this->assertSame( + self::assertSame( <<<'ASCIITABLE' +------+--------+-----+---------+----------------------+-------+ | id | price | 100 | deleted | created-at | group | @@ -196,7 +196,7 @@ public function test_display_with_very_long_entry_name() : void ])) ->collect(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'ASCIITABLE' +----------------------+ | this is very long en | @@ -231,7 +231,7 @@ public function test_print_rows() : void ->printRows(); $output = \ob_get_clean(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'ASCII' +----+---------+-----+ | id | country | age | @@ -271,7 +271,7 @@ public function test_print_schema() : void ->printSchema(); $output = \ob_get_clean(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'ASCII' schema |-- id: integer diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php index 87aaf59e3..b66a6b512 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/GroupByTest.php @@ -15,7 +15,7 @@ final class GroupByTest extends IntegrationTestCase public function test_group_by_multiple_columns_and_batch_size() : void { $loader = $this->createMock(Loader::class); - $loader->expects($this->exactly(4)) + $loader->expects(self::exactly(4)) ->method('load'); $rows = df() @@ -36,7 +36,7 @@ public function test_group_by_multiple_columns_and_batch_size() : void ->write($loader) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('country', 'PL'), str_entry('gender', 'male')), Row::create(str_entry('country', 'PL'), str_entry('gender', 'female')), @@ -66,7 +66,7 @@ public function test_group_by_multiples_columns_with_avg_aggregation() : void ->aggregate(average(ref('age'))) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('country', 'PL'), str_entry('gender', 'male'), float_entry('age_avg', 21.666666666666668)), Row::create(str_entry('country', 'PL'), str_entry('gender', 'female'), int_entry('age_avg', 30)), @@ -96,7 +96,7 @@ public function test_group_by_multiples_columns_with_avg_aggregation_with_null() ->aggregate(average(ref('age'))) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('country', 'PL'), str_entry('gender', 'male'), float_entry('age_avg', 21.666666666666668)), Row::create(str_entry('country', 'PL'), str_entry('gender', 'female'), int_entry('age_avg', 30)), @@ -126,7 +126,7 @@ public function test_group_by_single_column() : void ->groupBy('country') ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('country', 'PL')), Row::create(str_entry('country', 'US')), @@ -154,7 +154,7 @@ public function test_group_by_single_column_with_avg_aggregation() : void ->aggregate(average(ref('age'))) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('country', 'PL'), float_entry('age_avg', 23.75)), Row::create(str_entry('country', 'US'), float_entry('age_avg', 43.75)), @@ -190,7 +190,7 @@ public function test_group_by_twice() : void ->aggregate(sum(ref('contributions'))) ->fetch(); - $this->assertSame( + self::assertSame( [ ['user' => 'user_01', 'contributions_sum' => 4], ['user' => 'user_02', 'contributions_sum' => 2], @@ -217,7 +217,7 @@ public function test_group_by_uuid() : void ->aggregate(count(ref('id'))) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows(Row::create(integer_entry('id_count', 8))), $rows ); @@ -248,7 +248,7 @@ public function test_pivot() : void ->aggregate(sum(ref('contributions'))) ->fetch(); - $this->assertSame( + self::assertSame( [ [ 'date' => '2023-11-01', @@ -299,7 +299,7 @@ public function test_standalone_avg_aggregation() : void ->rename('age_avg', 'average_age') ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(float_entry('average_age', 33.75)), ), @@ -356,7 +356,7 @@ public function test_window_avg_function() : void ['employee_name' => 'Charlotte', 'department' => 'Marketing', 'salary' => 3000], ]); - $this->assertSame( + self::assertSame( [ ['department' => 'Sales', 'avg_salary' => 3917.0], ['department' => 'Marketing', 'avg_salary' => 2940.0], @@ -402,7 +402,7 @@ public function test_window_rank_function() : void ['employee_name' => 'Charlotte', 'department' => 'Marketing', 'salary' => 3000], ]); - $this->assertSame( + self::assertSame( [ ['employee_name' => 'Emma', 'department' => 'Sales', 'salary' => 4800, 'rank' => 1], ['employee_name' => 'Sophia', 'department' => 'Finance', 'salary' => 4200, 'rank' => 1], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php index d027c2f2d..cf4fdbf0d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php @@ -14,7 +14,7 @@ final class JoinTest extends IntegrationTestCase public function test_cross_join() : void { $loader = $this->createMock(Loader::class); - $loader->expects($this->exactly(2)) + $loader->expects(self::exactly(2)) ->method('load'); $rows = df() @@ -38,7 +38,7 @@ public function test_cross_join() : void ->write($loader) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), int_entry('num', 1), bool_entry('active', true)), Row::create(int_entry('id', 1), str_entry('country', 'PL'), int_entry('num', 2), bool_entry('active', false)), @@ -56,7 +56,7 @@ public function test_cross_join() : void public function test_join() : void { $loader = $this->createMock(Loader::class); - $loader->expects($this->exactly(2)) + $loader->expects(self::exactly(2)) ->method('load'); $rows = df() @@ -85,7 +85,7 @@ public function test_join() : void ->write($loader) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), string_entry('country', 'PL'), string_entry('name', 'Poland')), Row::create(int_entry('id', 2), string_entry('country', 'PL'), string_entry('name', 'Poland')), @@ -103,7 +103,7 @@ public function test_join() : void public function test_join_each() : void { $loader = $this->createMock(Loader::class); - $loader->expects($this->exactly(2)) + $loader->expects(self::exactly(2)) ->method('load'); $rows = df() @@ -137,7 +137,7 @@ public function from(Rows $rows) : DataFrame ->write($loader) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), str_entry('name', 'Poland')), Row::create(int_entry('id', 2), str_entry('country', 'PL'), str_entry('name', 'Poland')), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php index 34b27a684..b083e3e09 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/LimitTest.php @@ -24,7 +24,7 @@ public function test_exceeding_the_limit_in_one_rows_set() : void ->limit(9) ->fetch(); - $this->assertCount(9, $rows); + self::assertCount(9, $rows); } public function test_fetch_with_limit() : void @@ -44,7 +44,7 @@ public function test_fetch_with_limit() : void ])) ->fetch(5); - $this->assertCount(5, $rows); + self::assertCount(5, $rows); } public function test_fetch_with_limit_below_0() : void @@ -75,7 +75,7 @@ public function extract(FlowContext $context) : \Generator }) ->fetch(); - $this->assertCount(20, $rows); + self::assertCount(20, $rows); } public function test_limit() : void @@ -100,7 +100,7 @@ public function extract(FlowContext $context) : \Generator ->limit(10) ->fetch(); - $this->assertCount(10, $rows); + self::assertCount(10, $rows); } public function test_limit_below_0() : void @@ -143,7 +143,7 @@ public function extract(FlowContext $context) : \Generator ->limit(3) ->fetch(); - $this->assertCount(3, $rows); + self::assertCount(3, $rows); } public function test_limit_with_batch_size() : void @@ -169,7 +169,7 @@ public function extract(FlowContext $context) : \Generator ->limit(10) ->fetch(); - $this->assertCount(10, $rows); + self::assertCount(10, $rows); } public function test_limit_with_collecting() : void @@ -195,7 +195,7 @@ public function extract(FlowContext $context) : \Generator ->collect() ->fetch(); - $this->assertCount(10, $rows); + self::assertCount(10, $rows); } public function test_with_total_rows_below_the_limit() : void @@ -219,6 +219,6 @@ public function extract(FlowContext $context) : \Generator ->limit(10) ->fetch(); - $this->assertCount(5, $rows); + self::assertCount(5, $rows); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php index ef7350450..6afdbe31a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/PartitioningTest.php @@ -30,7 +30,7 @@ public function test_dropping_partitions() : void ->dropPartitions() ->fetch(); - $this->assertFalse($rows->isPartitioned()); + self::assertFalse($rows->isPartitioned()); } public function test_partition_by() : void @@ -51,7 +51,7 @@ public function test_partition_by() : void ->partitionBy(ref('country')) ->get(); - $this->assertEquals( + self::assertEquals( [ rows_partitioned( [ @@ -135,8 +135,8 @@ public function test_pruning_multiple_partitions() : void $days = $rows->reduceToArray('day'); \sort($days); - $this->assertCount(2, $rows); - $this->assertSame([1, 2], $days); + self::assertCount(2, $rows); + self::assertSame([1, 2], $days); } public function test_pruning_single_partition() : void @@ -150,7 +150,7 @@ public function test_pruning_single_partition() : void ->groupBy(ref('year')) ->fetch(); - $this->assertCount(1, $rows); - $this->assertSame(2023, $rows->first()->valueOf('year')); + self::assertCount(1, $rows); + self::assertSame(2023, $rows->first()->valueOf('year')); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php index c10479ff0..58aab56cf 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/RenameTest.php @@ -24,7 +24,7 @@ public function test_rename() : void ->rename('name', 'new_name') ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('new_name', 'foo'), bool_entry('active', true)), Row::create(int_entry('id', 2), null_entry('new_name'), bool_entry('active', false)), @@ -48,7 +48,7 @@ public function test_rename_all() : void ->drop('array') ->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'name', 'active' => true], ['id' => 2, 'name' => 'name', 'active' => false], @@ -66,7 +66,7 @@ public function test_rename_all_lower_case() : void $ds = df()->read(from_rows($rows))->renameAllLowerCase()->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'name', 'active' => true], ['id' => 2, 'name' => 'name', 'active' => false], @@ -88,7 +88,7 @@ public function test_rename_all_to_snake_case() : void ->renameAllLowerCase() ->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'user_name' => 'name', 'is_active' => true], ['id' => 2, 'user_name' => 'name', 'is_active' => false], @@ -109,7 +109,7 @@ public function test_rename_all_upper_case() : void ->renameAllUpperCase() ->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['ID' => 1, 'NAME' => 'name', 'ACTIVE' => true], ['ID' => 2, 'NAME' => 'name', 'ACTIVE' => false], @@ -130,7 +130,7 @@ public function test_rename_all_upper_case_first() : void ->renameAllUpperCaseFirst() ->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['Id' => 1, 'Name' => 'name', 'Active' => true], ['Id' => 2, 'Name' => 'name', 'Active' => false], @@ -151,7 +151,7 @@ public function test_rename_all_upper_case_word() : void ->renameAllUpperCaseWord() ->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['Id' => 1, 'Name' => 'name', 'Active' => true], ['Id' => 2, 'Name' => 'name', 'Active' => false], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php index 1e1cf5ada..358ae6ee9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SchemaTest.php @@ -22,7 +22,7 @@ function ($i) { \range(1, 100) )); - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), str_schema('name'), @@ -49,7 +49,7 @@ function ($i) { \range(1, 100) )); - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), str_schema('name'), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php index 91a9a2c88..ffba57d0b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/SortTest.php @@ -30,16 +30,16 @@ public function test_etl_sort_at_disk_in_memory() : void $cache = \array_diff(\scandir($this->cacheDir), ['..', '.']); - $this->assertEmpty($cache); + self::assertEmpty($cache); // 50 initial writes // 2500 single row writes // 50 merged writes - $this->assertSame(2600, $cacheSpy->writes()); + self::assertSame(2600, $cacheSpy->writes()); // 1 main cache // 50 tmp caches // 1 sorted cache // 1 extracted cache - $this->assertSame(52, $cacheSpy->clears()); + self::assertSame(52, $cacheSpy->clears()); } public function test_etl_sort_by_in_memory() : void @@ -58,8 +58,8 @@ public function test_etl_sort_by_in_memory() : void $cache = \array_diff(\scandir($this->cacheDir), ['..', '.']); - $this->assertEmpty($cache); - $this->assertSame(\range(0, 39), $rows->reduceToArray('int')); - $this->assertSame(20, $cacheSpy->writes()); + self::assertEmpty($cache); + self::assertSame(\range(0, 39), $rows->reduceToArray('int')); + self::assertSame(20, $cacheSpy->writes()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/FilesystemStreamsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/FilesystemStreamsTest.php index bf79bdbbe..8a3226e06 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/FilesystemStreamsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/FilesystemStreamsTest.php @@ -24,10 +24,10 @@ public function test_is_open_for_writing() : void $streams = $this->streams(); $streams->writeTo($this->getPath(__FUNCTION__ . '/file.txt')); - $this->assertTrue($streams->isOpen($this->getPath(__FUNCTION__ . '/file.txt'))); - $this->assertCount(1, $streams); + self::assertTrue($streams->isOpen($this->getPath(__FUNCTION__ . '/file.txt'))); + self::assertCount(1, $streams); $streams->closeWriters($this->getPath(__FUNCTION__ . '/file.txt')); - $this->assertFalse($streams->isOpen($this->getPath(__FUNCTION__ . '/file.txt'))); + self::assertFalse($streams->isOpen($this->getPath(__FUNCTION__ . '/file.txt'))); } public function test_read() : void @@ -39,7 +39,7 @@ public function test_read() : void ]); $streams = $this->streams(); - $this->assertEquals( + self::assertEquals( 'file content', \file_get_contents($streams->read($this->getPath(__FUNCTION__ . '/file.txt'))->path()->path()) ); @@ -56,7 +56,7 @@ public function test_read_partitioned() : void ]); $streams = $this->streams(); - $this->assertEquals( + self::assertEquals( 'file content', \file_get_contents( $streams->read($this->getPath(__FUNCTION__ . '/file.txt'), [new Partition('partition', 'a')]) @@ -73,10 +73,10 @@ public function test_rm() : void ], ]); - $this->assertTrue($this->streams()->exists($this->getPath(__FUNCTION__ . '/file.txt'))); + self::assertTrue($this->streams()->exists($this->getPath(__FUNCTION__ . '/file.txt'))); $this->streams()->rm($this->getPath(__FUNCTION__ . '/file.txt')); - $this->assertFileDoesNotExist($this->getPath(__FUNCTION__ . '/file.txt')->path()); + self::assertFileDoesNotExist($this->getPath(__FUNCTION__ . '/file.txt')->path()); } public function test_rm_partitioned() : void @@ -89,10 +89,10 @@ public function test_rm_partitioned() : void ], ]); - $this->assertTrue($this->streams()->exists($this->getPath(__FUNCTION__ . '/file.txt'), [new Partition('partition', 'a')])); + self::assertTrue($this->streams()->exists($this->getPath(__FUNCTION__ . '/file.txt'), [new Partition('partition', 'a')])); $this->streams()->rm($this->getPath(__FUNCTION__ . '/file.txt'), [new Partition('partition', 'a')]); - $this->assertFileDoesNotExist($this->getPath(__FUNCTION__ . '/partition=a/file.txt')->path()); + self::assertFileDoesNotExist($this->getPath(__FUNCTION__ . '/partition=a/file.txt')->path()); } public function test_scan() : void @@ -109,7 +109,7 @@ public function test_scan() : void ]); $streams = $this->streams(); - $this->assertCount( + self::assertCount( 4, \iterator_to_array($streams->scan($this->getPath(__FUNCTION__ . '/**/*.txt'), new NoopFilter())) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php index d0ccfebfb..65261fd26 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/AppendModeTest.php @@ -25,7 +25,7 @@ public function test_open_stream_for_existing_file() : void ], ]); $file = $this->getPath(__FUNCTION__ . '/existing-file.txt'); - $this->assertFileExists($file->path()); + self::assertFileExists($file->path()); $appendFileStream = $streams->writeTo($file); \fwrite($appendFileStream->resource(), 'new content'); @@ -33,11 +33,11 @@ public function test_open_stream_for_existing_file() : void $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/*'))); - $this->assertCount(2, $files); + self::assertCount(2, $files); foreach ($files as $streamFile) { - $this->assertStringStartsWith('existing-file', $streamFile->basename()); - $this->assertStringEndsWith('.txt', $streamFile->basename()); + self::assertStringStartsWith('existing-file', $streamFile->basename()); + self::assertStringEndsWith('.txt', $streamFile->basename()); } } @@ -48,7 +48,7 @@ public function test_open_stream_for_non_existing_file() : void __FUNCTION__ => [], ]); $file = $this->getPath(__FUNCTION__ . '/non-existing-file.txt'); - $this->assertFileDoesNotExist($file->path()); + self::assertFileDoesNotExist($file->path()); $appendFileStream = $streams->writeTo($file); \fwrite($appendFileStream->resource(), 'new content'); @@ -56,8 +56,8 @@ public function test_open_stream_for_non_existing_file() : void $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/*'))); - $this->assertCount(1, $files); - $this->assertSame('non-existing-file.txt', $files[0]->basename()); + self::assertCount(1, $files); + self::assertSame('non-existing-file.txt', $files[0]->basename()); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/ExceptionIfExistsModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/ExceptionIfExistsModeTest.php index 643dc8031..4cf4f0990 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/ExceptionIfExistsModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/ExceptionIfExistsModeTest.php @@ -44,8 +44,8 @@ public function test_open_stream_for_non_existing_file() : void \fwrite($fileStream->resource(), 'some content'); $streams->closeWriters($file); - $this->assertFileExists($file->path()); - $this->assertSame('some content', \file_get_contents($file->path())); + self::assertFileExists($file->path()); + self::assertSame('some content', \file_get_contents($file->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/IgnoreModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/IgnoreModeTest.php index 816e68e3e..21e513561 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/IgnoreModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/IgnoreModeTest.php @@ -30,8 +30,8 @@ public function test_open_stream_for_existing_file() : void \fwrite($fileStream->resource(), 'different content'); $streams->closeWriters($path); - $this->assertFileExists($path->path()); - $this->assertSame('some content', \file_get_contents($path->path())); + self::assertFileExists($path->path()); + self::assertSame('some content', \file_get_contents($path->path())); } public function test_open_stream_for_non_existing_file() : void @@ -46,8 +46,8 @@ public function test_open_stream_for_non_existing_file() : void \fwrite($fileStream->resource(), 'some content'); $streams->closeWriters($path); - $this->assertFileExists($path->path()); - $this->assertSame('some content', \file_get_contents($path->path())); + self::assertFileExists($path->path()); + self::assertSame('some content', \file_get_contents($path->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php index 13308c0c5..49dd17f1f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/NotPartitioned/OverwriteModeTest.php @@ -26,16 +26,16 @@ public function test_open_stream_for_existing_file() : void ]); $fileStream = $streams->writeTo($path = $this->getPath(__FUNCTION__ . '/existing-file.txt')); - $this->assertStringEndsWith(FilesystemStreams::FLOW_TMP_SUFFIX, $fileStream->path()->path()); + self::assertStringEndsWith(FilesystemStreams::FLOW_TMP_SUFFIX, $fileStream->path()->path()); \fwrite($fileStream->resource(), 'some other content'); - $this->assertSame('some content', \file_get_contents($path->path())); + self::assertSame('some content', \file_get_contents($path->path())); $streams->closeWriters($path); - $this->assertSame('some other content', \file_get_contents($path->path())); + self::assertSame('some other content', \file_get_contents($path->path())); - $this->assertCount(1, $files = \iterator_to_array($this->fs->scan(new Path($path->parentDirectory()->path() . '/*')))); - $this->assertSame('existing-file.txt', $files[0]->basename()); + self::assertCount(1, $files = \iterator_to_array($this->fs->scan(new Path($path->parentDirectory()->path() . '/*')))); + self::assertSame('existing-file.txt', $files[0]->basename()); } public function test_open_stream_for_non_existing_file() : void @@ -48,8 +48,8 @@ public function test_open_stream_for_non_existing_file() : void \fwrite($fileStream->resource(), 'some content'); $streams->closeWriters($path); - $this->assertFileExists($path->path()); - $this->assertSame('some content', \file_get_contents($path->path())); + self::assertFileExists($path->path()); + self::assertSame('some content', \file_get_contents($path->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php index 2a555fa0c..0d83a3c41 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/AppendModeTest.php @@ -37,11 +37,11 @@ public function test_open_stream_for_existing_partition_with_existing_file() : v $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(2, $files); + self::assertCount(2, $files); foreach ($files as $streamFile) { - $this->assertStringStartsWith('file', $streamFile->basename()); - $this->assertStringEndsWith('.txt', $streamFile->basename()); + self::assertStringStartsWith('file', $streamFile->basename()); + self::assertStringEndsWith('.txt', $streamFile->basename()); } } @@ -62,10 +62,10 @@ public function test_open_stream_for_existing_partition_without_existing_file() $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('appended content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('appended content', \file_get_contents($files[0]->path())); } public function test_open_stream_for_non_existing_partition() : void @@ -82,10 +82,10 @@ public function test_open_stream_for_non_existing_partition() : void $streams->closeWriters($file); $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/partition=value/*'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('appended content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('appended content', \file_get_contents($files[0]->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php index 51f657787..32a620e97 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/ExceptionIfExistsModeTest.php @@ -51,10 +51,10 @@ public function test_open_stream_for_existing_partition_without_existing_file() $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('file content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('file content', \file_get_contents($files[0]->path())); } public function test_open_stream_for_non_existing_partition() : void @@ -71,10 +71,10 @@ public function test_open_stream_for_non_existing_partition() : void $streams->closeWriters($file); $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/partition=value/*'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('file content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('file content', \file_get_contents($files[0]->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php index aee0d8d60..07fb5d8d2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/IgnoreModeTest.php @@ -36,10 +36,10 @@ public function test_open_stream_for_existing_partition_with_existing_file() : v $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertStringStartsWith('file.txt', $files[0]->basename()); - $this->assertSame('file content', \file_get_contents($files[0]->path())); + self::assertStringStartsWith('file.txt', $files[0]->basename()); + self::assertSame('file content', \file_get_contents($files[0]->path())); } public function test_open_stream_for_existing_partition_without_existing_file() : void @@ -59,10 +59,10 @@ public function test_open_stream_for_existing_partition_without_existing_file() $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('appended content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('appended content', \file_get_contents($files[0]->path())); } public function test_open_stream_for_non_existing_partition() : void @@ -79,10 +79,10 @@ public function test_open_stream_for_non_existing_partition() : void $streams->closeWriters($file); $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/partition=value/*'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('appended content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('appended content', \file_get_contents($files[0]->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php index 3e00781e2..5d3d4d4a8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/FilesystemStreams/Partitioned/OverwriteModeTest.php @@ -36,10 +36,10 @@ public function test_open_stream_for_existing_partition_with_existing_file() : v $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertStringStartsWith('file.txt', $files[0]->basename()); - $this->assertSame('new content', \file_get_contents($files[0]->path())); + self::assertStringStartsWith('file.txt', $files[0]->basename()); + self::assertSame('new content', \file_get_contents($files[0]->path())); } public function test_open_stream_for_existing_partition_without_existing_file() : void @@ -59,10 +59,10 @@ public function test_open_stream_for_existing_partition_without_existing_file() $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/**/*.txt'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('new content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('new content', \file_get_contents($files[0]->path())); } public function test_open_stream_for_non_existing_partition() : void @@ -79,10 +79,10 @@ public function test_open_stream_for_non_existing_partition() : void $streams->closeWriters($file); $files = \iterator_to_array($this->fs->scan(new Path($file->parentDirectory()->path() . '/partition=value/*'))); - $this->assertCount(1, $files); + self::assertCount(1, $files); - $this->assertSame('file.txt', $files[0]->basename()); - $this->assertSame('new content', \file_get_contents($files[0]->path())); + self::assertSame('file.txt', $files[0]->basename()); + self::assertSame('new content', \file_get_contents($files[0]->path())); } protected function streams() : FilesystemStreams diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php index e991b20c7..a0c9dc6c4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/LocalFilesystemTest.php @@ -25,7 +25,7 @@ public function test_append_mode() : void \fwrite($appendStream->resource(), "some more data to make file not empty\n"); $appendStream->close(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'STRING' some data to make file not empty some more data to make file not empty @@ -34,33 +34,33 @@ public function test_append_mode() : void ); $fs->rm($stream->path()); - $this->assertFalse($fs->exists($stream->path())); + self::assertFalse($fs->exists($stream->path())); } public function test_dir_exists() : void { - $this->assertTrue((new LocalFilesystem())->exists(new Path(__DIR__))); - $this->assertFalse((new LocalFilesystem())->exists(new Path(__DIR__ . '/not_existing_directory'))); + self::assertTrue((new LocalFilesystem())->exists(new Path(__DIR__))); + self::assertFalse((new LocalFilesystem())->exists(new Path(__DIR__ . '/not_existing_directory'))); } public function test_fie_exists() : void { - $this->assertTrue((new LocalFilesystem())->exists(new Path(__FILE__))); - $this->assertFalse((new LocalFilesystem())->exists(new Path(__DIR__ . '/not_existing_file.php'))); + self::assertTrue((new LocalFilesystem())->exists(new Path(__FILE__))); + self::assertFalse((new LocalFilesystem())->exists(new Path(__DIR__ . '/not_existing_file.php'))); } public function test_file_pattern_exists() : void { - $this->assertTrue((new LocalFilesystem())->exists(new Path(__DIR__ . '/**/*.txt'))); - $this->assertFalse((new LocalFilesystem())->exists(new Path(__DIR__ . '/**/*.pdf'))); + self::assertTrue((new LocalFilesystem())->exists(new Path(__DIR__ . '/**/*.txt'))); + self::assertFalse((new LocalFilesystem())->exists(new Path(__DIR__ . '/**/*.pdf'))); } public function test_open_file_stream_for_existing_file() : void { $stream = (new LocalFilesystem())->open(new Path(__FILE__), Mode::READ); - $this->assertIsResource($stream->resource()); - $this->assertSame( + self::assertIsResource($stream->resource()); + self::assertSame( \file_get_contents(__FILE__), \stream_get_contents($stream->resource()) ); @@ -72,7 +72,7 @@ public function test_open_file_stream_for_non_existing_file() : void $stream = (new LocalFilesystem())->open(new Path($path), Mode::WRITE); - $this->assertIsResource($stream->resource()); + self::assertIsResource($stream->resource()); } public function test_reading_multi_partitioned_path() : void @@ -95,7 +95,7 @@ public function test_reading_multi_partitioned_path() : void ); \sort($paths); - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/multi_partitions/date=2022-01-02/country=pl/file.txt'), new Path(__DIR__ . '/Fixtures/multi_partitions/date=2022-01-03/country=pl/file.txt'), @@ -109,7 +109,7 @@ public function test_reading_partitioned_folder() : void $paths = \iterator_to_array((new LocalFilesystem())->scan(new Path(__DIR__ . '/Fixtures/partitioned/**/*.txt'), new NoopFilter())); \sort($paths); - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/partitioned/partition_01=a/file_01.txt'), new Path(__DIR__ . '/Fixtures/partitioned/partition_01=b/file_02.txt'), @@ -120,7 +120,7 @@ public function test_reading_partitioned_folder() : void public function test_reading_partitioned_folder_with_partitions_filtering() : void { - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/partitioned/partition_01=b/file_02.txt'), ], @@ -139,7 +139,7 @@ public function test_reading_partitioned_folder_with_pattern() : void $paths = \iterator_to_array((new LocalFilesystem())->scan(new Path(__DIR__ . '/Fixtures/partitioned/partition_01=*/*.txt'), new NoopFilter())); \sort($paths); - $this->assertEquals( + self::assertEquals( [ new Path(__DIR__ . '/Fixtures/partitioned/partition_01=a/file_01.txt'), new Path(__DIR__ . '/Fixtures/partitioned/partition_01=b/file_02.txt'), @@ -158,11 +158,11 @@ public function test_remove_directory_with_content_when_exists() : void \fwrite($stream->resource(), 'some data to make file not empty'); $stream->close(); - $this->assertTrue($fs->exists($dirPath)); - $this->assertTrue($fs->exists($stream->path())); + self::assertTrue($fs->exists($dirPath)); + self::assertTrue($fs->exists($stream->path())); $fs->rm($dirPath); - $this->assertFalse($fs->exists($dirPath)); - $this->assertFalse($fs->exists($stream->path())); + self::assertFalse($fs->exists($dirPath)); + self::assertFalse($fs->exists($stream->path())); } public function test_remove_file_when_exists() : void @@ -173,9 +173,9 @@ public function test_remove_file_when_exists() : void \fwrite($stream->resource(), 'some data to make file not empty'); $stream->close(); - $this->assertTrue($fs->exists($stream->path())); + self::assertTrue($fs->exists($stream->path())); $fs->rm($stream->path()); - $this->assertFalse($fs->exists($stream->path())); + self::assertFalse($fs->exists($stream->path())); } public function test_remove_pattern() : void @@ -188,11 +188,11 @@ public function test_remove_pattern() : void \fwrite($stream->resource(), 'some data to make file not empty'); $stream->close(); - $this->assertTrue($fs->exists($dirPath)); - $this->assertTrue($fs->exists($stream->path())); + self::assertTrue($fs->exists($dirPath)); + self::assertTrue($fs->exists($stream->path())); $fs->rm(Path::realpath($dirPath->path() . '/*.txt')); - $this->assertTrue($fs->exists($dirPath)); - $this->assertFalse($fs->exists($stream->path())); + self::assertTrue($fs->exists($dirPath)); + self::assertFalse($fs->exists($stream->path())); $fs->rm($dirPath); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/RealpathTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/RealpathTest.php index e275b2841..dd673cbb3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/RealpathTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Filesystem/RealpathTest.php @@ -22,6 +22,6 @@ public static function double_dots_paths() : \Generator */ public function test_double_dots_in_path(string $relative, string $absolute) : void { - $this->assertEquals(new Path($absolute), Path::realpath($relative)); + self::assertEquals(new Path($absolute), Path::realpath($relative)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php index 0a039b28d..f7e420f3b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddDynamicEntriesTest.php @@ -26,7 +26,7 @@ public function test_adding_new_entries() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'updated_at' => new \DateTimeImmutable('2020-01-01T00:00:00+00:00')], ['id' => 2, 'updated_at' => new \DateTimeImmutable('2020-01-01T00:00:00+00:00')], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php index 3c11ebc10..320efca4a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AddJsonTest.php @@ -23,7 +23,7 @@ public function test_add_json_into_existing_reference() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4]], ], @@ -45,7 +45,7 @@ public function test_add_json_string_into_existing_reference() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4]], ], @@ -64,7 +64,7 @@ public function test_adding_json_as_object_from_string_entry() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ [ 'id' => 1, @@ -85,7 +85,7 @@ public function test_adding_json_from_string_entry() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ [ 'id' => 1, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php index ab5b37c61..664d7449e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AllTest.php @@ -36,7 +36,7 @@ public function test_all_cases_found() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'result' => 'not found'], ['id' => 2, 'result' => 'not found'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php index bfe10aa50..19b1dba93 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/AnyTest.php @@ -36,7 +36,7 @@ public function test_any_case_found() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'result' => 'found'], ['id' => 2, 'result' => 'found'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php index 228563d01..2067bfe39 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExistsTest.php @@ -27,7 +27,7 @@ public function test_array_exists() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'has_array' => true], ['id' => 2, 'has_array' => false], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php index 961a4726e..42ec9cdb6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayExpandTest.php @@ -27,7 +27,7 @@ public function test_expand_both() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'expanded' => ['a' => 1]], ['id' => 1, 'expanded' => ['b' => 2]], @@ -52,7 +52,7 @@ public function test_expand_keys() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'expanded' => 'a'], ['id' => 1, 'expanded' => 'b'], @@ -77,7 +77,7 @@ public function test_expand_values() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'expanded' => 1], ['id' => 1, 'expanded' => 2], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php index ff86feb00..7dd9529df 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetCollectionTest.php @@ -31,7 +31,7 @@ public function test_array_get_collection() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'result' => [['a' => 1, 'c' => 3], ['a' => 1, 'c' => 3], ['a' => 1, 'c' => 3]]], ['id' => 2, 'result' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php index 1733ae084..6ddd062a2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayGetTest.php @@ -27,7 +27,7 @@ public function test_array_get() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'result' => 2], ['id' => 2, 'result' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php index 2f90ed4f3..bc82cb5b6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeyRenameTest.php @@ -26,7 +26,7 @@ public function test_array_key_rename() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['b' => 2, 'c' => 3, 'd' => 1]], ['id' => 2, 'array' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php index f4578b997..00ad54974 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayKeysStyleConvertTest.php @@ -25,7 +25,7 @@ public function test_array_keys_style_convert() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['camel-cased' => 1, 'snake-cased' => 2, 'space-word' => 3]], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php index 74d81855c..c4c06afd2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeCollectionTest.php @@ -31,7 +31,7 @@ public function test_array_merge_collection() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'result' => ['a' => 1, 'b' => 2, 'c' => 3]], ['id' => 2, 'result' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php index 66b82fea0..1afa85509 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayMergeTest.php @@ -27,7 +27,7 @@ public function test_array_merge() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['a' => 1, 'b' => 2, 'c' => 3]], ['id' => 2, 'array' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php index 2ab88221f..e471ee2d0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayReverseTest.php @@ -26,7 +26,7 @@ public function test_array_reverse() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['c' => 3, 'b' => 2, 'a' => 1]], ['id' => 2, 'array' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php index 6c0c601b2..8eaad443a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArraySortTest.php @@ -27,7 +27,7 @@ public function test_array_sort() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['a' => 1, 'b' => 2, 'c' => 3]], ['id' => 2, 'array' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php index 740910710..8ab4a89bf 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ArrayUnpackTest.php @@ -28,7 +28,7 @@ public function test_array_unpack() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'a' => 1, 'b' => 2, 'c' => 3], ['id' => 2], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php index f8dbd9b38..39f273099 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BetweenTest.php @@ -26,7 +26,7 @@ public function test_between_comparisons() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ [ 'between' => true, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php index 59e9e1afc..be89c74e3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/BinaryComparisonsTest.php @@ -82,7 +82,7 @@ public function test_all_comparisons() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ [ 'a' => 100, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php index bd29b44da..56bfbc34a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CapitalizeTest.php @@ -25,7 +25,7 @@ public function test_to_lower() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'this is title', 'capitalized' => 'This Is Title'], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php index 0dc82e8f9..d4fb9496a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CastTest.php @@ -22,7 +22,7 @@ public function test_cast() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertEquals( + self::assertEquals( [ ['date' => '2023-01-01T00:00:00+00:00'], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php index ff3509cdd..7f872e474 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CombineTest.php @@ -27,7 +27,7 @@ public function test_combine() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['a' => 1, 'b' => 2, 'c' => 3]], ['id' => 2, 'array' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php index d6d6b1961..1a445b598 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ConcatTest.php @@ -26,7 +26,7 @@ public function test_concat_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'concat' => null], ['id' => 2, 'concat' => null], @@ -51,7 +51,7 @@ public function test_concat_on_stringable_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'concat' => '1-value'], ['id' => 2, 'concat' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php index 0f90dd4b3..a9f7029c8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ContainsTest.php @@ -25,7 +25,7 @@ public function test_contains() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'contains' => true], ], @@ -47,7 +47,7 @@ public function test_contains_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'contains' => false], ], @@ -69,7 +69,7 @@ public function test_contains_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'contains' => false], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php index 42de6ce37..904414fd5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/CountTest.php @@ -25,7 +25,7 @@ public function test_count_on_array() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['array' => [1, 2, 3], 'count' => 3], ], @@ -47,7 +47,7 @@ public function test_count_on_non_countable() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 1, 'count' => null], ], @@ -71,7 +71,7 @@ public function test_count_on_object() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertEquals( + self::assertEquals( [ ['key' => $iterator, 'count' => 3], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php index 04c20b89e..79d6670b3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/EndsWithTest.php @@ -25,7 +25,7 @@ public function test_ends_with() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'ends_with' => true], ], @@ -47,7 +47,7 @@ public function test_ends_with_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'ends_with' => false], ], @@ -69,7 +69,7 @@ public function test_ends_with_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'ends_with' => false], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php index 93959e2a9..5b3dc495f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/HashTest.php @@ -35,7 +35,7 @@ public function test_hash_on_given_value(mixed $value, string $expected) : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => $value, 'hash' => $expected], ], @@ -57,7 +57,7 @@ public function test_hash_with_different_algorithm() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'hash' => 'ec2c83edecb60304d154ebdb85bdfaf61a92bd142e71c4f7b25a15b9cb5f3c0ae301cfb3569cf240e4470031385348bc296d8d99d09e06b26f09591a97527296'], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php index d375f565b..a4cd85d9a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonDecodeTest.php @@ -25,7 +25,7 @@ public function test_add_json_string_into_existing_reference() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'array' => ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4]], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php index 1e7c64a58..1a96dc1a8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/JsonEncodeTest.php @@ -22,7 +22,7 @@ public function test_adding_json_as_object_from_string_entry() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ [ 'id' => 1, @@ -44,7 +44,7 @@ public function test_adding_json_from_string_entry() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ [ 'id' => 1, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php index 26cba8376..5c69a7c10 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ListSelectTest.php @@ -21,7 +21,7 @@ public function test_selecting_properties_from_list() : void ->withEntry('list', list_ref('list')->select('id')) ->fetch(); - $this->assertEquals( + self::assertEquals( [ ['list' => [['id' => 1], ['id' => 2], ['id' => 3]]], ['list' => [['id' => 4], ['id' => 5], ['id' => 6]]], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php index 13fecd7e7..3ae0a9f37 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/NotTest.php @@ -36,7 +36,7 @@ public function test_not() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'result' => 'found'], ['id' => 2, 'result' => 'not found'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php index df68cad8e..472deed8c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchAllTest.php @@ -25,7 +25,7 @@ public function test_preg_match_all() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'preg_match' => [['a']]], ], @@ -47,7 +47,7 @@ public function test_preg_match_all_on_non_integer_flags() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'preg_match' => []], ], @@ -69,7 +69,7 @@ public function test_preg_match_all_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'preg_match' => []], ], @@ -91,7 +91,7 @@ public function test_preg_match_all_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'preg_match' => []], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php index c78fb32b8..085677a20 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregMatchTest.php @@ -25,7 +25,7 @@ public function test_preg_match() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'preg_match' => true], ], @@ -47,7 +47,7 @@ public function test_preg_match_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'preg_match' => null], ], @@ -69,7 +69,7 @@ public function test_preg_match_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'preg_match' => null], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php index d1b9bceea..40cfda7f7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/PregReplaceTest.php @@ -25,7 +25,7 @@ public function test_preg_replace() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'preg_replace' => 'values'], ], @@ -47,7 +47,7 @@ public function test_preg_replace_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'preg_replace' => null], ], @@ -69,7 +69,7 @@ public function test_preg_replace_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'preg_replace' => null], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php index 0d7524af9..4545f1f51 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SanitizeTest.php @@ -25,7 +25,7 @@ public function test_sanitize_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'sanitize' => null], ], @@ -47,7 +47,7 @@ public function test_sanitize_with_skip_characters() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'sanitize' => 'va***'], ], @@ -69,7 +69,7 @@ public function test_sanitize_without_skip_characters() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'sanitize' => '*****'], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php index 7752895f6..103e87dff 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SizeTest.php @@ -25,7 +25,7 @@ public function test_size_on_array() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['array' => [1, 2, 3], 'size' => 3], ], @@ -47,7 +47,7 @@ public function test_size_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'size' => null], ], @@ -69,7 +69,7 @@ public function test_size_on_string() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'size' => 5], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php index 89f09cc94..21fd8ce63 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SplitTest.php @@ -25,7 +25,7 @@ public function test_split() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => '1-2', 'split' => ['1', '2']], ], @@ -47,7 +47,7 @@ public function test_split_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 1, 'split' => 1], ], @@ -69,7 +69,7 @@ public function test_split_with_missing_separator() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => '1', 'split' => ['1']], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php index 9d598195c..cfdb15601 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/SprintfTest.php @@ -25,7 +25,7 @@ public function test_sprintf() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'test %s', 'sprintf' => 'test value'], ], @@ -47,7 +47,7 @@ public function test_sprintf_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'sprintf' => null], ], @@ -69,7 +69,7 @@ public function test_sprintf_on_null_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'sprintf' => null], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php index 1446c0f1e..127fdd8d4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StartsWithTest.php @@ -25,7 +25,7 @@ public function test_starts_with() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'starts_with' => true], ], @@ -47,7 +47,7 @@ public function test_starts_with_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'starts_with' => false], ], @@ -69,7 +69,7 @@ public function test_starts_with_on_non_string_value() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => '1', 'starts_with' => false], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php index 2c4d97ea7..25bcc173c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrPadTest.php @@ -25,7 +25,7 @@ public function test_strpad() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'strpad' => 'value*****'], ], @@ -47,7 +47,7 @@ public function test_strpad_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'strpad' => null], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php index b814f4408..43212f4a8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/StrReplaceTest.php @@ -25,7 +25,7 @@ public function test_str_replace() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'str_replace' => 'values'], ], @@ -47,7 +47,7 @@ public function test_str_replace_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'str_replace' => null], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php index 2f7424d22..8420b7587 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/Structure/StructureSelectTest.php @@ -33,7 +33,7 @@ public function test_structure_keep() : void ->withEntry('user', structure_ref('user')->select('id', 'email', 'tags')) ->fetch(); - $this->assertEquals( + self::assertEquals( [ [ 'user' => [ diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php index 67d0b9850..2b5bb2737 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToLowerTest.php @@ -25,7 +25,7 @@ public function test_to_lower() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'VALUE', 'to_lower' => 'value'], ], @@ -47,7 +47,7 @@ public function test_to_lower_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'to_lower' => 1], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php index 9dadb3dd1..df4fd7d8e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/ToUpperTest.php @@ -25,7 +25,7 @@ public function test_to_upper() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => 'value', 'to_upper' => 'VALUE'], ], @@ -47,7 +47,7 @@ public function test_to_upper_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'to_upper' => 1], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php index 7dbf0369d..15b5e55f7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/TrimTest.php @@ -26,7 +26,7 @@ public function test_trim_both() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => ' value ', 'trim' => 'value'], ], @@ -48,7 +48,7 @@ public function test_trim_custom_characters() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => '-value ', 'trim' => 'value '], ], @@ -70,7 +70,7 @@ public function test_trim_left() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => ' value ', 'trim' => 'value '], ], @@ -92,7 +92,7 @@ public function test_trim_on_non_string_key() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'trim' => null], ], @@ -114,7 +114,7 @@ public function test_trim_right() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['key' => ' value ', 'trim' => ' value'], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php index 72b5fc592..2dbd9133a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Function/WhenTest.php @@ -26,7 +26,7 @@ public function test_when_odd_even() : void ->write(to_memory($memory = new ArrayMemory())) ->run(); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'type' => 'odd'], ['id' => 2, 'type' => 'even'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php index ab7895c8e..fc8c839d9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Monitoring/Memory/ConfigurationTest.php @@ -15,7 +15,7 @@ public function test_less_than_for_infinite_memory() : void $config = new Configuration(0); - $this->assertFalse($config->isLessThan(Unit::fromGb(1_000_000))); + self::assertFalse($config->isLessThan(Unit::fromGb(1_000_000))); } public function test_less_than_for_set_memory() : void @@ -24,9 +24,9 @@ public function test_less_than_for_set_memory() : void $config = new Configuration(0); - $this->assertTrue($config->isLessThan(Unit::fromGb(1_000_000))); - $this->assertFalse($config->isLessThan(Unit::fromGb(1))); - $this->assertFalse($config->isLessThan(Unit::fromMb(100))); + self::assertTrue($config->isLessThan(Unit::fromGb(1_000_000))); + self::assertFalse($config->isLessThan(Unit::fromGb(1))); + self::assertFalse($config->isLessThan(Unit::fromMb(100))); } public function test_memory_limit_fixed() : void @@ -35,7 +35,7 @@ public function test_memory_limit_fixed() : void $config = new Configuration(0); - $this->assertEquals(Unit::fromGb(1), $config->limit()); + self::assertEquals(Unit::fromGb(1), $config->limit()); } public function test_memory_limit_fixed_with_safety_buffer() : void @@ -44,7 +44,7 @@ public function test_memory_limit_fixed_with_safety_buffer() : void $config = new Configuration(10); - $this->assertEquals(Unit::fromMb(900), $config->limit()); + self::assertEquals(Unit::fromMb(900), $config->limit()); } public function test_memory_limit_infinite() : void @@ -53,7 +53,7 @@ public function test_memory_limit_infinite() : void $config = new Configuration(0); - $this->assertNull($config->limit()); + self::assertNull($config->limit()); } public function test_memory_limit_wift_safety_buffer() : void @@ -62,7 +62,7 @@ public function test_memory_limit_wift_safety_buffer() : void $config = new Configuration(10); - $this->assertEquals( + self::assertEquals( Unit::fromString('900M'), $config->limit() ); @@ -74,8 +74,8 @@ public function test_unit_below_limit_percentage_for_fixed_memory() : void $config = new Configuration(0); - $this->assertTrue($config->isConsumptionBelow(Unit::fromMb(99), 10)); - $this->assertFalse($config->isConsumptionBelow(Unit::fromMb(100), 10)); + self::assertTrue($config->isConsumptionBelow(Unit::fromMb(99), 10)); + self::assertFalse($config->isConsumptionBelow(Unit::fromMb(100), 10)); } public function test_unit_below_limit_percentage_for_infinite_memory() : void @@ -84,6 +84,6 @@ public function test_unit_below_limit_percentage_for_infinite_memory() : void $config = new Configuration(0); - $this->assertTrue($config->isConsumptionBelow(Unit::fromGb(1_000_000), 10)); + self::assertTrue($config->isConsumptionBelow(Unit::fromGb(1_000_000), 10)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php index 4a4770a76..781be49e5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/PHP/Type/CasterTest.php @@ -13,7 +13,7 @@ final class CasterTest extends TestCase { public function test_casting_array_to_json() : void { - $this->assertSame( + self::assertSame( '{"items":{"item":1}}', (Caster::default())->to(type_json())->value(['items' => ['item' => 1]]) ); @@ -21,7 +21,7 @@ public function test_casting_array_to_json() : void public function test_casting_string_to_datetime() : void { - $this->assertSame( + self::assertSame( '2021-01-01 00:00:00.000000', (Caster::default())->to(type_datetime())->value('2021-01-01 00:00:00 UTC')->format('Y-m-d H:i:s.u') ); @@ -29,7 +29,7 @@ public function test_casting_string_to_datetime() : void public function test_casting_string_to_uuid() : void { - $this->assertEquals( + self::assertEquals( new Uuid('6c2f6e0e-8d8e-4e9e-8f0e-5a2d9c1c4f6e'), (Caster::default())->to(type_uuid())->value('6c2f6e0e-8d8e-4e9e-8f0e-5a2d9c1c4f6e') ); @@ -37,7 +37,7 @@ public function test_casting_string_to_uuid() : void public function test_casting_string_to_xml() : void { - $this->assertSame( + self::assertSame( '' . "\n" . '1' . "\n", (Caster::default())->to(type_xml())->value('1')->saveXML() ); @@ -45,14 +45,14 @@ public function test_casting_string_to_xml() : void public function test_casting_to_boolean() : void { - $this->assertTrue( + self::assertTrue( (Caster::default())->to(type_boolean())->value('true') ); } public function test_casting_to_integer() : void { - $this->assertSame( + self::assertSame( 1, (Caster::default())->to(type_integer())->value('1') ); @@ -60,7 +60,7 @@ public function test_casting_to_integer() : void public function test_casting_to_string() : void { - $this->assertSame( + self::assertSame( '1', (Caster::default())->to(type_string())->value(1) ); @@ -68,7 +68,7 @@ public function test_casting_to_string() : void public function test_casting_values_to_null() : void { - $this->assertNull( + self::assertNull( (Caster::default())->to(type_null())->value('qweqwqw') ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php index 3fba3f473..65b0036fb 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/BatchingPipelineTest.php @@ -31,7 +31,7 @@ public function test_batching_rows() : void ]) )); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($pipeline->process(new FlowContext(Config::default()))) ); @@ -55,7 +55,7 @@ public function test_that_rows_are_not_lost() : void ]) )); - $this->assertEquals( + self::assertEquals( [ [ ['id' => 1], @@ -99,7 +99,7 @@ public function test_using_bigger_batch_size_than_total_number_of_rows() : void ]) )); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($pipeline->process(new FlowContext(Config::default()))) ); @@ -123,7 +123,7 @@ public function test_using_smaller_batch_size_than_total_number_of_rows() : void ]) )); - $this->assertCount( + self::assertCount( 2, \iterator_to_array($pipeline->process(new FlowContext(Config::default()))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php index 66781fa84..17bf21ccc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/CollectingPipelineTest.php @@ -36,7 +36,7 @@ public function test_collecting() : void ]) )); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($pipeline->process(new FlowContext(Config::default()))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php index 296f30b23..546a0d5cf 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/OptimizerTest.php @@ -17,6 +17,6 @@ public function test_adding_element_to_pipeline_when_no_optimization_is_applicab $optimizedPipeline = (new Optimizer())->optimize(new KeepEntriesTransformer(ref('id')), $pipeline); - $this->assertCount(1, $optimizedPipeline->pipes()->all()); + self::assertCount(1, $optimizedPipeline->pipes()->all()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php index a781f6113..8cf9b7e39 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/PipelineTest.php @@ -22,7 +22,7 @@ public function test_getting_pipes_from_nested_pipelines() : void $collecting = new CollectingPipeline($limiting); $collecting->add($loader2 = $this->createMock(Loader::class)); - $this->assertSame( + self::assertSame( [ $transformer1, $transformer2, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php index e93cd7d2f..fbf1b41e6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Pipeline/SynchronousPipelineTest.php @@ -31,7 +31,7 @@ public function test_limit() : void ->write(to_csv($path)) ->run(); - $this->assertSame( + self::assertSame( 3, (new Flow()) ->read(from_csv($path)) diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php index f1fc0bd36..1ce7c7ba6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/Window/WindowFunctionsTest.php @@ -31,7 +31,7 @@ public function test_rank_on_partitioned_window() : void ->sortBy(ref('department'), ref('rank')) ->get(); - $this->assertSame( + self::assertSame( [ [ ['id' => 5, 'name' => 'Jane', 'department' => 'Finances', 'salary' => 14_000, 'rank' => 1], @@ -71,7 +71,7 @@ public function test_rank_without_partitioning() : void ->withEntry('rank', rank()->over(window()->orderBy(ref('salary')->desc()))) ->get(); - $this->assertSame( + self::assertSame( [ [ ['id' => 5, 'name' => 'Jane', 'department' => 'Finances', 'salary' => 14_000, 'rank' => 1], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php index c1bdf0755..c680368fd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Cache/IneMemoryCacheTest.php @@ -15,21 +15,21 @@ public function test_cache() : void { $cache = new InMemoryCache(); - $this->assertFalse($cache->has('id-1')); - $this->assertFalse($cache->has('id-2')); + self::assertFalse($cache->has('id-1')); + self::assertFalse($cache->has('id-2')); $cache->add('id-1', $rows1 = new Rows(Row::create(int_entry('id', 1)))); $cache->add('id-2', $rows2 = new Rows(Row::create(int_entry('id', 1)))); - $this->assertEquals([$rows1], \iterator_to_array($cache->read('id-1'))); - $this->assertEquals([$rows2], \iterator_to_array($cache->read('id-2'))); + self::assertEquals([$rows1], \iterator_to_array($cache->read('id-1'))); + self::assertEquals([$rows2], \iterator_to_array($cache->read('id-2'))); $cache->clear('id-1'); $cache->clear('id-2'); - $this->assertEquals([], \iterator_to_array($cache->read('id-1'))); - $this->assertEquals([], \iterator_to_array($cache->read('id-2'))); - $this->assertTrue($cache->has('id-1')); - $this->assertTrue($cache->has('id-2')); + self::assertEquals([], \iterator_to_array($cache->read('id-1'))); + self::assertEquals([], \iterator_to_array($cache->read('id-2'))); + self::assertTrue($cache->has('id-1')); + self::assertTrue($cache->has('id-2')); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/CaseConverter/ArrayKeyConverterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/CaseConverter/ArrayKeyConverterTest.php index 3d8c6d71d..f96c0b9fe 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/CaseConverter/ArrayKeyConverterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/CaseConverter/ArrayKeyConverterTest.php @@ -16,7 +16,7 @@ public function test_converts_all_keys_to_snake_case() : void fn (string $key) : string => (new Convert($key))->toSnake() ); - $this->assertEquals( + self::assertEquals( [ 'item_id' => 1, 'item_status' => 'PENDING', diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php index 42119da8c..415d38109 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php @@ -56,7 +56,7 @@ public function test_collect_references() : void ->collectRefs($refs = refs()) ->run(); - $this->assertEquals( + self::assertEquals( refs('id', 'name', 'active', 'country', 'group'), $refs ); @@ -74,7 +74,7 @@ public function test_count() : void ])) ->count(); - $this->assertSame(5, $count); + self::assertSame(5, $count); } public function test_drop() : void @@ -89,7 +89,7 @@ public function test_drop() : void ->drop('id') ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('name', 'foo'), bool_entry('active', true)), Row::create(null_entry('name'), bool_entry('active', false)), @@ -111,7 +111,7 @@ public function test_drop_duplicates() : void ->dropDuplicates(ref('id')) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'foo'), bool_entry('active', true)), Row::create(int_entry('id', 2), str_entry('name', 'bar'), bool_entry('active', false)), @@ -152,7 +152,7 @@ public function transform(DataFrame $dataFrame) : DataFrame ) ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('country', 'pl'), int_entry('age', 2)), Row::create(str_entry('country', 'pl'), int_entry('age', 2)), @@ -189,8 +189,8 @@ public function extract(FlowContext $context) : \Generator ->filter(ref('id')->mod(lit(2))->same(lit(0))) ->fetch(); - $this->assertCount(5, $rows); - $this->assertSame( + self::assertCount(5, $rows); + self::assertSame( [['id' => 2], ['id' => 4], ['id' => 6], ['id' => 8], ['id' => 10]], $rows->toArray() ); @@ -232,7 +232,7 @@ public function test_get() : void )) ->get(); - $this->assertEquals([$extractedRows], \iterator_to_array($rows)); + self::assertEquals([$extractedRows], \iterator_to_array($rows)); } public function test_get_as_array() : void @@ -250,7 +250,7 @@ public function test_get_as_array() : void )) ->getAsArray(); - $this->assertEquals([ + self::assertEquals([ $extractedRows->toArray(), ], \iterator_to_array($rows)); } @@ -270,7 +270,7 @@ public function test_get_each() : void )) ->getEach(); - $this->assertEquals([ + self::assertEquals([ Row::create(int_entry('id', 1), str_entry('name', 'foo')), Row::create(int_entry('id', 2), str_entry('name', 'bar')), Row::create(int_entry('id', 3), str_entry('name', 'baz')), @@ -295,7 +295,7 @@ public function test_get_each_as_array() : void )) ->getEachAsArray(); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar'], @@ -330,8 +330,8 @@ public function extract(FlowContext $context) : \Generator ->map(fn (Row $row) => $row->add(new BooleanEntry('odd', $row->valueOf('id') % 2 === 0))) ->fetch(); - $this->assertCount(10, $rows); - $this->assertSame( + self::assertCount(10, $rows); + self::assertSame( [ ['id' => 1, 'odd' => false], ['id' => 2, 'odd' => true], @@ -411,7 +411,7 @@ public function transform(Rows $rows, FlowContext $context) : Rows ->write($loader) ->run(); - $this->assertEquals( + self::assertEquals( [ [ 'id' => 101, @@ -446,7 +446,7 @@ public function test_process_constructor() : void ) ->fetch(); - $this->assertEquals($rows, $collectedRows); + self::assertEquals($rows, $collectedRows); } public function test_select() : void @@ -461,7 +461,7 @@ public function test_select() : void ->select('name', 'id') ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('name', 'foo'), int_entry('id', 1)), Row::create(null_entry('name'), int_entry('id', 2)), @@ -484,7 +484,7 @@ public function test_selective_validation_against_schema() : void new Schema\SelectiveValidator() )->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'foo'), bool_entry('active', true)), Row::create(int_entry('id', 2), null_entry('name'), array_entry('tags', ['foo', 'bar'])), @@ -510,7 +510,7 @@ public function test_strict_validation_against_schema() : void ) )->fetch(); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'foo'), bool_entry('active', true)), Row::create(int_entry('id', 2), null_entry('name'), bool_entry('active', false)), @@ -542,8 +542,8 @@ public function test_until() : void ->until(ref('id')->lessThanEqual(lit(3))) ->fetch(); - $this->assertCount(3, $rows); - $this->assertSame( + self::assertCount(3, $rows); + self::assertSame( [ ['id' => 1], ['id' => 2], @@ -573,7 +573,7 @@ public function test_void() : void ->rename('age_avg', 'average_age') ->fetch(); - $this->assertEquals( + self::assertEquals( new Rows(), $rows ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php index 02a95c594..0e1ebad91 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php @@ -121,7 +121,7 @@ public function load(Rows $rows, FlowContext $context) : void ->load($loader) ->run(); - $this->assertEquals( + self::assertEquals( [ [ 'id' => 101, @@ -197,7 +197,7 @@ public function load(Rows $rows, FlowContext $context) : void ->load($loader) ->run(); - $this->assertEquals( + self::assertEquals( [ [ 'id' => 102, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php index fe34173b2..9cc31cab6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/ExternalSort/BufferCacheTest.php @@ -19,7 +19,7 @@ public function test_buffer_cache_close() : void 10, ); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('add') ->with('id', new Callback(fn (Rows $rows) => $rows->count() === 2)); @@ -36,7 +36,7 @@ public function test_buffer_cache_overflow() : void 2, ); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('add') ->with('id', new Callback(fn (Rows $rows) => $rows->count() === 2)); @@ -51,7 +51,7 @@ public function test_buffer_cache_overflow_and_close() : void 2, ); - $cacheMock->expects($this->exactly(2)) + $cacheMock->expects(self::exactly(2)) ->method('add'); $bufferCache->add('id', new Rows(Row::create(int_entry('id', 1)))); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php index ab90cbbb4..c7c92dcec 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ArrayExtractorTest.php @@ -18,9 +18,9 @@ public function test_array_extractor() : void $rows = \iterator_to_array($extractor->extract(execution_context(config_builder()->build()))); - $this->assertCount(2, $rows); - $this->assertSame(['id' => 1, 'name' => 'Norbert'], $rows[0]->first()->toArray()); - $this->assertSame(['id' => 2, 'name' => 'Michal'], $rows[1]->first()->toArray()); + self::assertCount(2, $rows); + self::assertSame(['id' => 1, 'name' => 'Norbert'], $rows[0]->first()->toArray()); + self::assertSame(['id' => 2, 'name' => 'Michal'], $rows[1]->first()->toArray()); } public function test_generator_extraction() : void @@ -34,8 +34,8 @@ public function test_generator_extraction() : void $rows = \iterator_to_array($extractor->extract(execution_context(config()))); - $this->assertCount(2, $rows); - $this->assertSame(['id' => 1, 'name' => 'Norbert'], $rows[0]->first()->toArray()); - $this->assertSame(['id' => 2, 'name' => 'Michal'], $rows[1]->first()->toArray()); + self::assertCount(2, $rows); + self::assertSame(['id' => 1, 'name' => 'Norbert'], $rows[0]->first()->toArray()); + self::assertSame(['id' => 2, 'name' => 'Michal'], $rows[1]->first()->toArray()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php index 3f8f017f7..c3f5c646d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/CacheExtractorTest.php @@ -20,23 +20,23 @@ public function test_extracting_from_cache() : void yield new Rows(Row::create(int_entry('id', 3))); }; - $cache->expects($this->any()) + $cache->expects(self::any()) ->method('read') ->with('id') ->willReturn($generator()); - $cache->expects($this->any()) + $cache->expects(self::any()) ->method('has') ->with('id') ->willReturn(true); - $cache->expects($this->never()) + $cache->expects(self::never()) ->method('clear') ->with('id'); $extractor = from_cache('id'); - $this->assertEquals( + self::assertEquals( [ new Rows(Row::create(int_entry('id', 1))), new Rows(Row::create(int_entry('id', 2))), @@ -56,17 +56,17 @@ public function test_extracting_from_cache_and_clear() : void yield new Rows(Row::create(int_entry('id', 3))); }; - $cache->expects($this->any()) + $cache->expects(self::any()) ->method('read') ->with('id') ->willReturn($generator()); - $cache->expects($this->any()) + $cache->expects(self::any()) ->method('has') ->with('id') ->willReturn(true); - $cache->expects($this->once()) + $cache->expects(self::once()) ->method('clear') ->with('id'); @@ -79,12 +79,12 @@ public function test_extracting_from_fallback_extractor_when_cache_is_empty() : ->cache($cache = $this->createMock(Cache::class)) ->build(); - $cache->expects($this->exactly(2)) + $cache->expects(self::exactly(2)) ->method('has') ->with('id') ->willReturnOnConsecutiveCalls(false, true); - $cache->expects($this->once()) + $cache->expects(self::once()) ->method('read') ->with('id') ->willReturn( @@ -95,7 +95,7 @@ public function test_extracting_from_fallback_extractor_when_cache_is_empty() : ))->extract(new FlowContext($config)) ); - $cache->expects($this->never()) + $cache->expects(self::never()) ->method('clear') ->with('id'); @@ -103,7 +103,7 @@ public function test_extracting_from_fallback_extractor_when_cache_is_empty() : \iterator_to_array($extractor->extract(new FlowContext($config))); - $this->assertEquals( + self::assertEquals( [ $rowsToCache, ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php index 10f3aa110..a66a34372 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChainExtractorTest.php @@ -29,7 +29,7 @@ public function extract(FlowContext $context) : \Generator }, ); - $this->assertEquals( + self::assertEquals( [ new Rows(Row::create(int_entry('id', 1))), new Rows(Row::create(int_entry('id', 2))), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php index 847f19999..b3149b6fe 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ChunkExtractorTest.php @@ -15,7 +15,7 @@ public function test_chunk_extractor() : void { $extractor = new ChunkExtractor(new FakeExtractor($batches = 100), $chunkSize = 10); - $this->assertCount( + self::assertCount( $batches / $chunkSize, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); @@ -25,7 +25,7 @@ public function test_chunk_extractor_with_chunk_size_greater_than_() : void { $extractor = new ChunkExtractor(new FakeExtractor(total: 20), chunkSize: 25); - $this->assertCount( + self::assertCount( 1, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php index a2c656065..1692aedcc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/DataFrameExtractorTest.php @@ -12,7 +12,7 @@ final class DataFrameExtractorTest extends TestCase { public function test_extracting_from_another_data_frame() : void { - $this->assertEquals( + self::assertEquals( [ rows( row(str_entry('value', 'test')), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php index d37ec8efc..0746e6605 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/LocalFileListExtractorTest.php @@ -32,11 +32,11 @@ public function test_extracting_files_from_directory() : void $totalRows = 0; foreach ($extractor->extract(flow_context()) as $rows) { - $this->assertCount(1, $rows); + self::assertCount(1, $rows); $totalRows += $rows->count(); } - $this->assertEquals(6, $totalRows); + self::assertEquals(6, $totalRows); } public function test_extracting_files_from_directory_after_getting_stop_signal() : void @@ -46,12 +46,12 @@ public function test_extracting_files_from_directory_after_getting_stop_signal() $totalRows = 0; foreach ($generator as $rows) { - $this->assertCount(1, $rows); + self::assertCount(1, $rows); $totalRows += $rows->count(); $generator->send(Signal::STOP); } - $this->assertEquals(1, $totalRows); + self::assertEquals(1, $totalRows); } public function test_extracting_files_from_directory_recursive() : void @@ -61,11 +61,11 @@ public function test_extracting_files_from_directory_recursive() : void $totalRows = 0; foreach ($extractor->extract(flow_context()) as $rows) { - $this->assertCount(1, $rows); + self::assertCount(1, $rows); $totalRows += $rows->count(); } - $this->assertEquals(7, $totalRows); + self::assertEquals(7, $totalRows); } public function test_extracting_files_from_directory_with_limit() : void @@ -76,11 +76,11 @@ public function test_extracting_files_from_directory_with_limit() : void $totalRows = 0; foreach ($extractor->extract(flow_context()) as $rows) { - $this->assertCount(1, $rows); + self::assertCount(1, $rows); $totalRows += $rows->count(); } - $this->assertEquals(2, $totalRows); + self::assertEquals(2, $totalRows); } public function test_extracting_from_directory_with_pattern() : void diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php index a9b8890d2..131caeecf 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/MemoryExtractorTest.php @@ -33,7 +33,7 @@ public function test_memory_extractor() : void $data = [...$data, ...$rowsData->toArray()]; } - $this->assertSame( + self::assertSame( [ ['number' => 1, 'name' => 'one'], ['number' => 2, 'name' => 'two'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php index 5ae5122ea..25940ecae 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/PipelineExtractorTest.php @@ -23,7 +23,7 @@ public function test_pipeline_extractor() : void $extractor = new PipelineExtractor($pipeline, Config::default()); - $this->assertCount( + self::assertCount( 3, \iterator_to_array($extractor->extract(new FlowContext(Config::default()))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php index 5f0b35f39..b27125cca 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/ProcessExtractorTest.php @@ -28,7 +28,7 @@ public function test_process_extractor() : void $data = [...$data, ...$rowsData->toArray()]; } - $this->assertSame( + self::assertSame( [ ['number' => 1, 'name' => 'one'], ['number' => 2, 'name' => 'two'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php index f4e149ff9..2bd2b66f7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Extractor/SequenceExtractorTest.php @@ -14,7 +14,7 @@ public function test_extracting_from_date_period() : void { $extractor = from_sequence_date_period('day', new \DateTimeImmutable('2023-01-01'), new \DateInterval('P1D'), new \DateTimeImmutable('2023-01-11'), \DatePeriod::EXCLUDE_START_DATE); - $this->assertEquals( + self::assertEquals( [ new Rows(Row::create(datetime_entry('day', new \DateTimeImmutable('2023-01-02')))), new Rows(Row::create(datetime_entry('day', new \DateTimeImmutable('2023-01-03')))), @@ -34,7 +34,7 @@ public function test_extracting_from_date_period_recurrences() : void { $extractor = from_sequence_date_period_recurrences('day', new \DateTimeImmutable('2023-01-01'), new \DateInterval('P1D'), 10, \DatePeriod::EXCLUDE_START_DATE); - $this->assertEquals( + self::assertEquals( [ new Rows(Row::create(datetime_entry('day', new \DateTimeImmutable('2023-01-02')))), new Rows(Row::create(datetime_entry('day', new \DateTimeImmutable('2023-01-03')))), @@ -55,7 +55,7 @@ public function test_extracting_from_numbers_range() : void { $extractor = from_sequence_number('num', 0, 10, 1.5); - $this->assertEquals( + self::assertEquals( [ new Rows(Row::create(float_entry('num', 0))), new Rows(Row::create(float_entry('num', 1.5))), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php index a215f16de..045bf9c49 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIBodyTest.php @@ -22,7 +22,7 @@ public function test_printing_ascii_body() : void new Body($rows) ); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' | 1 | 1.4 | | 2 | 3.4 | @@ -44,7 +44,7 @@ public function test_printing_ascii_body_with_partitioned_rows() : void new Body($rows[0]) ); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' | 1 | 1.4 | a | | 2 | 3.4 | a | diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php index 9e36e3e30..5570438f8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIHeadersTest.php @@ -23,7 +23,7 @@ public function test_printing_ascii_headers() : void new Body($rows) ); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +----+-------+ | id | value | diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIValueTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIValueTest.php index 5a2de1480..1e61cd60b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIValueTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCII/ASCIIValueTest.php @@ -34,7 +34,7 @@ public static function values_without_truncating() : \Generator */ public function test_converting_value_to_ascii_value(mixed $value, string $asciiValue) : void { - $this->assertSame( + self::assertSame( $asciiValue, (new ASCIIValue($value))->print(false), ); @@ -45,7 +45,7 @@ public function test_converting_value_to_ascii_value(mixed $value, string $ascii */ public function test_converting_value_to_ascii_value_with_truncating(mixed $value, string $asciiValue) : void { - $this->assertSame( + self::assertSame( $asciiValue, (new ASCIIValue($value))->print(3), ); @@ -53,17 +53,17 @@ public function test_converting_value_to_ascii_value_with_truncating(mixed $valu public function test_mb_str_pad() : void { - $this->assertSame( + self::assertSame( '00ąćę', ASCIIValue::mb_str_pad('ąćę', 5, '0', STR_PAD_LEFT) ); - $this->assertSame( + self::assertSame( 'ąćę00', ASCIIValue::mb_str_pad('ąćę', 5, '0', STR_PAD_RIGHT) ); - $this->assertSame( + self::assertSame( '0ąćę0', ASCIIValue::mb_str_pad('ąćę', 5, '0', STR_PAD_BOTH) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php index 0e0778e3a..8609d9a97 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Formatter/ASCIITableTest.php @@ -23,7 +23,7 @@ public function test_ascii_table_with_mb_strings() : void Row::create(str_entry('row', '[816][853]/Siedem - władcom krasnoludów,|/wspaniałym górnikom')), ); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +-------------------------------------------------------------------------------------+ | row | @@ -53,7 +53,7 @@ public function test_ascii_table_with_mb_strings_truncate() : void Row::create(str_entry('row', '[816][853]/Siedem - władcom krasnoludów,|/wspaniałym górnikom')), ); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +----------------------+ | row | @@ -83,7 +83,7 @@ public function test_ascii_table_with_non_symmetric_entries() : void Row::create(str_entry('test', '[816][853]/Siedem - władcom krasnoludów,|/wspaniałym górnikom')), ); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +-------------------------------------------------------------------------------------+---------------------------------------------------------------+ | row | test | @@ -107,7 +107,7 @@ public function test_ascii_table_with_single_row() : void ['id' => 1, 'name' => 'EN'], ]; - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +----+------+ | id | name | diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php index c122b8e3d..56cd6de25 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AllTest.php @@ -12,35 +12,35 @@ final class AllTest extends TestCase { public function test_all_expression_on_is_null_expression() : void { - $this->assertTrue( + self::assertTrue( all(ref('value')->isNull())->eval(Row::create(null_entry('value'))) ); } public function test_all_expression_on_multiple_boolean_values() : void { - $this->assertTrue( + self::assertTrue( all(lit(true), lit(true), lit(true))->eval(Row::create()) ); } public function test_all_expression_on_multiple_random_boolean_values() : void { - $this->assertFalse( + self::assertFalse( all(lit(true), lit(false), lit(true))->eval(Row::create()) ); } public function test_all_function_on_boolean_false_value() : void { - $this->assertFalse( + self::assertFalse( all(lit(false))->eval(Row::create()) ); } public function test_all_function_on_boolean_true_value() : void { - $this->assertTrue( + self::assertTrue( all(lit(true))->eval(Row::create()) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php index 88dd0d752..db8e6ed31 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AnyTest.php @@ -12,28 +12,28 @@ final class AnyTest extends TestCase { public function test_any_expression_on_boolean_false_value() : void { - $this->assertFalse( + self::assertFalse( any(lit(false))->eval(Row::create()) ); } public function test_any_expression_on_boolean_true_value() : void { - $this->assertTrue( + self::assertTrue( any(lit(true))->eval(Row::create()) ); } public function test_any_expression_on_is_null_expression() : void { - $this->assertTrue( + self::assertTrue( any(ref('value')->isNull())->eval(Row::create(null_entry('value'))) ); } public function test_any_expression_on_multiple_boolean_values() : void { - $this->assertTrue( + self::assertTrue( any(lit(false), lit(true), lit(false))->eval(Row::create()) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php index 2a9d4a60b..b0b2efcda 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayExpandTest.php @@ -17,7 +17,7 @@ public function test_expand_both() : void array_entry('array', ['a' => 1, 'b' => 2, 'c' => 3]), ); - $this->assertSame( + self::assertSame( [ ['a' => 1], ['b' => 2], @@ -33,7 +33,7 @@ public function test_expand_keys() : void array_entry('array', ['a' => 1, 'b' => 2, 'c' => 3]), ); - $this->assertSame( + self::assertSame( ['a', 'b', 'c'], array_expand(ref('array'), ArrayExpand::KEYS)->eval($row) ); @@ -45,7 +45,7 @@ public function test_expand_values() : void array_entry('array', ['a' => 1, 'b' => 2, 'c' => 3]), ); - $this->assertSame( + self::assertSame( ['a' => 1, 'b' => 2, 'c' => 3], array_expand(ref('array'))->eval($row) ); @@ -53,7 +53,7 @@ public function test_expand_values() : void public function test_for_not_array_entry() : void { - $this->assertNull( + self::assertNull( array_expand(ref('integer_entry'))->eval(Row::create(int_entry('integer_entry', 1))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php index 74e358e69..8c745c4df 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetCollectionTest.php @@ -16,7 +16,7 @@ public function test_for_not_array_entry() : void int_entry('invalid_entry', 1), ); - $this->assertNull(array_get_collection(ref('invalid_entry'), 'id')->eval($row)); + self::assertNull(array_get_collection(ref('invalid_entry'), 'id')->eval($row)); } public function test_getting_keys_from_simple_array() : void @@ -33,7 +33,7 @@ public function test_getting_keys_from_simple_array() : void ), ); - $this->assertNull(array_get_collection(ref('array_entry'), 'id', 'status')->eval($row)); + self::assertNull(array_get_collection(ref('array_entry'), 'id', 'status')->eval($row)); } public function test_getting_specific_keys_from_collection_of_array() : void @@ -58,7 +58,7 @@ public function test_getting_specific_keys_from_collection_of_array() : void ), ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'status' => 'PENDING'], ['id' => 2, 'status' => 'NEW'], @@ -91,7 +91,7 @@ public function test_getting_specific_keys_from_first_element_in_collection_of_a ), ); - $this->assertEquals( + self::assertEquals( [ 'parent_id' => 1, ], @@ -123,7 +123,7 @@ public function test_getting_specific_keys_from_first_element_in_collection_of_a ), ); - $this->assertEquals( + self::assertEquals( [ 'parent_id' => 1, ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php index bdf2d5617..66ec6abfd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayGetTest.php @@ -13,8 +13,8 @@ final class ArrayGetTest extends TestCase { public function test_array_access_for_not_array_entry() : void { - $this->assertNull(array_get(ref('integer_entry'), 'invalid_path')->eval(Row::create(int_entry('integer_entry', 1)))); - $this->assertFalse(array_exists(ref('integer_entry'), 'invalid_path')->eval(Row::create(int_entry('integer_entry', 1)))); + self::assertNull(array_get(ref('integer_entry'), 'invalid_path')->eval(Row::create(int_entry('integer_entry', 1)))); + self::assertFalse(array_exists(ref('integer_entry'), 'invalid_path')->eval(Row::create(int_entry('integer_entry', 1)))); } public function test_array_accessor_transformer() : void @@ -27,8 +27,8 @@ public function test_array_accessor_transformer() : void 'array' => ['foo' => 'bar'], ]), ); - $this->assertEquals('bar', array_get(ref('array_entry'), 'array.foo')->eval($row)); - $this->assertTrue(array_exists(ref('array_entry'), 'array.foo')->eval($row)); + self::assertEquals('bar', array_get(ref('array_entry'), 'array.foo')->eval($row)); + self::assertTrue(array_exists(ref('array_entry'), 'array.foo')->eval($row)); } public function test_array_accessor_transformer_with_invalid_and_without_strict_path() : void @@ -42,9 +42,9 @@ public function test_array_accessor_transformer_with_invalid_and_without_strict_ 'array' => ['foo' => 'bar'], ]), ); - $this->assertNull(array_get(ref('array_entry'), '?invalid_path')->eval($row)); - $this->assertTrue(array_exists(ref('array_entry'), '?invalid_path')->eval($row)); - $this->assertFalse(array_exists(ref('array_entry'), 'invalid_path')->eval($row)); + self::assertNull(array_get(ref('array_entry'), '?invalid_path')->eval($row)); + self::assertTrue(array_exists(ref('array_entry'), '?invalid_path')->eval($row)); + self::assertFalse(array_exists(ref('array_entry'), 'invalid_path')->eval($row)); } public function test_array_accessor_transformer_with_invalid_but_strict_path() : void diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php index 44b5be413..7e7a605bc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeyRenameTest.php @@ -17,7 +17,7 @@ public function test_for_not_array_entry() : void int_entry('integer_entry', 1), ); - $this->assertNull(array_key_rename(ref('integer_entry'), 'invalid_path', 'new_name')->eval($row)); + self::assertNull(array_key_rename(ref('integer_entry'), 'invalid_path', 'new_name')->eval($row)); } public function test_renames_array_entry_keys_in_multiple_array_entry() : void @@ -36,7 +36,7 @@ public function test_renames_array_entry_keys_in_multiple_array_entry() : void ]), ); - $this->assertEquals( + self::assertEquals( [ 'first_name' => 'John', 'last' => 'Snow', @@ -44,7 +44,7 @@ public function test_renames_array_entry_keys_in_multiple_array_entry() : void array_key_rename(ref('customer'), 'first', 'first_name')->eval($row) ); - $this->assertEquals( + self::assertEquals( [ 'address' => [ 'street' => '3644 Clement Street', @@ -68,7 +68,7 @@ public function test_renames_array_entry_keys_in_single_array_entry() : void ]), ); - $this->assertEquals( + self::assertEquals( [ 'id' => 1, 'status' => 'PENDING', diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php index 70bb38f1d..2a39b805b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayKeysStyleConverterTest.php @@ -29,7 +29,7 @@ public function test_for_not_array_entry() : void int_entry('invalid_entry', 1), ); - $this->assertNull(array_keys_style_convert(ref('invalid_entry'), 'snake')->eval($row)); + self::assertNull(array_keys_style_convert(ref('invalid_entry'), 'snake')->eval($row)); } public function test_transforms_case_style_for_all_keys_in_array_entry() : void @@ -58,7 +58,7 @@ public function test_transforms_case_style_for_all_keys_in_array_entry() : void ) ); - $this->assertEquals( + self::assertEquals( [ 'item_id' => 1, 'item_status' => 'PENDING', diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php index 8f32f6f69..cc7d79064 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeCollectionTest.php @@ -22,7 +22,7 @@ public function test_attempt_of_merging_collection_where_not_every_element_is_ar ), ); - $this->assertNull(array_merge_collection(ref('array_entry'))->eval($row)); + self::assertNull(array_merge_collection(ref('array_entry'))->eval($row)); } public function test_for_not_array_entry() : void @@ -31,7 +31,7 @@ public function test_for_not_array_entry() : void int_entry('invalid_entry', 1), ); - $this->assertNull(array_merge_collection(ref('invalid_entry'))->eval($row)); + self::assertNull(array_merge_collection(ref('invalid_entry'))->eval($row)); } public function test_merging_collection_of_arrays() : void @@ -51,7 +51,7 @@ public function test_merging_collection_of_arrays() : void ), ); - $this->assertEquals( + self::assertEquals( [1, 2], array_merge_collection(ref('array_entry'))->eval($row) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php index b0bb02a43..c23f6102f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayMergeTest.php @@ -13,7 +13,7 @@ final class ArrayMergeTest extends TestCase { public function test_array_merge_two_array_row_entries() : void { - $this->assertSame( + self::assertSame( ['a' => 1, 'b' => 2], ref('a')->arrayMerge(ref('b')) ->eval( @@ -32,12 +32,12 @@ public function test_array_merge_two_lit_functions() : void lit(['b' => 2]) ); - $this->assertSame(['a' => 1, 'b' => 2], $function->eval(Row::create())); + self::assertSame(['a' => 1, 'b' => 2], $function->eval(Row::create())); } public function test_array_merge_when_left_side_is_not_an_array() : void { - $this->assertNull( + self::assertNull( ref('a')->arrayMerge(ref('b')) ->eval( Row::create( @@ -50,7 +50,7 @@ public function test_array_merge_when_left_side_is_not_an_array() : void public function test_array_merge_when_right_side_is_not_an_array() : void { - $this->assertNull( + self::assertNull( ref('a')->arrayMerge(ref('b')) ->eval( Row::create( diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php index af2868bff..4fa9ef574 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayReverseTest.php @@ -12,7 +12,7 @@ final class ArrayReverseTest extends TestCase { public function test_array_reverse_array_entry() : void { - $this->assertSame( + self::assertSame( [5, 3, 10, 4], ref('a')->arrayReverse() ->eval( @@ -25,7 +25,7 @@ public function test_array_reverse_array_entry() : void public function test_array_reverse_non_array_entry() : void { - $this->assertNull( + self::assertNull( ref('a')->arrayReverse() ->eval( Row::create( diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php index 86f173491..73de1ae26 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArraySortTest.php @@ -12,7 +12,7 @@ final class ArraySortTest extends TestCase { public function test_sorting_big_arrays() : void { - $this->assertSame( + self::assertSame( ref('array')->arraySort('sort')->eval(Row::create(array_entry('array', \json_decode($this->jsonDifferentOrder(), true, 512, JSON_THROW_ON_ERROR)))), ref('array')->arraySort('sort')->eval(Row::create(array_entry('array', \json_decode($this->json(), true, 512, JSON_THROW_ON_ERROR)))) ); @@ -20,7 +20,7 @@ public function test_sorting_big_arrays() : void public function test_sorting_nested_array_using_asort_algo() : void { - $this->assertSame( + self::assertSame( [ 'a' => [ 'g' => 'h', @@ -49,7 +49,7 @@ public function test_sorting_nested_array_using_asort_algo() : void public function test_sorting_nested_associative_array() : void { - $this->assertSame( + self::assertSame( [ 'a' => [ 'b' => [ @@ -79,7 +79,7 @@ public function test_sorting_nested_associative_array() : void public function test_sorting_non_array_value() : void { - $this->assertNull( + self::assertNull( ref('array')->arraySort()->eval(Row::create(str_entry('array', 'string'))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php index 2424fbb2f..aa0baa308 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ArrayUnpackTest.php @@ -22,7 +22,7 @@ public function test_array_unpack() : void ]), ); - $this->assertSame( + self::assertSame( [ 'status' => 'PENDING', 'enabled' => true, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php index 7325bec4b..65c97808c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/AverageTest.php @@ -20,7 +20,7 @@ public function test_aggregation_average_from_numeric_values() : void $aggregator->aggregate(Row::create(str_entry('int', '25'))); $aggregator->aggregate(Row::create(null_entry('not_int'))); - $this->assertSame( + self::assertSame( 21.25, $aggregator->result()->value() ); @@ -35,7 +35,7 @@ public function test_aggregation_average_including_null_value() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(null_entry('int'))); - $this->assertSame( + self::assertSame( 20, $aggregator->result()->value() ); @@ -50,7 +50,7 @@ public function test_aggregation_average_with_float_result() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(int_entry('int', 25))); - $this->assertSame( + self::assertSame( 21.25, $aggregator->result()->value() ); @@ -65,7 +65,7 @@ public function test_aggregation_average_with_integer_result() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(int_entry('int', 40))); - $this->assertSame( + self::assertSame( 25, $aggregator->result()->value() ); @@ -75,7 +75,7 @@ public function test_aggregation_average_with_zero_result() : void { $aggregator = average(ref('int')); - $this->assertSame( + self::assertSame( 0, $aggregator->result()->value() ); @@ -93,6 +93,6 @@ public function test_window_function_average_on_partitioned_rows() : void $avg = average(ref('value'))->over(window()->orderBy(ref('value'))); - $this->assertSame(42.6, $avg->apply($row1, $rows)); + self::assertSame(42.6, $avg->apply($row1, $rows)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php index c07559697..cc70324a1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BetweenTest.php @@ -12,52 +12,52 @@ final class BetweenTest extends TestCase { public function test_between_exclusive() : void { - $this->assertTrue( + self::assertTrue( between(ref('value'), lit(10), lit(50), Boundary::EXCLUSIVE)->eval(row(int_entry('value', 11))) ); - $this->assertTrue( + self::assertTrue( between(ref('value'), lit(10), lit(50), Boundary::EXCLUSIVE)->eval(row(int_entry('value', 49))) ); - $this->assertFalse( + self::assertFalse( between(ref('value'), lit(10), lit(50), Boundary::EXCLUSIVE)->eval(row(int_entry('value', 10))) ); - $this->assertFalse( + self::assertFalse( between(ref('value'), lit(10), lit(50), Boundary::EXCLUSIVE)->eval(row(int_entry('value', 50))) ); } public function test_between_inclusive() : void { - $this->assertTrue( + self::assertTrue( between(ref('value'), lit(10), lit(50), Boundary::INCLUSIVE)->eval(row(int_entry('value', 10))) ); - $this->assertTrue( + self::assertTrue( between(ref('value'), lit(10), lit(50), Boundary::INCLUSIVE)->eval(row(int_entry('value', 50))) ); - $this->assertFalse( + self::assertFalse( between(ref('value'), lit(10), lit(50), Boundary::INCLUSIVE)->eval(row(int_entry('value', 9))) ); - $this->assertFalse( + self::assertFalse( between(ref('value'), lit(10), lit(50), Boundary::INCLUSIVE)->eval(row(int_entry('value', 51))) ); } public function test_between_left_inclusive() : void { - $this->assertTrue( + self::assertTrue( between(ref('value'), lit(10), lit(50))->eval(row(int_entry('value', 10))) ); - $this->assertFalse( + self::assertFalse( between(ref('value'), lit(10), lit(50))->eval(row(int_entry('value', 9))) ); } public function test_between_right_inclusive() : void { - $this->assertTrue( + self::assertTrue( between(ref('value'), lit(10), lit(50), Boundary::RIGHT_INCLUSIVE)->eval(row(int_entry('value', 50))) ); - $this->assertFalse( + self::assertFalse( between(ref('value'), lit(10), lit(50), Boundary::RIGHT_INCLUSIVE)->eval(row(int_entry('value', 51))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php index 3f6f5b2c4..dbf686c8e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/BinaryComparisonsTest.php @@ -16,13 +16,13 @@ public function test_equals() : void { $row = Row::create(int_entry('a', 100), int_entry('b', 100), int_entry('c', 10), datetime_entry('d', '2023-01-01 00:00:00 UTC'), datetime_entry('e', '2023-01-01 00:00:00 UTC')); - $this->assertTrue( + self::assertTrue( (new Equals(ref('a'), ref('b')))->eval($row) ); - $this->assertTrue( + self::assertTrue( (new Equals(ref('d'), ref('e')))->eval($row) ); - $this->assertFalse( + self::assertFalse( (new Equals(ref('a'), ref('c')))->eval($row) ); } @@ -37,13 +37,13 @@ public function test_greater_than() : void datetime_entry('e', '2023-01-02 00:00:00 UTC'), ); - $this->assertTrue((new GreaterThan(ref('a'), ref('c')))->eval($row)); - $this->assertFalse((new GreaterThan(ref('a'), ref('b')))->eval($row)); - $this->assertTrue((new GreaterThanEqual(ref('a'), ref('c')))->eval($row)); - $this->assertTrue((new GreaterThanEqual(ref('a'), ref('b')))->eval($row)); - $this->assertTrue((new GreaterThanEqual(ref('e'), ref('d')))->eval($row)); - $this->assertTrue((new GreaterThanEqual(ref('e'), lit(new \DateTimeImmutable('2022-01-01 00:00:00 UTC'))))->eval($row)); - $this->assertFalse((new GreaterThanEqual(ref('e'), lit(new \DateTimeImmutable('2024-01-01 00:00:00 UTC'))))->eval($row)); + self::assertTrue((new GreaterThan(ref('a'), ref('c')))->eval($row)); + self::assertFalse((new GreaterThan(ref('a'), ref('b')))->eval($row)); + self::assertTrue((new GreaterThanEqual(ref('a'), ref('c')))->eval($row)); + self::assertTrue((new GreaterThanEqual(ref('a'), ref('b')))->eval($row)); + self::assertTrue((new GreaterThanEqual(ref('e'), ref('d')))->eval($row)); + self::assertTrue((new GreaterThanEqual(ref('e'), lit(new \DateTimeImmutable('2022-01-01 00:00:00 UTC'))))->eval($row)); + self::assertFalse((new GreaterThanEqual(ref('e'), lit(new \DateTimeImmutable('2024-01-01 00:00:00 UTC'))))->eval($row)); } public function test_is_in() : void @@ -56,10 +56,10 @@ public function test_is_in() : void str_entry('e', 'b'), ); - $this->assertTrue((new IsIn(ref('a'), lit(1)))->eval($row)); - $this->assertFalse((new IsIn(ref('a'), lit(10)))->eval($row)); - $this->assertTrue((new IsIn(ref('a'), ref('d')))->eval($row)); - $this->assertTrue((new IsIn(ref('b'), ref('e')))->eval($row)); + self::assertTrue((new IsIn(ref('a'), lit(1)))->eval($row)); + self::assertFalse((new IsIn(ref('a'), lit(10)))->eval($row)); + self::assertTrue((new IsIn(ref('a'), ref('d')))->eval($row)); + self::assertTrue((new IsIn(ref('b'), ref('e')))->eval($row)); } public function test_is_numeric() : void @@ -68,12 +68,12 @@ public function test_is_numeric() : void int_entry('a', 100), null_entry('b'), ); - $this->assertTrue((new IsNumeric(ref('a')))->eval($row)); - $this->assertFalse((new IsNumeric(ref('b')))->eval($row)); - $this->assertFalse((new IsNotNumeric(ref('a')))->eval($row)); - $this->assertTrue((new IsNotNumeric(ref('b')))->eval($row)); - $this->assertTrue((new IsNotNumeric(lit(null)))->eval($row)); - $this->assertTrue((new IsNumeric(lit(1000)))->eval($row)); + self::assertTrue((new IsNumeric(ref('a')))->eval($row)); + self::assertFalse((new IsNumeric(ref('b')))->eval($row)); + self::assertFalse((new IsNotNumeric(ref('a')))->eval($row)); + self::assertTrue((new IsNotNumeric(ref('b')))->eval($row)); + self::assertTrue((new IsNotNumeric(lit(null)))->eval($row)); + self::assertTrue((new IsNumeric(lit(1000)))->eval($row)); } public function test_is_type() : void @@ -83,8 +83,8 @@ public function test_is_type() : void null_entry('b'), ); - $this->assertTrue((new IsType(ref('a'), IntegerEntry::class, StringEntry::class))->eval($row)); - $this->assertFalse((new IsType(ref('a'), StringEntry::class))->eval($row)); + self::assertTrue((new IsType(ref('a'), IntegerEntry::class, StringEntry::class))->eval($row)); + self::assertFalse((new IsType(ref('a'), StringEntry::class))->eval($row)); } public function test_is_type_with_non_existing_type_class() : void @@ -96,23 +96,23 @@ public function test_is_type_with_non_existing_type_class() : void null_entry('b'), ); - $this->assertFalse((new IsType(ref('a'), 'aaa'))->eval($row)); + self::assertFalse((new IsType(ref('a'), 'aaa'))->eval($row)); } public function test_less_than() : void { $row = Row::create(int_entry('a', 100), int_entry('b', 100), int_entry('c', 10)); - $this->assertFalse( + self::assertFalse( (new LessThan(ref('a'), ref('c')))->eval($row) ); - $this->assertFalse( + self::assertFalse( (new LessThan(ref('a'), ref('b')))->eval($row) ); - $this->assertTrue( + self::assertTrue( (new LessThanEqual(ref('c'), ref('a')))->eval($row) ); - $this->assertTrue( + self::assertTrue( (new LessThanEqual(ref('a'), ref('b')))->eval($row) ); } @@ -121,10 +121,10 @@ public function test_not_equals() : void { $row = Row::create(int_entry('a', 100), int_entry('b', 100), int_entry('c', 10)); - $this->assertFalse( + self::assertFalse( (new NotEquals(ref('a'), ref('b')))->eval($row) ); - $this->assertTrue( + self::assertTrue( (new NotEquals(ref('a'), ref('c')))->eval($row) ); } @@ -133,10 +133,10 @@ public function test_not_same() : void { $row = Row::create(int_entry('a', 100), int_entry('b', 100), int_entry('c', 10)); - $this->assertTrue( + self::assertTrue( (new NotSame(ref('a'), ref('c')))->eval($row) ); - $this->assertFalse( + self::assertFalse( (new NotSame(ref('a'), ref('b')))->eval($row) ); } @@ -148,25 +148,25 @@ public function test_null() : void null_entry('b'), ); - $this->assertFalse((new IsNull(ref('a')))->eval($row)); - $this->assertTrue((new IsNull(ref('b')))->eval($row)); - $this->assertTrue((new IsNotNull(ref('a')))->eval($row)); - $this->assertFalse((new IsNotNull(ref('b')))->eval($row)); - $this->assertTrue((new IsNull(lit(null)))->eval($row)); - $this->assertTrue((new IsNotNull(lit(1000)))->eval($row)); + self::assertFalse((new IsNull(ref('a')))->eval($row)); + self::assertTrue((new IsNull(ref('b')))->eval($row)); + self::assertTrue((new IsNotNull(ref('a')))->eval($row)); + self::assertFalse((new IsNotNull(ref('b')))->eval($row)); + self::assertTrue((new IsNull(lit(null)))->eval($row)); + self::assertTrue((new IsNotNull(lit(1000)))->eval($row)); } public function test_same() : void { $row = Row::create(int_entry('a', 100), int_entry('b', 100), int_entry('c', 10), datetime_entry('d', '2023-01-01 00:00:00 UTC'), datetime_entry('e', '2023-01-01 00:00:00 UTC')); - $this->assertTrue( + self::assertTrue( (new Same(ref('a'), ref('b')))->eval($row) ); - $this->assertFalse( + self::assertFalse( (new Same(ref('d'), ref('e')))->eval($row) ); - $this->assertFalse( + self::assertFalse( (new Same(ref('a'), ref('c')))->eval($row) ); } @@ -180,11 +180,11 @@ public function test_starts_ends_with() : void str_entry('d', 'text') ); - $this->assertTrue((new StartsWith(ref('a'), lit('some not')))->eval($row)); - $this->assertTrue((new EndsWith(ref('a'), lit('long string')))->eval($row)); - $this->assertTrue((new StartsWith(ref('b'), ref('c')))->eval($row)); - $this->assertTrue((new EndsWith(ref('b'), ref('d')))->eval($row)); - $this->assertTrue((new Contains(ref('a'), lit('too long')))->eval($row)); - $this->assertFalse((new Contains(ref('a'), lit('blablabla')))->eval($row)); + self::assertTrue((new StartsWith(ref('a'), lit('some not')))->eval($row)); + self::assertTrue((new EndsWith(ref('a'), lit('long string')))->eval($row)); + self::assertTrue((new StartsWith(ref('b'), ref('c')))->eval($row)); + self::assertTrue((new EndsWith(ref('b'), ref('d')))->eval($row)); + self::assertTrue((new Contains(ref('a'), lit('too long')))->eval($row)); + self::assertFalse((new Contains(ref('a'), lit('blablabla')))->eval($row)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php index c06300915..a74782b27 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CallMethodTest.php @@ -18,7 +18,7 @@ public function test_call_method() : void str_entry('method_param', 'H:i:s Y-m-d'), ); - $this->assertEquals( + self::assertEquals( '00:00:00 2023-01-01', call_method( ref('object'), @@ -35,7 +35,7 @@ public function test_method_not_string() : void datetime_entry('method', '2023-01-01 00:00:00 UTC'), ); - $this->assertNull( + self::assertNull( call_method( ref('object'), ref('method') @@ -50,7 +50,7 @@ public function test_not_existing_method() : void str_entry('method', 'method_that_not_exists'), ); - $this->assertNull( + self::assertNull( call_method( ref('object'), ref('method') @@ -65,7 +65,7 @@ public function test_null_method() : void null_entry('method'), ); - $this->assertNull( + self::assertNull( call_method( ref('object'), ref('method') @@ -80,7 +80,7 @@ public function test_null_object() : void str_entry('method', 'getTimestamp'), ); - $this->assertNull( + self::assertNull( call_method( ref('object'), ref('method') diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php index 2e38f113b..c1f24b891 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CapitalizeTest.php @@ -12,7 +12,7 @@ final class CapitalizeTest extends TestCase { public function test_capitalize_valid_string() : void { - $this->assertSame( + self::assertSame( 'This Is A Value', ref('string')->capitalize()->eval(Row::create(str_entry('string', 'this is a value'))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php index d2951385e..f6c0e4ab2 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CastTest.php @@ -56,24 +56,24 @@ public function test_cast(mixed $from, string $to, mixed $expected) : void $resultCastRef = cast(ref('value'), $to)->eval(Row::create((new NativeEntryFactory())->create('value', $from))); if (\is_object($expected) || \is_object($from)) { - $this->assertEquals($expected, $resultRefCast); - $this->assertEquals($expected, $resultCastRef); + self::assertEquals($expected, $resultRefCast); + self::assertEquals($expected, $resultCastRef); } else { - $this->assertSame($expected, $resultRefCast); - $this->assertSame($expected, $resultCastRef); + self::assertSame($expected, $resultRefCast); + self::assertSame($expected, $resultCastRef); } } public function test_casting_integer_to_xml() : void { - $this->assertNull( + self::assertNull( ref('value')->cast('xml')->eval(Row::create((new NativeEntryFactory())->create('value', 1))) ); } public function test_casting_non_xml_string_to_xml() : void { - $this->assertNull( + self::assertNull( ref('value')->cast('xml')->eval(Row::create((new NativeEntryFactory())->create('value', 'foo'))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php index 08cfdc64a..cccbb1b15 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectTest.php @@ -19,7 +19,7 @@ public function test_aggregation_collect_entry_values() : void $aggregator->aggregate(Row::create(str_entry('data', 'b'))); $aggregator->aggregate(Row::create(str_entry('data', 'c'))); - $this->assertSame( + self::assertSame( [ 'a', 'b', 'b', 'c', ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php index 78da61c74..a89087e21 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CollectUniqueTest.php @@ -19,7 +19,7 @@ public function test_aggregation_collect_unique_values() : void $aggregator->aggregate(Row::create(str_entry('data', 'b'))); $aggregator->aggregate(Row::create(str_entry('data', 'c'))); - $this->assertSame( + self::assertSame( [ 'a', 'b', 'c', ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php index cc4448c88..7cc393c05 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CombineTest.php @@ -12,7 +12,7 @@ final class CombineTest extends TestCase { public function test_array_combine() : void { - $this->assertSame( + self::assertSame( ['a' => 1, 'b' => 2, 'c' => 3], combine(lit(['a', 'b', 'c']), lit([1, 2, 3]))->eval(Row::create()), ); @@ -20,7 +20,7 @@ public function test_array_combine() : void public function test_array_combine_when_arrays_are_empty() : void { - $this->assertSame( + self::assertSame( [], combine(lit([]), lit([]))->eval(Row::create()), ); @@ -28,14 +28,14 @@ public function test_array_combine_when_arrays_are_empty() : void public function test_array_combine_when_keys_are_not_array() : void { - $this->assertNull( + self::assertNull( combine(lit('a'), lit([1, 2, 3]))->eval(Row::create()), ); } public function test_array_combine_when_keys_are_not_unique() : void { - $this->assertSame( + self::assertSame( ['a' => 4, 'b' => 2, 'c' => 3], combine(lit(['a', 'b', 'c', 'a']), lit([1, 2, 3, 4]))->eval(Row::create()), ); @@ -43,7 +43,7 @@ public function test_array_combine_when_keys_are_not_unique() : void public function test_array_combine_when_one_of_arrays_is_empty() : void { - $this->assertNull( + self::assertNull( combine(lit(['a', 'b', 'c']), lit([]))->eval(Row::create()), ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php index 9b99b0dbe..2be5973f0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ConcatTest.php @@ -12,7 +12,7 @@ final class ConcatTest extends TestCase { public function test_concat_arrays() : void { - $this->assertSame( + self::assertSame( '["a"]["b","c"]', concat(ref('array_1'), ref('array_2'))->eval(Row::create(array_entry('array_1', ['a']), array_entry('array_2', ['b', 'c']))), ); @@ -20,7 +20,7 @@ public function test_concat_arrays() : void public function test_concat_different_types_of_values() : void { - $this->assertSame( + self::assertSame( '1abc["a","b"]', concat(lit(1), lit('a'), lit('b'), lit('c'), lit(['a', 'b']))->eval(Row::create()), ); @@ -28,7 +28,7 @@ public function test_concat_different_types_of_values() : void public function test_concat_string_values() : void { - $this->assertSame( + self::assertSame( 'abc', concat(lit('a'), lit('b'), lit('c'))->eval(Row::create()), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php index 9cd86ce49..dca3c2984 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/CountTest.php @@ -20,7 +20,7 @@ public function test_aggregation_count_from_numeric_values() : void $aggregator->aggregate(Row::create(str_entry('int', '25'))); $aggregator->aggregate(Row::create(null_entry('not_int'))); - $this->assertSame( + self::assertSame( 4, $aggregator->result()->value() ); @@ -35,7 +35,7 @@ public function test_aggregation_count_with_float_result() : void $aggregator->aggregate(Row::create(int_entry('int', 305))); $aggregator->aggregate(Row::create(int_entry('int', 25))); - $this->assertSame( + self::assertSame( 4, $aggregator->result()->value() ); @@ -51,7 +51,7 @@ public function test_aggregation_when_row_does_not_have_entry() : void $aggregator->aggregate(Row::create(null_entry('int'))); $aggregator->aggregate(Row::create(null_entry('test'))); - $this->assertSame( + self::assertSame( 4, $aggregator->result()->value() ); @@ -69,7 +69,7 @@ public function test_window_function_count_on_partitioned_rows() : void $count = count(ref('id'))->over(window()->orderBy(ref('id')->desc())); - $this->assertSame(2, $count->apply($row1, $rows)); - $this->assertSame(1, $count->apply($row2, $rows)); + self::assertSame(2, $count->apply($row1, $rows)); + self::assertSame(1, $count->apply($row2, $rows)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeAttributeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeAttributeTest.php index 541779ac5..657e109f4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeAttributeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeAttributeTest.php @@ -16,7 +16,7 @@ public function test_extracting_attribute_from_dom_node_entry() : void $xml = new \DOMDocument(); $xml->loadXML('bar'); - $this->assertEquals( + self::assertEquals( 'buz', ref('value')->domNodeAttribute('baz')->eval(Row::create((new NativeEntryFactory())->create('value', $xml->documentElement->firstChild))) ); @@ -27,7 +27,7 @@ public function test_extracting_non_existing_attribute_from_dom_node_entry() : v $xml = new \DOMDocument(); $xml->loadXML('bar'); - $this->assertNull( + self::assertNull( ref('value')->domNodeAttribute('bar')->eval(Row::create((new NativeEntryFactory())->create('value', $xml->documentElement->firstChild))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeValueTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeValueTest.php index 0422587c7..92060bb39 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeValueTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DOMNodeValueTest.php @@ -16,7 +16,7 @@ public function test_getting_node_value_with_children() : void $xml = new \DOMDocument(); $xml->loadXML('baz'); - $this->assertEquals( + self::assertEquals( 'baz', ref('value')->domNodeValue()->eval(Row::create((new NativeEntryFactory())->create('value', $xml->documentElement->firstChild))) ); @@ -27,7 +27,7 @@ public function test_getting_simple_node_value() : void $xml = new \DOMDocument(); $xml->loadXML('bar'); - $this->assertEquals( + self::assertEquals( 'bar', ref('value')->domNodeValue()->eval(Row::create((new NativeEntryFactory())->create('value', $xml->documentElement->firstChild))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php index 40b61db38..3c91e1511 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DateTimeFormatTest.php @@ -12,7 +12,7 @@ final class DateTimeFormatTest extends TestCase { public function test_date_time_format() : void { - $this->assertEquals( + self::assertEquals( '2020-01-01 00:00:00', date_time_format(ref('date_time'), 'Y-m-d H:i:s')->eval(Row::create(datetime_entry('date_time', new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC'))))) ); @@ -20,7 +20,7 @@ public function test_date_time_format() : void public function test_formatting_now() : void { - $this->assertInstanceOf( + self::assertInstanceOf( \DateTimeImmutable::class, now()->eval(Row::create(datetime_entry('date_time', new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC'))))) ); @@ -28,7 +28,7 @@ public function test_formatting_now() : void public function test_invalid_date_time_format() : void { - $this->assertNull( + self::assertNull( date_time_format(ref('date_time'), 'Y-m-d H:i:s')->eval(Row::create(str_entry('date_time', '2020-01-01 00:00:00'))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php index d28b689c9..3948de51e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/DenseRankTest.php @@ -22,11 +22,11 @@ public function test_rank_function_on_collection_of_rows_sorted_by_id_descending $denseRank = dense_rank()->over(window()->orderBy(ref('salary')->desc())); - $this->assertSame(1, $denseRank->apply($row1, $rows)); - $this->assertSame(1, $denseRank->apply($row2, $rows)); - $this->assertSame(1, $denseRank->apply($row3, $rows)); - $this->assertSame(3, $denseRank->apply($row4, $rows)); - $this->assertSame(2, $denseRank->apply($row5, $rows)); + self::assertSame(1, $denseRank->apply($row1, $rows)); + self::assertSame(1, $denseRank->apply($row2, $rows)); + self::assertSame(1, $denseRank->apply($row3, $rows)); + self::assertSame(3, $denseRank->apply($row4, $rows)); + self::assertSame(2, $denseRank->apply($row5, $rows)); } public function test_rank_function_without_more_than_one_order_by_entries() : void @@ -43,7 +43,7 @@ public function test_rank_function_without_more_than_one_order_by_entries() : vo $densRank = dense_rank()->over(window()->orderBy(ref('salary'), ref('id'))); - $this->assertSame(1, $densRank->apply($row1, $rows)); + self::assertSame(1, $densRank->apply($row1, $rows)); } public function test_rank_function_without_order_by() : void diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php index c4bdaa64f..e051d47e5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ExistsTest.php @@ -13,28 +13,28 @@ final class ExistsTest extends TestCase { public function test_if_reference_exists() : void { - $this->assertTrue( + self::assertTrue( ref('value')->exists()->eval(Row::create(str_entry('value', 'test'))) ); } public function test_that_lit_function_exists() : void { - $this->assertTrue( + self::assertTrue( (new Exists(lit('val')))->eval(Row::create()) ); } public function test_that_null_reference_to_null_entry_exists() : void { - $this->assertTrue( + self::assertTrue( ref('value')->exists()->eval(Row::create(null_entry('value'))) ); } public function test_that_reference_does_not_exists() : void { - $this->assertFalse( + self::assertFalse( ref('value')->exists()->eval(Row::create()) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php index 8beb0132a..7b5da7e8b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/FirstTest.php @@ -20,7 +20,7 @@ public function test_aggregation_firs_value() : void $aggregator->aggregate(Row::create(str_entry('int', '55'))); $aggregator->aggregate(Row::create(str_entry('int', '25'))); - $this->assertSame( + self::assertSame( '10', $aggregator->result()->value() ); @@ -30,7 +30,7 @@ public function test_aggregation_firs_value_when_nothing_aggregated() : void { $aggregator = first(ref('int')); - $this->assertEquals( + self::assertEquals( new Row\Entry\NullEntry('int'), $aggregator->result() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php index 27950f6d4..54871d145 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/HashTest.php @@ -12,7 +12,7 @@ final class HashTest extends TestCase { public function test_hashing_array_value() : void { - $this->assertSame( + self::assertSame( '4450cf82dc53848e2bbe9798b70b0a6a', ref('value')->hash()->eval(Row::create(array_entry('value', ['test']))), ); @@ -20,7 +20,7 @@ public function test_hashing_array_value() : void public function test_hashing_concat() : void { - $this->assertSame( + self::assertSame( \hash('xxh128', 'test_test'), hash(concat(ref('value'), lit('_'), ref('value')))->eval(Row::create(str_entry('value', 'test'))) ); @@ -28,7 +28,7 @@ public function test_hashing_concat() : void public function test_hashing_datetime() : void { - $this->assertSame( + self::assertSame( '5347d10de38eb5570c044eb710a5120a', ref('value')->hash()->eval(Row::create(datetime_entry('value', new \DateTimeImmutable('2021-01-01')))), ); @@ -36,14 +36,14 @@ public function test_hashing_datetime() : void public function test_hashing_null_value() : void { - $this->assertNull( + self::assertNull( ref('value')->hash()->eval(Row::create(null_entry('value'))), ); } public function test_hashing_string_value() : void { - $this->assertSame( + self::assertSame( '6c78e0e3bd51d358d01e758642b85fb8', ref('value')->hash()->eval(Row::create(str_entry('value', 'test'))), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php index 2843d277b..5c40487e6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonDecodeTest.php @@ -12,7 +12,7 @@ final class JsonDecodeTest extends TestCase { public function test_json_decode_expression() : void { - $this->assertSame( + self::assertSame( ['value' => 1], ref('value')->jsonDecode()->eval(Row::create(str_entry('value', '{"value": 1}'))), ); @@ -20,14 +20,14 @@ public function test_json_decode_expression() : void public function test_json_decode_expression_with_invalid_json() : void { - $this->assertNull( + self::assertNull( ref('value')->jsonDecode()->eval(Row::create(str_entry('value', '{"value": 1'))), ); } public function test_json_decode_on_non_json_value() : void { - $this->assertNull( + self::assertNull( ref('value')->jsonDecode()->eval(Row::create(int_entry('value', 125))), ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php index f11c9c8ca..38192f4ec 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/JsonEncodeTest.php @@ -12,7 +12,7 @@ final class JsonEncodeTest extends TestCase { public function test_json_encode_on_datetime() : void { - $this->assertSame( + self::assertSame( '{"date":"2021-01-01 00:00:00.000000","timezone_type":3,"timezone":"UTC"}', ref('value')->jsonEncode()->eval(Row::create(datetime_entry('value', new \DateTimeImmutable('2021-01-01')))), ); @@ -20,7 +20,7 @@ public function test_json_encode_on_datetime() : void public function test_json_encode_on_integer() : void { - $this->assertSame( + self::assertSame( '125', ref('value')->jsonEncode()->eval(Row::create(int_entry('value', 125))), ); @@ -28,7 +28,7 @@ public function test_json_encode_on_integer() : void public function test_json_encode_on_string() : void { - $this->assertSame( + self::assertSame( '"test"', ref('value')->jsonEncode()->eval(Row::create(str_entry('value', 'test'))), ); @@ -36,7 +36,7 @@ public function test_json_encode_on_string() : void public function test_json_encode_on_valid_associative_array() : void { - $this->assertSame( + self::assertSame( '{"value":1}', ref('value')->jsonEncode()->eval(Row::create(array_entry('value', ['value' => 1]))), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php index fcbf816f8..9848200c9 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LastTest.php @@ -20,7 +20,7 @@ public function test_aggregation_last_value() : void $aggregator->aggregate(Row::create(str_entry('int', '25'))); $aggregator->aggregate(Row::create(null_entry('not_int'))); - $this->assertSame( + self::assertSame( '25', $aggregator->result()->value() ); @@ -30,7 +30,7 @@ public function test_aggregation_last_value_when_nothing_aggregated() : void { $aggregator = last(ref('int')); - $this->assertEquals( + self::assertEquals( new Row\Entry\NullEntry('int'), $aggregator->result() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php index cec04631c..b7f0b7557 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ListSelectTest.php @@ -27,7 +27,7 @@ public function test_selecting_non_existing_value_from_list_using_alias() : void ) ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'mail' => null], ['id' => 2, 'mail' => null], @@ -54,7 +54,7 @@ public function test_selecting_value_from_list() : void ) ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1], ['id' => 2], @@ -81,7 +81,7 @@ public function test_selecting_value_from_list_using_alias() : void ) ); - $this->assertEquals( + self::assertEquals( [ ['new_id' => 1], ['new_id' => 2], @@ -103,7 +103,7 @@ public function test_selecting_value_from_simple_list() : void ) ); - $this->assertEquals( + self::assertEquals( [ ['id' => null], ['id' => null], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php index baa93e8cc..1b1087863 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MathTest.php @@ -14,7 +14,7 @@ public function test_divide() : void { $row = row(int_entry('a', 100), int_entry('b', 10)); - $this->assertSame( + self::assertSame( 10, (new Divide(ref('a'), ref('b')))->eval($row) ); @@ -24,7 +24,7 @@ public function test_minus() : void { $row = row(int_entry('a', 100), int_entry('b', 100)); - $this->assertSame( + self::assertSame( 0, (new Minus(ref('a'), ref('b')))->eval($row) ); @@ -34,7 +34,7 @@ public function test_modulo() : void { $row = row(int_entry('a', 110), int_entry('b', 100)); - $this->assertSame( + self::assertSame( 10, (new Mod(ref('a'), ref('b')))->eval($row) ); @@ -42,7 +42,7 @@ public function test_modulo() : void public function test_multiple_operations() : void { - $this->assertSame( + self::assertSame( 200, ref('a')->plus(lit(100))->plus(lit(100))->minus(ref('b'))->eval(row(int_entry('a', 100), int_entry('b', 100))) ); @@ -52,7 +52,7 @@ public function test_multiply() : void { $row = row(int_entry('a', 100), int_entry('b', 100)); - $this->assertSame( + self::assertSame( 10_000, (new Multiply(ref('a'), ref('b')))->eval($row) ); @@ -62,7 +62,7 @@ public function test_plus() : void { $row = row(int_entry('a', 100), int_entry('b', 100)); - $this->assertSame( + self::assertSame( 200, (new Plus(ref('a'), ref('b')))->eval($row) ); @@ -72,7 +72,7 @@ public function test_power() : void { $row = row(int_entry('a', 1), int_entry('b', 2)); - $this->assertSame( + self::assertSame( 1, (new Power(ref('a'), ref('b')))->eval($row) ); @@ -82,7 +82,7 @@ public function test_round() : void { $row = row(float_entry('a', 1.009), int_entry('b', 2)); - $this->assertSame( + self::assertSame( 1.01, (new Round(ref('a'), ref('b')))->eval($row) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php index ab9a37fec..1a7347660 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MaxTest.php @@ -20,7 +20,7 @@ public function test_aggregation_max_from_numeric_values() : void $aggregator->aggregate(Row::create(str_entry('int', '25'))); $aggregator->aggregate(Row::create(null_entry('not_int'))); - $this->assertSame( + self::assertSame( 55, $aggregator->result()->value() ); @@ -35,7 +35,7 @@ public function test_aggregation_max_including_null_value() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(null_entry('int'))); - $this->assertSame( + self::assertSame( 30, $aggregator->result()->value() ); @@ -50,7 +50,7 @@ public function test_aggregation_max_with_float_result() : void $aggregator->aggregate(Row::create(float_entry('int', 30.5))); $aggregator->aggregate(Row::create(int_entry('int', 25))); - $this->assertSame( + self::assertSame( 30.5, $aggregator->result()->value() ); @@ -65,7 +65,7 @@ public function test_aggregation_max_with_integer_result() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(int_entry('int', 40))); - $this->assertSame( + self::assertSame( 40, $aggregator->result()->value() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php index 727b57f22..82a2e5a90 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/MinTest.php @@ -20,7 +20,7 @@ public function test_aggregation_min_from_numeric_values() : void $aggregator->aggregate(Row::create(str_entry('int', '25'))); $aggregator->aggregate(Row::create(null_entry('not_int'))); - $this->assertSame( + self::assertSame( 10, $aggregator->result()->value() ); @@ -35,7 +35,7 @@ public function test_aggregation_min_including_null_value() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(null_entry('int'))); - $this->assertSame( + self::assertSame( 10, $aggregator->result()->value() ); @@ -50,7 +50,7 @@ public function test_aggregation_min_with_float_result() : void $aggregator->aggregate(Row::create(int_entry('int', 305))); $aggregator->aggregate(Row::create(int_entry('int', 25))); - $this->assertSame( + self::assertSame( 10.25, $aggregator->result()->value() ); @@ -65,7 +65,7 @@ public function test_aggregation_min_with_integer_result() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(int_entry('int', 40))); - $this->assertSame( + self::assertSame( 10, $aggregator->result()->value() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php index 4d330d742..8dca2c45f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NotTest.php @@ -12,21 +12,21 @@ final class NotTest extends TestCase { public function test_not_expression_on_array_true_value() : void { - $this->assertFalse( + self::assertFalse( not(lit([1, 2, 3]))->eval(Row::create()) ); } public function test_not_expression_on_boolean_true_value() : void { - $this->assertFalse( + self::assertFalse( not(lit(true))->eval(Row::create()) ); } public function test_not_expression_on_is_in_expression() : void { - $this->assertTrue( + self::assertTrue( not(ref('value')->isIn(ref('array')))->eval(Row::create(array_entry('array', [1, 2, 3]), int_entry('value', 10))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php index 0323c9850..34208ec4b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/NumberFormatTest.php @@ -20,7 +20,7 @@ public function test_number_format() : void ref('thousands_separator') ); - $this->assertSame( + self::assertSame( '1,234.57', $expression->eval( Row::create( @@ -42,7 +42,7 @@ public function test_number_format_dsl() : void lit(',') ); - $this->assertSame( + self::assertSame( '1,234.57', $expression->eval( Row::create( @@ -61,7 +61,7 @@ public function test_number_format_on_decimals_that_are_not_integer() : void ref('thousands_separator') ); - $this->assertNull( + self::assertNull( $expression->eval( Row::create( float_entry('value', 1234.5678), @@ -82,7 +82,7 @@ public function test_number_format_on_non_int_entry() : void ref('thousands_separator') ); - $this->assertNull( + self::assertNull( $expression->eval( Row::create( str_entry('value', 'test'), @@ -103,7 +103,7 @@ public function test_number_format_on_numeric_entry() : void ref('thousands_separator') ); - $this->assertSame( + self::assertSame( '1,234.57', $expression->eval( Row::create( diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php index b93bfce9e..e4dfc4287 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchAllTest.php @@ -18,7 +18,7 @@ public function test_preg_match_all_expression_on_invalid_flags() : void lit('invalid') ); - $this->assertSame( + self::assertSame( [], $pregMatchAll->eval(Row::create()) ); @@ -31,7 +31,7 @@ public function test_preg_match_all_expression_on_invalid_pattern() : void lit('12 apples and 45 oranges') ); - $this->assertSame( + self::assertSame( [], $pregMatchAll->eval(Row::create()) ); @@ -44,7 +44,7 @@ public function test_preg_match_all_expression_on_invalid_subject() : void lit(2) ); - $this->assertSame( + self::assertSame( [], $pregMatchAll->eval(Row::create()) ); @@ -57,7 +57,7 @@ public function test_preg_match_all_expression_on_valid_strings() : void lit('12 apples and 45 oranges') ); - $this->assertSame( + self::assertSame( [['12', '45']], $pregMatchAll->eval(Row::create()) ); @@ -71,7 +71,7 @@ public function test_preg_match_all_expression_on_valid_strings_with_flags() : v lit(PREG_PATTERN_ORDER) ); - $this->assertSame( + self::assertSame( [['12', '45'], ['12', '45']], $pregMatchAll->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php index b6a487171..6482b4153 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregMatchTest.php @@ -17,7 +17,7 @@ public function test_preg_match_expression_on_invalid_pattern() : void lit('12 apples and 45 oranges') ); - $this->assertNull($pregMatch->eval(Row::create())); + self::assertNull($pregMatch->eval(Row::create())); } public function test_preg_match_expression_on_invalid_subject() : void @@ -27,7 +27,7 @@ public function test_preg_match_expression_on_invalid_subject() : void lit(2) ); - $this->assertNull($pregMatch->eval(Row::create())); + self::assertNull($pregMatch->eval(Row::create())); } public function test_preg_match_expression_on_no_match() : void @@ -37,7 +37,7 @@ public function test_preg_match_expression_on_no_match() : void lit('apples and oranges') ); - $this->assertFalse($pregMatch->eval(Row::create())); + self::assertFalse($pregMatch->eval(Row::create())); } public function test_preg_match_expression_on_valid_strings() : void @@ -47,6 +47,6 @@ public function test_preg_match_expression_on_valid_strings() : void lit('12 apples and 45 oranges') ); - $this->assertTrue($pregMatch->eval(Row::create())); + self::assertTrue($pregMatch->eval(Row::create())); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php index 9cdb4ec92..572165ef5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/PregReplaceTest.php @@ -18,7 +18,7 @@ public function test_preg_replace_expression_on_invalid_pattern() : void lit('foo is awesome') ); - $this->assertNull($pregReplace->eval(Row::create())); + self::assertNull($pregReplace->eval(Row::create())); } public function test_preg_replace_expression_on_invalid_replacement() : void @@ -29,7 +29,7 @@ public function test_preg_replace_expression_on_invalid_replacement() : void lit('foo is awesome') ); - $this->assertNull($pregReplace->eval(Row::create())); + self::assertNull($pregReplace->eval(Row::create())); } public function test_preg_replace_expression_on_invalid_subject() : void @@ -40,7 +40,7 @@ public function test_preg_replace_expression_on_invalid_subject() : void lit(3) ); - $this->assertNull($pregReplace->eval(Row::create())); + self::assertNull($pregReplace->eval(Row::create())); } public function test_preg_replace_expression_on_valid_strings() : void @@ -51,7 +51,7 @@ public function test_preg_replace_expression_on_valid_strings() : void lit('foo is awesome') ); - $this->assertSame( + self::assertSame( 'bar is awesome', $pregReplace->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php index 1cfedc162..e1e8d9817 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RankTest.php @@ -22,11 +22,11 @@ public function test_rank_function_on_collection_of_rows_sorted_by_id_descending $rank = rank()->over(window()->orderBy(ref('salary')->desc())); - $this->assertSame(1, $rank->apply($row1, $rows)); - $this->assertSame(1, $rank->apply($row2, $rows)); - $this->assertSame(1, $rank->apply($row3, $rows)); - $this->assertSame(5, $rank->apply($row4, $rows)); - $this->assertSame(4, $rank->apply($row5, $rows)); + self::assertSame(1, $rank->apply($row1, $rows)); + self::assertSame(1, $rank->apply($row2, $rows)); + self::assertSame(1, $rank->apply($row3, $rows)); + self::assertSame(5, $rank->apply($row4, $rows)); + self::assertSame(4, $rank->apply($row5, $rows)); } public function test_rank_function_without_more_than_one_order_by_entries() : void @@ -43,7 +43,7 @@ public function test_rank_function_without_more_than_one_order_by_entries() : vo $rank = rank()->over(window()->partitionBy(ref('value'))->orderBy(ref('salary'), ref('id'))); - $this->assertSame(1, $rank->apply($row1, $rows)); + self::assertSame(1, $rank->apply($row1, $rows)); } public function test_rank_function_without_order_by() : void @@ -59,6 +59,6 @@ public function test_rank_function_without_order_by() : void $rank = rank(); - $this->assertSame(1, $rank->apply($row1, $rows)); + self::assertSame(1, $rank->apply($row1, $rows)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php index 85fd5b67b..936fdbd21 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/RowNumberTest.php @@ -22,6 +22,6 @@ public function test_row_number_function_on_collection_of_rows_sorted_by_id_desc $rowNumber = row_number()->over(window()->partitionBy(ref('value'))->orderBy(ref('id')->desc())); - $this->assertSame(5, $rowNumber->apply($row1, $rows)); + self::assertSame(5, $rowNumber->apply($row1, $rows)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php index dbe9f496b..cc14c0981 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SanitizeTest.php @@ -12,14 +12,14 @@ final class SanitizeTest extends TestCase { public function test_sanitize_on_non_string_value() : void { - $this->assertNull( + self::assertNull( ref('value')->sanitize()->eval(Row::create(int_entry('value', 1000))), ); } public function test_sanitize_on_valid_string() : void { - $this->assertSame( + self::assertSame( '****', ref('value')->sanitize()->eval(Row::create(str_entry('value', 'test'))), ); @@ -27,7 +27,7 @@ public function test_sanitize_on_valid_string() : void public function test_sanitize_on_valid_string_with_left_characters() : void { - $this->assertSame( + self::assertSame( 'te**', ref('value')->sanitize(skipCharacters: lit(2))->eval(Row::create(str_entry('value', 'test'))), ); @@ -35,7 +35,7 @@ public function test_sanitize_on_valid_string_with_left_characters() : void public function test_sanitize_on_valid_string_with_left_characters_longer_than_string() : void { - $this->assertSame( + self::assertSame( '****', ref('value')->sanitize(skipCharacters: lit(5))->eval(Row::create(str_entry('value', 'test'))), ); @@ -43,7 +43,7 @@ public function test_sanitize_on_valid_string_with_left_characters_longer_than_s public function test_sanitize_on_valid_string_with_placeholder() : void { - $this->assertSame( + self::assertSame( '----', ref('value')->sanitize(lit('-'))->eval(Row::create(str_entry('value', 'test'))), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php index 198477cd4..525bf989e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SizeTest.php @@ -12,7 +12,7 @@ final class SizeTest extends TestCase { public function test_size_expression_on_array_value() : void { - $this->assertSame( + self::assertSame( 3, size(lit(['foo', 'bar', 'baz']))->eval(Row::create()) ); @@ -20,14 +20,14 @@ public function test_size_expression_on_array_value() : void public function test_size_expression_on_integer_value() : void { - $this->assertNull( + self::assertNull( size(lit(1))->eval(Row::create()) ); } public function test_size_expression_on_string_value() : void { - $this->assertSame( + self::assertSame( 3, size(lit('foo'))->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php index e98608c7b..a01a7246d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SplitTest.php @@ -12,7 +12,7 @@ final class SplitTest extends TestCase { public function test_split_not_string() : void { - $this->assertSame( + self::assertSame( 123, split(lit(123), ',')->eval(Row::create()) ); @@ -20,7 +20,7 @@ public function test_split_not_string() : void public function test_split_string() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar', 'baz'], split(lit('foo,bar,baz'), ',')->eval(Row::create()) ); @@ -28,7 +28,7 @@ public function test_split_string() : void public function test_split_string_with_limit() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar,baz'], split(lit('foo,bar,baz'), ',', 2)->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php index 8672d4233..3cf69cef8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SprintfTest.php @@ -18,7 +18,7 @@ public function test_sprintf_expression_on_invalid_format() : void lit(25) ); - $this->assertNull($sprintf->eval(Row::create())); + self::assertNull($sprintf->eval(Row::create())); } public function test_sprintf_expression_on_valid_format_and_args() : void @@ -29,7 +29,7 @@ public function test_sprintf_expression_on_valid_format_and_args() : void lit(25) ); - $this->assertSame( + self::assertSame( 'Hello, John! Your age is 25.', $sprintf->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php index 64e678652..2459646ba 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrPadTest.php @@ -12,14 +12,14 @@ final class StrPadTest extends TestCase { public function test_str_pad_on_non_string_value() : void { - $this->assertNull( + self::assertNull( ref('value')->strPad(5, '-', \STR_PAD_LEFT)->eval(Row::create(int_entry('value', 1000))), ); } public function test_str_pad_on_valid_string() : void { - $this->assertSame( + self::assertSame( '----N', ref('value')->strPad(5, '-', \STR_PAD_LEFT)->eval(Row::create(str_entry('value', 'N'))), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php index 54f8006ed..53ed863c5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StrReplaceTest.php @@ -12,14 +12,14 @@ final class StrReplaceTest extends TestCase { public function test_str_replace_on_non_string_value() : void { - $this->assertNull( + self::assertNull( ref('value')->strReplace('test', '1')->eval(Row::create(int_entry('value', 1000))), ); } public function test_str_replace_on_valid_string() : void { - $this->assertSame( + self::assertSame( '1', ref('value')->strReplace('test', '1')->eval(Row::create(str_entry('value', 'test'))), ); @@ -27,7 +27,7 @@ public function test_str_replace_on_valid_string() : void public function test_str_replace_on_valid_string_with_array_of_replacements() : void { - $this->assertSame( + self::assertSame( 'test was successful', ref('value')->strReplace(['is', 'broken'], ['was', 'successful'])->eval(Row::create(str_entry('value', 'test is broken'))), ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php index cad4b4bb0..212c013c0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StructureSelectTest.php @@ -24,7 +24,7 @@ public function test_selecting_multiple_values_from_structure() : void ]) ); - $this->assertEquals( + self::assertEquals( ['id' => 1, 'name' => 'test'], (new StructureSelect(ref('struct'), ref('id'), ref('name'))) ->eval(row($structure)) @@ -45,7 +45,7 @@ public function test_selecting_single_value_from_structure() : void ]) ); - $this->assertEquals( + self::assertEquals( ['id' => 1], (new StructureSelect(ref('struct'), 'id')) ->eval(row($structure)) @@ -66,7 +66,7 @@ public function test_selecting_single_value_from_structure_with_alias() : void ]) ); - $this->assertEquals( + self::assertEquals( ['new_id' => 1], (new StructureSelect(ref('struct'), ref('id')->as('new_id'))) ->eval(row($structure)) @@ -87,7 +87,7 @@ public function test_selecting_values_from_empty_structure() : void ]) ); - $this->assertEquals( + self::assertEquals( ['new_id' => null], (new StructureSelect(ref('struct'), ref('id')->as('new_id'))) ->eval(row($structure)) @@ -110,7 +110,7 @@ public function test_selecting_values_from_list() : void ) ); - $this->assertNull( + self::assertNull( (new StructureSelect(ref('list'), ref('id')))->eval(row($list)) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php index 9481a43c7..c7fdfc296 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/SumTest.php @@ -20,7 +20,7 @@ public function test_aggregation_sum_from_numeric_values() : void $aggregator->aggregate(Row::create(str_entry('int', '25'))); $aggregator->aggregate(Row::create(null_entry('not_int'))); - $this->assertSame( + self::assertSame( 110, $aggregator->result()->value() ); @@ -35,7 +35,7 @@ public function test_aggregation_sum_including_null_value() : void $aggregator->aggregate(Row::create(int_entry('int', 30))); $aggregator->aggregate(Row::create(null_entry('int'))); - $this->assertSame( + self::assertSame( 60, $aggregator->result()->value() ); @@ -50,7 +50,7 @@ public function test_aggregation_sum_with_float_result() : void $aggregator->aggregate(Row::create(int_entry('int', 305))); $aggregator->aggregate(Row::create(int_entry('int', 25))); - $this->assertSame( + self::assertSame( 360.25, $aggregator->result()->value() ); @@ -68,6 +68,6 @@ public function test_window_function_sum_on_partitioned_rows() : void $sum = sum(ref('id'))->over(window()->orderBy(ref('id')->desc())); - $this->assertSame(15, $sum->apply($row1, $rows)); + self::assertSame(15, $sum->apply($row1, $rows)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php index 0e1dc0015..3068097cd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTest.php @@ -12,7 +12,7 @@ final class ToDateTest extends TestCase { public function test_date_time_to_date() : void { - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')), to_date(ref('date_time'))->eval(Row::create(datetime_entry('date_time', new \DateTimeImmutable('2020-01-01 12:43:23', new \DateTimeZone('UTC'))))) ); @@ -20,7 +20,7 @@ public function test_date_time_to_date() : void public function test_int_to_date_time() : void { - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')), to_date(ref('int'))->eval(Row::create(int_entry('int', (int) (new \DateTimeImmutable('2020-01-01 10:11:11', new \DateTimeZone('UTC')))->format('U')))) ); @@ -28,7 +28,7 @@ public function test_int_to_date_time() : void public function test_string_to_date_time() : void { - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')), to_date(ref('string'), 'Y-m-d H:i:s')->eval(Row::create(str_entry('string', '2020-01-01 10:08:00'))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php index 8eb3ee420..8eca0241b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToDateTimeTest.php @@ -12,7 +12,7 @@ final class ToDateTimeTest extends TestCase { public function test_date_time_to_date_time() : void { - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')), to_date_time(ref('date_time'))->eval(Row::create(datetime_entry('date_time', new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC'))))) ); @@ -20,7 +20,7 @@ public function test_date_time_to_date_time() : void public function test_int_to_date_time() : void { - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')), to_date_time(ref('int'))->eval(Row::create(int_entry('int', (int) (new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')))->format('U')))) ); @@ -28,7 +28,7 @@ public function test_int_to_date_time() : void public function test_string_to_date_time() : void { - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC')), to_date_time(ref('string'), 'Y-m-d H:i:s')->eval(Row::create(str_entry('string', '2020-01-01 00:00:00'))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php index 97f7129ba..3875a6e84 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToLowerTest.php @@ -12,7 +12,7 @@ final class ToLowerTest extends TestCase { public function test_int_to_lower() : void { - $this->assertSame( + self::assertSame( 1, lower(lit(1))->eval(Row::create()) ); @@ -20,7 +20,7 @@ public function test_int_to_lower() : void public function test_string_to_lower() : void { - $this->assertSame( + self::assertSame( 'lower', lower(lit('LOWER'))->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php index d643935dd..61a4f0f09 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToMoneyTest.php @@ -16,7 +16,7 @@ public function test_money_amount() : void { $row = Row::create(str_entry('a', '19.90'), str_entry('b', 'USD')); - $this->assertEquals( + self::assertEquals( new Money('1990', new Currency('USD')), (new ToMoney(ref('a'), ref('b')))->eval($row) ); @@ -26,7 +26,7 @@ public function test_money_amount_float() : void { $row = Row::create(float_entry('a', 19.90), str_entry('b', 'USD')); - $this->assertEquals( + self::assertEquals( new Money('1990', new Currency('USD')), (new ToMoney(ref('a'), ref('b')))->eval($row) ); @@ -36,7 +36,7 @@ public function test_money_amount_integer() : void { $row = Row::create(int_entry('a', 19), str_entry('b', 'USD')); - $this->assertEquals( + self::assertEquals( new Money('1900', new Currency('USD')), (new ToMoney(ref('a'), ref('b')))->eval($row) ); @@ -46,7 +46,7 @@ public function test_non_numeric_money_amount() : void { $row = Row::create(bool_entry('a', false), null_entry('b')); - $this->assertNull( + self::assertNull( (new ToMoney(ref('a'), ref('b')))->eval($row) ); } @@ -55,7 +55,7 @@ public function test_null_currency() : void { $row = Row::create(str_entry('a', '19.90'), null_entry('b')); - $this->assertNull( + self::assertNull( (new ToMoney(ref('a'), ref('b')))->eval($row) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php index 1f601672f..99bdc4ec5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToTimeZoneTest.php @@ -12,7 +12,7 @@ final class ToTimeZoneTest extends TestCase { public function test_casting_date_time_pst_to_utc_time_zone() : void { - $this->assertSame( + self::assertSame( '2020-01-01 08:00:00.000000', to_timezone( lit(new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('PST'))), @@ -23,7 +23,7 @@ public function test_casting_date_time_pst_to_utc_time_zone() : void public function test_casting_date_time_pst_to_utc_time_zone_from_entry_ref() : void { - $this->assertSame( + self::assertSame( '2020-01-01 08:00:00.000000', to_timezone( lit(new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('PST'))), @@ -34,7 +34,7 @@ public function test_casting_date_time_pst_to_utc_time_zone_from_entry_ref() : v public function test_casting_date_time_pst_to_utc_time_zone_from_string_tz() : void { - $this->assertSame( + self::assertSame( '2020-01-01 08:00:00.000000', to_timezone( lit(new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('PST'))), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php index 96c6f6712..f3b4bafd1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/ToUpperTest.php @@ -12,7 +12,7 @@ final class ToUpperTest extends TestCase { public function test_int_to_upper() : void { - $this->assertSame( + self::assertSame( 1, upper(lit(1))->eval(Row::create()) ); @@ -20,7 +20,7 @@ public function test_int_to_upper() : void public function test_string_to_upper() : void { - $this->assertSame( + self::assertSame( 'UPPER', upper(lit('upper'))->eval(Row::create()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php index 345373e76..86971726e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/TrimTest.php @@ -13,7 +13,7 @@ final class TrimTest extends TestCase { public function test_trim_both_valid_string() : void { - $this->assertSame( + self::assertSame( 'value', ref('string')->trim()->eval(Row::create(str_entry('string', ' value'))) ); @@ -21,14 +21,14 @@ public function test_trim_both_valid_string() : void public function test_trim_integer() : void { - $this->assertNull( + self::assertNull( ref('integer')->trim()->eval(Row::create(int_entry('integer', 1))) ); } public function test_trim_left_valid_string() : void { - $this->assertSame( + self::assertSame( 'value ', ref('string')->trim(Type::LEFT)->eval(Row::create(str_entry('string', ' value '))) ); @@ -36,7 +36,7 @@ public function test_trim_left_valid_string() : void public function test_trim_right_valid_string() : void { - $this->assertSame( + self::assertSame( ' value', ref('string')->trim(Type::RIGHT)->eval(Row::create(str_entry('string', ' value '))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php index 7a17f523f..88b0e1016 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UlidTest.php @@ -14,12 +14,12 @@ final class UlidTest extends TestCase public function test_ulid() : void { $expression = ulid(); - $this->assertTrue( + self::assertTrue( Ulid::isValid( $expression->eval(Row::create())->toBase32() ) ); - $this->assertNotSame( + self::assertNotSame( $expression->eval(Row::create()), $expression->eval(Row::create()) ); @@ -29,7 +29,7 @@ public function test_ulid_is_unique() : void { $expression = ulid(); - $this->assertNotEquals( + self::assertNotEquals( $expression->eval(Row::create()), $expression->eval(Row::create()) ); @@ -37,7 +37,7 @@ public function test_ulid_is_unique() : void public function test_ulid_with_invalid_value_returns_null() : void { - $this->assertNull( + self::assertNull( ulid(lit(''))->eval(Row::create()) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php index 0ebe1deed..d8c202ce4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/UuidTest.php @@ -13,23 +13,23 @@ final class UuidTest extends TestCase protected function setUp() : void { if (!\class_exists(\Ramsey\Uuid\Uuid::class) && !\class_exists(\Symfony\Component\Uid\Uuid::class)) { - $this->markTestSkipped("Package 'ramsey/uuid' or 'symfony/uid' is required for this test."); + self::markTestSkipped("Package 'ramsey/uuid' or 'symfony/uid' is required for this test."); } } public function test_uuid4() : void { if (!\class_exists(\Ramsey\Uuid\Uuid::class)) { - $this->markTestSkipped("Package 'ramsey/uuid' is required for this test."); + self::markTestSkipped("Package 'ramsey/uuid' is required for this test."); } $expression = uuid_v4(); - $this->assertTrue( + self::assertTrue( \Ramsey\Uuid\Uuid::isValid( $expression->eval(Row::create())->toString() ) ); - $this->assertNotSame( + self::assertNotSame( $expression->eval(Row::create()), $expression->eval(Row::create()) ); @@ -39,7 +39,7 @@ public function test_uuid4_is_unique() : void { $expression = uuid_v4(); - $this->assertNotEquals( + self::assertNotEquals( $expression->eval(Row::create()), $expression->eval(Row::create()) ); @@ -48,10 +48,10 @@ public function test_uuid4_is_unique() : void public function test_uuid7() : void { if (!\class_exists(\Ramsey\Uuid\Uuid::class)) { - $this->markTestSkipped("Package 'ramsey/uuid' is required for this test."); + self::markTestSkipped("Package 'ramsey/uuid' is required for this test."); } - $this->assertTrue( + self::assertTrue( \Ramsey\Uuid\Uuid::isValid( uuid_v7(lit(new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC'))))->eval(Row::create())->toString() ) @@ -61,7 +61,7 @@ public function test_uuid7() : void public function test_uuid7_is_unique() : void { $dateTime = lit(new \DateTimeImmutable('2020-01-01 00:00:00', new \DateTimeZone('UTC'))); - $this->assertNotEquals( + self::assertNotEquals( uuid_v7($dateTime)->eval(Row::create()), uuid_v7($dateTime)->eval(Row::create()) ); @@ -69,7 +69,7 @@ public function test_uuid7_is_unique() : void public function test_uuid7_return_null_for_non_datetime_interface() : void { - $this->assertNull( + self::assertNull( uuid_v7(lit(''))->eval(Row::create()) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php index 75ff1d5b9..733bcd174 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/WhenTest.php @@ -13,7 +13,7 @@ final class WhenTest extends TestCase { public function test_condition_not_satisfied_without_else() : void { - $this->assertSame( + self::assertSame( 1, (new When( ref('id')->equals(lit(2)), @@ -25,7 +25,7 @@ public function test_condition_not_satisfied_without_else() : void public function test_else() : void { - $this->assertSame( + self::assertSame( 'else', (new When( new Literal(false), @@ -37,7 +37,7 @@ public function test_else() : void public function test_when() : void { - $this->assertSame( + self::assertSame( 'then', (new When( new Literal(true), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/XPathTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/XPathTest.php index b27cd05ee..25a5d9e66 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/XPathTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Function/XPathTest.php @@ -16,7 +16,7 @@ public function test_xpath_on_simple_xml_with_only_one_node_returned() : void $xml = new \DOMDocument(); $xml->loadXML('bar'); - $this->assertEquals( + self::assertEquals( $xml->documentElement->firstChild, ref('value')->xpath('/root/foo')->eval(Row::create((new NativeEntryFactory())->create('value', $xml))) ); @@ -27,7 +27,7 @@ public function test_xpath_when_there_are_more_than_one_elements_under_given_pat $xml = new \DOMDocument(); $xml->loadXML('barbar'); - $this->assertEquals( + self::assertEquals( [ $xml->documentElement->firstChild, $xml->documentElement->lastChild, @@ -41,7 +41,7 @@ public function test_xpath_with_invalid_path_syntax() : void $xml = new \DOMDocument(); $xml->loadXML('bar'); - $this->assertNull( + self::assertNull( ref('value')->xpath('/root/foo/@')->eval(Row::create((new NativeEntryFactory())->create('value', $xml))) ); } @@ -51,7 +51,7 @@ public function test_xpath_with_non_existing_path() : void $xml = new \DOMDocument(); $xml->loadXML('bar'); - $this->assertNull( + self::assertNull( ref('value')->xpath('/root/bar')->eval(Row::create((new NativeEntryFactory())->create('value', $xml))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php index 97e951dcb..820aec2a0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/GroupByTest.php @@ -21,7 +21,7 @@ public function test_group_by_missing_entry() : void Row::create(str_entry('type', 'c')) )); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('type', 'a')), Row::create(null_entry('type')), @@ -44,7 +44,7 @@ public function test_group_by_with_aggregation() : void Row::create(int_entry('id', 5), str_entry('type', 'd')) )); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id_sum', 5), str_entry('type', 'a')), Row::create(int_entry('id_sum', 2), str_entry('type', 'b')), @@ -86,7 +86,7 @@ public function test_group_by_with_pivoting() : void $group->group($rows); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('product', 'Banana'), int_entry('Canada', 2000), int_entry('China', 400), null_entry('Mexico'), int_entry('USA', 1000)), Row::create(str_entry('product', 'Beans'), null_entry('Canada'), int_entry('China', 1500), int_entry('Mexico', 2000), int_entry('USA', 1600)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AllTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AllTest.php index 3578d8cf6..9cb5179d3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AllTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AllTest.php @@ -24,7 +24,7 @@ public function test_failure() : void ->method('compare') ->willReturn(false); - $this->assertFalse( + self::assertFalse( (new All($comparison1, $comparison2)) ->compare( Row::create(int_entry('id', 1)), @@ -45,7 +45,7 @@ public function test_success() : void ->method('compare') ->willReturn(true); - $this->assertTrue( + self::assertTrue( (new All($comparison1, $comparison2)) ->compare( Row::create(int_entry('id', 1)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AnyTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AnyTest.php index 07d2924ae..3af2e8a7f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AnyTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/AnyTest.php @@ -24,7 +24,7 @@ public function test_failure() : void ->method('compare') ->willReturn(false); - $this->assertFalse( + self::assertFalse( (new Any($comparison1, $comparison2)) ->compare( Row::create(int_entry('id', 1)), @@ -45,7 +45,7 @@ public function test_success() : void ->method('compare') ->willReturn(false); - $this->assertTrue( + self::assertTrue( (new Any($comparison1, $comparison2)) ->compare( Row::create(int_entry('id', 1)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/EqualTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/EqualTest.php index 58c32ec44..d30dd1ba7 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/EqualTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/EqualTest.php @@ -13,7 +13,7 @@ final class EqualTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new Equal('datetime', 'datetime'))->compare( Row::create(datetime_entry('datetime', new \DateTimeImmutable('2022-10-01 00:00:00'))), Row::create(datetime_entry('datetime', new \DateTimeImmutable('2022-10-01 01:00:00'))), @@ -23,7 +23,7 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new Equal('datetime', 'datetime'))->compare( Row::create(datetime_entry('datetime', $datetime = new \DateTimeImmutable('2022-10-01 00:00:00'))), Row::create(datetime_entry('datetime', $datetime)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterTest.php index 5e15d1be2..8c497f810 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterTest.php @@ -13,13 +13,13 @@ final class GreaterTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new GreaterThan('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 2)), ) ); - $this->assertFalse( + self::assertFalse( (new GreaterThan('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 1)), @@ -29,7 +29,7 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new GreaterThan('id', 'id'))->compare( Row::create(int_entry('id', 5)), Row::create(int_entry('id', 1)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterThanEqualTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterThanEqualTest.php index cfeecca46..8016927fc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterThanEqualTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/GreaterThanEqualTest.php @@ -13,7 +13,7 @@ final class GreaterThanEqualTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new GreaterThanEqual('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 2)), @@ -23,14 +23,14 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new GreaterThanEqual('id', 'id'))->compare( Row::create(int_entry('id', 5)), Row::create(int_entry('id', 1)), ) ); - $this->assertTrue( + self::assertTrue( (new GreaterThanEqual('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 1)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/IdenticalTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/IdenticalTest.php index 853540b32..136d7c415 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/IdenticalTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/IdenticalTest.php @@ -13,7 +13,7 @@ final class IdenticalTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new Identical('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 2)), @@ -23,7 +23,7 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new Identical('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 1)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessTest.php index 872c89ad9..24f1b3c6c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessTest.php @@ -13,13 +13,13 @@ final class LessTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new LessThan('id', 'id'))->compare( Row::create(int_entry('id', 2)), Row::create(int_entry('id', 1)), ) ); - $this->assertFalse( + self::assertFalse( (new LessThan('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 1)), @@ -29,7 +29,7 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new LessThan('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 5)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessThanEqualTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessThanEqualTest.php index de65be270..c632bac08 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessThanEqualTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/LessThanEqualTest.php @@ -13,7 +13,7 @@ final class LessThanEqualTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new LessThanEqual('id', 'id'))->compare( Row::create(int_entry('id', 2)), Row::create(int_entry('id', 1)), @@ -23,14 +23,14 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new LessThanEqual('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 5)), ) ); - $this->assertTrue( + self::assertTrue( (new LessThanEqual('id', 'id'))->compare( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 1)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php index a1b26e0cd..de0246c95 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/Comparison/NotTest.php @@ -13,7 +13,7 @@ final class NotTest extends TestCase { public function test_failure() : void { - $this->assertFalse( + self::assertFalse( (new Not(new Equal('datetime', 'datetime')))->compare( Row::create(datetime_entry('datetime', $datetime = new \DateTimeImmutable('2022-10-01 00:00:00'))), Row::create(datetime_entry('datetime', $datetime)), @@ -23,7 +23,7 @@ public function test_failure() : void public function test_success() : void { - $this->assertTrue( + self::assertTrue( (new Not(new Equal('datetime', 'datetime')))->compare( Row::create(datetime_entry('datetime', new \DateTimeImmutable('2022-10-01 00:00:00'))), Row::create(datetime_entry('datetime', new \DateTimeImmutable('2022-10-01 01:00:00'))), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php index 6d0ca1cd3..d0d1a7be1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Join/ExpressionTest.php @@ -16,16 +16,16 @@ public function test_expression() : void { $expression = Expression::on(new Equal('id', 'id'), '_'); - $this->assertSame('_', $expression->prefix()); - $this->assertEquals([col('id')], $expression->left()); - $this->assertEquals([col('id')], $expression->right()); + self::assertSame('_', $expression->prefix()); + self::assertEquals([col('id')], $expression->left()); + self::assertEquals([col('id')], $expression->right()); } public function test_expression_comparison() : void { $expression = Expression::on(new Equal('id', 'id'), '_'); - $this->assertTrue($expression->meet( + self::assertTrue($expression->meet( Row::create(int_entry('id', 1)), Row::create(int_entry('id', 1)), )); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php index cef844ad6..64a8746a4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/CallbackLoaderTest.php @@ -23,6 +23,6 @@ public function test_callback_loader() : void $data = $rows->toArray(); })->load($rows, new FlowContext(Config::default())); - $this->assertEquals($rows->toArray(), $data); + self::assertEquals($rows->toArray(), $data); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php index 51f28d93e..af35cc1a3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/MemoryLoaderTest.php @@ -22,6 +22,6 @@ public function test_loads_rows_data_into_memory() : void to_memory($memory)->load($rows, new FlowContext(Config::default())); - $this->assertEquals($rows->toArray(), $memory->dump()); + self::assertEquals($rows->toArray(), $memory->dump()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php index 3ed5390dc..f7e4e00dc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/StreamLoaderTest.php @@ -47,7 +47,7 @@ public function test_loading_partitioned_rows_into_php_memory_stream() : void $output = \ob_get_contents(); \ob_end_clean(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +----+------+-------+ | id | name | group | @@ -81,7 +81,7 @@ public function test_loading_rows_and_schema_into_php_memory_stream() : void $output = \ob_get_contents(); \ob_end_clean(); - $this->assertSame( + self::assertSame( <<<'ASCII' +----+------+ | id | name | @@ -118,7 +118,7 @@ public function test_loading_rows_into_php_memory_stream() : void $output = \ob_get_contents(); \ob_end_clean(); - $this->assertStringContainsString( + self::assertStringContainsString( <<<'TABLE' +----+------+ | id | name | @@ -150,7 +150,7 @@ public function test_loading_schema_into_php_memory_stream() : void $output = \ob_get_contents(); \ob_end_clean(); - $this->assertSame( + self::assertSame( <<<'ASCII' schema |-- id: integer diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php index f1cc2ae23..f66aa2818 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Loader/TransformerLoaderTest.php @@ -13,12 +13,12 @@ final class TransformerLoaderTest extends TestCase public function test_transformer_loader() : void { $transformerMock = $this->createMock(Transformer::class); - $transformerMock->expects($this->once()) + $transformerMock->expects(self::once()) ->method('transform') ->willReturn(new Rows()); $loaderMock = $this->createMock(Loader::class); - $loaderMock->expects($this->once()) + $loaderMock->expects(self::once()) ->method('load'); $transformer = to_transformation( diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Memory/ArrayMemoryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Memory/ArrayMemoryTest.php index f20cb7994..8e8aa5f76 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Memory/ArrayMemoryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Memory/ArrayMemoryTest.php @@ -22,10 +22,10 @@ public function test_chunks() : void { $memory = new ArrayMemory([['id' => 1], ['id' => 2], ['id' => 3], ['id' => 4]]); - $this->assertCount(4, $memory->chunks(1)); - $this->assertCount(1, $memory->chunks(4)); - $this->assertCount(1, $memory->chunks(5)); - $this->assertCount(2, $memory->chunks(2)); + self::assertCount(4, $memory->chunks(1)); + self::assertCount(1, $memory->chunks(4)); + self::assertCount(1, $memory->chunks(5)); + self::assertCount(2, $memory->chunks(2)); } public function test_create_memory_from_invalid_data_structure() : void @@ -40,14 +40,14 @@ public function test_flat_values() : void { $memory = new ArrayMemory([['id' => 1], ['id' => 2], ['id' => 3], ['id' => 4]]); - $this->assertSame([1, 2, 3, 4], $memory->flatValues()); + self::assertSame([1, 2, 3, 4], $memory->flatValues()); } public function test_map() : void { $memory = new ArrayMemory([['id' => 1], ['id' => 2]]); - $this->assertSame([1, 2], $memory->map(fn (array $data) : int => $data['id'])); + self::assertSame([1, 2], $memory->map(fn (array $data) : int => $data['id'])); } public function test_save_memory_from_invalid_data_structure() : void @@ -65,7 +65,7 @@ public function test_saving_multiple_entries_into_memory() : void $memory->save([['id' => 1], ['id' => 2]]); $memory->save([['id' => 3], ['id' => 4]]); - $this->assertSame( + self::assertSame( [['id' => 1], ['id' => 2], ['id' => 3], ['id' => 4]], $memory->dump() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Monitoring/Memory/UnitTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Monitoring/Memory/UnitTest.php index fe8178635..ab3ec2f59 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Monitoring/Memory/UnitTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Monitoring/Memory/UnitTest.php @@ -11,11 +11,11 @@ final class UnitTest extends TestCase { public function test_calculating_percentage_from_value() : void { - $this->assertEquals( + self::assertEquals( Unit::fromString('10M'), Unit::fromString('100M')->percentage(10) ); - $this->assertEquals( + self::assertEquals( Unit::fromString('90M'), Unit::fromString('100M')->percentage(90) ); @@ -23,27 +23,27 @@ public function test_calculating_percentage_from_value() : void public function test_conversion_from_bytes_to_kbs() : void { - $this->assertSame(1.0, Unit::fromBytes(1000)->inKb()); - $this->assertSame(2.0, Unit::fromBytes(2000)->inKb()); - $this->assertSame(0.13, Unit::fromBytes(128)->inKb()); - $this->assertSame(2000, Unit::fromKb(2)->inBytes()); + self::assertSame(1.0, Unit::fromBytes(1000)->inKb()); + self::assertSame(2.0, Unit::fromBytes(2000)->inKb()); + self::assertSame(0.13, Unit::fromBytes(128)->inKb()); + self::assertSame(2000, Unit::fromKb(2)->inBytes()); } public function test_conversion_from_bytes_to_mbs() : void { - $this->assertSame(1.0, Unit::fromKb(1000)->inMb()); - $this->assertSame(2.0, Unit::fromKb(2000)->inMb()); - $this->assertSame(0.0, Unit::fromBytes(128)->inMb()); - $this->assertSame(2_000_000, Unit::fromMb(2)->inBytes()); + self::assertSame(1.0, Unit::fromKb(1000)->inMb()); + self::assertSame(2.0, Unit::fromKb(2000)->inMb()); + self::assertSame(0.0, Unit::fromBytes(128)->inMb()); + self::assertSame(2_000_000, Unit::fromMb(2)->inBytes()); } public function test_memory_diff() : void { - $this->assertSame( + self::assertSame( -5.0, Unit::fromMb(5)->diff(Unit::fromMb(10))->inMb() ); - $this->assertSame( + self::assertSame( 5.0, Unit::fromMb(5)->diff(Unit::fromMb(10))->absolute()->inMb() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php index 80a7bcdff..c50848a32 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/ArrayContentDetectorTest.php @@ -256,7 +256,7 @@ public static function provide_structure_data() : \Generator #[DataProvider('provide_list_data')] public function test_list_data(array $keys, array $values, bool $expected) : void { - $this->assertSame( + self::assertSame( $expected, (new ArrayContentDetector(new Types(...$keys), new Types(...$values)))->isList() ); @@ -265,7 +265,7 @@ public function test_list_data(array $keys, array $values, bool $expected) : voi #[DataProvider('provide_map_data')] public function test_map_data(array $keys, array $values, bool $expected) : void { - $this->assertSame( + self::assertSame( $expected, (new ArrayContentDetector(new Types(...$keys), new Types(...$values)))->isMap() ); @@ -274,7 +274,7 @@ public function test_map_data(array $keys, array $values, bool $expected) : void #[DataProvider('provide_structure_data')] public function test_structure_data(array $keys, array $values, bool $expected) : void { - $this->assertSame( + self::assertSame( $expected, (new ArrayContentDetector(new Types(...$keys), new Types(...$values)))->isStructure() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php index dc1a7c124..9e7bce1ce 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/AutoCasterTest.php @@ -11,7 +11,7 @@ final class AutoCasterTest extends TestCase { public function test_auto_casting_array_of_ints_and_floats_into_array_of_floats() : void { - $this->assertSame( + self::assertSame( [1.0, 2.0, 3.0], (new AutoCaster(Caster::default()))->cast([1, 2, 3.0]) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ArrayCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ArrayCastingHandlerTest.php index c4c6f205a..bf2155d52 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ArrayCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ArrayCastingHandlerTest.php @@ -13,7 +13,7 @@ final class ArrayCastingHandlerTest extends TestCase { public function test_casting_boolean_to_array() : void { - $this->assertEquals( + self::assertEquals( [true], (new ArrayCastingHandler())->value(true, type_array(), Caster::default()) ); @@ -21,7 +21,7 @@ public function test_casting_boolean_to_array() : void public function test_casting_datetime_to_array() : void { - $this->assertEquals( + self::assertEquals( ['date' => '2021-01-01 00:00:00.000000', 'timezone_type' => 3, 'timezone' => 'UTC'], (new ArrayCastingHandler())->value(new \DateTimeImmutable('2021-01-01 00:00:00 UTC'), type_array(), Caster::default()) ); @@ -29,7 +29,7 @@ public function test_casting_datetime_to_array() : void public function test_casting_float_to_array() : void { - $this->assertEquals( + self::assertEquals( [1.1], (new ArrayCastingHandler())->value(1.1, type_array(), Caster::default()) ); @@ -37,7 +37,7 @@ public function test_casting_float_to_array() : void public function test_casting_integer_to_array() : void { - $this->assertEquals( + self::assertEquals( [1], (new ArrayCastingHandler())->value(1, type_array(), Caster::default()) ); @@ -45,7 +45,7 @@ public function test_casting_integer_to_array() : void public function test_casting_string_to_array() : void { - $this->assertSame( + self::assertSame( ['items' => ['item' => 1]], (new ArrayCastingHandler())->value('{"items":{"item":1}}', type_array(), Caster::default()) ); @@ -56,7 +56,7 @@ public function test_casting_xml_document_to_array() : void $xml = new \DOMDocument(); $xml->loadXML($xmlString = 'bar'); - $this->assertSame( + self::assertSame( ['root' => ['foo' => ['@attributes' => ['baz' => 'buz'], '@value' => 'bar']]], (new ArrayCastingHandler())->value($xml, type_array(), Caster::default()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/BooleanCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/BooleanCastingHandlerTest.php index b333fbe41..28a03bfd3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/BooleanCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/BooleanCastingHandlerTest.php @@ -35,6 +35,6 @@ public static function boolean_castable_data_provider() : \Generator #[DataProvider('boolean_castable_data_provider')] public function test_casting_different_data_types_to_integer(mixed $value, bool $expected) : void { - $this->assertSame($expected, (new BooleanCastingHandler())->value($value, type_boolean(), Caster::default())); + self::assertSame($expected, (new BooleanCastingHandler())->value($value, type_boolean(), Caster::default())); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/DateTimeCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/DateTimeCastingHandlerTest.php index b2ce75276..0743bec5a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/DateTimeCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/DateTimeCastingHandlerTest.php @@ -25,6 +25,6 @@ public static function datetime_castable_data_provider() : \Generator #[DataProvider('datetime_castable_data_provider')] public function test_casting_different_data_types_to_datetime(mixed $value, \DateTimeImmutable $expected) : void { - $this->assertEquals($expected, (new DateTimeCastingHandler())->value($value, type_datetime(), Caster::default())); + self::assertEquals($expected, (new DateTimeCastingHandler())->value($value, type_datetime(), Caster::default())); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/EnumCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/EnumCastingHandlerTest.php index fccb309b1..ad1eafcd0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/EnumCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/EnumCastingHandlerTest.php @@ -23,7 +23,7 @@ public function test_casting_integer_to_enum() : void public function test_casting_string_to_enum() : void { - $this->assertEquals( + self::assertEquals( ColorsEnum::RED, (new EnumCastingHandler())->value('red', type_enum(ColorsEnum::class), Caster::default()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/FloatCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/FloatCastingHandlerTest.php index 776b5324e..f77f6b0dd 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/FloatCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/FloatCastingHandlerTest.php @@ -26,6 +26,6 @@ public static function float_castable_data_provider() : \Generator #[DataProvider('float_castable_data_provider')] public function test_casting_different_data_types_to_float(mixed $value, float $expected) : void { - $this->assertSame($expected, (new FloatCastingHandler())->value($value, type_float(), Caster::default())); + self::assertSame($expected, (new FloatCastingHandler())->value($value, type_float(), Caster::default())); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/IntegerCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/IntegerCastingHandlerTest.php index ac1560d43..48a27eb25 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/IntegerCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/IntegerCastingHandlerTest.php @@ -26,6 +26,6 @@ public static function integer_castable_data_provider() : \Generator #[DataProvider('integer_castable_data_provider')] public function test_casting_different_data_types_to_integer(mixed $value, int $expected) : void { - $this->assertSame($expected, (new IntegerCastingHandler())->value($value, type_integer(), Caster::default())); + self::assertSame($expected, (new IntegerCastingHandler())->value($value, type_integer(), Caster::default())); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/JsonCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/JsonCastingHandlerTest.php index ca02ed1e2..046516a0b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/JsonCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/JsonCastingHandlerTest.php @@ -14,7 +14,7 @@ final class JsonCastingHandlerTest extends TestCase { public function test_casting_array_to_json() : void { - $this->assertSame( + self::assertSame( '{"items":{"item":1}}', (new JsonCastingHandler())->value(['items' => ['item' => 1]], type_json(), Caster::default()) ); @@ -22,7 +22,7 @@ public function test_casting_array_to_json() : void public function test_casting_datetime_to_json() : void { - $this->assertSame( + self::assertSame( '{"date":"2021-01-01 00:00:00.000000","timezone_type":3,"timezone":"UTC"}', (new JsonCastingHandler())->value(new \DateTimeImmutable('2021-01-01 00:00:00 UTC'), type_json(), Caster::default()) ); @@ -38,7 +38,7 @@ public function test_casting_integer_to_json() : void public function test_casting_json_string_to_json() : void { - $this->assertSame( + self::assertSame( '{"items":{"item":1}}', (new JsonCastingHandler())->value('{"items":{"item":1}}', type_json(), Caster::default()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php index a7040d90b..1d9bce617 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ListCastingHandlerTest.php @@ -13,7 +13,7 @@ final class ListCastingHandlerTest extends TestCase { public function test_casting_list_of_ints_to_list_of_floats() : void { - $this->assertSame( + self::assertSame( [1.0, 2.0, 3.0], (new ListCastingHandler())->value([1, 2, 3], type_list(type_float()), Caster::default()) ); @@ -21,7 +21,7 @@ public function test_casting_list_of_ints_to_list_of_floats() : void public function test_casting_string_to_list_of_ints() : void { - $this->assertSame( + self::assertSame( [1], (new ListCastingHandler())->value(['1'], type_list(type_int()), Caster::default()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php index afda1daa2..bfd99cfe3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/MapCastingHandlerTest.php @@ -14,7 +14,7 @@ final class MapCastingHandlerTest extends TestCase { public function test_casting_map_of_ints_into_map_of_floats() : void { - $this->assertSame( + self::assertSame( [ 'a' => 1.0, 'b' => 2.0, @@ -29,7 +29,7 @@ public function test_casting_map_of_string_to_ints_into_map_of_int_to_float() : $this->expectException(CastingException::class); $this->expectExceptionMessage('Can\'t cast "array" into "map"'); - $this->assertSame( + self::assertSame( [ 'a' => 1.0, 'b' => 2.0, @@ -41,7 +41,7 @@ public function test_casting_map_of_string_to_ints_into_map_of_int_to_float() : public function test_casting_scalar_to_map() : void { - $this->assertSame( + self::assertSame( [ '0' => 2, ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ObjectCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ObjectCastingHandlerTest.php index 343140b70..73601654a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ObjectCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/ObjectCastingHandlerTest.php @@ -13,11 +13,11 @@ final class ObjectCastingHandlerTest extends TestCase { public function test_casting_string_to_object() : void { - $this->assertEquals( + self::assertEquals( (object) ['foo' => 'bar'], (new ObjectCastingHandler())->value((object) ['foo' => 'bar'], type_object(\stdClass::class), Caster::default()) ); - $this->assertInstanceOf( + self::assertInstanceOf( \stdClass::class, (new ObjectCastingHandler())->value((object) ['foo' => 'bar'], type_object(\stdClass::class), Caster::default()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandler/StringTypeCheckerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandler/StringTypeCheckerTest.php index dd690feb2..500f39bb3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandler/StringTypeCheckerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandler/StringTypeCheckerTest.php @@ -11,82 +11,82 @@ final class StringTypeCheckerTest extends TestCase { public function test_detecting_boolean() : void { - $this->assertTrue((new StringTypeChecker('true'))->isBoolean()); - $this->assertTrue((new StringTypeChecker('false'))->isBoolean()); - $this->assertTrue((new StringTypeChecker('yes'))->isBoolean()); - $this->assertTrue((new StringTypeChecker('no'))->isBoolean()); - $this->assertTrue((new StringTypeChecker('on'))->isBoolean()); - $this->assertTrue((new StringTypeChecker('off'))->isBoolean()); - $this->assertFalse((new StringTypeChecker('0'))->isBoolean()); - $this->assertFalse((new StringTypeChecker('not bool'))->isBoolean()); + self::assertTrue((new StringTypeChecker('true'))->isBoolean()); + self::assertTrue((new StringTypeChecker('false'))->isBoolean()); + self::assertTrue((new StringTypeChecker('yes'))->isBoolean()); + self::assertTrue((new StringTypeChecker('no'))->isBoolean()); + self::assertTrue((new StringTypeChecker('on'))->isBoolean()); + self::assertTrue((new StringTypeChecker('off'))->isBoolean()); + self::assertFalse((new StringTypeChecker('0'))->isBoolean()); + self::assertFalse((new StringTypeChecker('not bool'))->isBoolean()); } public function test_detecting_date_time() : void { - $this->assertFalse((new StringTypeChecker('not date time'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('2021-13-01'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('now'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('midnight'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('today'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('yesterday'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('tomorrow'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('+24h'))->isDateTime()); - $this->assertFalse((new StringTypeChecker('00:00:00'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('2023-01-01 +10 hours'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('Thursday, 02-Jun-2022 16:58:35 UTC'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('2022-06-02T16:58:35+0000'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('2022-06-02T16:58:35+00:00'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('Thu, 02 Jun 22 16:58:35 +0000'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('Thursday, 02-Jun-22 16:58:35 UTC'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('Thu, 02 Jun 22 16:58:35 +0000'))->isDateTime()); - $this->assertTrue((new StringTypeChecker('Thu, 02 Jun 2022 16:58:35 +0000'))->isDateTime()); + self::assertFalse((new StringTypeChecker('not date time'))->isDateTime()); + self::assertFalse((new StringTypeChecker('2021-13-01'))->isDateTime()); + self::assertFalse((new StringTypeChecker('now'))->isDateTime()); + self::assertFalse((new StringTypeChecker('midnight'))->isDateTime()); + self::assertFalse((new StringTypeChecker('today'))->isDateTime()); + self::assertFalse((new StringTypeChecker('yesterday'))->isDateTime()); + self::assertFalse((new StringTypeChecker('tomorrow'))->isDateTime()); + self::assertFalse((new StringTypeChecker('+24h'))->isDateTime()); + self::assertFalse((new StringTypeChecker('00:00:00'))->isDateTime()); + self::assertTrue((new StringTypeChecker('2023-01-01 +10 hours'))->isDateTime()); + self::assertTrue((new StringTypeChecker('Thursday, 02-Jun-2022 16:58:35 UTC'))->isDateTime()); + self::assertTrue((new StringTypeChecker('2022-06-02T16:58:35+0000'))->isDateTime()); + self::assertTrue((new StringTypeChecker('2022-06-02T16:58:35+00:00'))->isDateTime()); + self::assertTrue((new StringTypeChecker('Thu, 02 Jun 22 16:58:35 +0000'))->isDateTime()); + self::assertTrue((new StringTypeChecker('Thursday, 02-Jun-22 16:58:35 UTC'))->isDateTime()); + self::assertTrue((new StringTypeChecker('Thu, 02 Jun 22 16:58:35 +0000'))->isDateTime()); + self::assertTrue((new StringTypeChecker('Thu, 02 Jun 2022 16:58:35 +0000'))->isDateTime()); } public function test_detecting_float() : void { - $this->assertTrue((new StringTypeChecker('1.0'))->isFloat()); - $this->assertTrue((new StringTypeChecker('0.0'))->isFloat()); - $this->assertFalse((new StringTypeChecker('not float'))->isFloat()); - $this->assertFalse((new StringTypeChecker('1'))->isFloat()); - $this->assertFalse((new StringTypeChecker('1.0.0'))->isFloat()); + self::assertTrue((new StringTypeChecker('1.0'))->isFloat()); + self::assertTrue((new StringTypeChecker('0.0'))->isFloat()); + self::assertFalse((new StringTypeChecker('not float'))->isFloat()); + self::assertFalse((new StringTypeChecker('1'))->isFloat()); + self::assertFalse((new StringTypeChecker('1.0.0'))->isFloat()); } public function test_detecting_integer() : void { - $this->assertTrue((new StringTypeChecker('1'))->isInteger()); - $this->assertTrue((new StringTypeChecker('0'))->isInteger()); - $this->assertFalse((new StringTypeChecker('not integer'))->isInteger()); - $this->assertFalse((new StringTypeChecker('1.0'))->isInteger()); - $this->assertTrue((new StringTypeChecker('112312312'))->isInteger()); - $this->assertFalse((new StringTypeChecker('11_2312_312'))->isInteger()); + self::assertTrue((new StringTypeChecker('1'))->isInteger()); + self::assertTrue((new StringTypeChecker('0'))->isInteger()); + self::assertFalse((new StringTypeChecker('not integer'))->isInteger()); + self::assertFalse((new StringTypeChecker('1.0'))->isInteger()); + self::assertTrue((new StringTypeChecker('112312312'))->isInteger()); + self::assertFalse((new StringTypeChecker('11_2312_312'))->isInteger()); } public function test_detecting_json() : void { - $this->assertTrue((new StringTypeChecker('{"foo":"bar"}'))->isJson()); - $this->assertTrue((new StringTypeChecker('[{"foo":"bar"}]'))->isJson()); - $this->assertFalse((new StringTypeChecker('not json'))->isJson()); + self::assertTrue((new StringTypeChecker('{"foo":"bar"}'))->isJson()); + self::assertTrue((new StringTypeChecker('[{"foo":"bar"}]'))->isJson()); + self::assertFalse((new StringTypeChecker('not json'))->isJson()); } public function test_detecting_null() : void { - $this->assertTrue((new StringTypeChecker('null'))->isNull()); - $this->assertTrue((new StringTypeChecker('NULL'))->isNull()); - $this->assertTrue((new StringTypeChecker('Nil'))->isNull()); - $this->assertTrue((new StringTypeChecker('nil'))->isNull()); - $this->assertFalse((new StringTypeChecker('not null'))->isNull()); - $this->assertFalse((new StringTypeChecker(''))->isNull()); + self::assertTrue((new StringTypeChecker('null'))->isNull()); + self::assertTrue((new StringTypeChecker('NULL'))->isNull()); + self::assertTrue((new StringTypeChecker('Nil'))->isNull()); + self::assertTrue((new StringTypeChecker('nil'))->isNull()); + self::assertFalse((new StringTypeChecker('not null'))->isNull()); + self::assertFalse((new StringTypeChecker(''))->isNull()); } public function test_detecting_uuid() : void { - $this->assertTrue((new StringTypeChecker('f47ac10b-58cc-4372-a567-0e02b2c3d479'))->isUuid()); - $this->assertFalse((new StringTypeChecker('not uuid'))->isUuid()); + self::assertTrue((new StringTypeChecker('f47ac10b-58cc-4372-a567-0e02b2c3d479'))->isUuid()); + self::assertFalse((new StringTypeChecker('not uuid'))->isUuid()); } public function test_detecting_xml() : void { - $this->assertTrue((new StringTypeChecker('bar'))->isXML()); - $this->assertFalse((new StringTypeChecker('not xml'))->isXML()); + self::assertTrue((new StringTypeChecker('bar'))->isXML()); + self::assertFalse((new StringTypeChecker('not xml'))->isXML()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandlerTest.php index efe5a2287..cdbcfd90e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StringCastingHandlerTest.php @@ -33,7 +33,7 @@ public function __toString() : string #[DataProvider('string_castable_data_provider')] public function test_casting_different_data_types_to_string(mixed $value, string $expected) : void { - $this->assertSame($expected, \trim((new StringCastingHandler())->value($value, type_string(), Caster::default()))); + self::assertSame($expected, \trim((new StringCastingHandler())->value($value, type_string(), Caster::default()))); } public function test_casting_object_to_string() : void diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php index 02fcbd707..45cce56f6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/StructureCastingHandlerTest.php @@ -13,7 +13,7 @@ final class StructureCastingHandlerTest extends TestCase { public function test_casting_array_into_structure() : void { - $this->assertSame( + self::assertSame( [ 'name' => 'Norbert Orzechowicz', 'age' => 30, @@ -49,7 +49,7 @@ public function test_casting_array_into_structure() : void public function test_casting_structure_with_empty_not_nullable_fields() : void { - $this->assertSame( + self::assertSame( [ 'name' => 'Norbert Orzechowicz', 'age' => 30, @@ -82,7 +82,7 @@ public function test_casting_structure_with_empty_not_nullable_fields() : void public function test_casting_structure_with_missing_nullable_fields() : void { - $this->assertSame( + self::assertSame( [ 'name' => 'Norbert Orzechowicz', 'age' => 30, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/UuidCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/UuidCastingHandlerTest.php index bff84cb81..74e09e289 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/UuidCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/UuidCastingHandlerTest.php @@ -23,7 +23,7 @@ public function test_casting_integer_to_uuid() : void public function test_casting_ramsey_uuid_to_uuid() : void { - $this->assertEquals( + self::assertEquals( new Uuid('6c2f6e0e-8d8e-4e9e-8f0e-5a2d9c1c4f6e'), (new UuidCastingHandler())->value(\Ramsey\Uuid\Uuid::fromString('6c2f6e0e-8d8e-4e9e-8f0e-5a2d9c1c4f6e'), type_uuid(), Caster::default()) ); @@ -31,7 +31,7 @@ public function test_casting_ramsey_uuid_to_uuid() : void public function test_casting_string_to_uuid() : void { - $this->assertEquals( + self::assertEquals( new Uuid('6c2f6e0e-8d8e-4e9e-8f0e-5a2d9c1c4f6e'), (new UuidCastingHandler())->value('6c2f6e0e-8d8e-4e9e-8f0e-5a2d9c1c4f6e', type_uuid(), Caster::default()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/XMLCastingHandlerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/XMLCastingHandlerTest.php index 8a19b8f48..6d98e988d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/XMLCastingHandlerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Caster/XMLCastingHandlerTest.php @@ -22,7 +22,7 @@ public function test_casting_integer_to_xml() : void public function test_casting_string_to_xml() : void { - $this->assertSame( + self::assertSame( '' . "\n" . '1' . "\n", (new XMLCastingHandler())->value('1', type_xml(), Caster::default())->saveXML() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php index a71a6634f..24d13fdb4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/DateTimeTypeTest.php @@ -11,29 +11,29 @@ final class DateTimeTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_datetime()->isEqual(type_datetime()) ); - $this->assertFalse( + self::assertFalse( type_datetime()->isEqual(type_int()) ); } public function test_is_valid() : void { - $this->assertTrue(type_datetime()->isValid(new \DateTimeImmutable())); - $this->assertTrue(type_datetime()->isValid(new \DateTime())); - $this->assertFalse(type_datetime()->isValid('2020-01-01')); - $this->assertFalse(type_datetime()->isValid('2020-01-01 00:00:00')); + self::assertTrue(type_datetime()->isValid(new \DateTimeImmutable())); + self::assertTrue(type_datetime()->isValid(new \DateTime())); + self::assertFalse(type_datetime()->isValid('2020-01-01')); + self::assertFalse(type_datetime()->isValid('2020-01-01 00:00:00')); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'datetime', type_datetime()->toString() ); - $this->assertSame( + self::assertSame( '?datetime', type_datetime(true)->toString() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php index 8f84a7a03..6435d41e3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/JsonTypeTest.php @@ -11,28 +11,28 @@ final class JsonTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_json()->isEqual(type_json()) ); - $this->assertFalse( + self::assertFalse( type_json()->isEqual(type_int()) ); } public function test_is_valid() : void { - $this->assertTrue(type_json()->isValid('{"foo": "bar"}')); - $this->assertFalse(type_json()->isValid('{"foo": "bar"')); - $this->assertFalse(type_json()->isValid('2')); + self::assertTrue(type_json()->isValid('{"foo": "bar"}')); + self::assertFalse(type_json()->isValid('{"foo": "bar"')); + self::assertFalse(type_json()->isValid('2')); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'json', type_json()->toString() ); - $this->assertSame( + self::assertSame( '?json', type_json(true)->toString() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php index cadbd35b5..c4e50b135 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/ListTypeTest.php @@ -13,7 +13,7 @@ final class ListTypeTest extends TestCase { public function test_element() : void { - $this->assertEquals( + self::assertEquals( $element = ListElement::integer(), (new ListType($element))->element() ); @@ -21,20 +21,20 @@ public function test_element() : void public function test_equals() : void { - $this->assertTrue( + self::assertTrue( (new ListType(ListElement::integer()))->isEqual(new ListType(ListElement::integer())) ); - $this->assertFalse( + self::assertFalse( (new ListType(ListElement::integer()))->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( (new ListType(ListElement::integer()))->isEqual(new ListType(ListElement::float())) ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'list', (new ListType(ListElement::boolean()))->toString() ); @@ -42,36 +42,36 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( (new ListType(ListElement::boolean()))->isValid([true, false]) ); - $this->assertTrue( + self::assertTrue( (new ListType(ListElement::string()))->isValid(['one', 'two']) ); - $this->assertTrue( + self::assertTrue( (new ListType(ListElement::list(new ListType(ListElement::string()))))->isValid([['one', 'two']]) ); - $this->assertTrue( + self::assertTrue( ( new ListType( ListElement::map(new MapType(MapKey::string(), MapValue::list(new ListType(ListElement::integer())))) ) )->isValid([['one' => [1, 2], 'two' => [3, 4]], ['one' => [5, 6], 'two' => [7, 8]]]) ); - $this->assertFalse( + self::assertFalse( (new ListType(ListElement::string()))->isValid(['one' => 'two']) ); - $this->assertFalse( + self::assertFalse( (new ListType(ListElement::string()))->isValid([1, 2]) ); - $this->assertFalse( + self::assertFalse( (new ListType(ListElement::string()))->isValid(123) ); } public function test_value() : void { - $this->assertEquals( + self::assertEquals( $value = MapValue::string(), (new MapType(MapKey::string(), $value))->value() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php index 850d373a2..a0242c54b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/MapTypeTest.php @@ -13,20 +13,20 @@ final class MapTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( (new MapType(MapKey::string(), MapValue::float()))->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( (new MapType(MapKey::string(), MapValue::float()))->isEqual(new ListType(ListElement::integer())) ); - $this->assertFalse( + self::assertFalse( (new MapType(MapKey::string(), MapValue::float()))->isEqual(new MapType(MapKey::string(), MapValue::integer())) ); } public function test_key() : void { - $this->assertEquals( + self::assertEquals( $key = MapKey::string(), (new MapType($key, MapValue::float()))->key() ); @@ -34,7 +34,7 @@ public function test_key() : void public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'map', (new MapType(MapKey::string(), MapValue::string()))->toString() ); @@ -42,13 +42,13 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( (new MapType(MapKey::string(), MapValue::string()))->isValid(['one' => 'two']) ); - $this->assertTrue( + self::assertTrue( (new MapType(MapKey::integer(), MapValue::list(new ListType(ListElement::integer()))))->isValid([[1, 2], [3, 4]]) ); - $this->assertTrue( + self::assertTrue( ( new MapType( MapKey::integer(), @@ -56,20 +56,20 @@ public function test_valid() : void ) )->isValid([0 => ['one' => [1, 2]], 1 => ['two' => [3, 4]]]) ); - $this->assertFalse( + self::assertFalse( (new MapType(MapKey::integer(), MapValue::string()))->isValid(['one' => 'two']) ); - $this->assertFalse( + self::assertFalse( (new MapType(MapKey::integer(), MapValue::string()))->isValid([1, 2]) ); - $this->assertFalse( + self::assertFalse( (new MapType(MapKey::string(), MapValue::string()))->isValid(123) ); } public function test_value() : void { - $this->assertEquals( + self::assertEquals( $value = MapValue::string(), (new MapType(MapKey::string(), $value))->value() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php index 63afac402..e849df71e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/StructureTypeTest.php @@ -15,7 +15,7 @@ final class StructureTypeTest extends TestCase { public function test_elements() : void { - $this->assertEquals( + self::assertEquals( $map = [struct_element('map', new MapType(MapKey::string(), MapValue::float()))], (struct_type($map))->elements() ); @@ -23,19 +23,19 @@ public function test_elements() : void public function test_equals() : void { - $this->assertTrue( + self::assertTrue( (struct_type([struct_element('map', new MapType(MapKey::string(), MapValue::float()))])) ->isEqual(struct_type([struct_element('map', new MapType(MapKey::string(), MapValue::float()))])) ); - $this->assertFalse( + self::assertFalse( (struct_type([struct_element('string', type_string()), struct_element('bool', type_boolean())])) ->isEqual(new ListType(ListElement::integer())) ); - $this->assertFalse( + self::assertFalse( (struct_type([struct_element('string', type_string()), struct_element('bool', type_boolean())])) ->isEqual(struct_type([struct_element('bool', type_boolean()), struct_element('integer', type_string())])) ); - $this->assertTrue( + self::assertTrue( struct_type([ struct_element('string', type_string()), struct_element('bool', type_boolean()), @@ -47,7 +47,7 @@ public function test_equals() : void ]) ) ); - $this->assertFalse( + self::assertFalse( struct_type([ struct_element('string', type_string()), struct_element('bool', type_boolean()), @@ -63,7 +63,7 @@ public function test_equals() : void public function test_merging_different_left_structure() : void { - $this->assertEquals( + self::assertEquals( struct_type([ struct_element('string', type_string(true)), struct_element('float', type_float()), @@ -81,7 +81,7 @@ public function test_merging_different_left_structure() : void public function test_merging_different_right_structure() : void { - $this->assertEquals( + self::assertEquals( struct_type([ struct_element('string', type_string(true)), struct_element('float', type_float(true)), @@ -98,7 +98,7 @@ public function test_merging_different_right_structure() : void public function test_merging_nested_structures() : void { - $this->assertEquals( + self::assertEquals( struct_type([ struct_element('string', type_string(true)), struct_element('float', type_float(true)), @@ -153,7 +153,7 @@ public function test_to_string() : void struct_element('map', new MapType(MapKey::string(), MapValue::list(new ListType(ListElement::datetime())))), ]); - $this->assertSame( + self::assertSame( 'structure{string: string, float: float, map: map>}', $struct->toString() ); @@ -161,10 +161,10 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( (struct_type([struct_element('string', type_string())]))->isValid(['one' => 'two']) ); - $this->assertTrue( + self::assertTrue( ( struct_type([ struct_element( @@ -179,7 +179,7 @@ public function test_valid() : void ]) )->isValid(['a' => [0 => ['one' => [1, 2]], 1 => ['two' => [3, 4]]], 'b' => 'c', 'd' => 1.5]) ); - $this->assertFalse( + self::assertFalse( (struct_type([struct_element('int', type_int())]))->isValid([1, 2]) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php index aaa9f32e4..8a0ab260c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/UuidTypeTest.php @@ -12,31 +12,31 @@ final class UuidTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_uuid()->isEqual(type_uuid()) ); - $this->assertFalse( + self::assertFalse( type_uuid()->isEqual(type_int()) ); } public function test_is_valid() : void { - $this->assertFalse(type_uuid()->isValid('f6d6e0e8-4b7e-4b0e-8d7a-ff0a0c9c9a5a')); - $this->assertFalse(type_uuid()->isValid('f6d6e0e8-4b7e-4b0e-8d7a-ff0a0c9c9a5')); - $this->assertFalse(type_uuid()->isValid('2')); - $this->assertTrue(type_uuid()->isValid(Uuid::uuid4())); - $this->assertTrue(type_uuid()->isValid(\Symfony\Component\Uid\Uuid::v4())); - $this->assertTrue(type_uuid()->isValid(new \Flow\ETL\Row\Entry\Type\Uuid(Uuid::uuid4()))); + self::assertFalse(type_uuid()->isValid('f6d6e0e8-4b7e-4b0e-8d7a-ff0a0c9c9a5a')); + self::assertFalse(type_uuid()->isValid('f6d6e0e8-4b7e-4b0e-8d7a-ff0a0c9c9a5')); + self::assertFalse(type_uuid()->isValid('2')); + self::assertTrue(type_uuid()->isValid(Uuid::uuid4())); + self::assertTrue(type_uuid()->isValid(\Symfony\Component\Uid\Uuid::v4())); + self::assertTrue(type_uuid()->isValid(new \Flow\ETL\Row\Entry\Type\Uuid(Uuid::uuid4()))); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'uuid', type_uuid()->toString() ); - $this->assertSame( + self::assertSame( '?uuid', type_uuid(true)->toString() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php index 79de7bc08..3201b1e59 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLNodeTypeTest.php @@ -11,29 +11,29 @@ final class XMLNodeTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_xml_node()->isEqual(type_xml_node()) ); - $this->assertFalse( + self::assertFalse( type_xml_node()->isEqual(type_int()) ); } public function test_is_valid() : void { - $this->assertTrue(type_xml_node()->isValid(new \DOMDocument())); - $this->assertFalse(type_xml_node()->isValid('')); - $this->assertFalse(type_xml_node()->isValid('2020-01-01')); - $this->assertFalse(type_xml_node()->isValid('2020-01-01 00:00:00')); + self::assertTrue(type_xml_node()->isValid(new \DOMDocument())); + self::assertFalse(type_xml_node()->isValid('')); + self::assertFalse(type_xml_node()->isValid('2020-01-01')); + self::assertFalse(type_xml_node()->isValid('2020-01-01 00:00:00')); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'xml_node', type_xml_node()->toString() ); - $this->assertSame( + self::assertSame( '?xml_node', type_xml_node(true)->toString() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php index b8d946099..eccaa6488 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Logical/XMLTypeTest.php @@ -11,29 +11,29 @@ final class XMLTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_xml()->isEqual(type_xml()) ); - $this->assertFalse( + self::assertFalse( type_xml()->isEqual(type_int()) ); } public function test_is_valid() : void { - $this->assertTrue(type_xml()->isValid(new \DOMDocument())); - $this->assertFalse(type_xml()->isValid('')); - $this->assertFalse(type_xml()->isValid('2020-01-01')); - $this->assertFalse(type_xml()->isValid('2020-01-01 00:00:00')); + self::assertTrue(type_xml()->isValid(new \DOMDocument())); + self::assertFalse(type_xml()->isValid('')); + self::assertFalse(type_xml()->isValid('2020-01-01')); + self::assertFalse(type_xml()->isValid('2020-01-01 00:00:00')); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'xml', type_xml()->toString() ); - $this->assertSame( + self::assertSame( '?xml', type_xml(true)->toString() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php index 7716833f2..fde73bfc1 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ArrayTypeTest.php @@ -14,30 +14,30 @@ final class ArrayTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( (type_array())->isEqual(new ArrayType) ); - $this->assertTrue( + self::assertTrue( ArrayType::empty()->isEqual(ArrayType::empty()) ); - $this->assertFalse( + self::assertFalse( (type_array())->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( (type_array())->isEqual(type_float()) ); - $this->assertFalse( + self::assertFalse( ArrayType::empty()->isEqual(type_array()) ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'array', type_array()->toString() ); - $this->assertSame( + self::assertSame( 'array', ArrayType::empty()->toString() ); @@ -45,25 +45,25 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( type_array()->isValid([]) ); - $this->assertTrue( + self::assertTrue( type_array()->isValid(['one']) ); - $this->assertTrue( + self::assertTrue( type_array()->isValid([1]) ); - $this->assertFalse( + self::assertFalse( type_array()->isValid(null) ); - $this->assertFalse( + self::assertFalse( type_array()->isValid('one') ); - $this->assertFalse( + self::assertFalse( type_array()->isValid(true) ); - $this->assertFalse( + self::assertFalse( type_array()->isValid(123) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php index acd774108..c0dcd3765 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/CallableTypeTest.php @@ -13,27 +13,27 @@ final class CallableTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_callable(false)->isEqual(type_callable(false)) ); - $this->assertFalse( + self::assertFalse( type_callable(false)->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( type_callable(false)->isEqual(type_float()) ); - $this->assertFalse( + self::assertFalse( type_callable(false)->isEqual(type_callable(true)) ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'callable', type_callable(false)->toString() ); - $this->assertSame( + self::assertSame( '?callable', type_callable(true)->toString() ); @@ -41,16 +41,16 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( type_callable(false)->isValid('printf') ); - $this->assertFalse( + self::assertFalse( type_callable(false)->isValid('one') ); - $this->assertFalse( + self::assertFalse( type_callable(false)->isValid([1, 2]) ); - $this->assertFalse( + self::assertFalse( type_callable(false)->isValid(123) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php index 1885a6430..4d620da9f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/NullTypeTest.php @@ -13,20 +13,20 @@ final class NullTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_null()->isEqual(type_null()) ); - $this->assertFalse( + self::assertFalse( type_null()->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( type_null()->isEqual(type_float()) ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'null', type_null()->toString() ); @@ -34,16 +34,16 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( type_null()->isValid(null) ); - $this->assertFalse( + self::assertFalse( type_null()->isValid('one') ); - $this->assertFalse( + self::assertFalse( type_null()->isValid([1, 2]) ); - $this->assertFalse( + self::assertFalse( type_null()->isValid(123) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php index 27772bc5b..14f3a890e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ResourceTypeTest.php @@ -13,27 +13,27 @@ final class ResourceTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( (type_resource(false))->isEqual(type_resource(false)) ); - $this->assertFalse( + self::assertFalse( (type_resource(false))->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( (type_resource(false))->isEqual(type_float()) ); - $this->assertFalse( + self::assertFalse( (type_resource(false))->isEqual(type_resource()) ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'resource', (type_resource(false))->toString() ); - $this->assertSame( + self::assertSame( '?resource', (type_resource())->toString() ); @@ -42,17 +42,17 @@ public function test_to_string() : void public function test_valid() : void { $handle = \fopen('php://temp/max', 'r+b'); - $this->assertTrue( + self::assertTrue( (type_resource(false))->isValid($handle) ); \fclose($handle); - $this->assertFalse( + self::assertFalse( (type_resource(false))->isValid('one') ); - $this->assertFalse( + self::assertFalse( (type_resource(false))->isValid([1, 2]) ); - $this->assertFalse( + self::assertFalse( (type_resource(false))->isValid(123) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php index 841f5807c..6da5995bb 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/Native/ScalarTypeTest.php @@ -14,13 +14,13 @@ final class ScalarTypeTest extends TestCase { public function test_equals() : void { - $this->assertTrue( + self::assertTrue( type_int()->isEqual(type_int()) ); - $this->assertFalse( + self::assertFalse( type_int()->isEqual(new MapType(MapKey::string(), MapValue::float())) ); - $this->assertFalse( + self::assertFalse( type_int()->isEqual(type_float()) ); } @@ -35,53 +35,53 @@ public function test_merge_different_types() : void public function test_merge_same_types() : void { - $this->assertTrue( + self::assertTrue( type_int()->merge(type_int())->isEqual(type_int()) ); - $this->assertTrue( + self::assertTrue( type_string()->merge(type_string())->isEqual(type_string()) ); - $this->assertTrue( + self::assertTrue( type_boolean()->merge(type_boolean())->isEqual(type_boolean()) ); - $this->assertTrue( + self::assertTrue( type_float()->merge(type_float())->isEqual(type_float()) ); } public function test_merge_with_null() : void { - $this->assertTrue( + self::assertTrue( type_int()->merge(type_int(true))->isEqual(type_int(true)) ); - $this->assertTrue( + self::assertTrue( type_string()->merge(type_string(true))->isEqual(type_string(true)) ); - $this->assertTrue( + self::assertTrue( type_boolean()->merge(type_boolean(true))->isEqual(type_boolean(true)) ); - $this->assertTrue( + self::assertTrue( type_float()->merge(type_float(true))->isEqual(type_float(true)) ); } public function test_nullable() : void { - $this->assertFalse( + self::assertFalse( type_string(false)->nullable() ); - $this->assertTrue( + self::assertTrue( type_boolean(true)->nullable() ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'boolean', type_boolean()->toString() ); - $this->assertSame( + self::assertSame( '?string', type_string(true)->toString() ); @@ -89,25 +89,25 @@ public function test_to_string() : void public function test_valid() : void { - $this->assertTrue( + self::assertTrue( type_boolean()->isValid(true) ); - $this->assertTrue( + self::assertTrue( type_string()->isValid('one') ); - $this->assertTrue( + self::assertTrue( type_int()->isValid(1) ); - $this->assertTrue( + self::assertTrue( type_int(true)->isValid(null) ); - $this->assertFalse( + self::assertFalse( type_int()->isValid('one') ); - $this->assertFalse( + self::assertFalse( type_string()->isValid([1, 2]) ); - $this->assertFalse( + self::assertFalse( type_boolean()->isValid(123) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php index e977fdf9a..c55749836 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeDetectorTest.php @@ -313,7 +313,7 @@ public static function provide_scalar_data() : \Generator public function test_enum_type() : void { - $this->assertInstanceOf(EnumType::class, (new TypeDetector())->detectType(BasicEnum::two)); + self::assertInstanceOf(EnumType::class, (new TypeDetector())->detectType(BasicEnum::two)); } #[DataProvider('provide_logical_types_data')] @@ -321,21 +321,21 @@ public function test_logical_types($data, string $class, string $description) : { $type = (new TypeDetector())->detectType($data); - $this->assertInstanceOf($class, $type); - $this->assertSame($description, $type->toString()); + self::assertInstanceOf($class, $type); + self::assertSame($description, $type->toString()); } #[DataProvider('provide_object_data')] public function test_object_types(mixed $data) : void { - $this->assertInstanceOf(ObjectType::class, (new TypeDetector())->detectType($data)); + self::assertInstanceOf(ObjectType::class, (new TypeDetector())->detectType($data)); } #[DataProvider('provide_scalar_data')] public function test_scalar_types(mixed $data, string $description) : void { $type = (new TypeDetector())->detectType($data); - $this->assertInstanceOf(ScalarType::class, $type); - $this->assertSame($description, $type->toString()); + self::assertInstanceOf(ScalarType::class, $type); + self::assertSame($description, $type->toString()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php index 2ae4c5eb4..b4139c45b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PHP/Type/TypeFactoryTest.php @@ -14,73 +14,73 @@ final class TypeFactoryTest extends TestCase public function test_normalizing_and_creating_all_scalar() : void { $string = type_string(); - $this->assertEquals($string, TypeFactory::fromArray($string->normalize())); + self::assertEquals($string, TypeFactory::fromArray($string->normalize())); $integer = type_integer(); - $this->assertEquals($integer, TypeFactory::fromArray($integer->normalize())); + self::assertEquals($integer, TypeFactory::fromArray($integer->normalize())); $boolean = type_boolean(); - $this->assertEquals($boolean, TypeFactory::fromArray($boolean->normalize())); + self::assertEquals($boolean, TypeFactory::fromArray($boolean->normalize())); $float = type_float(); - $this->assertEquals($float, TypeFactory::fromArray($float->normalize())); + self::assertEquals($float, TypeFactory::fromArray($float->normalize())); } public function test_normalizing_and_creating_array_type() : void { $array = type_array(); - $this->assertEquals($array, TypeFactory::fromArray($array->normalize())); + self::assertEquals($array, TypeFactory::fromArray($array->normalize())); } public function test_normalizing_and_creating_callable_type() : void { $callable = type_callable(); - $this->assertEquals($callable, TypeFactory::fromArray($callable->normalize())); + self::assertEquals($callable, TypeFactory::fromArray($callable->normalize())); } public function test_normalizing_and_creating_datetime_type() : void { $datetime = type_datetime(); - $this->assertEquals($datetime, TypeFactory::fromArray($datetime->normalize())); + self::assertEquals($datetime, TypeFactory::fromArray($datetime->normalize())); } public function test_normalizing_and_creating_enum_type() : void { $enum = type_enum(SomeEnum::class); - $this->assertEquals($enum, TypeFactory::fromArray($enum->normalize())); + self::assertEquals($enum, TypeFactory::fromArray($enum->normalize())); } public function test_normalizing_and_creating_json_type() : void { $json = type_json(); - $this->assertEquals($json, TypeFactory::fromArray($json->normalize())); + self::assertEquals($json, TypeFactory::fromArray($json->normalize())); } public function test_normalizing_and_creating_list_type() : void { $list = type_list(type_string()); - $this->assertEquals($list, TypeFactory::fromArray($list->normalize())); + self::assertEquals($list, TypeFactory::fromArray($list->normalize())); } public function test_normalizing_and_creating_map_type() : void { $map = type_map(type_string(), type_integer()); - $this->assertEquals($map, TypeFactory::fromArray($map->normalize())); + self::assertEquals($map, TypeFactory::fromArray($map->normalize())); } public function test_normalizing_and_creating_null_type() : void { $null = type_null(); - $this->assertEquals($null, TypeFactory::fromArray($null->normalize())); + self::assertEquals($null, TypeFactory::fromArray($null->normalize())); } public function test_normalizing_and_creating_object_type() : void { $object = type_object(\stdClass::class); - $this->assertEquals($object, TypeFactory::fromArray($object->normalize())); + self::assertEquals($object, TypeFactory::fromArray($object->normalize())); } public function test_normalizing_and_creating_resource_type() : void { $resource = type_resource(); - $this->assertEquals($resource, TypeFactory::fromArray($resource->normalize())); + self::assertEquals($resource, TypeFactory::fromArray($resource->normalize())); } public function test_normalizing_and_creating_structure_type() : void @@ -95,24 +95,24 @@ public function test_normalizing_and_creating_structure_type() : void ] ); - $this->assertEquals($structure, TypeFactory::fromArray($structure->normalize())); + self::assertEquals($structure, TypeFactory::fromArray($structure->normalize())); } public function test_normalizing_and_creating_uuid_type() : void { $uuid = type_uuid(); - $this->assertEquals($uuid, TypeFactory::fromArray($uuid->normalize())); + self::assertEquals($uuid, TypeFactory::fromArray($uuid->normalize())); } public function test_normalizing_and_creating_xml_node_type() : void { $xmlNode = type_xml_node(); - $this->assertEquals($xmlNode, TypeFactory::fromArray($xmlNode->normalize())); + self::assertEquals($xmlNode, TypeFactory::fromArray($xmlNode->normalize())); } public function test_normalizing_and_creating_xml_type() : void { $xml = type_xml(); - $this->assertEquals($xml, TypeFactory::fromArray($xml->normalize())); + self::assertEquals($xml, TypeFactory::fromArray($xml->normalize())); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/CartesianProductTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/CartesianProductTest.php index 05443e007..cc2775770 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/CartesianProductTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/CartesianProductTest.php @@ -14,7 +14,7 @@ public function test_cartesian_product_with_associative_arrays() : void $input = ['first' => [1, 2], 'second' => ['a', 'b']]; $expected = [['first' => 1, 'second' => 'a'], ['first' => 1, 'second' => 'b'], ['first' => 2, 'second' => 'a'], ['first' => 2, 'second' => 'b']]; $result = (new CartesianProduct)($input); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } public function test_cartesian_product_with_different_lengths() : void @@ -22,7 +22,7 @@ public function test_cartesian_product_with_different_lengths() : void $input = [[1], ['a', 'b'], [true, false]]; $expected = [[1, 'a', true], [1, 'a', false], [1, 'b', true], [1, 'b', false]]; $result = (new CartesianProduct)($input); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } public function test_cartesian_product_with_edge_cases() : void @@ -30,7 +30,7 @@ public function test_cartesian_product_with_edge_cases() : void $input = [[null, 2], [0]]; $expected = [[null, 0], [2, 0]]; $result = (new CartesianProduct)($input); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } public function test_cartesian_product_with_empty_input() : void @@ -38,7 +38,7 @@ public function test_cartesian_product_with_empty_input() : void $input = []; $expected = [[]]; $result = (new CartesianProduct)($input); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } public function test_cartesian_product_with_multiple_arrays() : void @@ -46,7 +46,7 @@ public function test_cartesian_product_with_multiple_arrays() : void $input = [[1, 2], ['a', 'b']]; $expected = [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]; $result = (new CartesianProduct)($input); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } public function test_cartesian_product_with_one_array() : void @@ -54,6 +54,6 @@ public function test_cartesian_product_with_one_array() : void $input = [[1, 2]]; $expected = [[1], [2]]; $result = (new CartesianProduct)($input); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php index 47e668e5d..8813d1d2e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Partition/ScalarFunctionFilterTest.php @@ -19,8 +19,8 @@ public function test_filtering() : void new NativeEntryFactory() ); - $this->assertTrue($filter->keep(new Partition('foo', '100'))); - $this->assertFalse($filter->keep(new Partition('foo', '5'))); + self::assertTrue($filter->keep(new Partition('foo', '100'))); + self::assertFalse($filter->keep(new Partition('foo', '5'))); } public function test_filtering_when_partition_is_not_covered_by_any_filter() : void @@ -30,7 +30,7 @@ public function test_filtering_when_partition_is_not_covered_by_any_filter() : v new NativeEntryFactory() ); - $this->assertFalse($filter->keep(new Partition('bar', '100'))); + self::assertFalse($filter->keep(new Partition('bar', '100'))); } public function test_filtering_with_multiple_partitions_and_condition() : void @@ -43,10 +43,10 @@ public function test_filtering_with_multiple_partitions_and_condition() : void new NativeEntryFactory() ); - $this->assertTrue($filter->keep(new Partition('foo', '100'), new Partition('bar', '100'))); - $this->assertFalse($filter->keep(new Partition('foo', '100'), new Partition('bar', '5'))); - $this->assertFalse($filter->keep(new Partition('foo', '5'), new Partition('bar', '100'))); - $this->assertFalse($filter->keep(new Partition('foo', '5'), new Partition('bar', '5'))); + self::assertTrue($filter->keep(new Partition('foo', '100'), new Partition('bar', '100'))); + self::assertFalse($filter->keep(new Partition('foo', '100'), new Partition('bar', '5'))); + self::assertFalse($filter->keep(new Partition('foo', '5'), new Partition('bar', '100'))); + self::assertFalse($filter->keep(new Partition('foo', '5'), new Partition('bar', '5'))); } public function test_filtering_with_multiple_partitions_or_condition() : void @@ -59,9 +59,9 @@ public function test_filtering_with_multiple_partitions_or_condition() : void new NativeEntryFactory() ); - $this->assertTrue($filter->keep(new Partition('foo', '100'), new Partition('bar', '100'))); - $this->assertTrue($filter->keep(new Partition('foo', '100'), new Partition('bar', '5'))); - $this->assertTrue($filter->keep(new Partition('foo', '5'), new Partition('bar', '100'))); - $this->assertFalse($filter->keep(new Partition('foo', '5'), new Partition('bar', '5'))); + self::assertTrue($filter->keep(new Partition('foo', '100'), new Partition('bar', '100'))); + self::assertTrue($filter->keep(new Partition('foo', '100'), new Partition('bar', '5'))); + self::assertTrue($filter->keep(new Partition('foo', '5'), new Partition('bar', '100'))); + self::assertFalse($filter->keep(new Partition('foo', '5'), new Partition('bar', '5'))); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php index f1e357856..5bf5fac4c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/PartitionTest.php @@ -32,7 +32,7 @@ public static function provider_forbidden_characters_values() : array public function test_creating_partition_value_date_entry() : void { - $this->assertEquals( + self::assertEquals( '2023-01-01', Partition::valueFromRow(ref('date'), row(datetime_entry('date', '2023-01-01 00:00:00 UTC'))) ); @@ -40,7 +40,7 @@ public function test_creating_partition_value_date_entry() : void public function test_creating_partition_value_datetime_entry() : void { - $this->assertEquals( + self::assertEquals( '2023-01-01', Partition::valueFromRow(ref('date'), row(datetime_entry('date', '2023-01-01 21:51:14 PST'))) ); @@ -50,7 +50,7 @@ public function test_creating_partition_value_from_xml_entry() : void { $this->expectExceptionMessage(XMLEntry::class . ' can\'t be used as a partition'); - $this->assertEquals( + self::assertEquals( 'value', Partition::valueFromRow(ref('xml'), row(xml_entry('xml', ''))) ); @@ -60,15 +60,15 @@ public function test_creating_partitions_from_uri_with_partition_with_forbidden_ { $partitions = Partition::fromUri('/dataset/country=U|S/something'); - $this->assertCount(0, $partitions); + self::assertCount(0, $partitions); } public function test_creating_partitions_from_uri_with_partitions() : void { $partitions = Partition::fromUri('/dataset/country=US/age-range=20-45'); - $this->assertCount(2, $partitions); - $this->assertEquals( + self::assertCount(2, $partitions); + self::assertEquals( [ new Partition('country', 'US'), new Partition('age-range', '20-45'), @@ -81,7 +81,7 @@ public function test_creating_partitions_from_uri_without_partitions() : void { $partitions = Partition::fromUri('/some/regular/uri/to/file.csv'); - $this->assertCount(0, $partitions); + self::assertCount(0, $partitions); } /** diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php index 0d0c6db7d..38100f29f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php @@ -33,7 +33,7 @@ public function closure(FlowContext $context) : void }) ->run(); - $this->assertTrue($loader->closureCalled); - $this->assertSame(20, $loader->rowsLoaded); + self::assertTrue($loader->closureCalled); + self::assertSame(20, $loader->rowsLoaded); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php index 67b050c22..7ab2a9d25 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/NestedPipelineTest.php @@ -27,7 +27,7 @@ public function test_nested_pipelines() : void ) )); - $this->assertEquals( + self::assertEquals( [ new Rows( Row::create(int_entry('id', 1), bool_entry('active', true)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php index fa32b86e4..72e068d08 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/BatchSizeOptimizationTest.php @@ -20,7 +20,7 @@ public function test_for_nested_pipeline_with_batching_pipeline() : void new SynchronousPipeline() ); - $this->assertFalse( + self::assertFalse( (new BatchSizeOptimization())->isFor(new DbalLoader('test', [], []), $pipeline) ); } @@ -29,7 +29,7 @@ public function test_for_synchronous_pipeline_with_loader() : void { $pipeline = new SynchronousPipeline(); - $this->assertTrue( + self::assertTrue( (new BatchSizeOptimization())->isFor(new DbalLoader('test', [], []), $pipeline) ); } @@ -38,7 +38,7 @@ public function test_for_synchronous_pipeline_with_stream_loader() : void { $pipeline = new SynchronousPipeline(); - $this->assertFalse( + self::assertFalse( (new BatchSizeOptimization())->isFor(StreamLoader::output(), $pipeline) ); } @@ -47,7 +47,7 @@ public function test_for_synchronous_pipeline_without_loaders() : void { $pipeline = new SynchronousPipeline(); - $this->assertFalse( + self::assertFalse( (new BatchSizeOptimization())->isFor($this->createMock(Transformer::class), $pipeline) ); } @@ -56,7 +56,7 @@ public function test_is_for_already_batching_pipeline() : void { $pipeline = new BatchingPipeline(new SynchronousPipeline(), 10); - $this->assertFalse( + self::assertFalse( (new BatchSizeOptimization())->isFor(new DbalLoader('test', [], []), $pipeline) ); } @@ -65,7 +65,7 @@ public function test_is_for_collecting_pipeline() : void { $pipeline = new CollectingPipeline(new SynchronousPipeline()); - $this->assertFalse( + self::assertFalse( (new BatchSizeOptimization())->isFor(new DbalLoader('test', [], []), $pipeline) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php index 276651d06..615316d2c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/Optimizer/LimitOptimizationTest.php @@ -17,14 +17,14 @@ final class LimitOptimizationTest extends TestCase { public function test_optimization_against_pipelines() : void { - $this->assertFalse( + self::assertFalse( (new LimitOptimization())->isFor(new LimitTransformer(10), new GroupByPipeline(new GroupBy(), new SynchronousPipeline())) ); - $this->assertFalse( + self::assertFalse( (new LimitOptimization())->isFor(new LimitTransformer(10), new PartitioningPipeline(new SynchronousPipeline(), [ref('group')])) ); // Pipeline without extractor - $this->assertFalse( + self::assertFalse( (new LimitOptimization())->isFor(new LimitTransformer(10), new SynchronousPipeline()) ); } @@ -37,8 +37,8 @@ public function test_optimization_for_a_pipeline_with_expanding_expression_trans $optimizedPipeline = (new Optimizer(new LimitOptimization()))->optimize(new LimitTransformer(10), $pipeline); - $this->assertFalse($pipeline->source()->isLimited()); - $this->assertCount(2, $optimizedPipeline->pipes()->all()); + self::assertFalse($pipeline->source()->isLimited()); + self::assertCount(2, $optimizedPipeline->pipes()->all()); } public function test_optimization_for_a_pipeline_with_expanding_transformations() : void @@ -49,8 +49,8 @@ public function test_optimization_for_a_pipeline_with_expanding_transformations( $optimizedPipeline = (new Optimizer(new LimitOptimization()))->optimize(new LimitTransformer(10), $pipeline); - $this->assertFalse($pipeline->source()->isLimited()); - $this->assertCount(2, $optimizedPipeline->pipes()->all()); + self::assertFalse($pipeline->source()->isLimited()); + self::assertCount(2, $optimizedPipeline->pipes()->all()); } public function test_optimization_for_a_pipeline_with_limited_extractor() : void @@ -63,9 +63,9 @@ public function test_optimization_for_a_pipeline_with_limited_extractor() : void $optimizedPipeline = (new Optimizer(new LimitOptimization()))->optimize(new LimitTransformer(10), $pipeline); - $this->assertTrue($pipeline->source()->isLimited()); - $this->assertCount(2, $optimizedPipeline->pipes()->all()); - $this->assertInstanceOf(LimitTransformer::class, $optimizedPipeline->pipes()->all()[1]); + self::assertTrue($pipeline->source()->isLimited()); + self::assertCount(2, $optimizedPipeline->pipes()->all()); + self::assertInstanceOf(LimitTransformer::class, $optimizedPipeline->pipes()->all()[1]); } public function test_optimization_for_a_pipeline_without_expanding_transformations() : void @@ -76,8 +76,8 @@ public function test_optimization_for_a_pipeline_without_expanding_transformatio $optimizedPipeline = (new Optimizer(new LimitOptimization()))->optimize(new LimitTransformer(10), $pipeline); - $this->assertTrue($pipeline->source()->isLimited()); - $this->assertCount(1, $optimizedPipeline->pipes()->all()); + self::assertTrue($pipeline->source()->isLimited()); + self::assertCount(1, $optimizedPipeline->pipes()->all()); } public function test_optimization_of_limit_on_empty_pipeline() : void @@ -87,7 +87,7 @@ public function test_optimization_of_limit_on_empty_pipeline() : void $optimizedPipeline = (new Optimizer(new LimitOptimization()))->optimize(new LimitTransformer(10), $pipeline); - $this->assertTrue($pipeline->source()->isLimited()); - $this->assertCount(0, $optimizedPipeline->pipes()->all()); + self::assertTrue($pipeline->source()->isLimited()); + self::assertCount(0, $optimizedPipeline->pipes()->all()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php index 3e860f249..44e19624b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/PipesTest.php @@ -20,7 +20,7 @@ public function test_getting_only_loaders_from_pipes() : void $memoryLoader = to_memory(new ArrayMemory()), ]); - $this->assertEquals( + self::assertEquals( [$outputLoader, $memoryLoader], $pipes->loaders() ); @@ -34,8 +34,8 @@ public function test_has_transformer() : void $memoryLoader = to_memory(new ArrayMemory()), ]); - $this->assertTrue($pipes->has(ScalarFunctionTransformer::class)); - $this->assertFalse($pipes->has(DropDuplicatesTransformer::class)); + self::assertTrue($pipes->has(ScalarFunctionTransformer::class)); + self::assertFalse($pipes->has(DropDuplicatesTransformer::class)); } public function test_has_transformer_when_passed_class_does_not_exists() : void @@ -46,7 +46,7 @@ public function test_has_transformer_when_passed_class_does_not_exists() : void $memoryLoader = to_memory(new ArrayMemory()), ]); - $this->assertFalse($pipes->has('SomeClassThatDoesNotExist')); + self::assertFalse($pipes->has('SomeClassThatDoesNotExist')); } public function test_has_transformer_when_passed_class_is_not_a_transformer_class() : void @@ -57,6 +57,6 @@ public function test_has_transformer_when_passed_class_is_not_a_transformer_clas $memoryLoader = to_memory(new ArrayMemory()), ]); - $this->assertFalse($pipes->has(Pipes::class)); + self::assertFalse($pipes->has(Pipes::class)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/NativeComparatorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/NativeComparatorTest.php index 63d2e212b..f547ab77f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/NativeComparatorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/NativeComparatorTest.php @@ -16,7 +16,7 @@ public function test_row_comparison() : void $comparator = new Row\Comparator\NativeComparator(); - $this->assertTrue($comparator->equals($row, $nextRow)); + self::assertTrue($comparator->equals($row, $nextRow)); } public function test_row_comparison_for_different_rows() : void @@ -26,6 +26,6 @@ public function test_row_comparison_for_different_rows() : void $comparator = new Row\Comparator\NativeComparator(); - $this->assertFalse($comparator->equals($row, $nextRow)); + self::assertFalse($comparator->equals($row, $nextRow)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/WeakObjectComparatorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/WeakObjectComparatorTest.php index 3e1a19460..791875a90 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/WeakObjectComparatorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Comparator/WeakObjectComparatorTest.php @@ -21,7 +21,7 @@ public function test_compare_rows_different_entries() : void $comparator = new Row\Comparator\WeakObjectComparator(); - $this->assertFalse($comparator->equals($row, $nextRow)); + self::assertFalse($comparator->equals($row, $nextRow)); } public function test_compare_rows_with_other_different_entries() : void @@ -37,6 +37,6 @@ public function test_compare_rows_with_other_different_entries() : void $comparator = new Row\Comparator\WeakObjectComparator(); - $this->assertFalse($comparator->equals($row, $nextRow)); + self::assertFalse($comparator->equals($row, $nextRow)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php index 0de6c5513..077bb16f8 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntriesTest.php @@ -21,12 +21,12 @@ public function test_add_entry() : void $entries = new Entries( new IntegerEntry('integer-entry', 100) ); - $this->assertFalse($entries->has('entry-name')); + self::assertFalse($entries->has('entry-name')); $entries = $entries->add($newEntry); - $this->assertTrue($entries->has('entry-name')); - $this->assertEquals($newEntry, $entries->get('entry-name')); + self::assertTrue($entries->has('entry-name')); + self::assertEquals($newEntry, $entries->get('entry-name')); } public function test_add_multiple_duplicated_entries() : void @@ -49,15 +49,15 @@ public function test_add_multiple_entries() : void $entries = new Entries(new IntegerEntry('integer-entry', 100)); - $this->assertFalse($entries->has('string-name')); - $this->assertFalse($entries->has('boolean-name')); + self::assertFalse($entries->has('string-name')); + self::assertFalse($entries->has('boolean-name')); $entries = $entries->add($stringEntry)->add($booleanEntry); - $this->assertTrue($entries->has('string-name')); - $this->assertTrue($entries->has('boolean-name')); - $this->assertEquals($stringEntry, $entries->get('string-name')); - $this->assertEquals($booleanEntry, $entries->get('boolean-name')); + self::assertTrue($entries->has('string-name')); + self::assertTrue($entries->has('boolean-name')); + self::assertEquals($stringEntry, $entries->get('string-name')); + self::assertEquals($booleanEntry, $entries->get('boolean-name')); } public function test_adds_entry_when_it_does_not_exist() : void @@ -70,23 +70,23 @@ public function test_adds_entry_when_it_does_not_exist() : void $entries = $entries->set($stringEntry); - $this->assertEquals(new Entries($integerEntry, $booleanEntry, $stringEntry), $entries); + self::assertEquals(new Entries($integerEntry, $booleanEntry, $stringEntry), $entries); } public function test_array_access_exists() : void { $entries = new Entries(new IntegerEntry('id', 1), new StringEntry('name', 'John')); - $this->assertTrue(isset($entries['id'])); - $this->assertFalse(isset($entries['test'])); + self::assertTrue(isset($entries['id'])); + self::assertFalse(isset($entries['test'])); } public function test_array_access_get() : void { $entries = new Entries(new IntegerEntry('id', 1), new StringEntry('name', 'John')); - $this->assertSame(1, $entries['id']->value()); - $this->assertSame('John', $entries['name']->value()); + self::assertSame(1, $entries['id']->value()); + self::assertSame('John', $entries['name']->value()); } public function test_array_access_set() : void @@ -123,7 +123,7 @@ public function test_case_sensitive_entry_names() : void new StringEntry('entry-Name', 'just a string'), ); - $this->assertFalse($entries->has('entry-name')); + self::assertFalse($entries->has('entry-name')); } public function test_create_from_non_unique_entries() : void @@ -144,7 +144,7 @@ public function test_get_all_entries() : void int_entry('name', 1), ); - $this->assertCount( + self::assertCount( 2, $entries->getAll('id', 'name') ); @@ -168,7 +168,7 @@ public function test_has_when_at_least_one_is_missing() : void int_entry('name', 1), ); - $this->assertFalse($entries->has('id', 'name', 'status')); + self::assertFalse($entries->has('id', 'name', 'status')); } public function test_has_when_none_of_many_is_missing() : void @@ -179,7 +179,7 @@ public function test_has_when_none_of_many_is_missing() : void bool_entry('active', true) ); - $this->assertTrue($entries->has('id', 'name')); + self::assertTrue($entries->has('id', 'name')); } public function test_merge_duplicated_entries() : void @@ -200,7 +200,7 @@ public function test_merge_duplicated_entries_case_insensitive_() : void $merged = $entries1->merge($entries2); - $this->assertCount(2, $merged); + self::assertCount(2, $merged); } public function test_merge_entries() : void @@ -210,7 +210,7 @@ public function test_merge_entries() : void $entries = $entries1->merge($entries2); - $this->assertEquals( + self::assertEquals( new Entries(new StringEntry('string-name', 'new string entry'), new IntegerEntry('integer-entry', 100)), $entries ); @@ -224,14 +224,14 @@ public function test_order_entries() : void new BooleanEntry('bool', true), ); - $this->assertEquals( + self::assertEquals( ['integer', 'string', 'bool'], $entries->map(fn (\Flow\ETL\Row\Entry $e) => $e->name()) ); $entries = $entries->order('bool', 'string', 'integer'); - $this->assertEquals( + self::assertEquals( ['bool', 'string', 'integer'], $entries->map(fn (\Flow\ETL\Row\Entry $e) => $e->name()) ); @@ -260,7 +260,7 @@ public function test_overwrites_entry_when_it_exists() : void $entries = $entries->set($stringEntry); - $this->assertEquals(new Entries($booleanEntry, $stringEntry), $entries); + self::assertEquals(new Entries($booleanEntry, $stringEntry), $entries); } public function test_prevents_from_adding_entry_with_the_same_name() : void @@ -283,7 +283,7 @@ public function test_prevents_from_adding_entry_with_the_same_name_case_insensit $newEntries = $entries->add(new StringEntry('entry-name', 'just a string')); - $this->assertCount(2, $newEntries); + self::assertCount(2, $newEntries); } public function test_prevents_from_creating_collection_with_duplicate_entry_names() : void @@ -313,7 +313,7 @@ public function test_remove_entry() : void $booleanEntry = new BooleanEntry('boolean-entry', true) ); - $this->assertEquals(new Entries($integerEntry, $booleanEntry), $entries->remove('string-entry')); + self::assertEquals(new Entries($integerEntry, $booleanEntry), $entries->remove('string-entry')); } public function test_remove_multiple_entries() : void @@ -324,7 +324,7 @@ public function test_remove_multiple_entries() : void $booleanEntry = new BooleanEntry('boolean-entry', true) ); - $this->assertEquals(new Entries($booleanEntry), $entries->remove('string-entry', 'integer-entry')); + self::assertEquals(new Entries($booleanEntry), $entries->remove('string-entry', 'integer-entry')); } public function test_rename() : void @@ -333,7 +333,7 @@ public function test_rename() : void $entries = $entries->rename('string-name', 'new-string-name'); - $this->assertEquals( + self::assertEquals( new Entries(new StringEntry('new-string-name', 'new string entry')), $entries ); @@ -344,7 +344,7 @@ public function test_set_entry() : void $entries = new Entries(new StringEntry('string-entry', 'just a string')); $entries = $entries->set(new StringEntry('string-entry', 'new string')); - $this->assertEquals(new Entries(new StringEntry('string-entry', 'new string')), $entries); + self::assertEquals(new Entries(new StringEntry('string-entry', 'new string')), $entries); } public function test_set_multiple_entries() : void @@ -352,7 +352,7 @@ public function test_set_multiple_entries() : void $entries = new Entries(new StringEntry('string-entry', 'just a string')); $entries = $entries->set(new StringEntry('string-entry', 'new string'), new IntegerEntry('integer-entry', 100)); - $this->assertEquals(new Entries(new StringEntry('string-entry', 'new string'), new IntegerEntry('integer-entry', 100)), $entries); + self::assertEquals(new Entries(new StringEntry('string-entry', 'new string'), new IntegerEntry('integer-entry', 100)), $entries); } public function test_sorts_entries_by_name() : void @@ -371,7 +371,7 @@ public function test_sorts_entries_by_name() : void $sorted = $entries->sort(); - $this->assertEquals( + self::assertEquals( new Entries( $createdAt = new DateTimeEntry('created-at', new \DateTimeImmutable('2020-07-13 15:00')), $deleted = new BooleanEntry('deleted', false), @@ -402,7 +402,7 @@ public function test_transforms_collection_to_array() : void new EnumEntry('enum', BasicEnum::three) ); - $this->assertEquals( + self::assertEquals( [ 'id' => 1234, 'deleted' => false, @@ -433,7 +433,7 @@ public function test_transforms_collection_to_array_without_keys() : void new EnumEntry('enum', BasicEnum::three) ); - $this->assertEquals( + self::assertEquals( [ 1234, false, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php index 91f93e9b1..a3f196608 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ArrayEntryTest.php @@ -80,7 +80,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new ArrayEntry('0', ['id' => 1]))->name()); + self::assertSame('0', (new ArrayEntry('0', ['id' => 1]))->name()); } /** @@ -88,14 +88,14 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, ArrayEntry $entry, ArrayEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new ArrayEntry('entry-name', ['id' => 1, 'name' => 'one']); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (array $value) => $value) ); @@ -113,8 +113,8 @@ public function test_renames_entry() : void $entry = new ArrayEntry('entry-name', ['id' => 1, 'name' => 'one']); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals(['id' => 1, 'name' => 'one'], $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals(['id' => 1, 'name' => 'one'], $newEntry->value()); } public function test_returns_array_as_value() : void @@ -126,7 +126,7 @@ public function test_returns_array_as_value() : void ]; $entry = new ArrayEntry('items', $items); - $this->assertEquals($items, $entry->value()); + self::assertEquals($items, $entry->value()); } public function test_serialization() : void @@ -137,6 +137,6 @@ public function test_serialization() : void /** @var ArrayEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/BooleanEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/BooleanEntryTest.php index a28f1fbca..a5a98b01f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/BooleanEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/BooleanEntryTest.php @@ -19,7 +19,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new BooleanEntry('0', true))->name()); + self::assertSame('0', (new BooleanEntry('0', true))->name()); } /** @@ -27,14 +27,14 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, BooleanEntry $entry, BooleanEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new BooleanEntry('entry-name', true); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (bool $value) => $value) ); @@ -52,7 +52,7 @@ public function test_renames_entry() : void $entry = new BooleanEntry('entry-name', true); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertTrue($newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertTrue($newEntry->value()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/DateTimeEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/DateTimeEntryTest.php index 6c204bea6..3f0c6038a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/DateTimeEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/DateTimeEntryTest.php @@ -24,7 +24,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new DateTimeEntry('0', new \DateTimeImmutable('2020-07-13 12:00')))->name()); + self::assertSame('0', (new DateTimeEntry('0', new \DateTimeImmutable('2020-07-13 12:00')))->name()); } public function test_invalid_date() : void @@ -40,14 +40,14 @@ public function test_invalid_date() : void */ public function test_is_equal(bool $equals, DateTimeEntry $entry, DateTimeEntry $nextEntry) : void { - $this->assertEquals($equals, $entry->isEqual($nextEntry)); + self::assertEquals($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new DateTimeEntry('entry-name', new \DateTimeImmutable()); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (\DateTimeImmutable $dateTimeImmutable) => $dateTimeImmutable) ); @@ -66,8 +66,8 @@ public function test_renames_entry() : void $entry = new DateTimeEntry('entry-name', new \DateTimeImmutable()); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals($entry->value(), $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals($entry->value(), $newEntry->value()); } public function test_serialization() : void @@ -78,13 +78,13 @@ public function test_serialization() : void /** @var DateTimeEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } public function test_uses_full_date_time() : void { $entry = new DateTimeEntry('entry-name', new \DateTimeImmutable('2020-07-13 12:00')); - $this->assertEquals($entry->value(), new \DateTimeImmutable('2020-07-13 12:00')); + self::assertEquals($entry->value(), new \DateTimeImmutable('2020-07-13 12:00')); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php index 85ff6d777..9827eaf0c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/EnumEntryTest.php @@ -15,11 +15,11 @@ public function test_creating_backed_int_enum_entry() : void { $enum = new EnumEntry('enum', BackedIntEnum::one); - $this->assertSame( + self::assertSame( BackedIntEnum::one, $enum->value(), ); - $this->assertSame( + self::assertSame( 1, $enum->value()->value, ); @@ -29,11 +29,11 @@ public function test_creating_backed_string_enum_entry() : void { $enum = new EnumEntry('enum', BackedStringEnum::one); - $this->assertSame( + self::assertSame( BackedStringEnum::one, $enum->value(), ); - $this->assertSame( + self::assertSame( 'one', $enum->value()->value, ); @@ -43,16 +43,16 @@ public function test_creating_basic_enum_entry() : void { $enum = new EnumEntry('enum', BasicEnum::one); - $this->assertSame( + self::assertSame( BasicEnum::one, $enum->value(), ); - $this->assertSame('enum', $enum->name()); + self::assertSame('enum', $enum->name()); } public function test_definition() : void { - $this->assertEquals( + self::assertEquals( Definition::enum( 'enum', BackedStringEnum::class @@ -63,25 +63,25 @@ public function test_definition() : void public function test_is_equal() : void { - $this->assertTrue( + self::assertTrue( (new EnumEntry('enum', BasicEnum::one))->isEqual(new EnumEntry('enum', BasicEnum::one)), ); - $this->assertFalse( + self::assertFalse( (new EnumEntry('enum', BasicEnum::one))->isEqual(new EnumEntry('enum', BackedStringEnum::one)), ); } public function test_to_string() : void { - $this->assertSame( + self::assertSame( 'one', (new EnumEntry('enum', BasicEnum::one))->toString() ); - $this->assertSame( + self::assertSame( 'one', (new EnumEntry('enum', BackedStringEnum::one))->toString() ); - $this->assertSame( + self::assertSame( 'one', (new EnumEntry('enum', BackedIntEnum::one))->toString() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/FloatEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/FloatEntryTest.php index 20418dce4..a33a8691b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/FloatEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/FloatEntryTest.php @@ -21,7 +21,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new FloatEntry('0', 0))->name()); + self::assertSame('0', (new FloatEntry('0', 0))->name()); } /** @@ -29,14 +29,14 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, FloatEntry $entry, FloatEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new FloatEntry('entry-name', 1); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (float $float) => $float) ); @@ -54,8 +54,8 @@ public function test_renames_entry() : void $entry = new FloatEntry('entry-name', 100.00001); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals(100.00001, $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals(100.00001, $newEntry->value()); } public function test_serialization() : void @@ -66,6 +66,6 @@ public function test_serialization() : void /** @var FloatEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/IntegerEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/IntegerEntryTest.php index a4a3d6f53..2ce1e5ba5 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/IntegerEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/IntegerEntryTest.php @@ -19,7 +19,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new IntegerEntry('0', 0))->name()); + self::assertSame('0', (new IntegerEntry('0', 0))->name()); } /** @@ -27,14 +27,14 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, IntegerEntry $entry, IntegerEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new IntegerEntry('entry-name', 1); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (int $int) => $int) ); @@ -52,8 +52,8 @@ public function test_renames_entry() : void $entry = new IntegerEntry('entry-name', 100); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals(100, $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals(100, $newEntry->value()); } public function test_serialization() : void @@ -64,6 +64,6 @@ public function test_serialization() : void /** @var IntegerEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php index 9558b955b..d274ce902 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonEntryTest.php @@ -84,13 +84,13 @@ public function test_empty_entry() : void $jsonEntry = new JsonEntry('empty', []); $jsonObjectEntry = JsonEntry::object('empty', []); - $this->assertEquals('[]', $jsonEntry->value()); - $this->assertEquals('{}', $jsonObjectEntry->value()); + self::assertEquals('[]', $jsonEntry->value()); + self::assertEquals('{}', $jsonObjectEntry->value()); } public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new JsonEntry('0', [1]))->name()); + self::assertSame('0', (new JsonEntry('0', [1]))->name()); } public function test_invalid_json() : void @@ -106,7 +106,7 @@ public function test_invalid_json() : void */ public function test_is_equal(bool $equals, JsonEntry $entry, JsonEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void @@ -128,7 +128,7 @@ public function test_map() : void return \json_encode($trimValue, JSON_THROW_ON_ERROR); }); - $this->assertEquals( + self::assertEquals( \json_encode( $items = [ ['item-id' => 1, 'name' => 'one', 'address' => ['line1' => 'NO. 47 HENGSHAN ROAD, ECONOMIC TECHNOLOGICAL DEVELOPMENT ZONE, WUHU, ANHUI, 241000, CHINA']], @@ -161,8 +161,8 @@ public function test_renames_entry() : void $entry = new JsonEntry('entry-name', ['id' => 1, 'name' => 'one']); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals($entry->value(), $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals($entry->value(), $newEntry->value()); } public function test_returns_json_as_value() : void @@ -174,7 +174,7 @@ public function test_returns_json_as_value() : void ]; $entry = new JsonEntry('items', $items); - $this->assertEquals(\json_encode($items), $entry->value()); + self::assertEquals(\json_encode($items), $entry->value()); } public function test_serialization() : void @@ -184,7 +184,7 @@ public function test_serialization() : void $serialized = \serialize($entry); $unserialized = \unserialize($serialized); - $this->assertTrue($entry->isEqual($unserialized)); + self::assertTrue($entry->isEqual($unserialized)); } public function test_serialization_of_json_objects() : void @@ -194,6 +194,6 @@ public function test_serialization_of_json_objects() : void $serialized = \serialize($entry); $unserialized = \unserialize($serialized); - $this->assertTrue($entry->isEqual($unserialized)); + self::assertTrue($entry->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php index 20be2d141..c2d1f5a45 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/JsonObjectEntryTest.php @@ -58,7 +58,7 @@ public static function is_equal_data_provider() : \Generator */ public function test_is_equal(bool $equals, JsonEntry $entry, JsonEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void @@ -75,7 +75,7 @@ public function test_map() : void return \json_encode($jsonValue, JSON_THROW_ON_ERROR); }); - $this->assertEquals( + self::assertEquals( \json_encode( ['item-id' => 1, 'name' => 'ONE'] ), @@ -88,8 +88,8 @@ public function test_renames_entry() : void $entry = JsonEntry::object('entry-name', ['id' => 1, 'name' => 'one']); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals($entry->value(), $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals($entry->value(), $newEntry->value()); } public function test_returns_json_as_value() : void @@ -97,6 +97,6 @@ public function test_returns_json_as_value() : void $item = ['item-id' => 1, 'name' => 'one']; $entry = JsonEntry::object('item', $item); - $this->assertEquals(\json_encode($item), $entry->value()); + self::assertEquals(\json_encode($item), $entry->value()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php index 1eb1049c6..e450a144b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ListEntryTest.php @@ -72,7 +72,7 @@ public function test_creating_string_list_from_wrong_value_types() : void public function test_definition() : void { - $this->assertEquals( + self::assertEquals( Definition::list('strings', new ListType(ListElement::string())), list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))->definition() ); @@ -80,15 +80,15 @@ public function test_definition() : void public function test_is_equal() : void { - $this->assertTrue( + self::assertTrue( list_entry('strings', ['one', 'two', 'three'], type_list(type_string())) ->isEqual(list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))) ); - $this->assertFalse( + self::assertFalse( list_entry('strings', ['one', 'two', 'three'], type_list(type_string())) ->isEqual(list_entry('strings', [1, 2, 3], type_list(type_int()))) ); - $this->assertTrue( + self::assertTrue( list_entry('strings', ['two', 'one', 'three'], type_list(type_string())) ->isEqual(list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))) ); @@ -96,7 +96,7 @@ public function test_is_equal() : void public function test_map() : void { - $this->assertEquals( + self::assertEquals( list_entry('strings', ['one, two, three'], type_list(type_string())), list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))->map(fn (array $value) => [\implode(', ', $value)]) ); @@ -104,7 +104,7 @@ public function test_map() : void public function test_rename() : void { - $this->assertEquals( + self::assertEquals( list_entry('new_name', ['one', 'two', 'three'], type_list(type_string())), list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))->rename('new_name') ); @@ -112,7 +112,7 @@ public function test_rename() : void public function test_to_string() : void { - $this->assertEquals( + self::assertEquals( '["one","two","three"]', list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))->toString() ); @@ -120,7 +120,7 @@ public function test_to_string() : void public function test_to_string_date_time() : void { - $this->assertEquals( + self::assertEquals( '[{"date":"2021-01-01 00:00:00.000000","timezone_type":3,"timezone":"UTC"}]', list_entry('strings', [new \DateTimeImmutable('2021-01-01 00:00:00')], type_list(type_datetime()))->toString() ); @@ -128,7 +128,7 @@ public function test_to_string_date_time() : void public function test_type() : void { - $this->assertEquals( + self::assertEquals( new ListType(ListElement::string()), list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))->type() ); @@ -136,7 +136,7 @@ public function test_type() : void public function test_value() : void { - $this->assertEquals( + self::assertEquals( ['one', 'two', 'three'], list_entry('strings', ['one', 'two', 'three'], type_list(type_string()))->value() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php index b6dc8553a..ab2c56abc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/MapEntryTest.php @@ -71,7 +71,7 @@ public function test_creating_string_map_from_wrong_value_types() : void public function test_definition() : void { - $this->assertEquals( + self::assertEquals( Definition::map('strings', new MapType(MapKey::integer(), MapValue::string())), (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))->definition() ); @@ -79,15 +79,15 @@ public function test_definition() : void public function test_is_equal() : void { - $this->assertTrue( + self::assertTrue( (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string()))) ->isEqual((new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))) ); - $this->assertFalse( + self::assertFalse( (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string()))) ->isEqual(new MapEntry('strings', [1, 2, 3], new MapType(MapKey::integer(), MapValue::integer()))) ); - $this->assertTrue( + self::assertTrue( (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string()))) ->isEqual((new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))) ); @@ -95,7 +95,7 @@ public function test_is_equal() : void public function test_map() : void { - $this->assertEquals( + self::assertEquals( (new MapEntry('strings', ['one, two, three'], new MapType(MapKey::integer(), MapValue::string()))), (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))->map(fn (array $value) => [\implode(', ', $value)]) ); @@ -103,7 +103,7 @@ public function test_map() : void public function test_rename() : void { - $this->assertEquals( + self::assertEquals( (new MapEntry('new_name', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string()))), (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))->rename('new_name') ); @@ -111,7 +111,7 @@ public function test_rename() : void public function test_to_string() : void { - $this->assertSame( + self::assertSame( '["one","two","three"]', (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))->toString() ); @@ -119,7 +119,7 @@ public function test_to_string() : void public function test_type() : void { - $this->assertEquals( + self::assertEquals( new MapType(MapKey::integer(), MapValue::string()), (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))->type() ); @@ -127,11 +127,11 @@ public function test_type() : void public function test_value() : void { - $this->assertSame( + self::assertSame( ['one', 'two', 'three'], (new MapEntry('strings', ['one', 'two', 'three'], new MapType(MapKey::integer(), MapValue::string())))->value() ); - $this->assertSame( + self::assertSame( ['one' => 'two'], (new MapEntry('strings', ['one' => 'two'], new MapType(MapKey::string(), MapValue::string())))->value() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/NullEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/NullEntryTest.php index 3d8a8ef29..5e398e093 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/NullEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/NullEntryTest.php @@ -17,7 +17,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new NullEntry('0'))->name()); + self::assertSame('0', (new NullEntry('0'))->name()); } /** @@ -25,7 +25,7 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, NullEntry $entry, NullEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_prevents_from_creating_entry_with_empty_entry_name() : void @@ -40,8 +40,8 @@ public function test_renames_entry() : void $entry = new NullEntry('entry-name'); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertNull($newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertNull($newEntry->value()); } public function test_serialization() : void @@ -52,6 +52,6 @@ public function test_serialization() : void /** @var NullEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ObjectEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ObjectEntryTest.php index 77659de25..91e5ad4cb 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ObjectEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/ObjectEntryTest.php @@ -19,7 +19,7 @@ public static function is_equal_data_provider() : \Generator public function test_entry_name_can_be_zero() : void { - $this->assertSame('0', (new ObjectEntry('0', new \stdClass()))->name()); + self::assertSame('0', (new ObjectEntry('0', new \stdClass()))->name()); } /** @@ -27,14 +27,14 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, ObjectEntry $entry, ObjectEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new ObjectEntry('entry-name', new \stdClass()); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (\stdClass $object) => $object) ); @@ -52,8 +52,8 @@ public function test_renames_entry() : void $entry = new ObjectEntry('entry-name', new \stdClass()); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertIsObject($newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertIsObject($newEntry->value()); } public function test_serialization() : void @@ -64,6 +64,6 @@ public function test_serialization() : void /** @var ObjectEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StringEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StringEntryTest.php index 649b1cd9a..4b459ab58 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StringEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StringEntryTest.php @@ -22,14 +22,14 @@ public function test_creates_lowercase_value() : void { $entry = StringEntry::lowercase('lowercase', 'It Should Be Lowercase'); - $this->assertEquals('it should be lowercase', $entry->value()); + self::assertEquals('it should be lowercase', $entry->value()); } public function test_creates_uppercase_value() : void { $entry = StringEntry::uppercase('uppercase', 'It Should Be Uppercase'); - $this->assertEquals('IT SHOULD BE UPPERCASE', $entry->value()); + self::assertEquals('IT SHOULD BE UPPERCASE', $entry->value()); } /** @@ -37,14 +37,14 @@ public function test_creates_uppercase_value() : void */ public function test_is_equal(bool $equals, StringEntry $entry, StringEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new StringEntry('entry-name', 'any string value'); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (string $value) => $value) ); @@ -62,8 +62,8 @@ public function test_renames_entry() : void $entry = new StringEntry('entry-name', 'any string value'); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals($entry->value(), $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals($entry->value(), $newEntry->value()); } public function test_serialization() : void @@ -77,6 +77,6 @@ public function test_serialization() : void $serialized = \serialize($string); $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php index 22003135a..d5d884828 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/StructureEntryTest.php @@ -133,7 +133,7 @@ public function test_definition() : void ]), ); - $this->assertEquals( + self::assertEquals( Definition::structure( 'items', struct_type([ @@ -154,7 +154,7 @@ public function test_definition() : void public function test_entry_name_can_be_zero() : void { - $this->assertSame( + self::assertSame( '0', ( new StructureEntry( @@ -171,7 +171,7 @@ public function test_entry_name_can_be_zero() : void */ public function test_is_equal(bool $equals, StructureEntry $entry, StructureEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void @@ -182,7 +182,7 @@ public function test_map() : void struct_type([struct_element('id', type_int())]) ); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn (array $entries) => $entries) ); @@ -209,8 +209,8 @@ public function test_renames_entry() : void ); $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals($entry->value(), $newEntry->value()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals($entry->value(), $newEntry->value()); } public function test_returns_array_as_value() : void @@ -221,7 +221,7 @@ public function test_returns_array_as_value() : void struct_type([struct_element('id', type_int()), struct_element('name', type_string())]) ); - $this->assertEquals( + self::assertEquals( [ 'item-id' => 1, 'name' => 'one', @@ -242,6 +242,6 @@ public function test_serialization() : void /** @var StructureEntry $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($string->isEqual($unserialized)); + self::assertTrue($string->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/UuidEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/UuidEntryTest.php index 86b3b9530..44715a32b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/UuidEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/UuidEntryTest.php @@ -45,7 +45,7 @@ public static function valid_string_entries() : \Generator protected function setUp() : void { if (!\class_exists(\Ramsey\Uuid\Uuid::class) && !\class_exists(\Symfony\Component\Uid\Uuid::class)) { - $this->markTestSkipped("Package 'ramsey/uuid' or 'symfony/uid' is required for this test."); + self::markTestSkipped("Package 'ramsey/uuid' or 'symfony/uid' is required for this test."); } } @@ -56,7 +56,7 @@ public function test_creates_uuid_entry_from_string(string $value) : void { $entry = UuidEntry::from('entry-name', $value); - $this->assertEquals($value, $entry->value()->toString()); + self::assertEquals($value, $entry->value()->toString()); } /** @@ -64,14 +64,14 @@ public function test_creates_uuid_entry_from_string(string $value) : void */ public function test_is_equal(bool $equals, UuidEntry $entry, UuidEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_map() : void { $entry = new UuidEntry('entry-name', Uuid::fromString('00000000-0000-0000-0000-000000000000')); - $this->assertEquals( + self::assertEquals( $entry, $entry->map(fn ($value) => $value) ); @@ -97,7 +97,7 @@ public function test_renames_entry() : void /** @var UuidEntry $newEntry */ $newEntry = $entry->rename('new-entry-name'); - $this->assertEquals('new-entry-name', $newEntry->name()); - $this->assertEquals($uuid->toString(), $newEntry->value()->toString()); + self::assertEquals('new-entry-name', $newEntry->name()); + self::assertEquals($uuid->toString(), $newEntry->value()->toString()); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLEntryTest.php index ec1392f1c..1f46ef073 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLEntryTest.php @@ -94,7 +94,7 @@ public function test_canonicalization() : void XML); - $this->assertNotEquals( + self::assertNotEquals( xml_entry('row', $doc), xml_entry('row', $doc2), ); @@ -112,8 +112,8 @@ public function test_creating_entry_from_valid_xml_string() : void { $entry = new XMLEntry('name', '123'); - $this->assertSame('name', $entry->name()); - $this->assertSame("\n123\n", $entry->__toString()); + self::assertSame('name', $entry->name()); + self::assertSame("\n123\n", $entry->__toString()); } public function test_creating_xml_entry_with_empty_dom_document() : void @@ -121,9 +121,9 @@ public function test_creating_xml_entry_with_empty_dom_document() : void $doc = new \DOMDocument(); $entry = new XMLEntry('name', $doc); - $this->assertSame('name', $entry->name()); - $this->assertSame($doc, $entry->value()); - $this->assertSame("\n", $entry->__toString()); + self::assertSame('name', $entry->name()); + self::assertSame($doc, $entry->value()); + self::assertSame("\n", $entry->__toString()); } /** @@ -131,7 +131,7 @@ public function test_creating_xml_entry_with_empty_dom_document() : void */ public function test_is_equal(bool $equals, XMLEntry $entry, XMLEntry $nextEntry) : void { - $this->assertSame($equals, $entry->isEqual($nextEntry)); + self::assertSame($equals, $entry->isEqual($nextEntry)); } public function test_serialization() : void @@ -154,6 +154,6 @@ public function test_serialization() : void $serialized = \serialize($entry); $unserialized = \unserialize($serialized); - $this->assertTrue($entry->isEqual($unserialized)); + self::assertTrue($entry->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLNodeEntryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLNodeEntryTest.php index 99929b3d6..79c767637 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLNodeEntryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Entry/XMLNodeEntryTest.php @@ -18,6 +18,6 @@ public function test_serialization() : void $serialized = \serialize($entry); $unserialized = \unserialize($serialized); - $this->assertTrue($entry->isEqual($unserialized)); + self::assertTrue($entry->isEqual($unserialized)); } } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php index d3b11feb4..ef8fe3ab0 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/EntryReferenceTest.php @@ -14,7 +14,7 @@ public function test_executing_equals_expression() : void { $ref = ref('a')->equals(ref('b')); - $this->assertTrue( + self::assertTrue( $ref->eval(Row::create(int_entry('a', 1), int_entry('b', 1))) ); } @@ -23,7 +23,7 @@ public function test_executing_expression() : void { $ref = ref('b')->literal(100); - $this->assertSame( + self::assertSame( 100, $ref->eval(Row::create(int_entry('a', 1))) ); @@ -33,11 +33,11 @@ public function test_is_even() : void { $ref = ref('a')->isEven(); - $this->assertFalse( + self::assertFalse( $ref->eval(Row::create(int_entry('a', 1))) ); - $this->assertTrue( + self::assertTrue( $ref->eval(Row::create(int_entry('a', 2))) ); } @@ -46,11 +46,11 @@ public function test_is_odd() : void { $ref = ref('a')->isOdd(); - $this->assertTrue( + self::assertTrue( $ref->eval(Row::create(int_entry('a', 1))) ); - $this->assertFalse( + self::assertFalse( $ref->eval(Row::create(int_entry('a', 2))) ); } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php index 11e7bbd61..476a95a1f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Factory/NativeEntryFactoryTest.php @@ -48,7 +48,7 @@ public static function provide_unrecognized_data() : \Generator public function test_array_structure() : void { - $this->assertEquals( + self::assertEquals( new StructureEntry( 'e', ['a' => 1, 'b' => '2'], @@ -60,7 +60,7 @@ public function test_array_structure() : void public function test_array_with_schema() : void { - $this->assertEquals( + self::assertEquals( array_entry('e', [1, 2, 3]), (new NativeEntryFactory()) ->create('e', [1, 2, 3], new Schema(Schema\Definition::array('e'))) @@ -69,7 +69,7 @@ public function test_array_with_schema() : void public function test_bool() : void { - $this->assertEquals( + self::assertEquals( bool_entry('e', false), (new NativeEntryFactory())->create('e', false) ); @@ -77,7 +77,7 @@ public function test_bool() : void public function test_boolean_with_schema() : void { - $this->assertEquals( + self::assertEquals( bool_entry('e', false), (new NativeEntryFactory())->create('e', false, new Schema(Schema\Definition::boolean('e'))) ); @@ -85,7 +85,7 @@ public function test_boolean_with_schema() : void public function test_datetime() : void { - $this->assertEquals( + self::assertEquals( datetime_entry('e', $now = new \DateTimeImmutable()), (new NativeEntryFactory())->create('e', $now) ); @@ -93,7 +93,7 @@ public function test_datetime() : void public function test_datetime_string_with_schema() : void { - $this->assertEquals( + self::assertEquals( datetime_entry('e', '2022-01-01 00:00:00 UTC'), (new NativeEntryFactory()) ->create('e', '2022-01-01 00:00:00 UTC', new Schema(Schema\Definition::dateTime('e'))) @@ -102,7 +102,7 @@ public function test_datetime_string_with_schema() : void public function test_datetime_with_schema() : void { - $this->assertEquals( + self::assertEquals( datetime_entry('e', $datetime = new \DateTimeImmutable('now')), (new NativeEntryFactory()) ->create('e', $datetime, new Schema(Schema\Definition::dateTime('e'))) @@ -111,7 +111,7 @@ public function test_datetime_with_schema() : void public function test_enum() : void { - $this->assertEquals( + self::assertEquals( enum_entry('e', $enum = BackedIntEnum::one), (new NativeEntryFactory()) ->create('e', $enum) @@ -120,7 +120,7 @@ enum_entry('e', $enum = BackedIntEnum::one), public function test_enum_from_string_with_schema() : void { - $this->assertEquals( + self::assertEquals( enum_entry('e', BackedIntEnum::one), (new NativeEntryFactory()) ->create('e', 1, new Schema(Schema\Definition::enum('e', BackedIntEnum::class))) @@ -138,7 +138,7 @@ public function test_enum_invalid_value_with_schema() : void public function test_float() : void { - $this->assertEquals( + self::assertEquals( float_entry('e', 1.1), (new NativeEntryFactory())->create('e', 1.1) ); @@ -146,7 +146,7 @@ public function test_float() : void public function test_float_with_schema() : void { - $this->assertEquals( + self::assertEquals( float_entry('e', 1.1), (new NativeEntryFactory())->create('e', 1.1, new Schema(Schema\Definition::float('e'))) ); @@ -154,7 +154,7 @@ public function test_float_with_schema() : void public function test_from_empty_string() : void { - $this->assertEquals( + self::assertEquals( str_entry('e', ''), (new NativeEntryFactory())->create('e', '') ); @@ -162,7 +162,7 @@ public function test_from_empty_string() : void public function test_int() : void { - $this->assertEquals( + self::assertEquals( int_entry('e', 1), (new NativeEntryFactory())->create('e', 1) ); @@ -170,7 +170,7 @@ public function test_int() : void public function test_integer_with_schema() : void { - $this->assertEquals( + self::assertEquals( int_entry('e', 1), (new NativeEntryFactory())->create('e', 1, new Schema(Schema\Definition::integer('e'))) ); @@ -178,7 +178,7 @@ public function test_integer_with_schema() : void public function test_json() : void { - $this->assertEquals( + self::assertEquals( json_object_entry('e', ['id' => 1]), (new NativeEntryFactory())->create('e', '{"id":1}') ); @@ -186,7 +186,7 @@ public function test_json() : void public function test_json_object_array_with_schema() : void { - $this->assertEquals( + self::assertEquals( json_object_entry('e', ['id' => 1]), (new NativeEntryFactory())->create('e', ['id' => 1], new Schema(Schema\Definition::json('e'))) ); @@ -194,7 +194,7 @@ public function test_json_object_array_with_schema() : void public function test_json_string() : void { - $this->assertEquals( + self::assertEquals( json_entry('e', '{"id": 1}'), (new NativeEntryFactory())->create('e', '{"id": 1}') ); @@ -202,7 +202,7 @@ public function test_json_string() : void public function test_json_string_with_schema() : void { - $this->assertEquals( + self::assertEquals( json_entry('e', '{"id": 1}'), (new NativeEntryFactory())->create('e', '{"id": 1}', new Schema(Schema\Definition::json('e'))) ); @@ -210,7 +210,7 @@ public function test_json_string_with_schema() : void public function test_json_with_schema() : void { - $this->assertEquals( + self::assertEquals( json_entry('e', [['id' => 1]]), (new NativeEntryFactory())->create('e', [['id' => 1]], new Schema(Schema\Definition::json('e'))) ); @@ -218,7 +218,7 @@ public function test_json_with_schema() : void public function test_list_int_with_schema() : void { - $this->assertEquals( + self::assertEquals( list_entry('e', [1, 2, 3], type_list(type_int())), (new NativeEntryFactory())->create('e', [1, 2, 3], new Schema(Schema\Definition::list('e', new ListType(ListElement::integer())))) ); @@ -226,7 +226,7 @@ public function test_list_int_with_schema() : void public function test_list_int_with_schema_but_string_list() : void { - $this->assertEquals( + self::assertEquals( list_entry('e', ['false', 'true', 'true'], type_list(type_string())), (new NativeEntryFactory())->create('e', [false, true, true], new Schema(Schema\Definition::list('e', new ListType(ListElement::string())))) ); @@ -234,7 +234,7 @@ public function test_list_int_with_schema_but_string_list() : void public function test_list_of_datetime_with_schema() : void { - $this->assertEquals( + self::assertEquals( list_entry('e', $list = [new \DateTimeImmutable('now'), new \DateTimeImmutable('tomorrow')], type_list(type_datetime())), (new NativeEntryFactory()) ->create('e', $list, new Schema(Schema\Definition::list('e', new ListType(ListElement::datetime())))) @@ -243,7 +243,7 @@ public function test_list_of_datetime_with_schema() : void public function test_list_of_datetimes() : void { - $this->assertEquals( + self::assertEquals( list_entry('e', $list = [new \DateTimeImmutable(), new \DateTimeImmutable()], type_list(type_datetime())), (new NativeEntryFactory())->create('e', $list) ); @@ -251,7 +251,7 @@ public function test_list_of_datetimes() : void public function test_list_of_scalars() : void { - $this->assertEquals( + self::assertEquals( list_entry('e', [1, 2], type_list(type_int())), (new NativeEntryFactory())->create('e', [1, 2]) ); @@ -259,7 +259,7 @@ public function test_list_of_scalars() : void public function test_nested_structure() : void { - $this->assertEquals( + self::assertEquals( new StructureEntry( 'address', [ @@ -298,7 +298,7 @@ public function test_nested_structure() : void public function test_null() : void { - $this->assertEquals( + self::assertEquals( null_entry('e'), (new NativeEntryFactory())->create('e', null) ); @@ -306,12 +306,12 @@ public function test_null() : void public function test_null_with_schema() : void { - $this->assertEquals( + self::assertEquals( null_entry('e'), (new NativeEntryFactory())->create('e', null, new Schema(Schema\Definition::null('e'))) ); - $this->assertEquals( + self::assertEquals( null_entry('e'), (new NativeEntryFactory())->create('e', null, new Schema(Schema\Definition::string('e', true))) ); @@ -319,7 +319,7 @@ public function test_null_with_schema() : void public function test_object() : void { - $this->assertEquals( + self::assertEquals( object_entry('e', $object = new \ArrayIterator([1, 2])), (new NativeEntryFactory())->create('e', $object) ); @@ -327,7 +327,7 @@ public function test_object() : void public function test_object_with_schema() : void { - $this->assertEquals( + self::assertEquals( object_entry('e', $object = new \ArrayObject([1, 2, 3])), (new NativeEntryFactory()) ->create('e', $object, new Schema(Schema\Definition::object('e', type_object($object::class)))) @@ -336,7 +336,7 @@ public function test_object_with_schema() : void public function test_string() : void { - $this->assertEquals( + self::assertEquals( str_entry('e', 'test'), (new NativeEntryFactory())->create('e', 'test') ); @@ -344,7 +344,7 @@ public function test_string() : void public function test_string_with_schema() : void { - $this->assertEquals( + self::assertEquals( str_entry('e', 'string'), (new NativeEntryFactory())->create('e', 'string', new Schema(Schema\Definition::string('e'))) ); @@ -352,7 +352,7 @@ public function test_string_with_schema() : void public function test_structure() : void { - $this->assertEquals( + self::assertEquals( new StructureEntry( 'address', ['id' => 1, 'city' => 'Krakow', 'street' => 'Floriańska', 'zip' => '31-021'], @@ -370,7 +370,7 @@ public function test_structure() : void #[DataProvider('provide_unrecognized_data')] public function test_unrecognized_data_set_same_as_provided(string $input) : void { - $this->assertEquals( + self::assertEquals( str_entry('e', $input), (new NativeEntryFactory())->create('e', $input) ); @@ -379,10 +379,10 @@ public function test_unrecognized_data_set_same_as_provided(string $input) : voi public function test_uuid_from_ramsey_uuid_library() : void { if (!\class_exists(Uuid::class)) { - $this->markTestSkipped("Package 'ramsey/uuid' is required for this test."); + self::markTestSkipped("Package 'ramsey/uuid' is required for this test."); } - $this->assertEquals( + self::assertEquals( uuid_entry('e', $uuid = Uuid::uuid4()->toString()), (new NativeEntryFactory())->create('e', $uuid) ); @@ -390,7 +390,7 @@ public function test_uuid_from_ramsey_uuid_library() : void public function test_uuid_from_string() : void { - $this->assertEquals( + self::assertEquals( uuid_entry('e', $uuid = '00000000-0000-0000-0000-000000000000'), (new NativeEntryFactory())->create('e', $uuid) ); @@ -398,7 +398,7 @@ public function test_uuid_from_string() : void public function test_uuid_string_with_uuid_definition_provided() : void { - $this->assertEquals( + self::assertEquals( uuid_entry('e', $uuid = '00000000-0000-0000-0000-000000000000'), (new NativeEntryFactory())->create('e', $uuid, new Schema(Schema\Definition::uuid('e'))) ); @@ -424,7 +424,7 @@ public function test_xml_from_dom_document() : void { $doc = new \DOMDocument(); $doc->loadXML($xml = '123'); - $this->assertEquals( + self::assertEquals( xml_entry('e', $xml), (new NativeEntryFactory())->create('e', $doc) ); @@ -432,7 +432,7 @@ public function test_xml_from_dom_document() : void public function test_xml_from_string() : void { - $this->assertEquals( + self::assertEquals( xml_entry('e', $xml = '123'), (new NativeEntryFactory())->create('e', $xml) ); @@ -440,7 +440,7 @@ public function test_xml_from_string() : void public function test_xml_string_with_xml_definition_provided() : void { - $this->assertEquals( + self::assertEquals( xml_entry('e', $xml = '123'), (new NativeEntryFactory())->create('e', $xml, new Schema(Schema\Definition::xml('e'))) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php index b7b0869fd..ff04f6197 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/ReferencesTest.php @@ -14,7 +14,7 @@ public function test_lazy_without() : void { $refs = refs()->without('id')->add('id')->add('name'); - $this->assertEquals( + self::assertEquals( refs('name')->all(), $refs->all() ); @@ -24,21 +24,21 @@ public function test_that_reference_with_alias_exists() : void { $refs = new References(ref('id')->as('test'), ref('name')); - $this->assertFalse($refs->has(ref('id'))); - $this->assertTrue($refs->has(ref('test'))); + self::assertFalse($refs->has(ref('id'))); + self::assertTrue($refs->has(ref('test'))); } public function test_that_reference_without_alias_exists() : void { $refs = new References(ref('id'), ref('name')); - $this->assertTrue($refs->has(ref('id'))); - $this->assertFalse($refs->has(ref('test'))); + self::assertTrue($refs->has(ref('id'))); + self::assertFalse($refs->has(ref('test'))); } public function test_without() : void { - $this->assertEquals( + self::assertEquals( refs('name')->all(), refs('id', 'name')->without('id')->all() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php index e99e58d72..17b8bf9fc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/DefinitionTest.php @@ -25,7 +25,7 @@ public function test_equals_types() : void { $def = Definition::list('list', new ListType(ListElement::integer())); - $this->assertTrue( + self::assertTrue( $def->isEqual( Definition::list('list', new ListType(ListElement::integer())) ) @@ -36,19 +36,19 @@ public function test_matches_when_nullable_and_name_matches() : void { $def = Definition::integer('test', $nullable = true); - $this->assertTrue($def->matches(null_entry('test'))); + self::assertTrue($def->matches(null_entry('test'))); } public function test_matches_when_type_and_name_match() : void { $def = Definition::integer('test'); - $this->assertTrue($def->matches(int_entry('test', 1))); + self::assertTrue($def->matches(int_entry('test', 1))); } public function test_merge_definitions() : void { - $this->assertEquals( + self::assertEquals( Definition::integer('id', true), Definition::integer('id')->merge(Definition::integer('id', true)) ); @@ -56,19 +56,19 @@ public function test_merge_definitions() : void public function test_merging_anything_and_string() : void { - $this->assertEquals( + self::assertEquals( Definition::string('id', true), Definition::integer('id', false)->merge(Definition::string('id', true)) ); - $this->assertEquals( + self::assertEquals( Definition::string('id', true), Definition::float('id', false)->merge(Definition::string('id', true)) ); - $this->assertEquals( + self::assertEquals( Definition::string('id', true), Definition::boolean('id', false)->merge(Definition::string('id', true)) ); - $this->assertEquals( + self::assertEquals( Definition::string('id', true), Definition::dateTime('id', false)->merge(Definition::string('id', true)) ); @@ -76,19 +76,19 @@ public function test_merging_anything_and_string() : void public function test_merging_anything_with_null() : void { - $this->assertEquals( + self::assertEquals( Definition::string('id', true), Definition::string('id', false)->merge(Definition::null('id')) ); - $this->assertEquals( + self::assertEquals( Definition::dateTime('datetime', true), Definition::dateTime('datetime', false)->merge(Definition::null('datetime')) ); - $this->assertEquals( + self::assertEquals( Definition::integer('id', true), Definition::integer('id', false)->merge(Definition::null('id')) ); - $this->assertEquals( + self::assertEquals( Definition::float('id', true), Definition::float('id', false)->merge(Definition::null('id')) ); @@ -104,7 +104,7 @@ public function test_merging_different_entries() : void public function test_merging_list_of_ints_and_floats() : void { - $this->assertEquals( + self::assertEquals( Definition::list('list', type_list(type_float())), Definition::list('list', type_list(type_int()))->merge(Definition::list('list', type_list(type_float()))) ); @@ -112,11 +112,11 @@ public function test_merging_list_of_ints_and_floats() : void public function test_merging_numeric_types() : void { - $this->assertEquals( + self::assertEquals( Definition::float('id', true), Definition::integer('id', false)->merge(Definition::float('id', true)) ); - $this->assertEquals( + self::assertEquals( Definition::float('id', true), Definition::float('id', false)->merge(Definition::integer('id', true)) ); @@ -124,7 +124,7 @@ public function test_merging_numeric_types() : void public function test_merging_two_different_lists() : void { - $this->assertEquals( + self::assertEquals( Definition::array('list'), Definition::list('list', type_list(type_string()))->merge(Definition::list('list', type_list(type_int()))) ); @@ -132,7 +132,7 @@ public function test_merging_two_different_lists() : void public function test_merging_two_different_maps() : void { - $this->assertEquals( + self::assertEquals( Definition::array('map'), Definition::map('map', type_map(type_string(), type_string()))->merge(Definition::map('map', type_map(type_string(), type_int()))) ); @@ -140,7 +140,7 @@ public function test_merging_two_different_maps() : void public function test_merging_two_different_structures() : void { - $this->assertEquals( + self::assertEquals( Definition::array('structure'), Definition::structure( 'structure', @@ -162,7 +162,7 @@ public function test_merging_two_different_structures() : void public function test_merging_two_same_lists() : void { - $this->assertEquals( + self::assertEquals( Definition::list('list', type_list(type_int())), Definition::list('list', type_list(type_int()))->merge(Definition::list('list', type_list(type_int()))) ); @@ -170,7 +170,7 @@ public function test_merging_two_same_lists() : void public function test_merging_two_same_maps() : void { - $this->assertEquals( + self::assertEquals( Definition::map('map', type_map(type_string(), type_string())), Definition::map('map', type_map(type_string(), type_string()))->merge(Definition::map('map', type_map(type_string(), type_string()))) ); @@ -195,7 +195,7 @@ public function test_normalize_and_from_array() : void Metadata::with('description', 'some_random_description')->add('priority', 1) ); - $this->assertEquals( + self::assertEquals( $definition, Definition::fromArray($definition->normalize()) ); @@ -205,21 +205,21 @@ public function test_not_matches_when_not_nullable_name_matches_but_null_given() { $def = Definition::integer('test', $nullable = false); - $this->assertFalse($def->matches(null_entry('test'))); + self::assertFalse($def->matches(null_entry('test'))); } public function test_not_matches_when_type_does_not_match() : void { $def = Definition::integer('test'); - $this->assertFalse($def->matches(str_entry('test', 'test'))); + self::assertFalse($def->matches(str_entry('test', 'test'))); } public function test_not_matches_when_type_name_not_match() : void { $def = Definition::integer('test'); - $this->assertFalse($def->matches(int_entry('not-test', 1))); + self::assertFalse($def->matches(int_entry('not-test', 1))); } public function test_structure_definition_metadata() : void @@ -244,7 +244,7 @@ public function test_structure_definition_metadata() : void ]), ); - $this->assertEquals( + self::assertEquals( new StructureType([ struct_element('street', type_string()), struct_element('city', type_string()), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php index 2aea7d9b4..e4dafac1e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/Formatter/ASCIISchemaFormatterTest.php @@ -46,7 +46,7 @@ public function test_format_nested_schema() : void Schema\Definition::dateTime('datetime'), ); - $this->assertSame( + self::assertSame( <<<'SCHEMA' schema |-- integer: ?integer @@ -84,7 +84,7 @@ public function test_format_schema() : void Schema\Definition::list('list', new ListType(ListElement::map(new MapType(MapKey::string(), MapValue::integer())))) ); - $this->assertSame( + self::assertSame( <<<'SCHEMA' schema |-- name: ?string diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/MetadataTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/MetadataTest.php index 73773d1f1..48c57e1c3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/MetadataTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/MetadataTest.php @@ -12,8 +12,8 @@ final class MetadataTest extends TestCase { public function test_equal_metadata() : void { - $this->assertTrue(Metadata::empty()->add('array', [1, 2, 3])->isEqual(Metadata::empty()->add('array', [1, 2, 3]))); - $this->assertFalse(Metadata::empty()->add('array', [1, 2, 3])->isEqual(Metadata::empty()->add('array', [2, 3]))); + self::assertTrue(Metadata::empty()->add('array', [1, 2, 3])->isEqual(Metadata::empty()->add('array', [1, 2, 3]))); + self::assertFalse(Metadata::empty()->add('array', [1, 2, 3])->isEqual(Metadata::empty()->add('array', [2, 3]))); } public function test_get_non_existing_key() : void @@ -26,7 +26,7 @@ public function test_get_non_existing_key() : void public function test_merge_metadata() : void { - $this->assertEquals( + self::assertEquals( Metadata::empty()->add('id', 1)->add('name', 'test'), Metadata::empty()->add('id', 1)->merge(Metadata::empty()->add('name', 'test')) ); @@ -34,7 +34,7 @@ public function test_merge_metadata() : void public function test_merge_metadata_with_the_same_keys() : void { - $this->assertEquals( + self::assertEquals( Metadata::empty()->add('id', 2), Metadata::empty()->add('id', 1)->merge(Metadata::empty()->add('id', 2)) ); @@ -42,7 +42,7 @@ public function test_merge_metadata_with_the_same_keys() : void public function test_remove_metadata_with_the_same_keys() : void { - $this->assertEquals( + self::assertEquals( Metadata::empty()->add('name', 'test'), Metadata::empty()->add('id', 1)->add('name', 'test')->remove('id') ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php index 3420ba67c..e9921db8f 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/SelectiveValidatorTest.php @@ -19,7 +19,7 @@ public function test_rows_with_a_missing_entry() : void Schema\Definition::string('name'), ); - $this->assertFalse( + self::assertFalse( (new SelectiveValidator())->isValid( new Rows(Row::create(int_entry('id', 1), bool_entry('active', true))), $schema @@ -34,7 +34,7 @@ public function test_rows_with_an_extra_entry() : void Schema\Definition::string('name'), ); - $this->assertTrue( + self::assertTrue( (new SelectiveValidator())->isValid( new Rows(Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true))), $schema @@ -50,7 +50,7 @@ public function test_rows_with_single_invalid_entry() : void Schema\Definition::boolean('active'), ); - $this->assertFalse( + self::assertFalse( (new SelectiveValidator())->isValid( new Rows(Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true))), $schema @@ -65,7 +65,7 @@ public function test_rows_with_single_invalid_row() : void Schema\Definition::boolean('active'), ); - $this->assertFalse( + self::assertFalse( (new SelectiveValidator())->isValid( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php index 9f74a439d..034cb9335 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/Schema/StrictValidatorTest.php @@ -19,7 +19,7 @@ public function test_rows_with_a_missing_entry() : void Schema\Definition::string('name'), ); - $this->assertFalse( + self::assertFalse( (new StrictValidator())->isValid( new Rows(Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true))), $schema @@ -35,7 +35,7 @@ public function test_rows_with_all_entries_valid() : void Schema\Definition::boolean('active'), ); - $this->assertTrue( + self::assertTrue( (new StrictValidator())->isValid( new Rows(Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true))), $schema @@ -52,7 +52,7 @@ public function test_rows_with_an_extra_entry() : void Schema\Definition::array('tags'), ); - $this->assertFalse( + self::assertFalse( (new StrictValidator())->isValid( new Rows(Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true))), $schema @@ -68,7 +68,7 @@ public function test_rows_with_single_invalid_entry() : void Schema\Definition::boolean('active'), ); - $this->assertFalse( + self::assertFalse( (new StrictValidator())->isValid( new Rows(Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true))), $schema @@ -84,7 +84,7 @@ public function test_rows_with_single_invalid_row() : void Schema\Definition::boolean('active'), ); - $this->assertFalse( + self::assertFalse( (new StrictValidator())->isValid( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'test'), bool_entry('active', true)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php index 679824404..7c024e197 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Row/SchemaTest.php @@ -27,7 +27,7 @@ public function test_adding_new_definitions() : void str_schema('str', true), )->add(int_schema('number'), bool_schema('bool')); - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), str_schema('str', true), @@ -55,7 +55,7 @@ public function test_allowing_only_unique_definitions_case_insensitive() : void Schema\Definition::integer('Id') ); - $this->assertEquals([EntryReference::init('id'), EntryReference::init('Id')], $schema->entries()); + self::assertEquals([EntryReference::init('id'), EntryReference::init('Id')], $schema->entries()); } public function test_creating_schema_from_corrupted_json() : void @@ -85,7 +85,7 @@ public function test_creating_schema_from_invalid_json_format_at_definition_leve public function test_graceful_remove_non_existing_definition() : void { - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), str_schema('name'), @@ -118,7 +118,7 @@ public function test_keep_selected_entries() : void str_schema('email'), ); - $this->assertEquals( + self::assertEquals( schema( str_schema('name'), str_schema('surname'), @@ -134,7 +134,7 @@ public function test_making_whole_schema_nullable() : void Schema\Definition::string('name', $nullable = true) ); - $this->assertEquals( + self::assertEquals( new Schema( Schema\Definition::integer('id', $nullable = true), Schema\Definition::string('name', $nullable = true) @@ -152,7 +152,7 @@ public function test_merge_int_empty_schema() : void ) ); - $this->assertSame( + self::assertSame( $notEmptySchema, $schema ); @@ -169,7 +169,7 @@ public function test_merge_schema() : void ) ); - $this->assertEquals( + self::assertEquals( new Schema( Schema\Definition::integer('id', $nullable = true), Schema\Definition::string('name', $nullable = true), @@ -188,7 +188,7 @@ public function test_merge_with_empty_schema() : void new Schema() ); - $this->assertEquals( + self::assertEquals( $notEmptySchema, $schema ); @@ -209,7 +209,7 @@ public function test_normalizing_and_recreating_schema() : void ])) ); - $this->assertEquals( + self::assertEquals( $schema, Schema::fromArray($schema->normalize()) ); @@ -227,7 +227,7 @@ public function test_remove_non_existing_definition() : void public function test_removing_elements_from_schema() : void { - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), ), @@ -245,7 +245,7 @@ public function test_rename() : void str_schema('name'), ); - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), str_schema('new_name'), @@ -281,7 +281,7 @@ public function test_replace_reference() : void str_schema('str', true), )->replace('str', int_schema('number')); - $this->assertEquals( + self::assertEquals( schema( int_schema('id'), int_schema('number'), @@ -305,7 +305,7 @@ public function test_schema_to_from_json() : void ])) ); - $this->assertSame( + self::assertSame( <<<'JSON' [ { @@ -410,7 +410,7 @@ public function test_schema_to_from_json() : void \json_encode($schema->normalize(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT) ); - $this->assertEquals( + self::assertEquals( $schema, schema_from_json(schema_to_json($schema)) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php index c80198482..59a838bdc 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowTest.php @@ -106,7 +106,7 @@ public function test_getting_schema_from_row() : void object_entry('object', new \ArrayIterator([1, 2, 3])) ); - $this->assertEquals( + self::assertEquals( new Schema( Definition::integer('id'), Definition::float('price'), @@ -141,7 +141,7 @@ public function test_hash() : void list_entry('list', [1, 2, 3], type_list(type_int())) ); - $this->assertSame( + self::assertSame( $row->hash(), row( int_entry('id', 1), @@ -154,7 +154,7 @@ public function test_hash() : void public function test_hash_different_rows() : void { - $this->assertNotSame( + self::assertNotSame( row(list_entry('list', [1, 2, 3], type_list(type_int())))->hash(), row(list_entry('list', [3, 2, 1], type_list(type_int())))->hash() ); @@ -162,7 +162,7 @@ public function test_hash_different_rows() : void public function test_hash_empty_row() : void { - $this->assertSame( + self::assertSame( row()->hash(), row()->hash() ); @@ -173,7 +173,7 @@ public function test_hash_empty_row() : void */ public function test_is_equal(bool $equals, \Flow\ETL\Row $row, \Flow\ETL\Row $nextRow) : void { - $this->assertSame($equals, $row->isEqual($nextRow)); + self::assertSame($equals, $row->isEqual($nextRow)); } public function test_keep() : void @@ -184,7 +184,7 @@ public function test_keep() : void bool_entry('active', true) ); - $this->assertEquals( + self::assertEquals( row( int_entry('id', 1), bool_entry('active', true) @@ -203,7 +203,7 @@ public function test_keep_non_existing_entry() : void bool_entry('active', true) ); - $this->assertEquals( + self::assertEquals( row(), $row->keep('something') ); @@ -211,7 +211,7 @@ public function test_keep_non_existing_entry() : void public function test_merge_row_with_another_row_using_prefix() : void { - $this->assertSame( + self::assertSame( [ 'id' => 1, '_id' => 2, @@ -230,7 +230,7 @@ public function test_remove() : void bool_entry('active', true) ); - $this->assertEquals( + self::assertEquals( row( int_entry('id', 1), str_entry('name', 'test') @@ -247,7 +247,7 @@ public function test_remove_non_existing_entry() : void bool_entry('active', true) ); - $this->assertEquals( + self::assertEquals( row( int_entry('id', 1), str_entry('name', 'test'), @@ -265,7 +265,7 @@ public function test_renames_entry() : void ); $newRow = $row->rename('name', 'new-name'); - $this->assertEquals( + self::assertEquals( row( new BooleanEntry('active', true), new StringEntry('new-name', 'just a string') @@ -293,7 +293,7 @@ public function test_transforms_row_to_array() : void ) ); - $this->assertEquals( + self::assertEquals( [ 'id' => 1234, 'deleted' => false, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php index f96032afb..dd67604d3 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsJoinTest.php @@ -28,7 +28,7 @@ public function test_cross_join() : void ), ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), int_entry('num', 1), bool_entry('active', true)), Row::create(int_entry('id', 1), str_entry('country', 'PL'), int_entry('num', 2), bool_entry('active', false)), @@ -56,7 +56,7 @@ public function test_cross_join_empty() : void new Rows(), ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL')), Row::create(int_entry('id', 2), str_entry('country', 'PL')), @@ -80,7 +80,7 @@ public function test_cross_join_left_empty() : void ), ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL')), Row::create(int_entry('id', 2), str_entry('country', 'PL')), @@ -125,7 +125,7 @@ public function test_cross_join_left_with_name_conflict_with_prefix() : void '_' ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), bool_entry('active', false), bool_entry('_active', true)), Row::create(int_entry('id', 2), str_entry('country', 'PL'), bool_entry('active', false), bool_entry('_active', true)), @@ -150,7 +150,7 @@ public function test_inner_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows(), $joined ); @@ -174,7 +174,7 @@ public function test_inner_join() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), str_entry('name', 'Poland')), Row::create(int_entry('id', 2), str_entry('country', 'PL'), str_entry('name', 'Poland')), @@ -197,7 +197,7 @@ public function test_inner_join_into_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows(), $joined ); @@ -241,7 +241,7 @@ public function test_left_anti_join() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL')), ), @@ -262,7 +262,7 @@ public function test_left_anti_join_on_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( $left, $joined ); @@ -285,7 +285,7 @@ public function test_left_join() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), str_entry('name', 'Poland')), Row::create(int_entry('id', 2), str_entry('country', 'US'), str_entry('name', 'United States')), @@ -308,7 +308,7 @@ public function test_left_join_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL')), Row::create(int_entry('id', 2), str_entry('country', 'US')), @@ -331,7 +331,7 @@ public function test_left_join_to_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows(), $joined ); @@ -376,7 +376,7 @@ public function test_right_join() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('code', 'PL'), str_entry('name', 'Poland'), int_entry('id', 1)), Row::create(str_entry('code', 'PL'), str_entry('name', 'Poland'), int_entry('id', 2)), @@ -401,7 +401,7 @@ public function test_right_join_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows(), $joined ); @@ -420,7 +420,7 @@ public function test_right_join_to_empty() : void Expression::on(['country' => 'code']) ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('code', 'PL'), str_entry('name', 'Poland')), Row::create(str_entry('code', 'US'), str_entry('name', 'United States')), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php index 87576c2c4..8f876872a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/RowsTest.php @@ -110,7 +110,7 @@ public function test_adding_multiple_rows() : void $two = row(int_entry('number', 2), new StringEntry('name', 'two')); $rows = (rows())->add($one, $two); - $this->assertEquals(rows($one, $two), $rows); + self::assertEquals(rows($one, $two), $rows); } public function test_array_access_exists() : void @@ -121,8 +121,8 @@ public function test_array_access_exists() : void row(int_entry('id', 3)), ); - $this->assertTrue(isset($rows[0])); - $this->assertFalse(isset($rows[3])); + self::assertTrue(isset($rows[0])); + self::assertFalse(isset($rows[3])); } public function test_array_access_get() : void @@ -133,9 +133,9 @@ public function test_array_access_get() : void row(int_entry('id', 3)), ); - $this->assertSame(1, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); - $this->assertSame(3, $rows[2]->valueOf('id')); + self::assertSame(1, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); + self::assertSame(3, $rows[2]->valueOf('id')); } public function test_array_access_set() : void @@ -164,7 +164,7 @@ public function test_building_row_from_array_with_schema_and_additional_fields_n ) ); - $this->assertEquals( + self::assertEquals( rows( row( int_entry('id', 1234), @@ -186,7 +186,7 @@ public function test_building_row_from_array_with_schema_but_entries_not_availab ) ); - $this->assertEquals( + self::assertEquals( rows( row( int_entry('id', 1234), @@ -207,7 +207,7 @@ public function test_building_rows_from_array() : void ] ); - $this->assertEquals( + self::assertEquals( rows( row( int_entry('id', 1234), @@ -237,7 +237,7 @@ public function test_building_rows_from_array_with_schema_and_additional_fields_ ) ); - $this->assertEquals( + self::assertEquals( rows( row( int_entry('id', 1234), @@ -266,7 +266,7 @@ public function test_building_rows_from_array_with_schema_but_entries_not_availa ) ); - $this->assertEquals( + self::assertEquals( rows( row( int_entry('id', 1234), @@ -297,8 +297,8 @@ public function test_chunks_with_less() : void $chunk = \iterator_to_array($rows->chunks(10)); - $this->assertCount(1, $chunk); - $this->assertSame([1, 2, 3, 4, 5, 6, 7], $chunk[0]->reduceToArray('id')); + self::assertCount(1, $chunk); + self::assertSame([1, 2, 3, 4, 5, 6, 7], $chunk[0]->reduceToArray('id')); } public function test_chunks_with_more_than_expected_in_chunk_rows() : void @@ -318,9 +318,9 @@ public function test_chunks_with_more_than_expected_in_chunk_rows() : void $chunk = \iterator_to_array($rows->chunks(5)); - $this->assertCount(2, $chunk); - $this->assertSame([1, 2, 3, 4, 5], $chunk[0]->reduceToArray('id')); - $this->assertSame([6, 7, 8, 9, 10], $chunk[1]->reduceToArray('id')); + self::assertCount(2, $chunk); + self::assertSame([1, 2, 3, 4, 5], $chunk[0]->reduceToArray('id')); + self::assertSame([6, 7, 8, 9, 10], $chunk[1]->reduceToArray('id')); } public function test_drop() : void @@ -333,9 +333,9 @@ public function test_drop() : void $rows = $rows->drop(1); - $this->assertCount(2, $rows); - $this->assertSame(2, $rows[0]->valueOf('id')); - $this->assertSame(3, $rows[1]->valueOf('id')); + self::assertCount(2, $rows); + self::assertSame(2, $rows[0]->valueOf('id')); + self::assertSame(3, $rows[1]->valueOf('id')); } public function test_drop_all() : void @@ -348,7 +348,7 @@ public function test_drop_all() : void $rows = $rows->drop(3); - $this->assertCount(0, $rows); + self::assertCount(0, $rows); } public function test_drop_more_than_exists() : void @@ -361,7 +361,7 @@ public function test_drop_more_than_exists() : void $rows = $rows->drop(4); - $this->assertCount(0, $rows); + self::assertCount(0, $rows); } public function test_drop_right() : void @@ -374,9 +374,9 @@ public function test_drop_right() : void $rows = $rows->dropRight(1); - $this->assertCount(2, $rows); - $this->assertSame(1, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); + self::assertCount(2, $rows); + self::assertSame(1, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); } public function test_drop_right_all() : void @@ -389,7 +389,7 @@ public function test_drop_right_all() : void $rows = $rows->dropRight(3); - $this->assertCount(0, $rows); + self::assertCount(0, $rows); } public function test_drop_right_more_than_available() : void @@ -402,7 +402,7 @@ public function test_drop_right_more_than_available() : void $rows = $rows->dropRight(5); - $this->assertCount(0, $rows); + self::assertCount(0, $rows); } public function test_drop_right_more_than_exists() : void @@ -415,13 +415,13 @@ public function test_drop_right_more_than_exists() : void $rows = $rows->dropRight(4); - $this->assertCount(0, $rows); + self::assertCount(0, $rows); } public function test_empty_rows() : void { - $this->assertTrue((rows())->empty()); - $this->assertFalse((rows(row(int_entry('id', 1))))->empty()); + self::assertTrue((rows())->empty()); + self::assertFalse((rows(row(int_entry('id', 1))))->empty()); } public function test_filters_out_rows() : void @@ -437,8 +437,8 @@ public function test_filters_out_rows() : void $evenRows = fn (Row $row) : bool => $row->get('number')->value() % 2 === 0; $oddRows = fn (Row $row) : bool => $row->get('number')->value() % 2 === 1; - $this->assertEquals(rows($two, $four), $rows->filter($evenRows)); - $this->assertEquals(rows($one, $three, $five), $rows->filter($oddRows)); + self::assertEquals(rows($two, $four), $rows->filter($evenRows)); + self::assertEquals(rows($one, $three, $five), $rows->filter($oddRows)); } public function test_find() : void @@ -451,7 +451,7 @@ public function test_find() : void $three1 = row(int_entry('number', 3), new StringEntry('name', 'three')), ); - $this->assertEquals( + self::assertEquals( rows( $one, $three @@ -462,7 +462,7 @@ public function test_find() : void public function test_find_on_empty_rows() : void { - $this->assertEquals(rows(), (rows())->find(fn (Row $row) => false)); + self::assertEquals(rows(), (rows())->find(fn (Row $row) => false)); } public function test_find_one() : void @@ -475,13 +475,13 @@ public function test_find_one() : void $three1 = row(int_entry('number', 3), new StringEntry('name', 'three')), ); - $this->assertSame($three, $rows->findOne(fn (Row $row) : bool => $row->valueOf('number') === 3)); - $this->assertNotSame($three1, $rows->findOne(fn (Row $row) : bool => $row->valueOf('number') === 3)); + self::assertSame($three, $rows->findOne(fn (Row $row) : bool => $row->valueOf('number') === 3)); + self::assertNotSame($three1, $rows->findOne(fn (Row $row) : bool => $row->valueOf('number') === 3)); } public function test_find_one_on_empty_rows() : void { - $this->assertNull((rows())->findOne(fn (Row $row) => false)); + self::assertNull((rows())->findOne(fn (Row $row) => false)); } public function test_find_without_results() : void @@ -494,7 +494,7 @@ public function test_find_without_results() : void $three1 = row(int_entry('number', 3), new StringEntry('name', 'three')), ); - $this->assertNull($rows->findOne(fn (Row $row) : bool => $row->valueOf('number') === 5)); + self::assertNull($rows->findOne(fn (Row $row) : bool => $row->valueOf('number') === 5)); } public function test_first_on_empty_rows() : void @@ -520,7 +520,7 @@ public function test_flat_map() : void $row->add(new StringEntry('name', $row->valueOf('id') . '-name-02')), ]); - $this->assertSame( + self::assertSame( [ ['id' => 1234, 'name' => '1234-name-01'], ['id' => 1234, 'name' => '1234-name-02'], @@ -540,7 +540,7 @@ public function test_hash() : void row(int_entry('id', 4), bool_entry('bool', false)) ); - $this->assertSame( + self::assertSame( $rows->hash(), rows( row(bool_entry('bool', false), int_entry('id', 1)), @@ -553,7 +553,7 @@ public function test_hash() : void public function test_hash_empty_rows() : void { - $this->assertSame( + self::assertSame( rows()->hash(), rows()->hash(), ); @@ -568,7 +568,7 @@ public function test_hash_rows_with_different_columns() : void row(int_entry('id', 4), bool_entry('bool', false)) ); - $this->assertNotSame( + self::assertNotSame( $rows->hash(), rows( row(bool_entry('bool', false)), @@ -588,7 +588,7 @@ public function test_hash_rows_with_different_order() : void row(int_entry('id', 4), bool_entry('bool', false)) ); - $this->assertNotSame( + self::assertNotSame( $rows->hash(), rows( row(bool_entry('bool', false), int_entry('id', 1)), @@ -604,11 +604,11 @@ public function test_merge_empty_rows_with_partitioned_rows() : void $rows1 = rows(row(int_entry('id', 1), str_entry('group', 'a')))->partitionBy(ref('group'))[0]; $rows2 = rows(); - $this->assertEquals( + self::assertEquals( partitions(partition('group', 'a')), $rows1->merge($rows2)->partitions() ); - $this->assertCount(1, $rows1->merge($rows2)); + self::assertCount(1, $rows1->merge($rows2)); } public function test_merge_row_with_another_row_that_has_duplicated_entries() : void @@ -625,11 +625,11 @@ public function test_merge_rows_from_different_partition() : void $rows1 = rows(row(int_entry('id', 1), str_entry('group', 'a')))->partitionBy(ref('group'))[0]; $rows2 = rows(row(int_entry('id', 2), str_entry('group', 'b')))->partitionBy(ref('group'))[0]; - $this->assertEquals( + self::assertEquals( partitions(), $rows1->merge($rows2)->partitions() ); - $this->assertCount(2, $rows1->merge($rows2)); + self::assertCount(2, $rows1->merge($rows2)); } public function test_merge_rows_from_same_partition() : void @@ -637,11 +637,11 @@ public function test_merge_rows_from_same_partition() : void $rows1 = rows(row(int_entry('id', 1), str_entry('group', 'a')))->partitionBy(ref('group'))[0]; $rows2 = rows(row(int_entry('id', 2), str_entry('group', 'a')))->partitionBy(ref('group'))[0]; - $this->assertEquals( + self::assertEquals( partitions(partition('group', 'a')), $rows1->merge($rows2)->partitions() ); - $this->assertCount(2, $rows1->merge($rows2)); + self::assertCount(2, $rows1->merge($rows2)); } public function test_merge_rows_from_same_partitions() : void @@ -652,11 +652,11 @@ public function test_merge_rows_from_same_partitions() : void $rows2 = rows(row(int_entry('id', 2), str_entry('group', 'a'), str_entry('sub_group', '1'))) ->partitionBy(ref('sub_group'), ref('group'))[0]; - $this->assertEquals( + self::assertEquals( partitions(partition('group', 'a'), partition('sub_group', '1')), $rows1->merge($rows2)->partitions() ); - $this->assertCount(2, $rows1->merge($rows2)); + self::assertCount(2, $rows1->merge($rows2)); } public function test_merges_collection_together() : void @@ -678,7 +678,7 @@ public function test_merges_collection_together() : void $merged = $rowsOne->merge($rowsTwo)->merge($rowsThree); - $this->assertEquals( + self::assertEquals( rows( row(int_entry('id', 1)), row(int_entry('id', 2)), @@ -708,7 +708,7 @@ public function test_offset_get_on_empty_rows() : void public function test_partition_rows_by_multiple_duplicated_entries() : void { - $this->assertEquals( + self::assertEquals( [ rows_partitioned( [ @@ -754,7 +754,7 @@ public function test_partition_rows_by_multiple_duplicated_entries() : void public function test_partition_rows_by_multiple_entries() : void { - $this->assertEquals( + self::assertEquals( [ rows_partitioned( [ @@ -814,7 +814,7 @@ public function test_partition_rows_by_non_existing_entry() : void public function test_partition_rows_by_single_entry() : void { - $this->assertEquals( + self::assertEquals( [ rows_partitioned( [row(int_entry('number', 1)), row(int_entry('number', 1))], @@ -836,7 +836,7 @@ public function test_partition_rows_by_single_entry() : void public function test_partition_rows_date_entry() : void { - $this->assertEquals( + self::assertEquals( [ rows_partitioned( [row(datetime_entry('date', '2023-01-01 00:00:00 UTC'))], @@ -871,7 +871,7 @@ public function test_partitions() : void row(int_entry('number', 4), str_entry('group', 'a')), ))->partitionBy('group'); - $this->assertEquals( + self::assertEquals( partitions(partition('group', 'a')), $rows[0]->partitions() ); @@ -887,9 +887,9 @@ public function test_remove() : void $rows = $rows->remove(1); - $this->assertCount(2, $rows); - $this->assertSame(1, $rows[0]->valueOf('id')); - $this->assertSame(3, $rows[1]->valueOf('id')); + self::assertCount(2, $rows); + self::assertSame(1, $rows[0]->valueOf('id')); + self::assertSame(3, $rows[1]->valueOf('id')); } public function test_remove_on_empty_rows() : void @@ -907,7 +907,7 @@ public function test_returns_first_row() : void row(int_entry('number', 2), new StringEntry('name', 'two')), ); - $this->assertEquals($first, $rows->first()); + self::assertEquals($first, $rows->first()); } public function test_reverse() : void @@ -920,10 +920,10 @@ public function test_reverse() : void $rows = $rows->reverse(); - $this->assertCount(3, $rows); - $this->assertSame(3, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); - $this->assertSame(1, $rows[2]->valueOf('id')); + self::assertCount(3, $rows); + self::assertSame(3, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); + self::assertSame(1, $rows[2]->valueOf('id')); } /** @@ -931,7 +931,7 @@ public function test_reverse() : void */ public function test_rows_diff_left(Rows $expected, Rows $left, Rows $right) : void { - $this->assertEquals($expected->toArray(), $left->diffLeft($right)->toArray()); + self::assertEquals($expected->toArray(), $left->diffLeft($right)->toArray()); } /** @@ -939,7 +939,7 @@ public function test_rows_diff_left(Rows $expected, Rows $left, Rows $right) : v */ public function test_rows_diff_right(Rows $expected, Rows $left, Rows $right) : void { - $this->assertEquals($expected->toArray(), $left->diffRight($right)->toArray()); + self::assertEquals($expected->toArray(), $left->diffRight($right)->toArray()); } public function test_rows_schema() : void @@ -951,7 +951,7 @@ public function test_rows_schema() : void row(int_entry('id', 1), int_entry('name', 25)), ); - $this->assertEquals( + self::assertEquals( new Schema( Definition::integer('id'), Definition::string('name', true), @@ -969,7 +969,7 @@ public function test_rows_schema_when_rows_have_different_list_types() : void row(list_entry('list', [1, 2], type_list(type_int()))), ); - $this->assertEquals( + self::assertEquals( new Schema(Definition::array('list')), $rows->schema() ); @@ -988,9 +988,9 @@ public function test_rows_serialization() : void /** @var Rows $unserialized */ $unserialized = \unserialize($serialized); - $this->assertTrue($unserialized[0]->isEqual($rows[0])); - $this->assertTrue($unserialized[1]->isEqual($rows[1])); - $this->assertTrue($unserialized[2]->isEqual($rows[2])); + self::assertTrue($unserialized[0]->isEqual($rows[0])); + self::assertTrue($unserialized[1]->isEqual($rows[1])); + self::assertTrue($unserialized[2]->isEqual($rows[2])); } /** @@ -998,7 +998,7 @@ public function test_rows_serialization() : void */ public function test_rows_unique(Rows $expected, Rows $notUnique, Comparator $comparator = new NativeComparator()) : void { - $this->assertEquals($expected, $notUnique->unique($comparator)); + self::assertEquals($expected, $notUnique->unique($comparator)); } public function test_sort() : void @@ -1013,8 +1013,8 @@ public function test_sort() : void $sort = $rows->sort(fn (Row $row, Row $nextRow) : int => $row->valueOf('number') <=> $nextRow->valueOf('number')); - $this->assertEquals(rows($one, $two, $three, $four, $five), $sort); - $this->assertNotEquals($sort, $rows); + self::assertEquals(rows($one, $two, $three, $four, $five), $sort); + self::assertNotEquals($sort, $rows); } public function test_sort_rows_by_not_existing_column() : void @@ -1048,13 +1048,13 @@ public function test_sort_rows_by_two_columns() : void $ascending = $rows->sortBy(ref('a'), ref('b')->desc()); $descending = $rows->sortBy(ref('a')->desc(), ref('b')); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 5], ['a' => 1, 'b' => 4], ['a' => 2, 'b' => 7], ['a' => 2, 'b' => 4], ['a' => 3, 'b' => 10], ['a' => 3, 'b' => 2], ], $ascending->toArray() ); - $this->assertSame( + self::assertSame( [ ['a' => 3, 'b' => 2], ['a' => 3, 'b' => 10], ['a' => 2, 'b' => 4], ['a' => 2, 'b' => 7], ['a' => 1, 'b' => 4], ['a' => 1, 'b' => 5], ], @@ -1075,10 +1075,10 @@ public function test_sort_rows_without_changing_original_collection() : void $ascending = $rows->sortAscending(ref('number')); $descending = $rows->sortDescending(ref('number')); - $this->assertEquals(rows($one, $two, $three, $four, $five), $ascending); - $this->assertEquals(rows($five, $four, $three, $two, $one), $descending); - $this->assertNotEquals($ascending, $rows); - $this->assertNotEquals($descending, $rows); + self::assertEquals(rows($one, $two, $three, $four, $five), $ascending); + self::assertEquals(rows($five, $four, $three, $two, $one), $descending); + self::assertNotEquals($ascending, $rows); + self::assertNotEquals($descending, $rows); } public function test_sorts_entries_in_all_rows() : void @@ -1100,7 +1100,7 @@ public function test_sorts_entries_in_all_rows() : void $sorted = $rows->sortEntries(); - $this->assertEquals( + self::assertEquals( rows( row( $rowOneCreatedAt = new DateTimeEntry('created-at', new \DateTimeImmutable('2020-08-13 15:00')), @@ -1129,8 +1129,8 @@ public function test_take() : void $rows = $rows->take(1); - $this->assertCount(1, $rows); - $this->assertSame(1, $rows[0]->valueOf('id')); + self::assertCount(1, $rows); + self::assertSame(1, $rows[0]->valueOf('id')); } public function test_take_all() : void @@ -1143,10 +1143,10 @@ public function test_take_all() : void $rows = $rows->take(3); - $this->assertCount(3, $rows); - $this->assertSame(1, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); - $this->assertSame(3, $rows[2]->valueOf('id')); + self::assertCount(3, $rows); + self::assertSame(1, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); + self::assertSame(3, $rows[2]->valueOf('id')); } public function test_take_more_than_exists() : void @@ -1159,10 +1159,10 @@ public function test_take_more_than_exists() : void $rows = $rows->take(4); - $this->assertCount(3, $rows); - $this->assertSame(1, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); - $this->assertSame(3, $rows[2]->valueOf('id')); + self::assertCount(3, $rows); + self::assertSame(1, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); + self::assertSame(3, $rows[2]->valueOf('id')); } public function test_take_right() : void @@ -1175,8 +1175,8 @@ public function test_take_right() : void $rows = $rows->takeRight(1); - $this->assertCount(1, $rows); - $this->assertSame(3, $rows[0]->valueOf('id')); + self::assertCount(1, $rows); + self::assertSame(3, $rows[0]->valueOf('id')); } public function test_take_right_all() : void @@ -1189,10 +1189,10 @@ public function test_take_right_all() : void $rows = $rows->takeRight(3); - $this->assertCount(3, $rows); - $this->assertSame(3, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); - $this->assertSame(1, $rows[2]->valueOf('id')); + self::assertCount(3, $rows); + self::assertSame(3, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); + self::assertSame(1, $rows[2]->valueOf('id')); } public function test_take_right_more_than_exists() : void @@ -1205,10 +1205,10 @@ public function test_take_right_more_than_exists() : void $rows = $rows->takeRight(4); - $this->assertCount(3, $rows); - $this->assertSame(3, $rows[0]->valueOf('id')); - $this->assertSame(2, $rows[1]->valueOf('id')); - $this->assertSame(1, $rows[2]->valueOf('id')); + self::assertCount(3, $rows); + self::assertSame(3, $rows[0]->valueOf('id')); + self::assertSame(2, $rows[1]->valueOf('id')); + self::assertSame(1, $rows[2]->valueOf('id')); } public function test_transforms_rows_to_array() : void @@ -1226,7 +1226,7 @@ public function test_transforms_rows_to_array() : void ) ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1234, 'deleted' => false, 'phase' => null], ['id' => 4321, 'deleted' => true, 'phase' => 'launch'], @@ -1250,7 +1250,7 @@ public function test_transforms_rows_to_array_without_keys() : void ) ); - $this->assertEquals( + self::assertEquals( [ [1234, false, null], [4321, true, 'launch'], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php index 5372fc8cd..a1cc74d30 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Stream/PathTest.php @@ -83,7 +83,7 @@ public function test_add_partitions_to_path_pattern() : void public function test_add_partitions_to_path_with_extension() : void { - $this->assertEquals( + self::assertEquals( new Path('/path/to/group=a/file.txt'), (new Path('/path/to/file.txt'))->addPartitions(new Partition('group', 'a')) ); @@ -91,7 +91,7 @@ public function test_add_partitions_to_path_with_extension() : void public function test_add_partitions_to_path_without_extension() : void { - $this->assertEquals( + self::assertEquals( new Path('/path/to/group=a/folder'), (new Path('/path/to/folder'))->addPartitions(new Partition('group', 'a')) ); @@ -99,7 +99,7 @@ public function test_add_partitions_to_path_without_extension() : void public function test_add_partitions_to_root_path_with_extension() : void { - $this->assertEquals( + self::assertEquals( new Path('/group=a/file.txt'), (new Path('/file.txt'))->addPartitions(new Partition('group', 'a')) ); @@ -107,7 +107,7 @@ public function test_add_partitions_to_root_path_with_extension() : void public function test_add_partitions_to_root_path_without_extension() : void { - $this->assertEquals( + self::assertEquals( new Path('/group=a/folder'), (new Path('/folder'))->addPartitions(new Partition('group', 'a')) ); @@ -118,12 +118,12 @@ public function test_add_partitions_to_root_path_without_extension() : void */ public function test_directories(string $uri, string $dirPath) : void { - $this->assertSame($dirPath, (new Path($uri))->parentDirectory()->path()); + self::assertSame($dirPath, (new Path($uri))->parentDirectory()->path()); } public function test_equal_paths_starts_with() : void { - $this->assertTrue( + self::assertTrue( Path::realpath(\sys_get_temp_dir() . '/some/path/file.json') ->startsWith(Path::realpath(\sys_get_temp_dir() . '/some/path/file.json')) ); @@ -131,8 +131,8 @@ public function test_equal_paths_starts_with() : void public function test_extension() : void { - $this->assertSame('php', (new Path(__FILE__))->extension()); - $this->assertFalse((new Path(__DIR__))->extension()); + self::assertSame('php', (new Path(__FILE__))->extension()); + self::assertFalse((new Path(__DIR__))->extension()); } /** @@ -140,12 +140,12 @@ public function test_extension() : void */ public function test_finding_static_part_of_the_path(string $staticPart, string $uri) : void { - $this->assertEquals(new Path($staticPart), (new Path($uri))->staticPart()); + self::assertEquals(new Path($staticPart), (new Path($uri))->staticPart()); } public function test_local_file() : void { - $this->assertNull((new Path(__FILE__))->context()->resource()); + self::assertNull((new Path(__FILE__))->context()->resource()); } /** @@ -153,15 +153,15 @@ public function test_local_file() : void */ public function test_matching_pattern_with_path(string $path, string $pattern, bool $result) : void { - $this->assertSame($result, (new Path($path))->matches(new Path($pattern))); + self::assertSame($result, (new Path($path))->matches(new Path($pattern))); } public function test_not_matching_items_under_directory_that_matches_pattern() : void { $path = new Path('flow-file://var/file/partition=*'); - $this->assertTrue($path->matches(new Path('flow-file://var/file/partition=1'))); - $this->assertFalse($path->matches(new Path('flow-file://var/file/partition=1/file.csv'))); + self::assertTrue($path->matches(new Path('flow-file://var/file/partition=1'))); + self::assertFalse($path->matches(new Path('flow-file://var/file/partition=1/file.csv'))); } /** @@ -169,8 +169,8 @@ public function test_not_matching_items_under_directory_that_matches_pattern() : */ public function test_parsing_path(string $uri, string $schema, string $parsedUri) : void { - $this->assertEquals($schema, (new Path($uri))->scheme()); - $this->assertEquals($parsedUri, (new Path($uri))->uri()); + self::assertEquals($schema, (new Path($uri))->scheme()); + self::assertEquals($parsedUri, (new Path($uri))->uri()); } /** @@ -178,14 +178,14 @@ public function test_parsing_path(string $uri, string $schema, string $parsedUri */ public function test_partitions_in_path(string $uri, Partitions $partitions) : void { - $this->assertEquals($partitions, (new Path($uri))->partitions()); + self::assertEquals($partitions, (new Path($uri))->partitions()); } public function test_partitions_paths() : void { $path = new Path('/var/path/partition_1=A/partition_2=B/file.csv', ['option' => true]); - $this->assertEquals( + self::assertEquals( [ new Path('/var/path/partition_1=A', ['option' => true]), new Path('/var/path/partition_1=A/partition_2=B', ['option' => true]), @@ -196,7 +196,7 @@ public function test_partitions_paths() : void public function test_path_starting_with_other_path() : void { - $this->assertTrue( + self::assertTrue( Path::realpath(\sys_get_temp_dir() . '/some/path/file.json') ->startsWith(Path::realpath(\sys_get_temp_dir() . '/some/path')) ); @@ -204,7 +204,7 @@ public function test_path_starting_with_other_path() : void public function test_pattern_path_starting_with_realpath_path() : void { - $this->assertTrue( + self::assertTrue( Path::realpath(\sys_get_temp_dir() . '/some/path/*.json') ->startsWith(Path::realpath(\sys_get_temp_dir() . '/some/path')) ); @@ -214,11 +214,11 @@ public function test_randomization_file_path() : void { $path = new Path('flow-file://var/file/test.csv', []); - $this->assertStringStartsWith( + self::assertStringStartsWith( 'flow-file://var/file/test_', $path->randomize()->uri() ); - $this->assertStringEndsWith( + self::assertStringEndsWith( '.csv', $path->randomize()->uri() ); @@ -228,7 +228,7 @@ public function test_randomization_folder_path() : void { $path = new Path('flow-file://var/file/folder/', []); - $this->assertStringStartsWith( + self::assertStringStartsWith( 'flow-file://var/file/folder_', $path->randomize()->uri() ); @@ -236,7 +236,7 @@ public function test_randomization_folder_path() : void public function test_realpath_starting_with_non_realpath_path() : void { - $this->assertFalse( + self::assertFalse( Path::realpath(\sys_get_temp_dir() . '/some/path/file.json') ->startsWith(new Path('/some/path')) ); @@ -246,7 +246,7 @@ public function test_set_extension_different_than_existing_one() : void { $path = new Path('flow-file://var/file/folder/file.txt', ['option' => true]); - $this->assertEquals( + self::assertEquals( new Path('flow-file://var/file/folder/file.csv', ['option' => true]), $path->setExtension('csv') ); @@ -256,7 +256,7 @@ public function test_set_extension_when_is_not_set_yet() : void { $path = (new Path('flow-file://var/file/folder/file', ['option' => true]))->randomize(); - $this->assertEquals( + self::assertEquals( new Path($path->uri() . '.csv', ['option' => true]), $path->setExtension('csv') ); @@ -266,7 +266,7 @@ public function test_set_same_extension() : void { $path = new Path('flow-file://var/file/folder/file.csv', ['option' => true]); - $this->assertEquals( + self::assertEquals( $path, $path->setExtension('csv') ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php index 6dd1e0043..0a61724ae 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/AutoCastTransformerTest.php @@ -27,7 +27,7 @@ public function test_transforming_row() : void ], ]); - $this->assertEquals( + self::assertEquals( [ [ 'integer' => 1, diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php index 305b6a9ce..7d6c93966 100755 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php @@ -27,7 +27,7 @@ public function test_replacing_dashes_in_entry_name_with_str_replace_callback() new FlowContext(Config::default()) ); - $this->assertEquals(new Rows( + static::assertEquals(new Rows( Row::create( new Entry\StringEntry('string-entry ', 'String entry') ) diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php index b91525169..8e897244d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropDuplicatesTransformerTest.php @@ -32,7 +32,7 @@ public function test_dropping_duplicated_entries_from_rows() : void Row::create(int_entry('id', 3), str_entry('name', 'name3')), ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'name1')), Row::create(int_entry('id', 2), str_entry('name', 'name2')), @@ -55,7 +55,7 @@ public function test_dropping_duplicates_when_not_all_rows_has_expected_entry() Row::create(int_entry('id', 4), str_entry('name', 'name4')), ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'name1')), Row::create(int_entry('id', 2), str_entry('name', 'name2')), @@ -78,7 +78,7 @@ public function test_dropping_duplications_based_on_two_entries() : void Row::create(int_entry('id', 3), str_entry('name', 'name3')), ); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('name', 'name1')), Row::create(int_entry('id', 2), str_entry('name', 'name2')), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php index 253cea81e..d82fba418 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/DropPartitionsTransformerTest.php @@ -26,11 +26,11 @@ public function test_dropping_partitions() : void ])->partitionBy(ref('category')); foreach ($partitioned as $rows) { - $this->assertTrue($rows->isPartitioned()); + self::assertTrue($rows->isPartitioned()); $notPartitioned = (new DropPartitionsTransformer())->transform($rows, flow_context()); - $this->assertFalse($notPartitioned->isPartitioned()); + self::assertFalse($notPartitioned->isPartitioned()); } } @@ -50,12 +50,12 @@ public function test_dropping_partitions_with_columns() : void ])->partitionBy(ref('category')); foreach ($partitioned as $rows) { - $this->assertTrue($rows->isPartitioned()); + self::assertTrue($rows->isPartitioned()); $notPartitioned = (new DropPartitionsTransformer(true))->transform($rows, flow_context()); - $this->assertFalse($notPartitioned->isPartitioned()); - $this->assertFalse($notPartitioned->first()->has('category')); + self::assertFalse($notPartitioned->isPartitioned()); + self::assertFalse($notPartitioned->first()->has('category')); } } @@ -74,7 +74,7 @@ public function test_transforming_not_partitioned_rows() : void ['id' => 10, 'name' => 'ten', 'category' => 'b'], ]); - $this->assertSame( + self::assertSame( $rows, (new DropPartitionsTransformer())->transform($rows, flow_context()) ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php index f686e8f53..3aad0961e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/EntryNameStyleConverterTransformerTest.php @@ -22,7 +22,7 @@ public function test_conversion_of_entry_names_style() : void ) ), new FlowContext(Config::default())); - $this->assertSame( + self::assertSame( [ [ 'camel_case_entry_name' => 'test', diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php index 6195e45b1..8c9f0edb6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/GroupToArrayTransformerTest.php @@ -38,7 +38,7 @@ public function test_grouping_entries_to_array() : void $transformer = new GroupToArrayTransformer('order_id', 'order_line_items'); - $this->assertSame( + self::assertSame( [ [ 'order_line_items' => [ diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php index d5682533e..1772b1e9c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php @@ -35,7 +35,7 @@ public function from(Rows $rows) : DataFrame $transformer = JoinEachRowsTransformer::inner($right, Expression::on(['country' => 'code'])); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('name', 'Poland'), int_entry('id', 1), str_entry('country', 'PL')), Row::create(str_entry('name', 'United States'), int_entry('id', 2), str_entry('country', 'US')), @@ -66,7 +66,7 @@ public function from(Rows $rows) : DataFrame $transformer = JoinEachRowsTransformer::left($right, Expression::on(['country' => 'code'])); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), str_entry('name', 'Poland')), Row::create(int_entry('id', 2), str_entry('country', 'US'), str_entry('name', 'United States')), @@ -98,7 +98,7 @@ public function from(Rows $rows) : DataFrame $transformer = JoinEachRowsTransformer::right($right, Expression::on(['country' => 'code'])); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('name', 'Poland'), str_entry('code', 'PL'), int_entry('id', 1)), Row::create(str_entry('name', 'United States'), str_entry('code', 'US'), int_entry('id', 2)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php index 46d5072bf..282110a9c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinRowsTransformerTest.php @@ -29,7 +29,7 @@ public function test_inner_join_rows() : void $transformer = JoinRowsTransformer::inner($right, Expression::on(['country' => 'code'])); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('name', 'Poland'), int_entry('id', 1), str_entry('country', 'PL')), Row::create(str_entry('name', 'United States'), int_entry('id', 2), str_entry('country', 'US')), @@ -55,7 +55,7 @@ public function test_left_join_rows() : void $transformer = JoinRowsTransformer::left($right, Expression::on(['country' => 'code'])); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(int_entry('id', 1), str_entry('country', 'PL'), str_entry('name', 'Poland')), Row::create(int_entry('id', 2), str_entry('country', 'US'), str_entry('name', 'United States')), @@ -82,7 +82,7 @@ public function test_right_join_rows() : void $transformer = JoinRowsTransformer::right($right, Expression::on(['country' => 'code'])); - $this->assertEquals( + self::assertEquals( new Rows( Row::create(str_entry('name', 'Poland'), str_entry('code', 'PL'), int_entry('id', 1)), Row::create(str_entry('name', 'United States'), str_entry('code', 'US'), int_entry('id', 2)), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php index 70ab84773..3d9293931 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/KeepEntriesTransformerTest.php @@ -21,7 +21,7 @@ public function test_keeping_entries() : void ); $transformer = new KeepEntriesTransformer('name'); - $this->assertSame( + self::assertSame( [ ['name' => 'Row Name'], ], @@ -40,7 +40,7 @@ public function test_keeping_not_existing_entries() : void ); $transformer = new KeepEntriesTransformer('not_existing'); - $this->assertSame( + self::assertSame( [['not_existing' => null]], $transformer->transform($rows, new FlowContext(Config::default()))->toArray() ); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php index 728176ee2..32db7f12d 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RemoveEntriesTransformerTest.php @@ -21,7 +21,7 @@ public function test_removing_entries() : void ); $transformer = new RemoveEntriesTransformer('id', 'array'); - $this->assertSame( + self::assertSame( [ ['name' => 'Row Name'], ], @@ -40,7 +40,7 @@ public function test_removing_not_existing_entries() : void ); $transformer = new RemoveEntriesTransformer('not_existing'); - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'Row Name', 'array' => ['test']], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php index 410dbb21b..7d2fb6bc6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/RenameEntryTransformerTest.php @@ -34,7 +34,7 @@ public function test_renaming_entries() : void $rows = $renameTransformerTwo->transform($rows, $context); - $this->assertEquals( + self::assertEquals( new Rows( Row::create( new Row\Entry\IntegerEntry('id', 1), diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php index f676fb584..ba826bb07 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionFilterTransformerTest.php @@ -18,7 +18,7 @@ public function test_equal() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 1], ], @@ -35,7 +35,7 @@ public function test_equal_on_literal() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 2], ], @@ -49,7 +49,7 @@ public function test_greater_than() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 2], ], @@ -64,7 +64,7 @@ public function test_greater_than_or_equal() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 1], ['a' => 1, 'b' => 2], @@ -80,7 +80,7 @@ public function test_less_than() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 2], ], @@ -95,7 +95,7 @@ public function test_less_than_equal() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 1], ['a' => 1, 'b' => 2], @@ -111,7 +111,7 @@ public function test_not_equal() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 2], ], @@ -126,7 +126,7 @@ public function test_not_same() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 2], ], @@ -141,7 +141,7 @@ public function test_same() : void Row::create(int_entry('a', 1), int_entry('b', 2)) ); - $this->assertSame( + self::assertSame( [ ['a' => 1, 'b' => 1], ], diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php index fe1e886c0..a3e95e82c 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/ScalarFunctionTransformerTest.php @@ -14,7 +14,7 @@ final class ScalarFunctionTransformerTest extends TestCase { public function test_lit_expression_on_empty_rows() : void { - $this->assertEquals( + self::assertEquals( [ ], (new ScalarFunctionTransformer('number', lit(1_000))) @@ -25,7 +25,7 @@ public function test_lit_expression_on_empty_rows() : void public function test_lit_expression_on_non_empty_rows() : void { - $this->assertEquals( + self::assertEquals( [ ['name' => 'Norbert', 'number' => 1], ], @@ -40,7 +40,7 @@ public function test_lit_expression_on_non_empty_rows() : void public function test_plus_expression_on_empty_rows() : void { - $this->assertEquals( + self::assertEquals( [ ], (new ScalarFunctionTransformer('number', ref('num')->plus(ref('num1')))) @@ -51,7 +51,7 @@ public function test_plus_expression_on_empty_rows() : void public function test_plus_expression_on_non_empty_rows() : void { - $this->assertEquals( + self::assertEquals( [ ['a' => 1, 'b' => 2, 'c' => 3], ], @@ -68,7 +68,7 @@ public function test_plus_expression_on_non_existing_rows() : void $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Entry "num" does not exist. Did you mean one of the following? ["a"]'); - $this->assertEquals( + self::assertEquals( [ ['a' => 1, 'number' => 0], ], @@ -88,7 +88,7 @@ public function test_xml_xpath_expression_when_there_is_more_than_one_node_under $document->loadXML($xml); $xpath = new \DOMXPath($document); - $this->assertEquals( + self::assertEquals( list_entry('xpath', [ $xpath->query('/root/foo')->item(0), $xpath->query('/root/foo')->item(1), diff --git a/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php b/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php index dcf253493..5765acffa 100644 --- a/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php +++ b/src/core/etl/tests/Flow/Serializer/Tests/Unit/CompressingSerializerTest.php @@ -14,7 +14,7 @@ final class CompressingSerializerTest extends TestCase protected function setUp() : void { if (!\function_exists('gzcompress')) { - $this->markTestSkipped('gzcompress unavailable.'); + self::markTestSkipped('gzcompress unavailable.'); } } @@ -49,7 +49,7 @@ public function test_serializing_rows() : void $unserialized = $serializer->unserialize($serialized, Rows::class); - $this->assertEquals( + self::assertEquals( $rows, $unserialized ); diff --git a/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php b/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php index f251ee232..56224164c 100644 --- a/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php +++ b/src/core/etl/tests/Flow/Serializer/Tests/Unit/NativePHPSerializerTest.php @@ -40,7 +40,7 @@ public function test_serializing_rows() : void $serialized = $serializer->serialize($rows); - $this->assertEquals( + self::assertEquals( $rows, $serializer->unserialize($serialized, Rows::class) ); diff --git a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotGetTest.php b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotGetTest.php index 433cfd5c0..ebeda11e6 100644 --- a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotGetTest.php +++ b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotGetTest.php @@ -12,7 +12,7 @@ final class ArrayDotGetTest extends TestCase { public function test_accessing_array_scalar_value_by_path_multiple_asterix_paths() : void { - $this->assertSame( + self::assertSame( [ ['12345', '22222'], ['3333'], @@ -47,7 +47,7 @@ public function test_accessing_array_scalar_value_by_path_multiple_asterix_paths public function test_accessing_array_scalar_value_by_path_multiple_asterix_paths_with_nullsafe() : void { - $this->assertSame( + self::assertSame( [ ['12345', '22222'], ['3333'], @@ -92,7 +92,7 @@ public function test_accessing_array_scalar_value_by_path_multiple_asterix_paths public function test_accessing_array_scalar_value_by_path_with_asterix() : void { - $this->assertSame( + self::assertSame( ['Michael', 'Jack'], array_dot_get( [ @@ -143,7 +143,7 @@ public function test_accessing_array_scalar_value_by_path_with_asterix_and_diffe public function test_accessing_array_scalar_value_by_path_with_asterix_and_different_elements_using_nullsafe() : void { - $this->assertSame( + self::assertSame( ['Michael', null], array_dot_get( [ @@ -168,7 +168,7 @@ public function test_accessing_array_scalar_value_by_path_with_asterix_and_diffe public function test_accessing_array_scalar_value_by_path_with_escaped_nullable_asterix() : void { - $this->assertSame( + self::assertSame( 'Michael', array_dot_get( [ @@ -185,7 +185,7 @@ public function test_accessing_array_scalar_value_by_path_with_escaped_nullable_ public function test_accessing_array_scalar_value_by_path_with_escaped_wildcard_key() : void { - $this->assertSame( + self::assertSame( 'Michael', array_dot_get( [ @@ -203,7 +203,7 @@ public function test_accessing_array_scalar_value_by_path_with_escaped_wildcard_ public function test_accessing_array_scalar_value_by_path_with_nullable_asterix_and_different_elements() : void { - $this->assertSame( + self::assertSame( ['Michael'], array_dot_get( [ @@ -231,12 +231,12 @@ public function test_accessing_array_value_by_invalid_path() : void $this->expectException(InvalidPathException::class); $this->expectExceptionMessage("Path \"invalid_path\" does not exists in array \"array('user'=>array('id'=>1,),)\""); - $this->assertSame(array_dot_get(['user' => ['id' => 1]], 'invalid_path'), 1); + self::assertSame(array_dot_get(['user' => ['id' => 1]], 'invalid_path'), 1); } public function test_accessing_array_value_by_nullsafe_path() : void { - $this->assertNull( + self::assertNull( array_dot_get( [ 'user' => [ @@ -246,7 +246,7 @@ public function test_accessing_array_value_by_nullsafe_path() : void 'user.?name' ) ); - $this->assertNull( + self::assertNull( array_dot_get( [ 'user' => [ @@ -258,7 +258,7 @@ public function test_accessing_array_value_by_nullsafe_path() : void 'user.?wrong_path.name' ) ); - $this->assertNull( + self::assertNull( array_dot_get( [ 'users' => [], @@ -270,7 +270,7 @@ public function test_accessing_array_value_by_nullsafe_path() : void public function test_accessing_array_value_by_path() : void { - $this->assertSame( + self::assertSame( 1, array_dot_get( [ @@ -281,7 +281,7 @@ public function test_accessing_array_value_by_path() : void 'user.id' ) ); - $this->assertTrue( + self::assertTrue( array_dot_exists( [ 'user' => [ @@ -291,7 +291,7 @@ public function test_accessing_array_value_by_path() : void 'user.id' ) ); - $this->assertFalse( + self::assertFalse( array_dot_exists( [ 'user' => [ @@ -305,7 +305,7 @@ public function test_accessing_array_value_by_path() : void public function test_accessing_array_value_by_path_with_asterix() : void { - $this->assertSame( + self::assertSame( [ [ 'id' => 1, @@ -343,12 +343,12 @@ public function test_accessing_empty_array_value_by_invalid_path() : void $this->expectException(InvalidPathException::class); $this->expectExceptionMessage('Path "invalid_path" does not exists in array "array()"'); - $this->assertSame(array_dot_get([], 'invalid_path'), 1); + self::assertSame(array_dot_get([], 'invalid_path'), 1); } public function test_accessing_nested_array_value_by_numeric_path() : void { - $this->assertSame( + self::assertSame( 1, array_dot_get( [ @@ -367,7 +367,7 @@ public function test_accessing_nested_array_value_by_numeric_path() : void public function test_accessing_nested_collection_using_wildcard() : void { - $this->assertSame( + self::assertSame( [ [ 'id' => 1, @@ -398,7 +398,7 @@ public function test_accessing_nested_collection_using_wildcard() : void public function test_accessing_not_nested_nullsafe() : void { - $this->assertNull( + self::assertNull( array_dot_get( [ '@name' => 'Test', @@ -410,7 +410,7 @@ public function test_accessing_not_nested_nullsafe() : void public function test_accessing_not_nested_nullsafe_on_empty_array() : void { - $this->assertNull( + self::assertNull( array_dot_get( [ ], @@ -421,7 +421,7 @@ public function test_accessing_not_nested_nullsafe_on_empty_array() : void public function test_accessing_null_value_under_existing_path() : void { - $this->assertTrue( + self::assertTrue( array_dot_exists( [ 'user' => [ @@ -431,7 +431,7 @@ public function test_accessing_null_value_under_existing_path() : void 'user.id' ) ); - $this->assertFalse( + self::assertFalse( array_dot_exists( [ 'user' => [ @@ -441,7 +441,7 @@ public function test_accessing_null_value_under_existing_path() : void 'user.ids' ) ); - $this->assertTrue( + self::assertTrue( array_dot_exists( [ 'user' => [ @@ -455,7 +455,7 @@ public function test_accessing_null_value_under_existing_path() : void public function test_all_multi_key_get() : void { - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar'], @@ -485,7 +485,7 @@ public function test_all_multi_key_get() : void public function test_all_multi_key_get_nested() : void { - $this->assertSame( + self::assertSame( [ ['id' => 1, 'name' => 'foo', 'property_status_value' => 'active'], ['id' => 2, 'name' => 'bar', 'property_status_value' => 'active'], @@ -518,7 +518,7 @@ public function test_all_multi_key_get_nested() : void public function test_escape_dot_path() : void { - $this->assertSame( + self::assertSame( 'baz', array_dot_get( [ @@ -534,7 +534,7 @@ public function test_escape_dot_path() : void public function test_escape_multi_key_syntax() : void { - $this->assertSame( + self::assertSame( 1, array_dot_get( [ @@ -577,7 +577,7 @@ public function test_get_wildcard_from_not_array() : void public function test_single_multi_key_get() : void { - $this->assertSame( + self::assertSame( [ 'id' => 1, 'name' => 'foo', ], @@ -605,7 +605,7 @@ public function test_single_multi_key_get() : void public function test_single_nullsafe_multi_key_get() : void { - $this->assertSame( + self::assertSame( [ 'id' => 1, 'name' => null, ], diff --git a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotRenameTest.php b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotRenameTest.php index 5094823f0..0c2d0072e 100644 --- a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotRenameTest.php +++ b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotRenameTest.php @@ -11,7 +11,7 @@ final class ArrayDotRenameTest extends TestCase { public function test_renames_array_by_path() : void { - $this->assertSame( + self::assertSame( [ 'users' => [ ['id' => 1, 'user_name' => 'John'], @@ -33,7 +33,7 @@ public function test_renames_array_by_path() : void public function test_renames_array_by_path_with_asterix() : void { - $this->assertSame( + self::assertSame( [ 'users' => [ ['id' => 1, 'user_name' => 'John'], @@ -55,7 +55,7 @@ public function test_renames_array_by_path_with_asterix() : void public function test_renames_array_by_path_with_asterix_as_a_key() : void { - $this->assertSame( + self::assertSame( [ 'users' => [ 'john' => ['id' => 1], @@ -79,7 +79,7 @@ public function test_renames_array_by_path_with_asterix_as_a_key() : void public function test_renames_array_by_path_with_multiple_asterix() : void { - $this->assertSame( + self::assertSame( [ 'transactions' => [ [ @@ -135,7 +135,7 @@ public function test_renames_array_by_path_with_multiple_asterix() : void public function test_renames_array_root_key_name() : void { - $this->assertEquals( + self::assertEquals( [ 'admins' => [ ['id' => 1, 'name' => 'John'], diff --git a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotSetTest.php b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotSetTest.php index 8236cddca..de876d50c 100644 --- a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotSetTest.php +++ b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotSetTest.php @@ -11,7 +11,7 @@ final class ArrayDotSetTest extends TestCase { public function test_replace_value_on_non_empty_array() : void { - $this->assertSame( + self::assertSame( [ 'foo' => [ 'bar' => 'baz', @@ -33,7 +33,7 @@ public function test_replace_value_on_non_empty_array() : void public function test_set_value_on_empty_array() : void { - $this->assertSame( + self::assertSame( [ 'foo' => [ 'bar' => 'baz', @@ -45,7 +45,7 @@ public function test_set_value_on_empty_array() : void public function test_set_value_on_empty_array_using_escaped_wildcard() : void { - $this->assertSame( + self::assertSame( [ 'foo' => [ '*' => 'baz', @@ -57,7 +57,7 @@ public function test_set_value_on_empty_array_using_escaped_wildcard() : void public function test_set_value_on_existing_nested_array_each_element() : void { - $this->assertSame( + self::assertSame( [ 'users' => [ [ diff --git a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotStepsTest.php b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotStepsTest.php index 702dd80fc..90576839e 100644 --- a/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotStepsTest.php +++ b/src/lib/array-dot/tests/Flow/ArrayDot/Tests/Unit/ArrayDotStepsTest.php @@ -20,7 +20,7 @@ public function test_empty_path() : void public function test_escaping_dots() : void { - $this->assertSame( + self::assertSame( ['foo.bar'], array_dot_steps('foo\\.bar') ); @@ -28,7 +28,7 @@ public function test_escaping_dots() : void public function test_escaping_multimatch() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar', '\\{bas, bai\\}'], array_dot_steps('foo.bar.\\{bas, bai\\}') ); @@ -36,7 +36,7 @@ public function test_escaping_multimatch() : void public function test_multimatch() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar', '{bas, bai}'], array_dot_steps('foo.bar.{bas, bai}') ); @@ -47,7 +47,7 @@ public function test_multimatch_not_closed() : void $this->expectException(InvalidPathException::class); $this->expectExceptionMessage('Multimatch syntax not closed'); - $this->assertSame( + self::assertSame( ['foo', 'bar', '{bas, bai}'], array_dot_steps('foo.bar.{bas, bai.id') ); @@ -58,7 +58,7 @@ public function test_multimatch_not_closed_at_the_end_of_path() : void $this->expectException(InvalidPathException::class); $this->expectExceptionMessage('Multimatch must be used at the end of path'); - $this->assertSame( + self::assertSame( ['foo', 'bar', '{bas, bai}'], array_dot_steps('foo.bar.{bas, bai}.id') ); @@ -66,7 +66,7 @@ public function test_multimatch_not_closed_at_the_end_of_path() : void public function test_simple_steps() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar', 'baz'], array_dot_steps('foo.bar.baz') ); @@ -74,7 +74,7 @@ public function test_simple_steps() : void public function test_simple_steps_with_nullsafe() : void { - $this->assertSame( + self::assertSame( ['foo', '?bar', 'baz'], array_dot_steps('foo.?bar.baz') ); @@ -82,7 +82,7 @@ public function test_simple_steps_with_nullsafe() : void public function test_simple_steps_with_nullsafe_wildcard() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar', '?*', 'baz'], array_dot_steps('foo.bar.?*.baz') ); @@ -90,7 +90,7 @@ public function test_simple_steps_with_nullsafe_wildcard() : void public function test_simple_steps_with_wildcard() : void { - $this->assertSame( + self::assertSame( ['foo', 'bar', '*', 'baz'], array_dot_steps('foo.bar.*.baz') ); diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkInsertTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkInsertTest.php index b5b9f3a86..37918aab5 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkInsertTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkInsertTest.php @@ -39,10 +39,10 @@ public function test_inserts_multiple_rows_at_once() : void ]) ); - $this->assertEquals(3, $this->databaseContext->tableCount($table)); - $this->assertEquals(1, $this->executedQueriesCount()); + self::assertEquals(3, $this->databaseContext->tableCount($table)); + self::assertEquals(1, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals( [ ['id' => $id1, 'age' => 20, 'name' => 'Name One', 'description' => 'Description One', 'active' => false, 'updated_at' => $date1->format('Y-m-d H:i:s'), 'tags' => '["a", "b", "c"]'], ['id' => $id2, 'age' => 30, 'name' => 'Name Two', 'description' => null, 'active' => true, 'updated_at' => $date2->format('Y-m-d H:i:s'), 'tags' => '["a", "b", "c"]'], @@ -90,9 +90,9 @@ public function test_inserts_new_rows_and_skip_already_existed() : void ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'Name Two', 'description' => 'Description Two', 'active' => true], @@ -141,9 +141,9 @@ public function test_inserts_new_rows_and_update_already_existed() : void ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'New Name Two', 'description' => 'New Description Two', 'active' => false], @@ -193,9 +193,9 @@ public function test_inserts_new_rows_and_update_selected_columns_only_of_alread ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'Name Two', 'description' => 'New Description Two', 'active' => true], diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkUpdateTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkUpdateTest.php index cb7356509..df197cd4a 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkUpdateTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/MySqlBulkUpdateTest.php @@ -45,7 +45,7 @@ public function test_update_multiple_rows_with_all_columns_at_once() : void ]), ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => false], ['id' => 2, 'name' => 'Changed name Two', 'description' => 'Changed description Two', 'active' => false], diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkInsertTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkInsertTest.php index 693141a62..a876ba6d7 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkInsertTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkInsertTest.php @@ -41,10 +41,10 @@ public function test_inserts_multiple_rows_at_once() : void ]) ); - $this->assertEquals(3, $this->databaseContext->tableCount($table)); - $this->assertEquals(1, $this->executedQueriesCount()); + self::assertEquals(3, $this->databaseContext->tableCount($table)); + self::assertEquals(1, $this->executedQueriesCount()); - $this->assertSame( + self::assertSame( [ ['id' => $id1, 'age' => 20, 'name' => 'Name One', 'description' => 'Description One', 'active' => false, 'updated_at' => $date1->format('Y-m-d H:i:s'), 'tags' => '["a", "b", "c"]'], ['id' => $id2, 'age' => 30, 'name' => 'Name Two', 'description' => null, 'active' => true, 'updated_at' => $date2->format('Y-m-d H:i:s'), 'tags' => '["a", "b", "c"]'], @@ -92,9 +92,9 @@ public function test_inserts_new_rows_and_skip_already_existed() : void ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'Name Two', 'description' => 'Description Two', 'active' => true], @@ -142,9 +142,9 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_column ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'New Name Two', 'description' => 'New Description Two', 'active' => true], @@ -191,9 +191,9 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_column ] ); - $this->assertEquals(3, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(3, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'Name Two', 'description' => 'DESCRIPTION', 'active' => false], @@ -240,9 +240,9 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_primar ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'New Name Two', 'description' => 'New Description Two', 'active' => true], diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkUpdateTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkUpdateTest.php index 4da7a5c66..b039e58cf 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkUpdateTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/PostgreSqlBulkUpdateTest.php @@ -54,7 +54,7 @@ public function test_update_multiple_rows_with_all_columns_and_multiple_primary_ ] ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => false, 'account' => 'Bob', 'created_at' => (new \DateTimeImmutable('2021-01-01 10:00:00'))->format('Y-m-d H:i:s')], ['id' => 2, 'name' => 'Changed name Two', 'description' => 'Changed description Two', 'active' => false, 'account' => 'Bob', 'created_at' => (new \DateTimeImmutable('2021-01-02 10:00:00'))->format('Y-m-d H:i:s')], @@ -103,7 +103,7 @@ public function test_update_multiple_rows_with_all_columns_at_once() : void ] ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => false], ['id' => 2, 'name' => 'Changed name Two', 'description' => 'Changed description Two', 'active' => false], @@ -155,7 +155,7 @@ public function test_update_multiple_rows_with_selected_columns_at_once() : void ] ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => false], ['id' => 2, 'name' => 'Changed name Two', 'description' => 'Description Two', 'active' => true], diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkInsertTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkInsertTest.php index 901583389..0d7d14147 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkInsertTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkInsertTest.php @@ -39,10 +39,10 @@ public function test_inserts_multiple_rows_at_once() : void ]) ); - $this->assertEquals(3, $this->databaseContext->tableCount($table)); - $this->assertEquals(1, $this->executedQueriesCount()); + self::assertEquals(3, $this->databaseContext->tableCount($table)); + self::assertEquals(1, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals( [ ['id' => $id1, 'age' => 20, 'name' => 'Name One', 'description' => 'Description One', 'active' => 0, 'updated_at' => $date1->format('Y-m-d H:i:s'), 'tags' => '["a","b","c"]'], ['id' => $id2, 'age' => 30, 'name' => 'Name Two', 'description' => null, 'active' => 1, 'updated_at' => $date2->format('Y-m-d H:i:s'), 'tags' => '["a","b","c"]'], @@ -90,9 +90,9 @@ public function test_inserts_new_rows_and_skip_already_existed() : void ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'Name Two', 'description' => 'Description Two', 'active' => true], @@ -140,9 +140,9 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_column ] ); - $this->assertEquals(4, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(4, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'New Name Two', 'description' => 'New Description Two', 'active' => true], @@ -189,9 +189,9 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_column ] ); - $this->assertEquals(3, $this->databaseContext->tableCount($table)); - $this->assertEquals(2, $this->executedQueriesCount()); - $this->assertEquals( + self::assertEquals(3, $this->databaseContext->tableCount($table)); + self::assertEquals(2, $this->executedQueriesCount()); + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => true], ['id' => 2, 'name' => 'Name Two', 'description' => 'DESCRIPTION', 'active' => false], diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkUpdateTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkUpdateTest.php index add1e6aa3..afb0adf5f 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkUpdateTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration/SqliteBulkUpdateTest.php @@ -45,7 +45,7 @@ public function test_update_multiple_rows_with_all_columns_at_once() : void ]), ); - $this->assertEquals( + self::assertEquals( [ ['id' => 1, 'name' => 'Name One', 'description' => 'Description One', 'active' => false], ['id' => 2, 'name' => 'Changed name Two', 'description' => 'Changed description Two', 'active' => false], diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/BulkDataTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/BulkDataTest.php index b6d1a2798..71b26722b 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/BulkDataTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/BulkDataTest.php @@ -81,7 +81,7 @@ public function test_returns_all_sql_parameters_as_one_dimensional_array_with_pl $registry = Type::getTypeRegistry(); - $this->assertEquals( + self::assertEquals( [ 'date_0' => 'today', 'title_0' => 'Title One', @@ -124,7 +124,7 @@ public function test_returns_columns() : void ], ]); - $this->assertEquals( + self::assertEquals( new Columns('date', 'title', 'description', 'quantity'), $bulkData->columns() ); @@ -147,7 +147,7 @@ public function test_returns_rows_with_numeric_indexes_even_when_provided_no_sor ], ]); - $this->assertEquals( + self::assertEquals( [ 0 => [ 'date' => 'today', @@ -183,7 +183,7 @@ public function test_returns_sql_rows() : void ], ]); - $this->assertEquals( + self::assertEquals( [ 0 => [ 'date_0' => 'today', @@ -219,7 +219,7 @@ public function test_transforms_data_to_sql_values_placeholders() : void ], ]); - $this->assertEquals( + self::assertEquals( '(:date_0,:title_0,:description_0,:quantity_0),(:date_1,:title_1,:description_1,:quantity_1)', $bulkData->toSqlPlaceholders() ); diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/ColumnsTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/ColumnsTest.php index 870911c8f..c6f888073 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/ColumnsTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/ColumnsTest.php @@ -13,7 +13,7 @@ public function test_adds_index_on_the_end_of_all_columns() : void { $columns = new Columns('date', 'title', 'description', 'quantity'); - $this->assertEquals( + self::assertEquals( new Columns('date_7', 'title_7', 'description_7', 'quantity_7'), $columns->suffix('_7') ); @@ -37,21 +37,21 @@ public function test_that_collection_contains_columns() : void { $columns = new Columns('date', 'title', 'description', 'quantity'); - $this->assertTrue($columns->has('date')); - $this->assertTrue($columns->has('date', 'title')); - $this->assertFalse($columns->has('row')); + self::assertTrue($columns->has('date')); + self::assertTrue($columns->has('date', 'title')); + self::assertFalse($columns->has('row')); } public function test_that_collection_not_contains_columns() : void { $columns = new Columns('date', 'title', 'description', 'quantity'); - $this->assertEquals( + self::assertEquals( new Columns('title', 'description', 'quantity'), $columns->without('date') ); $columns = new Columns('date', 'title', 'description', 'quantity'); - $this->assertEquals( + self::assertEquals( new Columns('title', 'quantity'), $columns->without('date', 'description') ); @@ -61,7 +61,7 @@ public function test_transforms_all_columns_to_placeholders() : void { $columns = new Columns('date', 'title', 'description', 'quantity'); - $this->assertEquals( + self::assertEquals( new Columns(':date', ':title', ':description', ':quantity'), $columns->prefix(':') ); diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/DbalPlatformTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/DbalPlatformTest.php index 14b1cb7a4..2ff6b3753 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/DbalPlatformTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/DbalPlatformTest.php @@ -22,21 +22,21 @@ public function test_is_mysql() : void { $platform = new DbalPlatform(new MySQL80Platform()); - $this->assertInstanceOf(MySQLDialect::class, $platform->dialect()); + self::assertInstanceOf(MySQLDialect::class, $platform->dialect()); } public function test_is_mysql_with_mariadb() : void { $platform = new DbalPlatform(new MariaDBPlatform()); - $this->assertInstanceOf(MySQLDialect::class, $platform->dialect()); + self::assertInstanceOf(MySQLDialect::class, $platform->dialect()); } public function test_is_postgres_sql() : void { $platform = new DbalPlatform(new PostgreSQLPlatform()); - $this->assertInstanceOf(PostgreSQLDialect::class, $platform->dialect()); + self::assertInstanceOf(PostgreSQLDialect::class, $platform->dialect()); } /** @@ -47,10 +47,10 @@ public function test_is_sqlite_sql(string $className) : void if (\class_exists($className)) { $platform = new DbalPlatform(new $className()); } else { - $this->markTestSkipped('Unknown platform class: ' . $className); + self::markTestSkipped('Unknown platform class: ' . $className); } - $this->assertInstanceOf(SqliteDialect::class, $platform->dialect()); + self::assertInstanceOf(SqliteDialect::class, $platform->dialect()); } public function test_no_supported_platform() : void diff --git a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/TableDefinitionTest.php b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/TableDefinitionTest.php index 9b696eaff..64c204123 100644 --- a/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/TableDefinitionTest.php +++ b/src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Unit/TableDefinitionTest.php @@ -29,7 +29,7 @@ public function test_getting_sql_typed_placeholders() : void new Column('updated_at', Type::getType('datetime_immutable')), ); - $this->assertSame( + self::assertSame( '(CAST(:id_0 as INT),CAST(:name_0 as VARCHAR(255)),CAST(:updated_at_0 as TIMESTAMP(0) WITHOUT TIME ZONE)),(CAST(:id_1 as INT),CAST(:name_1 as VARCHAR(255)),CAST(:updated_at_1 as TIMESTAMP(0) WITHOUT TIME ZONE))', $table->toSqlCastedPlaceholders($data, new PostgreSQLPlatform()) ); @@ -51,7 +51,7 @@ public function test_getting_types_from_bulk_data() : void new Column('updated_at', Type::getType('datetime_immutable')), ); - $this->assertSame( + self::assertSame( [ 'id_0' => 'integer', 'id_1' => 'integer', diff --git a/src/lib/dremel/tests/Flow/Dremel/Tests/Integration/DremelTest.php b/src/lib/dremel/tests/Flow/Dremel/Tests/Integration/DremelTest.php index 8be2aec6f..34373280e 100644 --- a/src/lib/dremel/tests/Flow/Dremel/Tests/Integration/DremelTest.php +++ b/src/lib/dremel/tests/Flow/Dremel/Tests/Integration/DremelTest.php @@ -26,7 +26,7 @@ public function test_deeply_nested_lists() : void $shredded = (new Dremel())->shred($values, 5); - $this->assertSame( + self::assertSame( $values, (new Dremel())->assemble($shredded->repetitions, $shredded->definitions, $shredded->values) ); @@ -41,12 +41,12 @@ public function test_dremel_shredding_and_assembling() : void $dremel = new Dremel(); $shredded = $dremel->shred($values, \max($definitions)); - $this->assertSame($repetitions, $shredded->repetitions); - $this->assertSame($definitions, $shredded->definitions); + self::assertSame($repetitions, $shredded->repetitions); + self::assertSame($definitions, $shredded->definitions); $assembledValues = $dremel->assemble($shredded->repetitions, $shredded->definitions, $shredded->values); - $this->assertSame($values, $assembledValues); + self::assertSame($values, $assembledValues); } public function test_dremel_shredding_and_assembling_list_with_empty_elements() : void @@ -58,10 +58,10 @@ public function test_dremel_shredding_and_assembling_list_with_empty_elements() $dremel = new Dremel(); $shredded = $dremel->shred($values, 3); - $this->assertSame($repetitions, $shredded->repetitions); - $this->assertSame($definitions, $shredded->definitions); + self::assertSame($repetitions, $shredded->repetitions); + self::assertSame($definitions, $shredded->definitions); - $this->assertSame( + self::assertSame( $values, $dremel->assemble($shredded->repetitions, $shredded->definitions, $shredded->values) ); @@ -76,10 +76,10 @@ public function test_dremel_shredding_and_assembling_list_with_nulls_in_list() : $dremel = new Dremel(); $shredded = $dremel->shred($values, 3); - $this->assertSame($repetitions, $shredded->repetitions); - $this->assertSame($definitions, $shredded->definitions); + self::assertSame($repetitions, $shredded->repetitions); + self::assertSame($definitions, $shredded->definitions); - $this->assertSame( + self::assertSame( $values, $dremel->assemble($shredded->repetitions, $shredded->definitions, $shredded->values) ); @@ -95,11 +95,11 @@ public function test_dremel_shredding_and_assembling_nullable_nested_values() : $dremel = new Dremel(); $shredded = $dremel->shred($values, 2); - $this->assertSame($repetitions, $shredded->repetitions); - $this->assertSame($definitions, $shredded->definitions); - $this->assertSame($flatValues, $shredded->values); + self::assertSame($repetitions, $shredded->repetitions); + self::assertSame($definitions, $shredded->definitions); + self::assertSame($flatValues, $shredded->values); - $this->assertSame( + self::assertSame( $values, $dremel->assemble($shredded->repetitions, $shredded->definitions, $shredded->values) ); diff --git a/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelAssembleTest.php b/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelAssembleTest.php index adfb941d4..f80f15b40 100644 --- a/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelAssembleTest.php +++ b/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelAssembleTest.php @@ -16,7 +16,7 @@ public function test_assembly_shred_on_nested_nullable_lists() : void $definitions = [2, 2, 2, 1, 1, 2, 2, 2]; $values = [0, 1, 2, 4, 5, 6]; - $this->assertSame( + self::assertSame( [[[0, 1, 2]], [[null, null]], [[4, 5, 6]]], (new Dremel())->assemble($repetitions, $definitions, $values) ); @@ -28,7 +28,7 @@ public function test_decode_column_of_integer_list() : void $definitions = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]; $values = [3, 7, 5, 4, 4, 7, 10, 6, 4, 10, 3, 2, 10, 4, 4, 5, 3, 2, 1, 4, 3, 4, 3, 9, 10, 3, 4, 5, 7, 4]; - $this->assertSame( + self::assertSame( [[3, 7, 5], [4, 4, 7], [10, 6, 4], [10, 3, 2], [10, 4, 4], [5, 3, 2], [1, 4, 3], [4, 3, 9], [10, 3, 4], [5, 7, 4]], (new Dremel())->assemble($repetitions, $definitions, $values) ); @@ -40,7 +40,7 @@ public function test_decode_flat_column_of_integers_where_every_second_one_is_nu $definitions = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]; $values = [0, 2, 4, 6, 8]; - $this->assertSame( + self::assertSame( [0, null, 2, null, 4, null, 6, null, 8, null], (new Dremel())->assemble($repetitions, $definitions, $values) ); @@ -52,7 +52,7 @@ public function test_decode_flat_column_of_integers_without_nulls() : void $definitions = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; $values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - $this->assertSame( + self::assertSame( [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], (new Dremel())->assemble($repetitions, $definitions, $values) ); @@ -64,7 +64,7 @@ public function test_decode_list_with_nulls_and_different_size_of_each_list() : $definitions = [3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 3, 2]; $values = [10, 7, 9, 8, 9, 4, 6, 3, 10, 8]; - $this->assertSame( + self::assertSame( [[10], [7, null, null], [9], [8, null], [9], [4, null, null, null, null], [6], [3, null, null], [10, null, null], [8, null]], (new Dremel())->assemble($repetitions, $definitions, $values) ); @@ -76,7 +76,7 @@ public function test_decode_nested_list_v2() : void $definitions = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]; $values = [5, 3, 8, 2, 9, 5, 5, 10, 9, 7, 2, 1, 8, 2, 4, 7, 2, 4, 4, 10, 6, 5, 6, 6, 3, 6, 5, 7, 2, 10, 6, 4, 7, 2, 8, 10, 6, 5, 9, 2, 10, 3, 7, 3, 7, 8, 7, 5, 8, 4, 1, 5, 1, 10, 7, 4, 7, 2, 7, 3, 9, 3, 2, 3, 9, 5, 2, 6, 2, 10, 10, 7, 9, 9, 8, 5, 9, 7, 7, 9, 1, 8, 2, 9, 10, 6, 2, 10, 10, 3, 5, 6, 5, 10, 6, 3, 6, 8, 5, 1, 10, 2, 10, 4, 4, 5, 6, 9, 5, 6, 3, 4, 3, 9, 10, 3, 2, 1, 2, 6, 7, 3, 6, 1, 7, 6, 2, 2, 10, 5, 1, 6, 3, 5, 3, 5, 6, 2, 8, 3, 5, 8, 1, 7, 9, 4, 7, 6, 7, 8, 8, 1, 4, 7, 3, 6, 5, 6, 7, 9, 8, 2, 4, 9, 8, 6, 6, 5, 2, 6, 1, 10, 6, 1, 1, 6, 7, 1, 5, 2, 1, 9, 1, 7, 10, 5, 2, 1, 8, 7, 9, 1, 2, 8, 10, 7, 9, 5, 9, 5, 2, 1, 5, 5, 3, 5, 6, 6, 6, 1, 1, 4, 3, 8, 3, 9, 3, 4, 7, 2, 9, 6, 10, 5, 5, 9, 9, 9, 7, 1, 1, 8, 10, 6, 4, 7, 7, 10, 9, 10, 8, 10, 3, 2, 5, 2, 1, 9, 2, 9, 6, 7, 7, 3, 7, 9, 4, 8, 3, 1, 4, 6, 1, 3, 2, 4, 5, 7, 1, 9, 9, 10, 4, 2, 5, 8, 9, 2, 7, 1, 4, 9, 1, 9, 9, 2, 4, 4, 7, 7, 2, 9, 3, 4, 4, 1, 9, 4, 1, 1, 8, 1, 1, 7, 3, 10, 3, 8, 3, 10, 10, 5, 2, 6, 8, 1, 2, 9, 9, 8, 10, 10, 10, 5, 1, 1, 8, 9, 1, 5, 9, 7, 3, 5, 9, 8, 8, 6, 2, 8, 8, 4, 5, 1, 10, 7, 9, 5, 10, 2, 2, 7, 1, 7, 2, 6, 10, 7, 6, 5, 7, 4, 3, 4, 10, 10, 7, 9, 9, 4, 5, 5, 6, 10, 1, 1, 3, 10, 5, 10, 5, 2, 2, 8, 7, 4, 9, 7, 4, 1, 1, 6, 3, 10, 1, 6, 3, 10, 5, 8, 2, 5, 9, 3, 9, 3, 9, 1, 8, 4, 6, 6, 7, 9, 2, 8, 3, 3, 5, 2, 10, 4, 3, 8, 1, 6, 6, 7, 1, 9, 10, 7, 4, 7, 2, 3, 6, 10, 5, 8, 4, 7, 9, 4, 3, 4, 7, 10, 10, 3, 4, 2, 1, 6, 10, 7, 10, 1, 9, 10, 5, 8, 9, 10, 1, 9, 8, 7, 1, 4, 1, 3, 6, 10, 8, 9, 6, 1, 7, 2, 10, 6, 7, 3, 7, 9, 6, 3, 1, 6, 9, 4, 6, 7, 9, 7, 7, 3, 4, 3, 3, 9, 5, 5, 2, 8, 5, 10, 10, 8, 2, 9, 6, 2, 5, 2, 9, 4, 9, 3, 3, 4, 9, 8, 2, 2, 6, 10, 9, 3, 1, 3, 8, 8, 9, 6, 8, 8, 1, 1, 2, 4, 1, 4, 4, 9, 5, 7, 1, 6, 1, 7, 3, 5, 5, 7, 2, 3, 10, 10, 3, 7, 6, 2, 10, 3, 10, 2, 7, 9, 3, 2, 2, 8, 10, 2, 10, 4, 4, 4, 10, 9, 8, 10, 2, 9, 10, 1, 7, 10, 3, 4, 3, 9, 5, 8, 10, 9, 5, 5, 3, 4, 3, 6, 6, 9, 8, 1, 9, 2, 3, 9, 4, 3, 8, 9, 6, 9, 10, 9, 8, 4, 8, 7, 2, 2, 6, 7, 6, 4, 4, 7, 3, 2, 5, 7, 9, 10, 8, 6, 8, 3, 4, 9, 3, 1, 7, 6, 4, 4, 5, 6, 5, 2, 5, 10, 10, 9, 10, 2, 8, 2, 2, 2, 10, 5, 10, 3, 2, 8, 6, 8, 4, 9, 9, 6, 5, 5, 4, 1, 1, 5, 3, 9, 6, 6, 5, 9, 3, 10, 6, 1, 5, 6, 6, 7, 1, 7, 5, 5, 7, 2, 10, 1, 8, 8, 3, 4, 3, 5, 2, 1, 3, 4, 2, 1, 2, 10, 4, 5, 1, 6, 7, 5, 3, 5, 10, 7, 6, 2, 8, 10, 4, 2, 2, 1, 4, 5, 3, 2, 3, 2, 2, 3, 2, 6, 3, 5, 9, 8, 8, 5, 7, 5, 5, 4, 7, 4, 10, 5, 9, 5, 5, 1, 6, 3, 5, 10, 9, 7, 9, 9, 9, 3, 4, 7, 3, 4, 3, 5, 9, 3, 4, 8, 4, 4, 10, 3, 1, 7, 7, 1, 1, 2, 1, 6, 5, 7, 3, 9, 5, 6, 1, 4, 8, 7]; - $this->assertSame( + self::assertSame( [ [[[5, 3, 8], [2, 9, 5]], [[5, 10], [9, 7], [2, 1, 8]], [[2, 4]]], [[[7, 2, 4], [4, 10, 6], [5, 6, 6]], [[3, 6], [5]], [[7, 2, 10], [6, 4, 7]]], @@ -188,7 +188,7 @@ public function test_decode_nullable_column_of_integer_list() : void $definitions = [3, 3, 3, 0, 3, 3, 3, 0, 3, 3, 3, 0, 3, 3, 3, 0, 3, 3, 3, 0]; $values = [5, 9, 2, 3, 2, 9, 5, 2, 3, 7, 2, 3, 2, 6, 6, null, null, null, null, null]; - $this->assertSame( + self::assertSame( [[5, 9, 2], null, [3, 2, 9], null, [5, 2, 3], null, [7, 2, 3], null, [2, 6, 6], null], (new Dremel())->assemble($repetitions, $definitions, $values) ); @@ -221,7 +221,7 @@ public function test_decoding_nested_list_with_nulls_and_different_size_of_each_ * iteration 6: stack[[[9, 5], [9, null]]], current_list[6,6,7] - rep 2 def 5 (take next val) * iteration 7: stack[[[9, 5], [9, null]], [[6,6,7]], current_list[7] - rep 1 def 5 (take next val) */ - $this->assertSame( + self::assertSame( [ [[9, 5], [9, null]], [[6, 6, 7], [7, 9, 3]], @@ -253,7 +253,7 @@ public function test_decoding_nested_list_with_nulls_and_different_size_of_each_ * iteration 2: stack[], current_list[[10, 5], [9]] - rep 2 def 7 (take next val) * iteration 3: stack[], current_list[[10, 5], [9, null]] - rep 3 def 6 (take null) */ - $this->assertSame( + self::assertSame( [ [[[10, 5], [9, null], [1, 10], [7, null]], [[null, 6], [3, 1], [null, 6], [9, 9]], [[null, 4], [null, 6], [null, null], [3, 8]], [[5, 8], [1, 10], [null, null], [9, 4]]], [[[null, 6, null], [2, null, null], [8, 4, 6], [null, 8, 9]], [[null, 4, 10], [null, null, null], [4, null, null], [8, 4, 3]]], @@ -276,7 +276,7 @@ public function test_reconstructing_map() : void $definitions = [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]; $values = [6, 10, 10, 5, 9, 8, 4, 7, 4, 7, 1, 6, 6, 10, 6, 6, 1, 5, 8, 5, 2, 6, 3, 9, 9, 10, 7, 9, 4, 6, 5, 10, 3, 5, 4, 7, 6, 3, 5, 7, 5, 2, 8, 3, 8, 5]; - $this->assertSame( + self::assertSame( [ [ [ diff --git a/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelShredTest.php b/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelShredTest.php index 92c52afd5..e3b99c87a 100644 --- a/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelShredTest.php +++ b/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/DremelShredTest.php @@ -15,7 +15,7 @@ public function test_dremel_shred_on_a_flat_non_nullable_columns() : void $data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; $shredded = (new Dremel())->shred($data, 10); - $this->assertEquals( + self::assertEquals( [ 'repetitions' => [], 'definitions' => [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], @@ -45,7 +45,7 @@ public function test_dremel_shred_on_deeply_not_equally_distributed_repeated_col ]; $shredded = (new Dremel())->shred($data, 5); - $this->assertSame( + self::assertSame( [ 'repetitions' => [0, 2, 2, 0, 2, 2, 1, 2, 2, 0, 2, 2], 'definitions' => [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], @@ -68,7 +68,7 @@ public function test_dremel_shred_on_deeply_repeated_columns() : void ]; $shredded = (new Dremel())->shred($data, 2); - $this->assertSame( + self::assertSame( [ 'repetitions' => [0, 2, 2, 0, 2, 2, 0, 2, 2], 'definitions' => [2, 2, 2, 2, 2, 2, 2, 2, 2], @@ -87,7 +87,7 @@ public function test_dremel_shred_on_nested_nullable_lists() : void $data = [[1, 2, 3], [null, null], [4, 5, 6]]; $shredded = (new Dremel())->shred($data, 3); - $this->assertSame( + self::assertSame( [ 'repetitions' => [0, 1, 1, 0, 1, 0, 1, 1], 'definitions' => [3, 3, 3, 2, 2, 3, 3, 3], @@ -110,7 +110,7 @@ public function test_dremel_shred_on_repeated_columns() : void ]; $shredded = (new Dremel())->shred($data, 2); - $this->assertSame( + self::assertSame( [ 'repetitions' => [0, 1, 1, 0, 1, 1, 0, 1, 1], 'definitions' => [2, 2, 2, 2, 2, 2, 2, 2, 2], diff --git a/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/ListNodeTest.php b/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/ListNodeTest.php index 8ebf33171..34b51b854 100644 --- a/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/ListNodeTest.php +++ b/src/lib/dremel/tests/Flow/Dremel/Tests/Unit/ListNodeTest.php @@ -19,7 +19,7 @@ public function test_creating_list_node_with_repetition_3() : void public function test_push_by_2_levels() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -50,7 +50,7 @@ public function test_push_by_2_levels() : void public function test_push_to_level_3_then_2_then_1() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -72,7 +72,7 @@ public function test_push_to_level_3_then_2_then_1() : void public function test_push_to_level_3_then_2_then_1_then_1_again() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -99,7 +99,7 @@ public function test_push_to_level_3_then_2_then_1_then_1_again() : void public function test_push_to_level_3_then_2_then_1_then_2() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -124,7 +124,7 @@ public function test_push_to_level_3_then_2_then_1_then_2() : void public function test_push_to_level_3_then_2_then_1_then_3() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -147,7 +147,7 @@ public function test_push_to_level_3_then_2_then_1_then_3() : void public function test_push_value_highest_level_then_lower_and_higher() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -167,7 +167,7 @@ public function test_push_value_highest_level_then_lower_and_higher() : void public function test_push_value_to_highest_level() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -185,7 +185,7 @@ public function test_push_value_to_highest_level() : void public function test_push_value_to_lower_level() : void { - $this->assertSame( + self::assertSame( [ [ [ @@ -202,7 +202,7 @@ public function test_push_value_to_lower_level() : void public function test_push_value_to_specific_level() : void { - $this->assertSame( + self::assertSame( [ [ [ diff --git a/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadDataCommandTest.php b/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadDataCommandTest.php index e0627e224..a3164bfe4 100644 --- a/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadDataCommandTest.php +++ b/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadDataCommandTest.php @@ -25,8 +25,8 @@ public function test_read_data_command() : void '-t' => 20, ]); - $this->assertSame(0, $tester->getStatusCode()); - $this->assertStringContainsString( + self::assertSame(0, $tester->getStatusCode()); + self::assertStringContainsString( <<<'OUTPUT' +---------+------------+---------------------+-------+--------------+---------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+----------------------+ | boolean | int32 | int64 | float | double | decimal | string | date | datetime | list_of_datetimes | map_of_ints | list_of_strings | struct_flat | diff --git a/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadMetadataTest.php b/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadMetadataTest.php index f7c20f11e..08f129904 100644 --- a/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadMetadataTest.php +++ b/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadMetadataTest.php @@ -24,11 +24,11 @@ public function test_reading_metadata_from_non_json_file() : void 'file' => $path, ]); - $this->assertStringContainsString( + self::assertStringContainsString( 'not a valid parquet file', $tester->getDisplay() ); - $this->assertSame(1, $tester->getStatusCode()); + self::assertSame(1, $tester->getStatusCode()); } public function test_reading_metadata_from_parquet_file() : void @@ -49,11 +49,11 @@ public function test_reading_metadata_from_parquet_file() : void '--statistics' => 1, ]); - $this->assertStringContainsString('Metadata', $tester->getDisplay()); - $this->assertStringContainsString('Row Groups', $tester->getDisplay()); - $this->assertStringContainsString('Column Chunks', $tester->getDisplay()); - $this->assertStringContainsString('Column Chunks Statistics', $tester->getDisplay()); - $this->assertStringContainsString('Page Headers', $tester->getDisplay()); - $this->assertSame(0, $tester->getStatusCode()); + self::assertStringContainsString('Metadata', $tester->getDisplay()); + self::assertStringContainsString('Row Groups', $tester->getDisplay()); + self::assertStringContainsString('Column Chunks', $tester->getDisplay()); + self::assertStringContainsString('Column Chunks Statistics', $tester->getDisplay()); + self::assertStringContainsString('Page Headers', $tester->getDisplay()); + self::assertSame(0, $tester->getStatusCode()); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/Binary/BinaryReaderWriterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/Binary/BinaryReaderWriterTest.php index 4afb71448..1113a4446 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/Binary/BinaryReaderWriterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/Binary/BinaryReaderWriterTest.php @@ -46,7 +46,7 @@ public function test_writing_and_reading_decimals(array $decimals, int $precisio $buffer = ''; (new BinaryBufferWriter($buffer))->writeDecimals($decimals, $byteLength, $precision, $scale); - $this->assertSame( + self::assertSame( $decimals, (new BinaryBufferReader($buffer))->readDecimals(\count($decimals), $byteLength, $precision, $scale) ); @@ -58,7 +58,7 @@ public function test_writing_and_reading_floats() : void $floats = [1.1, 2.2, 3.3, 4.4, 9.1]; (new BinaryBufferWriter($buffer))->writeFloats($floats); - $this->assertEqualsWithDelta( + self::assertEqualsWithDelta( $floats, (new BinaryBufferReader($buffer))->readFloats(\count($floats)), 0.000001, @@ -69,7 +69,7 @@ public function test_writing_and_reading_strings() : void { $buffer = ''; (new BinaryBufferWriter($buffer))->writeStrings($strings = ['some_string_01', 'some_string_02', 'some_string_02', 'ĄCZXCĄŚQWRQW']); - $this->assertSame( + self::assertSame( $strings, (new BinaryBufferReader($buffer))->readStrings(\count($strings)) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/CompressionTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/CompressionTest.php index f5b8a223c..2dc8567c6 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/CompressionTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/CompressionTest.php @@ -51,11 +51,11 @@ public function test_writing_and_reading_file_with_gzip_compression() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -98,11 +98,11 @@ public function test_writing_and_reading_file_with_snappy_compression() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -145,11 +145,11 @@ public function test_writing_and_reading_file_with_uncompressed_compression() : $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/EdgeCasesReadingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/EdgeCasesReadingTest.php index a5e50e35b..2eb53f23d 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/EdgeCasesReadingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/EdgeCasesReadingTest.php @@ -21,7 +21,7 @@ public function test_nonullable_impala() : void $rows[] = $row; } - $this->assertSame( + self::assertSame( [ [ 'ID' => null, @@ -100,7 +100,7 @@ public function test_read_datapage_v2_snappy_list() : void $rows[] = $row; } - $this->assertSame( + self::assertSame( [ ['emptylist' => null], ], @@ -120,7 +120,7 @@ public function test_read_null_list() : void $rows[] = $row; } - $this->assertSame( + self::assertSame( [ ['emptylist' => null], ], diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsReadingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsReadingTest.php index 8fb16e2d0..a6f5f1c70 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsReadingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsReadingTest.php @@ -14,19 +14,19 @@ public function test_reading_list_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/lists.parquet'); - $this->assertNull($file->metadata()->schema()->get('list')->type()); - $this->assertEquals('LIST', $file->metadata()->schema()->get('list')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('list')->type()); + self::assertEquals('LIST', $file->metadata()->schema()->get('list')->logicalType()->name()); $count = 0; foreach ($file->values(['list']) as $row) { - $this->assertContainsOnly('int', $row['list']); - $this->assertCount(3, $row['list']); + self::assertContainsOnly('int', $row['list']); + self::assertCount(3, $row['list']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_list_column_with_limit() : void @@ -34,18 +34,18 @@ public function test_reading_list_column_with_limit() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/lists.parquet'); - $this->assertNull($file->metadata()->schema()->get('list')->type()); - $this->assertEquals('LIST', $file->metadata()->schema()->get('list')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('list')->type()); + self::assertEquals('LIST', $file->metadata()->schema()->get('list')->logicalType()->name()); $count = 0; foreach ($file->values(['list'], $limit = 50) as $row) { - $this->assertContainsOnly('int', $row['list']); - $this->assertCount(3, $row['list']); + self::assertContainsOnly('int', $row['list']); + self::assertCount(3, $row['list']); $count++; } - $this->assertSame($limit, $count); + self::assertSame($limit, $count); } public function test_reading_list_nested_column() : void @@ -53,22 +53,22 @@ public function test_reading_list_nested_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/lists.parquet'); - $this->assertNull($file->metadata()->schema()->get('list_nested')->type()); - $this->assertEquals('LIST', $file->metadata()->schema()->get('list_nested')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('list_nested')->type()); + self::assertEquals('LIST', $file->metadata()->schema()->get('list_nested')->logicalType()->name()); $count = 0; foreach ($file->values(['list_nested']) as $row) { - $this->assertIsArray($row['list_nested']); - $this->assertIsList($row['list_nested']); - $this->assertIsArray($row['list_nested'][0]); - $this->assertIsList($row['list_nested'][0]); - $this->assertIsArray($row['list_nested'][0][0]); + self::assertIsArray($row['list_nested']); + self::assertIsList($row['list_nested']); + self::assertIsArray($row['list_nested'][0]); + self::assertIsList($row['list_nested'][0]); + self::assertIsArray($row['list_nested'][0][0]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_list_nullable_column() : void @@ -76,23 +76,23 @@ public function test_reading_list_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/lists.parquet'); - $this->assertNull($file->metadata()->schema()->get('list_nullable')->type()); - $this->assertEquals('LIST', $file->metadata()->schema()->get('list_nullable')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('list_nullable')->type()); + self::assertEquals('LIST', $file->metadata()->schema()->get('list_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['list_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertContainsOnly('int', $row['list_nullable']); - $this->assertCount(3, $row['list_nullable']); + self::assertContainsOnly('int', $row['list_nullable']); + self::assertCount(3, $row['list_nullable']); } else { - $this->assertNull($row['list_nullable']); + self::assertNull($row['list_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_list_of_structures_column() : void @@ -100,31 +100,31 @@ public function test_reading_list_of_structures_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/lists.parquet'); - $this->assertNull($file->metadata()->schema()->get('list_mixed_types')->type()); - $this->assertEquals('LIST', $file->metadata()->schema()->get('list_mixed_types')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('list_mixed_types')->type()); + self::assertEquals('LIST', $file->metadata()->schema()->get('list_mixed_types')->logicalType()->name()); $count = 0; foreach ($file->values(['list_mixed_types']) as $row) { - $this->assertIsArray($row['list_mixed_types']); - $this->assertCount(4, $row['list_mixed_types']); - $this->assertArrayHasKey('int', $row['list_mixed_types'][0]); - $this->assertArrayHasKey('string', $row['list_mixed_types'][0]); - $this->assertArrayHasKey('bool', $row['list_mixed_types'][0]); - $this->assertArrayHasKey('int', $row['list_mixed_types'][1]); - $this->assertArrayHasKey('string', $row['list_mixed_types'][1]); - $this->assertArrayHasKey('bool', $row['list_mixed_types'][1]); - $this->assertArrayHasKey('int', $row['list_mixed_types'][2]); - $this->assertArrayHasKey('string', $row['list_mixed_types'][2]); - $this->assertArrayHasKey('bool', $row['list_mixed_types'][2]); - $this->assertArrayHasKey('int', $row['list_mixed_types'][3]); - $this->assertArrayHasKey('string', $row['list_mixed_types'][3]); - $this->assertArrayHasKey('bool', $row['list_mixed_types'][3]); + self::assertIsArray($row['list_mixed_types']); + self::assertCount(4, $row['list_mixed_types']); + self::assertArrayHasKey('int', $row['list_mixed_types'][0]); + self::assertArrayHasKey('string', $row['list_mixed_types'][0]); + self::assertArrayHasKey('bool', $row['list_mixed_types'][0]); + self::assertArrayHasKey('int', $row['list_mixed_types'][1]); + self::assertArrayHasKey('string', $row['list_mixed_types'][1]); + self::assertArrayHasKey('bool', $row['list_mixed_types'][1]); + self::assertArrayHasKey('int', $row['list_mixed_types'][2]); + self::assertArrayHasKey('string', $row['list_mixed_types'][2]); + self::assertArrayHasKey('bool', $row['list_mixed_types'][2]); + self::assertArrayHasKey('int', $row['list_mixed_types'][3]); + self::assertArrayHasKey('string', $row['list_mixed_types'][3]); + self::assertArrayHasKey('bool', $row['list_mixed_types'][3]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_list_of_structures_nullable_column() : void @@ -132,26 +132,26 @@ public function test_reading_list_of_structures_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/lists.parquet'); - $this->assertNull($file->metadata()->schema()->get('list_of_structs_nullable')->type()); - $this->assertEquals('LIST', $file->metadata()->schema()->get('list_of_structs_nullable')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('list_of_structs_nullable')->type()); + self::assertEquals('LIST', $file->metadata()->schema()->get('list_of_structs_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['list_of_structs_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsArray($row['list_of_structs_nullable']); + self::assertIsArray($row['list_of_structs_nullable']); foreach ($row['list_of_structs_nullable'] as $rowList) { - $this->assertIsInt($rowList['id']); - $this->assertIsString($rowList['name']); + self::assertIsInt($rowList['id']); + self::assertIsString($rowList['name']); } } else { - $this->assertNull($row['list_of_structs_nullable']); + self::assertNull($row['list_of_structs_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsWritingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsWritingTest.php index 9138533f5..f26fffe71 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsWritingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/ListsWritingTest.php @@ -30,7 +30,7 @@ public function test_writing_list_of_ints() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -54,7 +54,7 @@ public function test_writing_list_of_strings() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -88,7 +88,7 @@ public function test_writing_list_of_structures() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -114,7 +114,7 @@ public function test_writing_list_with_nullable_elements() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -140,7 +140,7 @@ public function test_writing_list_with_nullable_list_values() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -166,7 +166,7 @@ public function test_writing_nullable_list_of_ints() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -205,7 +205,7 @@ public function test_writing_nullable_list_of_structures() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsReadingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsReadingTest.php index 93e1f9043..9bd0ddacc 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsReadingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsReadingTest.php @@ -14,18 +14,18 @@ public function test_reading_map_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map')->logicalType()->name()); $count = 0; foreach ($file->values(['map']) as $row) { - $this->assertIsString(\array_key_first($row['map'])); - $this->assertIsInt($row['map'][\array_key_first($row['map'])]); + self::assertIsString(\array_key_first($row['map'])); + self::assertIsInt($row['map'][\array_key_first($row['map'])]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_nullable_column() : void @@ -33,22 +33,22 @@ public function test_reading_map_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_nullable')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_nullable')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_nullable')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['map_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsString(\array_key_first($row['map_nullable'])); - $this->assertIsInt($row['map_nullable'][\array_key_first($row['map_nullable'])]); + self::assertIsString(\array_key_first($row['map_nullable'])); + self::assertIsInt($row['map_nullable'][\array_key_first($row['map_nullable'])]); } else { - $this->assertNull($row['map_nullable']); + self::assertNull($row['map_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_of_complex_lists() : void @@ -56,21 +56,21 @@ public function test_reading_map_of_complex_lists() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_complex_lists')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_complex_lists')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_complex_lists')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_complex_lists')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_complex_lists']) as $row) { - $this->assertIsArray($row['map_of_complex_lists']); - $this->assertIsArray($row['map_of_complex_lists']['key_0']); - $this->assertIsString($row['map_of_complex_lists']['key_0']['string'][0]); - $this->assertIsInt($row['map_of_complex_lists']['key_0']['int'][0]); - $this->assertIsBool($row['map_of_complex_lists']['key_0']['bool'][0]); + self::assertIsArray($row['map_of_complex_lists']); + self::assertIsArray($row['map_of_complex_lists']['key_0']); + self::assertIsString($row['map_of_complex_lists']['key_0']['string'][0]); + self::assertIsInt($row['map_of_complex_lists']['key_0']['int'][0]); + self::assertIsBool($row['map_of_complex_lists']['key_0']['bool'][0]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_of_list_of_map_of_lists() : void @@ -78,22 +78,22 @@ public function test_reading_map_of_list_of_map_of_lists() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_list_of_map_of_lists')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_list_of_map_of_lists')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_list_of_map_of_lists')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_list_of_map_of_lists')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_list_of_map_of_lists']) as $row) { - $this->assertIsArray($row['map_of_list_of_map_of_lists']); - $this->assertIsArray($row['map_of_list_of_map_of_lists']['key_0']); - $this->assertIsArray($row['map_of_list_of_map_of_lists']['key_0'][0]); - $this->assertIsArray($row['map_of_list_of_map_of_lists']['key_0'][0]['string_0_0_0']); - $this->assertIsList($row['map_of_list_of_map_of_lists']['key_0'][0]['string_0_0_0']); - $this->assertIsInt($row['map_of_list_of_map_of_lists']['key_0'][0]['string_0_0_0'][0]); + self::assertIsArray($row['map_of_list_of_map_of_lists']); + self::assertIsArray($row['map_of_list_of_map_of_lists']['key_0']); + self::assertIsArray($row['map_of_list_of_map_of_lists']['key_0'][0]); + self::assertIsArray($row['map_of_list_of_map_of_lists']['key_0'][0]['string_0_0_0']); + self::assertIsList($row['map_of_list_of_map_of_lists']['key_0'][0]['string_0_0_0']); + self::assertIsInt($row['map_of_list_of_map_of_lists']['key_0'][0]['string_0_0_0'][0]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_of_lists() : void @@ -101,20 +101,20 @@ public function test_reading_map_of_lists() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_lists')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_lists')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_lists')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_lists')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_lists']) as $row) { - $this->assertIsArray($row['map_of_lists']); - $this->assertIsArray($row['map_of_lists']['key_0']); - $this->assertIsList($row['map_of_lists']['key_0']); - $this->assertIsInt($row['map_of_lists']['key_0'][0]); + self::assertIsArray($row['map_of_lists']); + self::assertIsArray($row['map_of_lists']['key_0']); + self::assertIsList($row['map_of_lists']['key_0']); + self::assertIsInt($row['map_of_lists']['key_0'][0]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_of_maps_column() : void @@ -122,19 +122,19 @@ public function test_reading_map_of_maps_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_maps')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_maps')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_maps')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_maps')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_maps']) as $row) { - $this->assertIsArray($row['map_of_maps']); - $this->assertIsArray($row['map_of_maps']['outer_key_0']); - $this->assertIsInt($row['map_of_maps']['outer_key_0']['inner_key_0']); + self::assertIsArray($row['map_of_maps']); + self::assertIsArray($row['map_of_maps']['outer_key_0']); + self::assertIsInt($row['map_of_maps']['outer_key_0']['inner_key_0']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_of_struct_of_structs_column() : void @@ -142,20 +142,20 @@ public function test_reading_map_of_struct_of_structs_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_struct_of_structs')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_struct_of_structs')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_struct_of_structs')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_struct_of_structs')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_struct_of_structs']) as $row) { - $this->assertIsArray($row['map_of_struct_of_structs']); - $this->assertIsArray($row['map_of_struct_of_structs']['key_0']); - $this->assertIsInt($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['int']); - $this->assertIsString($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['string']); + self::assertIsArray($row['map_of_struct_of_structs']); + self::assertIsArray($row['map_of_struct_of_structs']['key_0']); + self::assertIsInt($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['int']); + self::assertIsString($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['string']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_map_of_struct_of_structs_column_with_limit() : void @@ -163,19 +163,19 @@ public function test_reading_map_of_struct_of_structs_column_with_limit() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_struct_of_structs')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_struct_of_structs')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_struct_of_structs')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_struct_of_structs')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_struct_of_structs'], $limit = 50) as $row) { - $this->assertIsArray($row['map_of_struct_of_structs']); - $this->assertIsArray($row['map_of_struct_of_structs']['key_0']); - $this->assertIsInt($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['int']); - $this->assertIsString($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['string']); + self::assertIsArray($row['map_of_struct_of_structs']); + self::assertIsArray($row['map_of_struct_of_structs']['key_0']); + self::assertIsInt($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['int']); + self::assertIsString($row['map_of_struct_of_structs']['key_0']['struct']['nested_struct']['string']); $count++; } - $this->assertSame($limit, $count); + self::assertSame($limit, $count); } public function test_reading_map_of_structs_column() : void @@ -183,19 +183,19 @@ public function test_reading_map_of_structs_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/maps.parquet'); - $this->assertNull($file->metadata()->schema()->get('map_of_structs')->type()); - $this->assertEquals('MAP', $file->metadata()->schema()->get('map_of_structs')->logicalType()->name()); + self::assertNull($file->metadata()->schema()->get('map_of_structs')->type()); + self::assertEquals('MAP', $file->metadata()->schema()->get('map_of_structs')->logicalType()->name()); $count = 0; foreach ($file->values(['map_of_structs']) as $row) { - $this->assertIsArray($row['map_of_structs']); - $this->assertIsArray($row['map_of_structs']['key_0']); - $this->assertIsInt($row['map_of_structs']['key_0']['int_field']); - $this->assertIsString($row['map_of_structs']['key_0']['string_field']); + self::assertIsArray($row['map_of_structs']); + self::assertIsArray($row['map_of_structs']['key_0']); + self::assertIsInt($row['map_of_structs']['key_0']['int_field']); + self::assertIsString($row['map_of_structs']['key_0']['string_field']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsWritingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsWritingTest.php index 05b0ce606..738c072f1 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsWritingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/MapsWritingTest.php @@ -35,7 +35,7 @@ public function test_writing_map_of_int_int() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -64,7 +64,7 @@ public function test_writing_map_of_int_string() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -95,7 +95,7 @@ public function test_writing_nullable_map_of_int_int() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/PaginationTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/PaginationTest.php index 2f97a0fbb..8799db67d 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/PaginationTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/PaginationTest.php @@ -16,7 +16,7 @@ public function test_setting_offset_larger_than_file() : void { $path = __DIR__ . '/Fixtures/pagination_row_group_1kb_5k_rows.snappy.parquet'; - $this->assertEquals( + self::assertEquals( [], \iterator_to_array((new Reader())->read($path)->values(['id'], offset: 6000, limit: 10)) ); @@ -26,7 +26,7 @@ public function test_setting_reading_last_100_results() : void { $path = __DIR__ . '/Fixtures/pagination_row_group_1kb_5k_rows.snappy.parquet'; - $this->assertCount( + self::assertCount( 100, \iterator_to_array((new Reader())->read($path)->values(['id'], offset: 4900, limit: 100)) ); @@ -36,7 +36,7 @@ public function test_setting_setting_limit_greater_than_remaining_rows() : void { $path = __DIR__ . '/Fixtures/pagination_row_group_1kb_5k_rows.snappy.parquet'; - $this->assertCount( + self::assertCount( 1, \iterator_to_array((new Reader())->read($path)->values(['id'], offset: 4999, limit: 2)) ); @@ -56,7 +56,7 @@ public function test_setting_setting_offset_to_0() : void { $path = __DIR__ . '/Fixtures/pagination_row_group_1kb_5k_rows.snappy.parquet'; - $this->assertCount( + self::assertCount( 2, \iterator_to_array((new Reader())->read($path)->values(['id'], offset: 0, limit: 2)) ); @@ -79,7 +79,7 @@ public function test_simple_pagination_on_small_row_group_size() : void // Uncomment only to apply changes to the dataset // $this->generateDataset($path); - $this->assertEquals( + self::assertEquals( \array_merge( ...\array_map( static function (int $i) : array { diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SchemaReadingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SchemaReadingTest.php index 2cff4687f..f88edee41 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SchemaReadingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SchemaReadingTest.php @@ -37,7 +37,7 @@ public function test_reading_lists_schema_ddl() : void ]) ); - $this->assertSame( + self::assertSame( ($reader->read(__DIR__ . '/Fixtures/lists.parquet'))->metadata()->schema()->toDDL(), $schema->toDDL(), ); @@ -72,7 +72,7 @@ public function test_reading_maps_schema_ddl() : void ])), ); - $this->assertSame( + self::assertSame( ($reader->read(__DIR__ . '/Fixtures/maps.parquet'))->metadata()->schema()->toDDL(), $schema->toDDL(), ); @@ -111,7 +111,7 @@ public function test_reading_primitives_schema_ddl() : void FlatColumn::decimal('decimal_nullable'), ); - $this->assertSame( + self::assertSame( ($reader->read(__DIR__ . '/Fixtures/primitives.parquet'))->metadata()->schema()->toDDL(), $schema->toDDL() ); @@ -122,7 +122,7 @@ public function test_reading_statistics() : void $metadata = (new Reader())->read(__DIR__ . '/Fixtures/primitives.parquet')->metadata(); foreach ($metadata->columnChunks() as $chunk) { - $this->assertInstanceOf(StatisticsReader::class, $chunk->statistics()); + self::assertInstanceOf(StatisticsReader::class, $chunk->statistics()); } } @@ -225,7 +225,7 @@ public function test_reading_structs_schema_ddl() : void ]) ); - $this->assertSame( + self::assertSame( ($reader->read(__DIR__ . '/Fixtures/structs.parquet'))->metadata()->schema()->toDDL(), $schema->toDDL() ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesReadingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesReadingTest.php index 6148575cf..5ccc40d56 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesReadingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesReadingTest.php @@ -15,13 +15,13 @@ public function test_reading_bool_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool')->type()); - $this->assertNull($file->metadata()->schema()->get('bool')->logicalType()); + self::assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool')->type()); + self::assertNull($file->metadata()->schema()->get('bool')->logicalType()); $results = \array_merge_recursive(...\iterator_to_array($file->values(['bool'])))['bool']; - $this->assertCount(100, $results); - $this->assertContainsOnly('bool', $results); - $this->assertSame($file->metadata()->rowsNumber(), \count($results)); + self::assertCount(100, $results); + self::assertContainsOnly('bool', $results); + self::assertSame($file->metadata()->rowsNumber(), \count($results)); } public function test_reading_bool_column_with_limit() : void @@ -29,12 +29,12 @@ public function test_reading_bool_column_with_limit() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool')->type()); - $this->assertNull($file->metadata()->schema()->get('bool')->logicalType()); + self::assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool')->type()); + self::assertNull($file->metadata()->schema()->get('bool')->logicalType()); $results = \array_merge_recursive(...\iterator_to_array($file->values(['bool'], limit: 50)))['bool']; - $this->assertCount(50, $results); - $this->assertContainsOnly('bool', $results); + self::assertCount(50, $results); + self::assertContainsOnly('bool', $results); } public function test_reading_bool_nullable_column() : void @@ -42,14 +42,14 @@ public function test_reading_bool_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool_nullable')->type()); - $this->assertNull($file->metadata()->schema()->get('bool_nullable')->logicalType()); + self::assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool_nullable')->type()); + self::assertNull($file->metadata()->schema()->get('bool_nullable')->logicalType()); $results = \array_merge_recursive(...\iterator_to_array($file->values(['bool_nullable'])))['bool_nullable']; - $this->assertCount(100, $results); - $this->assertSame($file->metadata()->rowsNumber(), \count($results)); - $this->assertCount(50, \array_filter($results, fn ($value) => $value === null)); - $this->assertCount(50, \array_filter($results, fn ($value) => $value !== null)); + self::assertCount(100, $results); + self::assertSame($file->metadata()->rowsNumber(), \count($results)); + self::assertCount(50, \array_filter($results, fn ($value) => $value === null)); + self::assertCount(50, \array_filter($results, fn ($value) => $value !== null)); } public function test_reading_bool_nullable_column_with_limit() : void @@ -57,13 +57,13 @@ public function test_reading_bool_nullable_column_with_limit() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool_nullable')->type()); - $this->assertNull($file->metadata()->schema()->get('bool_nullable')->logicalType()); + self::assertEquals(PhysicalType::BOOLEAN, $file->metadata()->schema()->get('bool_nullable')->type()); + self::assertNull($file->metadata()->schema()->get('bool_nullable')->logicalType()); $results = \array_merge_recursive(...\iterator_to_array($file->values(['bool_nullable'], $limit = 50)))['bool_nullable']; - $this->assertCount($limit, $results); - $this->assertCount($limit / 2, \array_filter($results, fn ($value) => $value === null)); - $this->assertCount($limit / 2, \array_filter($results, fn ($value) => $value !== null)); + self::assertCount($limit, $results); + self::assertCount($limit / 2, \array_filter($results, fn ($value) => $value === null)); + self::assertCount($limit / 2, \array_filter($results, fn ($value) => $value !== null)); } public function test_reading_date_column() : void @@ -71,17 +71,17 @@ public function test_reading_date_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('date')->type()); - $this->assertEquals('DATE', $file->metadata()->schema()->get('date')->logicalType()->name()); + self::assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('date')->type()); + self::assertEquals('DATE', $file->metadata()->schema()->get('date')->logicalType()->name()); $count = 0; foreach ($file->values(['date']) as $row) { - $this->assertInstanceOf(\DateTimeImmutable::class, $row['date']); + self::assertInstanceOf(\DateTimeImmutable::class, $row['date']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_date_nullable_column() : void @@ -89,21 +89,21 @@ public function test_reading_date_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('date_nullable')->type()); - $this->assertEquals('DATE', $file->metadata()->schema()->get('date_nullable')->logicalType()->name()); + self::assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('date_nullable')->type()); + self::assertEquals('DATE', $file->metadata()->schema()->get('date_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['date_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertInstanceOf(\DateTimeImmutable::class, $row['date_nullable']); + self::assertInstanceOf(\DateTimeImmutable::class, $row['date_nullable']); } else { - $this->assertNull($row['date_nullable']); + self::assertNull($row['date_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_decimal_column() : void @@ -111,16 +111,16 @@ public function test_reading_decimal_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::FIXED_LEN_BYTE_ARRAY, $file->metadata()->schema()->get('decimal')->type()); + self::assertEquals(PhysicalType::FIXED_LEN_BYTE_ARRAY, $file->metadata()->schema()->get('decimal')->type()); $count = 0; foreach ($file->values(['decimal']) as $row) { - $this->assertIsFloat($row['decimal']); + self::assertIsFloat($row['decimal']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_decimal_nullable_column() : void @@ -128,20 +128,20 @@ public function test_reading_decimal_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::FIXED_LEN_BYTE_ARRAY, $file->metadata()->schema()->get('decimal_nullable')->type()); + self::assertEquals(PhysicalType::FIXED_LEN_BYTE_ARRAY, $file->metadata()->schema()->get('decimal_nullable')->type()); $count = 0; foreach ($file->values(['decimal_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsFloat($row['decimal_nullable']); + self::assertIsFloat($row['decimal_nullable']); } else { - $this->assertNull($row['decimal_nullable']); + self::assertNull($row['decimal_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_double_column() : void @@ -149,16 +149,16 @@ public function test_reading_double_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::DOUBLE, $file->metadata()->schema()->get('double')->type()); + self::assertEquals(PhysicalType::DOUBLE, $file->metadata()->schema()->get('double')->type()); $count = 0; foreach ($file->values(['double']) as $row) { - $this->assertIsFloat($row['double']); + self::assertIsFloat($row['double']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_double_nullable_column() : void @@ -166,20 +166,20 @@ public function test_reading_double_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::DOUBLE, $file->metadata()->schema()->get('double_nullable')->type()); + self::assertEquals(PhysicalType::DOUBLE, $file->metadata()->schema()->get('double_nullable')->type()); $count = 0; foreach ($file->values(['double_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsFloat($row['double_nullable']); + self::assertIsFloat($row['double_nullable']); } else { - $this->assertNull($row['double_nullable']); + self::assertNull($row['double_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_enum_column() : void @@ -187,17 +187,17 @@ public function test_reading_enum_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('enum')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('enum')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('enum')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('enum')->logicalType()->name()); $count = 0; foreach ($file->values(['enum']) as $row) { - $this->assertIsString($row['enum']); + self::assertIsString($row['enum']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_float_column() : void @@ -205,16 +205,16 @@ public function test_reading_float_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::FLOAT, $file->metadata()->schema()->get('float')->type()); + self::assertEquals(PhysicalType::FLOAT, $file->metadata()->schema()->get('float')->type()); $count = 0; foreach ($file->values(['float']) as $row) { - $this->assertIsFloat($row['float']); + self::assertIsFloat($row['float']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_float_nullable_column() : void @@ -222,20 +222,20 @@ public function test_reading_float_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::FLOAT, $file->metadata()->schema()->get('float_nullable')->type()); + self::assertEquals(PhysicalType::FLOAT, $file->metadata()->schema()->get('float_nullable')->type()); $count = 0; foreach ($file->values(['float_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsFloat($row['float_nullable']); + self::assertIsFloat($row['float_nullable']); } else { - $this->assertNull($row['float_nullable']); + self::assertNull($row['float_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_int32_column() : void @@ -243,17 +243,17 @@ public function test_reading_int32_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('int32')->type()); - $this->assertNull($file->metadata()->schema()->get('int32')->logicalType()); + self::assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('int32')->type()); + self::assertNull($file->metadata()->schema()->get('int32')->logicalType()); $count = 0; foreach ($file->values(['int32']) as $row) { - $this->assertIsInt($row['int32']); + self::assertIsInt($row['int32']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_int32_nullable_column() : void @@ -261,21 +261,21 @@ public function test_reading_int32_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('int32_nullable')->type()); - $this->assertNull($file->metadata()->schema()->get('int32_nullable')->logicalType()); + self::assertEquals(PhysicalType::INT32, $file->metadata()->schema()->get('int32_nullable')->type()); + self::assertNull($file->metadata()->schema()->get('int32_nullable')->logicalType()); $count = 0; foreach ($file->values(['int32_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsInt($row['int32_nullable']); + self::assertIsInt($row['int32_nullable']); } else { - $this->assertNull($row['int32_nullable']); + self::assertNull($row['int32_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_int64() : void @@ -283,18 +283,18 @@ public function test_reading_int64() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('int64')->type()); - $this->assertNull($file->metadata()->schema()->get('int64')->logicalType()); + self::assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('int64')->type()); + self::assertNull($file->metadata()->schema()->get('int64')->logicalType()); $count = 0; foreach ($file->values(['int64']) as $row) { - $this->assertIsInt($row['int64']); + self::assertIsInt($row['int64']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_int64_nullable_column() : void @@ -302,21 +302,21 @@ public function test_reading_int64_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('int64_nullable')->type()); - $this->assertNull($file->metadata()->schema()->get('int64_nullable')->logicalType()); + self::assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('int64_nullable')->type()); + self::assertNull($file->metadata()->schema()->get('int64_nullable')->logicalType()); $count = 0; foreach ($file->values(['int64_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsInt($row['int64_nullable']); + self::assertIsInt($row['int64_nullable']); } else { - $this->assertNull($row['int64_nullable']); + self::assertNull($row['int64_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_json_column() : void @@ -324,17 +324,17 @@ public function test_reading_json_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('json')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('json')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('json')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('json')->logicalType()->name()); $count = 0; foreach ($file->values(['json']) as $row) { - $this->assertIsString($row['json']); + self::assertIsString($row['json']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_json_nullable_column() : void @@ -342,21 +342,21 @@ public function test_reading_json_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('json_nullable')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('json_nullable')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('json_nullable')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('json_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['json_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsString($row['json_nullable']); + self::assertIsString($row['json_nullable']); } else { - $this->assertNull($row['json_nullable']); + self::assertNull($row['json_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_string_column() : void @@ -364,17 +364,17 @@ public function test_reading_string_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('string')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('string')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('string')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('string')->logicalType()->name()); $count = 0; foreach ($file->values(['string']) as $row) { - $this->assertIsString($row['string']); + self::assertIsString($row['string']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_string_nullable_column() : void @@ -382,21 +382,21 @@ public function test_reading_string_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('string_nullable')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('string_nullable')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('string_nullable')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('string_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['string_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsString($row['string_nullable']); + self::assertIsString($row['string_nullable']); } else { - $this->assertNull($row['string_nullable']); + self::assertNull($row['string_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_time_column() : void @@ -404,17 +404,17 @@ public function test_reading_time_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('time')->type()); - $this->assertEquals('TIME', $file->metadata()->schema()->get('time')->logicalType()->name()); + self::assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('time')->type()); + self::assertEquals('TIME', $file->metadata()->schema()->get('time')->logicalType()->name()); $count = 0; foreach ($file->values(['time']) as $row) { - $this->assertInstanceOf(\DateInterval::class, $row['time']); + self::assertInstanceOf(\DateInterval::class, $row['time']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_time_nullable_column() : void @@ -422,21 +422,21 @@ public function test_reading_time_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('time_nullable')->type()); - $this->assertEquals('TIME', $file->metadata()->schema()->get('time_nullable')->logicalType()->name()); + self::assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('time_nullable')->type()); + self::assertEquals('TIME', $file->metadata()->schema()->get('time_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['time_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertInstanceOf(\DateInterval::class, $row['time_nullable']); + self::assertInstanceOf(\DateInterval::class, $row['time_nullable']); } else { - $this->assertNull($row['time_nullable']); + self::assertNull($row['time_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_timestamp_column() : void @@ -444,17 +444,17 @@ public function test_reading_timestamp_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('timestamp')->type()); - $this->assertEquals('TIMESTAMP', $file->metadata()->schema()->get('timestamp')->logicalType()->name()); + self::assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('timestamp')->type()); + self::assertEquals('TIMESTAMP', $file->metadata()->schema()->get('timestamp')->logicalType()->name()); $count = 0; foreach ($file->values(['timestamp']) as $row) { - $this->assertInstanceOf(\DateTimeImmutable::class, $row['timestamp']); + self::assertInstanceOf(\DateTimeImmutable::class, $row['timestamp']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_timestamp_nullable_column() : void @@ -462,21 +462,21 @@ public function test_reading_timestamp_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('timestamp_nullable')->type()); - $this->assertEquals('TIMESTAMP', $file->metadata()->schema()->get('timestamp_nullable')->logicalType()->name()); + self::assertEquals(PhysicalType::INT64, $file->metadata()->schema()->get('timestamp_nullable')->type()); + self::assertEquals('TIMESTAMP', $file->metadata()->schema()->get('timestamp_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['timestamp_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertInstanceOf(\DateTimeImmutable::class, $row['timestamp_nullable']); + self::assertInstanceOf(\DateTimeImmutable::class, $row['timestamp_nullable']); } else { - $this->assertNull($row['timestamp_nullable']); + self::assertNull($row['timestamp_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_uuid_column() : void @@ -484,17 +484,17 @@ public function test_reading_uuid_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('uuid')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('uuid')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('uuid')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('uuid')->logicalType()->name()); $count = 0; foreach ($file->values(['uuid']) as $row) { - $this->assertIsString($row['uuid']); + self::assertIsString($row['uuid']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_uuid_nullable_column() : void @@ -502,20 +502,20 @@ public function test_reading_uuid_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/primitives.parquet'); - $this->assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('uuid_nullable')->type()); - $this->assertEquals('STRING', $file->metadata()->schema()->get('uuid_nullable')->logicalType()->name()); + self::assertEquals(PhysicalType::BYTE_ARRAY, $file->metadata()->schema()->get('uuid_nullable')->type()); + self::assertEquals('STRING', $file->metadata()->schema()->get('uuid_nullable')->logicalType()->name()); $count = 0; foreach ($file->values(['uuid_nullable']) as $rowIndex => $row) { if ($rowIndex % 2 === 0) { - $this->assertIsString($row['uuid_nullable']); + self::assertIsString($row['uuid_nullable']); } else { - $this->assertNull($row['uuid_nullable']); + self::assertNull($row['uuid_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesWritingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesWritingTest.php index 7d55ce6e8..83cfa9afc 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesWritingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/SimpleTypesWritingTest.php @@ -29,12 +29,12 @@ public function test_writing_bool_column() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -55,12 +55,12 @@ public function test_writing_bool_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -83,12 +83,12 @@ public function test_writing_date_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -111,12 +111,12 @@ public function test_writing_date_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -139,12 +139,12 @@ public function test_writing_decimal_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -167,12 +167,12 @@ public function test_writing_decimal_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -195,12 +195,12 @@ public function test_writing_double_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -223,12 +223,12 @@ public function test_writing_double_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -251,12 +251,12 @@ public function test_writing_enum_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -277,12 +277,12 @@ public function test_writing_float_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -303,12 +303,12 @@ public function test_writing_float_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -331,12 +331,12 @@ public function test_writing_int32_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -359,12 +359,12 @@ public function test_writing_int32_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -387,11 +387,11 @@ public function test_writing_int64() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -414,11 +414,11 @@ public function test_writing_int64_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -441,11 +441,11 @@ public function test_writing_json_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -470,11 +470,11 @@ public function test_writing_json_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -497,11 +497,11 @@ public function test_writing_string_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -524,11 +524,11 @@ public function test_writing_string_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -549,11 +549,11 @@ public function test_writing_time_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -574,11 +574,11 @@ public function test_writing_time_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -601,11 +601,11 @@ public function test_writing_timestamp_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -628,11 +628,11 @@ public function test_writing_timestamp_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -655,11 +655,11 @@ public function test_writing_uuid_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } @@ -682,11 +682,11 @@ public function test_writing_uuid_nullable_column() : void $writer->write($path, $schema, $inputData); - $this->assertEquals( + self::assertEquals( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertTrue(\file_exists($path)); + self::assertTrue(\file_exists($path)); \unlink($path); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsReadingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsReadingTest.php index 9a15655e4..1f8114700 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsReadingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsReadingTest.php @@ -14,27 +14,27 @@ public function test_reading_struct_deeply_nested_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_deeply_nested')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_deeply_nested')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_deeply_nested')->type()); + self::assertNull($file->metadata()->schema()->get('struct_deeply_nested')->logicalType()); $count = 0; foreach ($file->values(['struct_deeply_nested']) as $row) { - $this->assertArrayHasKey('struct_0', $row['struct_deeply_nested']); - $this->assertArrayHasKey('int', $row['struct_deeply_nested']['struct_0']); - $this->assertArrayHasKey('struct_1', $row['struct_deeply_nested']['struct_0']); - $this->assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']); - $this->assertArrayHasKey('struct_2', $row['struct_deeply_nested']['struct_0']['struct_1']); - $this->assertArrayHasKey('bool', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); - $this->assertArrayHasKey('struct_3', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); - $this->assertArrayHasKey('float', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); - $this->assertArrayHasKey('struct_4', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); - $this->assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); - $this->assertArrayHasKey('json', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); + self::assertArrayHasKey('struct_0', $row['struct_deeply_nested']); + self::assertArrayHasKey('int', $row['struct_deeply_nested']['struct_0']); + self::assertArrayHasKey('struct_1', $row['struct_deeply_nested']['struct_0']); + self::assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']); + self::assertArrayHasKey('struct_2', $row['struct_deeply_nested']['struct_0']['struct_1']); + self::assertArrayHasKey('bool', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); + self::assertArrayHasKey('struct_3', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); + self::assertArrayHasKey('float', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); + self::assertArrayHasKey('struct_4', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); + self::assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); + self::assertArrayHasKey('json', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_deeply_nested_column_with_limit() : void @@ -42,26 +42,26 @@ public function test_reading_struct_deeply_nested_column_with_limit() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_deeply_nested')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_deeply_nested')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_deeply_nested')->type()); + self::assertNull($file->metadata()->schema()->get('struct_deeply_nested')->logicalType()); $count = 0; foreach ($file->values(['struct_deeply_nested'], $limit = 50) as $row) { - $this->assertArrayHasKey('struct_0', $row['struct_deeply_nested']); - $this->assertArrayHasKey('int', $row['struct_deeply_nested']['struct_0']); - $this->assertArrayHasKey('struct_1', $row['struct_deeply_nested']['struct_0']); - $this->assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']); - $this->assertArrayHasKey('struct_2', $row['struct_deeply_nested']['struct_0']['struct_1']); - $this->assertArrayHasKey('bool', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); - $this->assertArrayHasKey('struct_3', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); - $this->assertArrayHasKey('float', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); - $this->assertArrayHasKey('struct_4', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); - $this->assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); - $this->assertArrayHasKey('json', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); + self::assertArrayHasKey('struct_0', $row['struct_deeply_nested']); + self::assertArrayHasKey('int', $row['struct_deeply_nested']['struct_0']); + self::assertArrayHasKey('struct_1', $row['struct_deeply_nested']['struct_0']); + self::assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']); + self::assertArrayHasKey('struct_2', $row['struct_deeply_nested']['struct_0']['struct_1']); + self::assertArrayHasKey('bool', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); + self::assertArrayHasKey('struct_3', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']); + self::assertArrayHasKey('float', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); + self::assertArrayHasKey('struct_4', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']); + self::assertArrayHasKey('string', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); + self::assertArrayHasKey('json', $row['struct_deeply_nested']['struct_0']['struct_1']['struct_2']['struct_3']['struct_4']); $count++; } - $this->assertSame($limit, $count); + self::assertSame($limit, $count); } public function test_reading_struct_flat_column() : void @@ -69,20 +69,20 @@ public function test_reading_struct_flat_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_flat')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_flat')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_flat')->type()); + self::assertNull($file->metadata()->schema()->get('struct_flat')->logicalType()); $count = 0; foreach ($file->values(['struct_flat']) as $row) { - $this->assertArrayHasKey('string', $row['struct_flat']); - $this->assertArrayHasKey('int', $row['struct_flat']); - $this->assertArrayHasKey('list_of_ints', $row['struct_flat']); - $this->assertArrayHasKey('map_of_string_int', $row['struct_flat']); + self::assertArrayHasKey('string', $row['struct_flat']); + self::assertArrayHasKey('int', $row['struct_flat']); + self::assertArrayHasKey('list_of_ints', $row['struct_flat']); + self::assertArrayHasKey('map_of_string_int', $row['struct_flat']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_flat_nullable_column() : void @@ -90,24 +90,24 @@ public function test_reading_struct_flat_nullable_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_flat_nullable')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_flat_nullable')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_flat_nullable')->type()); + self::assertNull($file->metadata()->schema()->get('struct_flat_nullable')->logicalType()); $count = 0; foreach ($file->values(['struct_flat_nullable']) as $i => $row) { if ($i % 2 === 0) { - $this->assertArrayHasKey('string', $row['struct_flat_nullable']); - $this->assertArrayHasKey('int', $row['struct_flat_nullable']); - $this->assertArrayHasKey('list_of_ints', $row['struct_flat_nullable']); - $this->assertArrayHasKey('map_of_string_int', $row['struct_flat_nullable']); + self::assertArrayHasKey('string', $row['struct_flat_nullable']); + self::assertArrayHasKey('int', $row['struct_flat_nullable']); + self::assertArrayHasKey('list_of_ints', $row['struct_flat_nullable']); + self::assertArrayHasKey('map_of_string_int', $row['struct_flat_nullable']); } else { - $this->assertNull($row['struct_flat_nullable']); + self::assertNull($row['struct_flat_nullable']); } $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_nested_column() : void @@ -115,21 +115,21 @@ public function test_reading_struct_nested_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_nested')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_nested')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_nested')->type()); + self::assertNull($file->metadata()->schema()->get('struct_nested')->logicalType()); $count = 0; foreach ($file->values(['struct_nested']) as $row) { - $this->assertArrayHasKey('string', $row['struct_nested']); - $this->assertArrayHasKey('struct_flat', $row['struct_nested']); - $this->assertArrayHasKey('int', $row['struct_nested']['struct_flat']); - $this->assertArrayHasKey('list_of_ints', $row['struct_nested']['struct_flat']); - $this->assertArrayHasKey('map_of_string_int', $row['struct_nested']['struct_flat']); + self::assertArrayHasKey('string', $row['struct_nested']); + self::assertArrayHasKey('struct_flat', $row['struct_nested']); + self::assertArrayHasKey('int', $row['struct_nested']['struct_flat']); + self::assertArrayHasKey('list_of_ints', $row['struct_nested']['struct_flat']); + self::assertArrayHasKey('map_of_string_int', $row['struct_nested']['struct_flat']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_nested_with_list_of_lists_column() : void @@ -137,20 +137,20 @@ public function test_reading_struct_nested_with_list_of_lists_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_lists')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_lists')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_lists')->type()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_lists')->logicalType()); $count = 0; foreach ($file->values(['struct_nested_with_list_of_lists']) as $row) { - $this->assertArrayHasKey('string', $row['struct_nested_with_list_of_lists']); - $this->assertArrayHasKey('struct', $row['struct_nested_with_list_of_lists']); - $this->assertArrayHasKey('int', $row['struct_nested_with_list_of_lists']['struct']); - $this->assertArrayHasKey('list_of_list_of_ints', $row['struct_nested_with_list_of_lists']['struct']); + self::assertArrayHasKey('string', $row['struct_nested_with_list_of_lists']); + self::assertArrayHasKey('struct', $row['struct_nested_with_list_of_lists']); + self::assertArrayHasKey('int', $row['struct_nested_with_list_of_lists']['struct']); + self::assertArrayHasKey('list_of_list_of_ints', $row['struct_nested_with_list_of_lists']['struct']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_nested_with_list_of_maps_column() : void @@ -158,20 +158,20 @@ public function test_reading_struct_nested_with_list_of_maps_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_maps')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_maps')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_maps')->type()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_list_of_maps')->logicalType()); $count = 0; foreach ($file->values(['struct_nested_with_list_of_maps']) as $row) { - $this->assertArrayHasKey('string', $row['struct_nested_with_list_of_maps']); - $this->assertArrayHasKey('struct', $row['struct_nested_with_list_of_maps']); - $this->assertArrayHasKey('int', $row['struct_nested_with_list_of_maps']['struct']); - $this->assertArrayHasKey('list_of_map_of_string_int', $row['struct_nested_with_list_of_maps']['struct']); + self::assertArrayHasKey('string', $row['struct_nested_with_list_of_maps']); + self::assertArrayHasKey('struct', $row['struct_nested_with_list_of_maps']); + self::assertArrayHasKey('int', $row['struct_nested_with_list_of_maps']['struct']); + self::assertArrayHasKey('list_of_map_of_string_int', $row['struct_nested_with_list_of_maps']['struct']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_nested_with_map_of_list_of_ints_column() : void @@ -179,21 +179,21 @@ public function test_reading_struct_nested_with_map_of_list_of_ints_column() : v $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_list_of_ints')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_list_of_ints')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_list_of_ints')->type()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_list_of_ints')->logicalType()); $count = 0; foreach ($file->values(['struct_nested_with_map_of_list_of_ints']) as $row) { - $this->assertArrayHasKey('string', $row['struct_nested_with_map_of_list_of_ints']); - $this->assertArrayHasKey('struct', $row['struct_nested_with_map_of_list_of_ints']); - $this->assertArrayHasKey('int', $row['struct_nested_with_map_of_list_of_ints']['struct']); - $this->assertArrayHasKey('map_of_int_list_of_string', $row['struct_nested_with_map_of_list_of_ints']['struct']); - $this->assertIsList($row['struct_nested_with_map_of_list_of_ints']['struct']['map_of_int_list_of_string'][0]); + self::assertArrayHasKey('string', $row['struct_nested_with_map_of_list_of_ints']); + self::assertArrayHasKey('struct', $row['struct_nested_with_map_of_list_of_ints']); + self::assertArrayHasKey('int', $row['struct_nested_with_map_of_list_of_ints']['struct']); + self::assertArrayHasKey('map_of_int_list_of_string', $row['struct_nested_with_map_of_list_of_ints']['struct']); + self::assertIsList($row['struct_nested_with_map_of_list_of_ints']['struct']['map_of_int_list_of_string'][0]); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_nested_with_map_of_string_map_of_string_string_column() : void @@ -201,22 +201,22 @@ public function test_reading_struct_nested_with_map_of_string_map_of_string_stri $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->type()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->logicalType()); $count = 0; foreach ($file->values(['struct_nested_with_map_of_string_map_of_string_string']) as $row) { - $this->assertArrayHasKey('string', $row['struct_nested_with_map_of_string_map_of_string_string']); - $this->assertArrayHasKey('struct', $row['struct_nested_with_map_of_string_map_of_string_string']); - $this->assertArrayHasKey('int', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); - $this->assertArrayHasKey('map_of_string_map_of_string_string', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); - $this->assertArrayHasKey('outer_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']); - $this->assertArrayHasKey('inner_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']['outer_key_0']); + self::assertArrayHasKey('string', $row['struct_nested_with_map_of_string_map_of_string_string']); + self::assertArrayHasKey('struct', $row['struct_nested_with_map_of_string_map_of_string_string']); + self::assertArrayHasKey('int', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); + self::assertArrayHasKey('map_of_string_map_of_string_string', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); + self::assertArrayHasKey('outer_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']); + self::assertArrayHasKey('inner_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']['outer_key_0']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } public function test_reading_struct_nested_with_map_of_string_map_of_string_string_column_with_limit() : void @@ -224,21 +224,21 @@ public function test_reading_struct_nested_with_map_of_string_map_of_string_stri $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->type()); + self::assertNull($file->metadata()->schema()->get('struct_nested_with_map_of_string_map_of_string_string')->logicalType()); $count = 0; foreach ($file->values(['struct_nested_with_map_of_string_map_of_string_string'], $limit = 50) as $row) { - $this->assertArrayHasKey('string', $row['struct_nested_with_map_of_string_map_of_string_string']); - $this->assertArrayHasKey('struct', $row['struct_nested_with_map_of_string_map_of_string_string']); - $this->assertArrayHasKey('int', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); - $this->assertArrayHasKey('map_of_string_map_of_string_string', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); - $this->assertArrayHasKey('outer_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']); - $this->assertArrayHasKey('inner_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']['outer_key_0']); + self::assertArrayHasKey('string', $row['struct_nested_with_map_of_string_map_of_string_string']); + self::assertArrayHasKey('struct', $row['struct_nested_with_map_of_string_map_of_string_string']); + self::assertArrayHasKey('int', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); + self::assertArrayHasKey('map_of_string_map_of_string_string', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']); + self::assertArrayHasKey('outer_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']); + self::assertArrayHasKey('inner_key_0', $row['struct_nested_with_map_of_string_map_of_string_string']['struct']['map_of_string_map_of_string_string']['outer_key_0']); $count++; } - $this->assertSame($limit, $count); + self::assertSame($limit, $count); } public function test_reading_struct_with_list_and_map_of_structs_column() : void @@ -246,24 +246,24 @@ public function test_reading_struct_with_list_and_map_of_structs_column() : void $reader = new Reader(); $file = $reader->read(__DIR__ . '/Fixtures/structs.parquet'); - $this->assertNull($file->metadata()->schema()->get('struct_with_list_and_map_of_structs')->type()); - $this->assertNull($file->metadata()->schema()->get('struct_with_list_and_map_of_structs')->logicalType()); + self::assertNull($file->metadata()->schema()->get('struct_with_list_and_map_of_structs')->type()); + self::assertNull($file->metadata()->schema()->get('struct_with_list_and_map_of_structs')->logicalType()); $count = 0; foreach ($file->values(['struct_with_list_and_map_of_structs']) as $row) { - $this->assertArrayHasKey('string', $row['struct_with_list_and_map_of_structs']); - $this->assertArrayHasKey('struct', $row['struct_with_list_and_map_of_structs']); - $this->assertArrayHasKey('int', $row['struct_with_list_and_map_of_structs']['struct']); - $this->assertArrayHasKey('list_of_structs', $row['struct_with_list_and_map_of_structs']['struct']); - $this->assertArrayHasKey('map_of_string_structs', $row['struct_with_list_and_map_of_structs']['struct']); - $this->assertArrayHasKey('key_0', $row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']); - $this->assertArrayHasKey('int', $row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']['key_0']); - $this->assertArrayHasKey('list', $row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']['key_0']); - $this->assertIsList($row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']['key_0']['list']); + self::assertArrayHasKey('string', $row['struct_with_list_and_map_of_structs']); + self::assertArrayHasKey('struct', $row['struct_with_list_and_map_of_structs']); + self::assertArrayHasKey('int', $row['struct_with_list_and_map_of_structs']['struct']); + self::assertArrayHasKey('list_of_structs', $row['struct_with_list_and_map_of_structs']['struct']); + self::assertArrayHasKey('map_of_string_structs', $row['struct_with_list_and_map_of_structs']['struct']); + self::assertArrayHasKey('key_0', $row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']); + self::assertArrayHasKey('int', $row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']['key_0']); + self::assertArrayHasKey('list', $row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']['key_0']); + self::assertIsList($row['struct_with_list_and_map_of_structs']['struct']['map_of_string_structs']['key_0']['list']); $count++; } - $this->assertSame(100, $count); - $this->assertSame($file->metadata()->rowsNumber(), $count); + self::assertSame(100, $count); + self::assertSame($file->metadata()->rowsNumber(), $count); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsWritingTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsWritingTest.php index 4efd2caa2..8bcb5d881 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsWritingTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/StructsWritingTest.php @@ -52,7 +52,7 @@ public function test_writing_flat_nullable_structure() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -96,7 +96,7 @@ public function test_writing_flat_structure() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); @@ -144,7 +144,7 @@ public function test_writing_flat_structure_with_nullable_elements() : void $writer->write($path, $schema, $inputData); - $this->assertSame( + self::assertSame( $inputData, \iterator_to_array((new Reader())->read($path)->values()) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/WriterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/WriterTest.php index d6699e914..cb1ae1afa 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/WriterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/IO/WriterTest.php @@ -27,11 +27,11 @@ public function test_appending_to_file() : void $writer->append($path, [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row]); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -54,11 +54,11 @@ public function test_appending_to_in_batches_file() : void $writer->writeBatch([$row, $row]); $writer->close(); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -79,11 +79,11 @@ public function test_appending_to_stream() : void $writer->writeBatch([$row, $row, $row, $row, $row, $row, $row, $row, $row, $row]); $writer->close(); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -109,7 +109,7 @@ public function test_created_by_metadata() : void $metadata = (new Reader())->read($path)->metadata(); - $this->assertSame('flow-php parquet version ' . InstalledVersions::getRootPackage()['pretty_version'], $metadata->createdBy()); + self::assertSame('flow-php parquet version ' . InstalledVersions::getRootPackage()['pretty_version'], $metadata->createdBy()); } public function test_opening_already_open_writer() : void @@ -172,14 +172,14 @@ public function test_writing_column_statistics() : void $statistics = (new Reader())->read($path)->metadata()->columnChunks()[0]->statistics(); - $this->assertSame(1, $statistics->min($column)); - $this->assertSame(100, $statistics->max($column)); - $this->assertSame(1, $statistics->minValue($column)); - $this->assertSame(100, $statistics->maxValue($column)); - $this->assertSame(100, $statistics->distinctCount()); - $this->assertSame(0, $statistics->nullCount()); + self::assertSame(1, $statistics->min($column)); + self::assertSame(100, $statistics->max($column)); + self::assertSame(1, $statistics->minValue($column)); + self::assertSame(100, $statistics->maxValue($column)); + self::assertSame(100, $statistics->distinctCount()); + self::assertSame(0, $statistics->nullCount()); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -202,12 +202,12 @@ public function test_writing_data_page_v2_statistics() : void foreach ((new Reader())->read($path)->pageHeaders() as $pageHeader) { $statistics = $pageHeader->pageHeader->dataPageHeaderV2()->statistics(); - $this->assertSame(1, $statistics->min($column)); - $this->assertSame(100, $statistics->max($column)); - $this->assertSame(1, $statistics->minValue($column)); - $this->assertSame(100, $statistics->maxValue($column)); - $this->assertSame(100, $statistics->distinctCount()); - $this->assertSame(0, $statistics->nullCount()); + self::assertSame(1, $statistics->min($column)); + self::assertSame(100, $statistics->max($column)); + self::assertSame(1, $statistics->minValue($column)); + self::assertSame(100, $statistics->maxValue($column)); + self::assertSame(100, $statistics->distinctCount()); + self::assertSame(0, $statistics->nullCount()); } \unlink($path); @@ -232,11 +232,11 @@ public function test_writing_in_batches_to_file() : void $writer->close(); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -258,11 +258,11 @@ public function test_writing_in_batches_to_file_without_explicit_close() : void unset($writer); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -286,11 +286,11 @@ public function test_writing_in_batches_to_stream() : void $writer->close(); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -315,11 +315,11 @@ public function test_writing_to_file() : void $writer->write($path, $schema, [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row]); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -337,12 +337,12 @@ public function test_writing_to_file_v2() : void $writer->write($path, $schema, [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row]); - $this->assertSame(2, (new Reader())->read($path)->metadata()->version()); - $this->assertSame( + self::assertSame(2, (new Reader())->read($path)->metadata()->version()); + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } @@ -359,11 +359,11 @@ public function test_writing_to_stream() : void $writer->writeStream($stream, $schema, [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row]); - $this->assertSame( + self::assertSame( [$row, $row, $row, $row, $row, $row, $row, $row, $row, $row], \iterator_to_array((new Reader())->read($path)->values()) ); - $this->assertFileExists($path); + self::assertFileExists($path); \unlink($path); } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/Data/RLEBitPackedHybridTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/Data/RLEBitPackedHybridTest.php index d63ea5ca4..ad9a23e40 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/Data/RLEBitPackedHybridTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/Data/RLEBitPackedHybridTest.php @@ -16,7 +16,7 @@ public function test_() : void $values = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1]; $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid($writer = new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -31,7 +31,7 @@ public function test_1() : void $values = [5, 5, 5, 5, 5, 5, 4, 4, 4, 4]; $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid($writer = new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -47,7 +47,7 @@ public function test_bit_packing_reading_with_extra_bytes_in_the_buffer() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid($writer = new BinaryBufferWriter($buffer), $values); $writer->writeBytes([1, 2, 3]); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -64,7 +64,7 @@ public function test_bit_packing_with_not_a_full_sequence() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -84,7 +84,7 @@ public function test_bit_packing_with_two_sequences() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -101,7 +101,7 @@ public function test_bit_packing_zeroes() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -117,7 +117,7 @@ public function test_bit_rle_reading_with_extra_bytes_in_the_buffer() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid($writer = new BinaryBufferWriter($buffer), $values); $writer->writeBytes([1, 2, 3]); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -134,7 +134,7 @@ public function test_both_rle_and_bit_packed() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -151,7 +151,7 @@ public function test_encoding_bit_pack_before_encoding_rle() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -167,7 +167,7 @@ public function test_flushing_buffers_when_they_are_dividable_by_8() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -184,7 +184,7 @@ public function test_plain_long_rle() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -201,7 +201,7 @@ public function test_plain_rle_with_two_sequences() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), @@ -224,7 +224,7 @@ public function test_with_dynamically_generated_values() : void $buffer = ''; (new RLEBitPackedHybrid())->encodeHybrid(new BinaryBufferWriter($buffer), $values); - $this->assertSame( + self::assertSame( $values, (new RLEBitPackedHybrid())->decodeHybrid( new BinaryBufferReader($buffer), diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/ColumnChunkStatisticsTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/ColumnChunkStatisticsTest.php index 655856a9d..8ce9ee32b 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/ColumnChunkStatisticsTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/ColumnChunkStatisticsTest.php @@ -22,11 +22,11 @@ public function test_statistics_for_boolean() : void $statistics->add(false); $statistics->add(null); - $this->assertFalse($statistics->min()); - $this->assertTrue($statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(2, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertFalse($statistics->min()); + self::assertTrue($statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(2, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_date() : void @@ -41,11 +41,11 @@ public function test_statistics_for_date() : void $statistics->add(new \DateTimeImmutable('2020-01-05')); $statistics->add(null); - $this->assertSame('2020-01-01', $statistics->min()->format('Y-m-d')); - $this->assertSame('2020-01-05', $statistics->max()->format('Y-m-d')); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('2020-01-01', $statistics->min()->format('Y-m-d')); + self::assertSame('2020-01-05', $statistics->max()->format('Y-m-d')); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_decimal() : void @@ -60,11 +60,11 @@ public function test_statistics_for_decimal() : void $statistics->add('5.5'); $statistics->add(null); - $this->assertSame('1.1', $statistics->min()); - $this->assertSame('5.5', $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('1.1', $statistics->min()); + self::assertSame('5.5', $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_double() : void @@ -79,11 +79,11 @@ public function test_statistics_for_double() : void $statistics->add(5.5); $statistics->add(null); - $this->assertSame(1.1, $statistics->min()); - $this->assertSame(5.5, $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame(1.1, $statistics->min()); + self::assertSame(5.5, $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_enum() : void @@ -98,11 +98,11 @@ public function test_statistics_for_enum() : void $statistics->add('e'); $statistics->add(null); - $this->assertSame('a', $statistics->min()); - $this->assertSame('e', $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('a', $statistics->min()); + self::assertSame('e', $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_float() : void @@ -117,11 +117,11 @@ public function test_statistics_for_float() : void $statistics->add(5.5); $statistics->add(null); - $this->assertSame(1.1, $statistics->min()); - $this->assertSame(5.5, $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame(1.1, $statistics->min()); + self::assertSame(5.5, $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_int32() : void @@ -136,11 +136,11 @@ public function test_statistics_for_int32() : void $statistics->add(5); $statistics->add(null); - $this->assertSame(1, $statistics->min()); - $this->assertSame(5, $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame(1, $statistics->min()); + self::assertSame(5, $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_int64() : void @@ -155,11 +155,11 @@ public function test_statistics_for_int64() : void $statistics->add(5); $statistics->add(null); - $this->assertSame(1, $statistics->min()); - $this->assertSame(5, $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame(1, $statistics->min()); + self::assertSame(5, $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_json() : void @@ -174,11 +174,11 @@ public function test_statistics_for_json() : void $statistics->add('{"e":5}'); $statistics->add(null); - $this->assertSame('{"a":1}', $statistics->min()); - $this->assertSame('{"e":5}', $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('{"a":1}', $statistics->min()); + self::assertSame('{"e":5}', $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_string() : void @@ -193,11 +193,11 @@ public function test_statistics_for_string() : void $statistics->add('e'); $statistics->add(null); - $this->assertSame('a', $statistics->min()); - $this->assertSame('e', $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('a', $statistics->min()); + self::assertSame('e', $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_time() : void @@ -212,11 +212,11 @@ public function test_statistics_for_time() : void $statistics->add(new \DateInterval('PT5S')); $statistics->add(null); - $this->assertSame('PT01S', $statistics->min()->format('PT%SS')); - $this->assertSame('PT05S', $statistics->max()->format('PT%SS')); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('PT01S', $statistics->min()->format('PT%SS')); + self::assertSame('PT05S', $statistics->max()->format('PT%SS')); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } public function test_statistics_for_uuid() : void @@ -231,10 +231,10 @@ public function test_statistics_for_uuid() : void $statistics->add('00000000-0000-0000-0000-000000000004'); $statistics->add(null); - $this->assertSame('00000000-0000-0000-0000-000000000000', $statistics->min()); - $this->assertSame('00000000-0000-0000-0000-000000000004', $statistics->max()); - $this->assertSame(7, $statistics->valuesCount()); - $this->assertSame(5, $statistics->distinctCount()); - $this->assertSame(1, $statistics->nullCount()); + self::assertSame('00000000-0000-0000-0000-000000000000', $statistics->min()); + self::assertSame('00000000-0000-0000-0000-000000000004', $statistics->max()); + self::assertSame(7, $statistics->valuesCount()); + self::assertSame(5, $statistics->distinctCount()); + self::assertSame(1, $statistics->nullCount()); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PageBuilder/RLEBitPackedTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PageBuilder/RLEBitPackedTest.php index 48718d12d..d3193852a 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PageBuilder/RLEBitPackedTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PageBuilder/RLEBitPackedTest.php @@ -32,10 +32,10 @@ public function test_packing_and_unpacking_with_length(array $values, int $lengt $buffer = $packer->packWithLength($values); $reader = new BinaryBufferReader($buffer); - $this->assertSame($length, $reader->readInts32(1)[0]); + self::assertSame($length, $reader->readInts32(1)[0]); $unpacked = $rleBitPackedHybrid->decodeHybrid($reader, BitWidth::fromArray($values), \count($values)); - $this->assertSame( + self::assertSame( $values, $unpacked ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PagesBuilderTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PagesBuilderTest.php index 93164c362..249a12f72 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PagesBuilderTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Integration/ParquetFile/RowGroupBuilder/PagesBuilderTest.php @@ -31,8 +31,8 @@ public function test_building_multiple_pages_for_large_int32_column() : void $pages = (new PagesBuilder(DataConverter::initialize($options), Compressions::UNCOMPRESSED, new PageSizeCalculator($options), $options)) ->build($column, $values, $statistics); - $this->assertCount(4, $pages->dataPageContainers()); - $this->assertEquals( + self::assertCount(4, $pages->dataPageContainers()); + self::assertEquals( new PageHeader( Type::DATA_PAGE, \strlen($pages->dataPageContainers()[0]->pageBuffer), @@ -69,7 +69,7 @@ public function test_building_pages_for_enum_columns() : void $pages = (new PagesBuilder(DataConverter::initialize($options), Compressions::UNCOMPRESSED, new PageSizeCalculator($options), $options)) ->build($column, $values, $statistics); - $this->assertEquals( + self::assertEquals( new PageHeader( Type::DICTIONARY_PAGE, \strlen($pages->dictionaryPageContainer()->pageBuffer), @@ -83,7 +83,7 @@ public function test_building_pages_for_enum_columns() : void ), $pages->dictionaryPageContainer()->pageHeader ); - $this->assertEquals( + self::assertEquals( new PageHeader( Type::DATA_PAGE, \strlen($pages->dataPageContainers()[0]->pageBuffer), @@ -116,8 +116,8 @@ public function test_building_pages_for_integer_column() : void $pages = (new PagesBuilder(DataConverter::initialize($options), Compressions::UNCOMPRESSED, new PageSizeCalculator($options), $options)) ->build($column, $values, $statistics); - $this->assertCount(1, $pages->dataPageContainers()); - $this->assertEquals( + self::assertCount(1, $pages->dataPageContainers()); + self::assertEquals( new PageHeader( Type::DATA_PAGE, \strlen($pages->dataPageContainers()[0]->pageBuffer), @@ -150,8 +150,8 @@ public function test_building_pages_for_json_columns() : void $pages = (new PagesBuilder(DataConverter::initialize($options), Compressions::UNCOMPRESSED, new PageSizeCalculator($options), $options)) ->build($column, $values, $statistics); - $this->assertNull($pages->dictionaryPageContainer()); - $this->assertEquals( + self::assertNull($pages->dictionaryPageContainer()); + self::assertEquals( new PageHeader( Type::DATA_PAGE, \strlen($pages->dataPageContainers()[0]->pageBuffer), @@ -183,8 +183,8 @@ public function test_building_pages_for_string_columns_with_very_low_cardinality $pages = (new PagesBuilder(DataConverter::initialize($options), Compressions::UNCOMPRESSED, new PageSizeCalculator($options), $options)) ->build($column, $values, $statistics); - $this->assertCount(1, $pages->dataPageContainers()); - $this->assertEquals( + self::assertCount(1, $pages->dataPageContainers()); + self::assertEquals( new PageHeader( Type::DICTIONARY_PAGE, \strlen($pages->dictionaryPageContainer()->pageBuffer), @@ -198,7 +198,7 @@ public function test_building_pages_for_string_columns_with_very_low_cardinality ), $pages->dictionaryPageContainer()->pageHeader ); - $this->assertEquals( + self::assertEquals( new PageHeader( Type::DATA_PAGE, \strlen($pages->dataPageContainers()[0]->pageBuffer), @@ -230,8 +230,8 @@ public function test_building_pages_for_uuid_columns() : void $pages = (new PagesBuilder(DataConverter::initialize($options), Compressions::UNCOMPRESSED, new PageSizeCalculator($options), $options)) ->build($column, $values, $statistics); - $this->assertNull($pages->dictionaryPageContainer()); - $this->assertEquals( + self::assertNull($pages->dictionaryPageContainer()); + self::assertEquals( new PageHeader( Type::DATA_PAGE, \strlen($pages->dataPageContainers()[0]->pageBuffer), diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BinaryBufferReaderTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BinaryBufferReaderTest.php index 48826cfb4..fb58e8c85 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BinaryBufferReaderTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BinaryBufferReaderTest.php @@ -20,10 +20,10 @@ public function test_read_var_int() : void // First varint should be 1 $result1 = $reader->readVarInt(); - $this->assertSame(1, $result1); + self::assertSame(1, $result1); // Second varint should be 300 $result2 = $reader->readVarInt(); - $this->assertSame(300, $result2); + self::assertSame(300, $result2); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BytesTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BytesTest.php index 69c85b867..42d6eec6a 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BytesTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/BinaryReader/BytesTest.php @@ -13,73 +13,73 @@ final class BytesTest extends TestCase public function test_buffer_from_string() : void { $buffer = Bytes::fromString('Hello'); - $this->assertEquals('Hello', $buffer->toString()); - $this->assertEquals(new DataSize(40), $buffer->size()); + self::assertEquals('Hello', $buffer->toString()); + self::assertEquals(new DataSize(40), $buffer->size()); } public function test_buffer_size() : void { $buffer = new Bytes([72, 101, 108, 108, 111]); // ASCII for "Hello" - $this->assertEquals(new DataSize(40), $buffer->size()); // 5 bytes * 8 bits per byte = 40 bits + self::assertEquals(new DataSize(40), $buffer->size()); // 5 bytes * 8 bits per byte = 40 bits } public function test_buffer_to_string() : void { $buffer = new Bytes([72, 101, 108, 108, 111]); // ASCII for "Hello" - $this->assertEquals('Hello', $buffer->toString()); + self::assertEquals('Hello', $buffer->toString()); } public function test_empty_buffer_size() : void { $buffer = new Bytes([]); - $this->assertEquals(new DataSize(0), $buffer->size()); + self::assertEquals(new DataSize(0), $buffer->size()); } public function test_empty_buffer_to_string() : void { $buffer = new Bytes([]); - $this->assertEquals('', $buffer->toString()); + self::assertEquals('', $buffer->toString()); } public function test_to_int() : void { $bytes = new Bytes([1, 0, 0, 0]); // Little-endian representation of the integer 1 - $this->assertEquals(1, $bytes->toInt()); + self::assertEquals(1, $bytes->toInt()); } public function test_to_int_big_endian() : void { $bytes = new Bytes([0, 0, 0, 1], ByteOrder::BIG_ENDIAN); - $this->assertEquals(1, $bytes->toInt()); + self::assertEquals(1, $bytes->toInt()); } public function test_to_int_big_endian_multi_byte() : void { $bytes = new Bytes([1, 0, 0], ByteOrder::BIG_ENDIAN); // Big-endian representation of the integer 65536 - $this->assertEquals(65536, $bytes->toInt()); + self::assertEquals(65536, $bytes->toInt()); } public function test_to_int_big_endian_non_zero_bytes() : void { $bytes = new Bytes([0xFF, 0xFF], ByteOrder::BIG_ENDIAN); - $this->assertEquals(65535, $bytes->toInt()); + self::assertEquals(65535, $bytes->toInt()); } public function test_to_int_empty_bytes() : void { $bytes = new Bytes([]); // Should return 0 when bytes array is empty - $this->assertEquals(0, $bytes->toInt()); + self::assertEquals(0, $bytes->toInt()); } public function test_to_int_non_zero_bytes() : void { $bytes = new Bytes([0xFF, 0xFF]); // Little-endian representation of the integer 65535 - $this->assertEquals(65535, $bytes->toInt()); + self::assertEquals(65535, $bytes->toInt()); } public function test_to_int_single_byte() : void { $bytes = new Bytes([42]); // Single byte representing the integer 42 - $this->assertEquals(42, $bytes->toInt()); + self::assertEquals(42, $bytes->toInt()); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateConverterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateConverterTest.php index 04d16e5c3..a54e78942 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateConverterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateConverterTest.php @@ -15,7 +15,7 @@ public function test_converting_dates() : void $converter = new Int32DateConverter(); - $this->assertEquals( + self::assertEquals( $date, $converter->fromParquetType($converter->toParquetType($date)) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateTimeConverterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateTimeConverterTest.php index 6c9d495da..d7854a186 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateTimeConverterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int32DateTimeConverterTest.php @@ -15,7 +15,7 @@ public function test_converting_date_times() : void $converter = new Int32DateTimeConverter(); - $this->assertEquals( + self::assertEquals( new \DateTimeImmutable('2021-01-01T14:58:16.111000+0000'), $converter->fromParquetType($converter->toParquetType($date)) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int64DateTimeConverterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int64DateTimeConverterTest.php index 57bbf8351..74c8069ce 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int64DateTimeConverterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/Int64DateTimeConverterTest.php @@ -17,7 +17,7 @@ public function test_converting_date_times() : void $converter = new Int64DateTimeConverter(); - $this->assertEquals( + self::assertEquals( $date, $converter->fromParquetType($converter->toParquetType($date)) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/TimeConverterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/TimeConverterTest.php index fcf0dae31..16bcb8042 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/TimeConverterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/TimeConverterTest.php @@ -18,7 +18,7 @@ public function test_converting_diff_between_two_datetimes_to_time() : void $microseconds = (new TimeConverter())->toParquetType($diff); - $this->assertEquals( + self::assertEquals( $diff, (new TimeConverter())->fromParquetType($microseconds) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/UuidConverterTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/UuidConverterTest.php index bfd008298..1cb2b6f03 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/UuidConverterTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/Data/Converter/UuidConverterTest.php @@ -16,7 +16,7 @@ public function test_converting_uuid() : void $converter = new UuidConverter(); - $this->assertEquals( + self::assertEquals( $uuid, $converter->fromParquetType($converter->toParquetType($uuid)) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/FunctionsTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/FunctionsTest.php index 6fd852236..ec84c7fa0 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/FunctionsTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/FunctionsTest.php @@ -10,7 +10,7 @@ final class FunctionsTest extends TestCase { public function test_array_merge_recursive() : void { - $this->assertSame( + self::assertSame( [ 'members' => [ 0 => [ diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/CodecTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/CodecTest.php index 099009926..712c9dce1 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/CodecTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/CodecTest.php @@ -16,7 +16,7 @@ public function test_gzip() : void $codec = new Codec((new Options())->set(Option::GZIP_COMPRESSION_LEVEL, 9)); - $this->assertSame( + self::assertSame( $data, $codec->decompress($codec->compress($data, Compressions::GZIP), Compressions::GZIP) ); @@ -28,7 +28,7 @@ public function test_snappy() : void $codec = new Codec((new Options())); - $this->assertSame( + self::assertSame( $data, $codec->decompress($codec->compress($data, Compressions::SNAPPY), Compressions::SNAPPY) ); @@ -40,7 +40,7 @@ public function test_uncompressed() : void $codec = new Codec((new Options())); - $this->assertSame( + self::assertSame( $data, $codec->decompress($codec->compress($data, Compressions::UNCOMPRESSED), Compressions::UNCOMPRESSED) ); diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Data/RLEBitPackedHybridTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Data/RLEBitPackedHybridTest.php index 8e19579a5..1b0f710cd 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Data/RLEBitPackedHybridTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Data/RLEBitPackedHybridTest.php @@ -22,18 +22,18 @@ public function test_decode_bit_packed_with_byte_count_greater_than_raw_bytes_le $varInt = 2; $maxItems = 5; - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('remainingLength') ->willReturn(new DataSize(1)); - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('readBytes') ->willReturn(new Bytes([8])); $result = []; $rleBitPackedHybrid->decodeBitPacked($binaryReader, $bitWidth, $varInt, $maxItems, $result); - $this->assertEquals([8], $result); + self::assertEquals([8], $result); } public function test_decode_bit_packed_with_different_bit_width() : void @@ -47,18 +47,18 @@ public function test_decode_bit_packed_with_different_bit_width() : void $varInt = 2; $maxItems = 5; - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('remainingLength') ->willReturn(new DataSize(2)); - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('readBytes') ->willReturn(new Bytes([8, 4])); $result = []; $rleBitPackedHybrid->decodeBitPacked($binaryReader, $bitWidth, $varInt, $maxItems, $result); - $this->assertEquals([8, 0, 4, 0], $result); + self::assertEquals([8, 0, 4, 0], $result); } public function test_decode_bit_packed_with_fewer_remaining_bytes_than_byte_count() : void @@ -72,18 +72,18 @@ public function test_decode_bit_packed_with_fewer_remaining_bytes_than_byte_coun $varInt = 2; $maxItems = 5; - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('remainingLength') ->willReturn(new DataSize(1)); - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('readBytes') ->willReturn(new Bytes([8])); $result = []; $rleBitPackedHybrid->decodeBitPacked($binaryReader, $bitWidth, $varInt, $maxItems, $result); - $this->assertEquals([8], $result); + self::assertEquals([8], $result); } public function test_decode_bit_packed_with_zero_group_count_and_count() : void @@ -100,7 +100,7 @@ public function test_decode_bit_packed_with_zero_group_count_and_count() : void $result = []; $rleBitPackedHybrid->decodeBitPacked($binaryReader, $bitWidth, $varInt, $maxItems, $result); - $this->assertEquals([], $result); + self::assertEquals([], $result); } public function test_decode_rl_e_with_is_literal_run_false() : void @@ -114,14 +114,14 @@ public function test_decode_rl_e_with_is_literal_run_false() : void $intVar = 4; // Even intVar, so isLiteralRun will be false $maxItems = 2; - $binaryReader->expects($this->once()) + $binaryReader->expects(self::once()) ->method('readBytes') ->willReturn(new Bytes([2])); $result = []; $rleBitPackedHybrid->decodeRLE($binaryReader, $bitWidth, $intVar, $maxItems, $result); - $this->assertEquals([2, 2], $result); + self::assertEquals([2, 2], $result); } public function test_decode_rl_e_with_is_literal_run_true() : void @@ -135,18 +135,18 @@ public function test_decode_rl_e_with_is_literal_run_true() : void $intVar = 3; // Odd intVar, so isLiteralRun will be true $maxItems = 2; - $binaryReader->expects($this->exactly(1)) + $binaryReader->expects(self::exactly(1)) ->method('readBytes') ->willReturn(new Bytes([])); - $binaryReader->expects($this->exactly(1)) + $binaryReader->expects(self::exactly(1)) ->method('readBits') ->willReturnOnConsecutiveCalls([1]); $result = []; $rleBitPackedHybrid->decodeRLE($binaryReader, $bitWidth, $intVar, $maxItems, $result); - $this->assertEquals([[1]], $result); + self::assertEquals([[1]], $result); } public function test_decode_rl_e_with_run_length_zero() : void @@ -163,6 +163,6 @@ public function test_decode_rl_e_with_run_length_zero() : void $result = []; $rleBitPackedHybrid->decodeRLE($binaryReader, $bitWidth, $intVar, $maxItems, $result); - $this->assertEquals([0], $result); + self::assertEquals([0], $result); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Page/ColumnDataTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Page/ColumnDataTest.php index 95045c572..b299046fa 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Page/ColumnDataTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Page/ColumnDataTest.php @@ -18,7 +18,7 @@ public function test_split_last_row_for_flat_column() : void $columnData = new ColumnData(PhysicalType::INT32, null, $repetitions, $definitions, $values); - $this->assertEquals( + self::assertEquals( new ColumnData( PhysicalType::INT32, null, @@ -29,7 +29,7 @@ public function test_split_last_row_for_flat_column() : void $columnData->splitLastRow()[0] ); - $this->assertEquals( + self::assertEquals( new ColumnData( PhysicalType::INT32, null, @@ -49,7 +49,7 @@ public function test_splitting_last_row() : void $columnData = new ColumnData(PhysicalType::INT32, null, $repetitions, $definitions, $values); - $this->assertEquals( + self::assertEquals( new ColumnData( PhysicalType::INT32, null, @@ -60,7 +60,7 @@ public function test_splitting_last_row() : void $columnData->splitLastRow()[0] ); - $this->assertEquals( + self::assertEquals( new ColumnData( PhysicalType::INT32, null, @@ -80,7 +80,7 @@ public function test_splitting_map_rows() : void $columnData = new ColumnData(PhysicalType::INT32, null, $repetitions, $definitions, $values); - $this->assertEquals( + self::assertEquals( new ColumnData( PhysicalType::INT32, null, @@ -91,7 +91,7 @@ public function test_splitting_map_rows() : void $columnData->splitLastRow()[0] ); - $this->assertEquals( + self::assertEquals( new ColumnData( PhysicalType::INT32, null, diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/ColumnChunkSizeStatisticsTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/ColumnChunkSizeStatisticsTest.php index a9c53a3dd..4938c6bab 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/ColumnChunkSizeStatisticsTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/ColumnChunkSizeStatisticsTest.php @@ -18,9 +18,9 @@ public function test_int32_statistics() : void $statistics->add($i); } - $this->assertSame(100, $statistics->valuesCount()); - $this->assertSame(0, $statistics->nullCount()); - $this->assertSame(4 * 100, $statistics->uncompressedSize()); + self::assertSame(100, $statistics->valuesCount()); + self::assertSame(0, $statistics->nullCount()); + self::assertSame(4 * 100, $statistics->uncompressedSize()); } public function test_int64_statistics() : void @@ -31,9 +31,9 @@ public function test_int64_statistics() : void $statistics->add($i); } - $this->assertSame(100, $statistics->valuesCount()); - $this->assertSame(0, $statistics->nullCount()); - $this->assertSame(8 * 100, $statistics->uncompressedSize()); + self::assertSame(100, $statistics->valuesCount()); + self::assertSame(0, $statistics->nullCount()); + self::assertSame(8 * 100, $statistics->uncompressedSize()); } public function test_string_statistics() : void @@ -44,8 +44,8 @@ public function test_string_statistics() : void $statistics->add($string = 'string with a fixed length'); } - $this->assertSame(100, $statistics->valuesCount()); - $this->assertSame(0, $statistics->nullCount()); - $this->assertSame(\strlen($string) * $statistics->notNullCount() + (4 * $statistics->notNullCount()), $statistics->uncompressedSize()); + self::assertSame(100, $statistics->valuesCount()); + self::assertSame(0, $statistics->nullCount()); + self::assertSame(\strlen($string) * $statistics->notNullCount() + (4 * $statistics->notNullCount()), $statistics->uncompressedSize()); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/FlattenerTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/FlattenerTest.php index db8cac649..9cd3d0cb3 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/FlattenerTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/RowGroupBuilder/FlattenerTest.php @@ -19,7 +19,7 @@ public function test_flattening_flat_column() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'int32' => 1, ], @@ -41,7 +41,7 @@ public function test_flattening_flat_structure() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'struct.int32' => 1, 'struct.string' => 'string', @@ -58,7 +58,7 @@ public function test_flattening_list_of_ints() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'list.list.element' => [1, 2, 3], ], @@ -80,7 +80,7 @@ public function test_flattening_list_of_lists() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'list.list.element.list.element' => [ [1, 2, 3], @@ -115,7 +115,7 @@ public function test_flattening_list_of_maps() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'list_of_maps.list.element.key_value.key' => [['a', 'b'], ['c', 'd'], ['e', 'f']], 'list_of_maps.list.element.key_value.value' => [[1, 2], [3, 4], [5, 6]], @@ -148,7 +148,7 @@ public function test_flattening_list_of_structs() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'list_of_structs.list.element.int32' => [1, 2, 3], 'list_of_structs.list.element.string' => ['string', 'string', 'string'], @@ -169,7 +169,7 @@ public function test_flattening_map_of_lists() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'map_of_lists.key_value.key' => ['a', 'b', 'c'], 'map_of_lists.key_value.value.list.element' => [[1, 2, 3, 4], [null, null], [10, 11]], @@ -195,7 +195,7 @@ public function test_flattening_map_of_maps() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'map_of_maps.key_value.key' => ['a', 'b', 'c'], 'map_of_maps.key_value.value.key_value.key' => [['d', 'e'], ['f'], null], @@ -229,7 +229,7 @@ public function test_flattening_map_of_string_structure() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'map_of_string_struct.key_value.key' => ['a', 'b', 'c'], 'map_of_string_struct.key_value.value.int32' => [1, 2, 3], @@ -251,7 +251,7 @@ public function test_flattening_map_string_int() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'map_string_int.key_value.key' => ['a', 'b', 'c'], 'map_string_int.key_value.value' => [0, 1, 2], @@ -268,7 +268,7 @@ public function test_flattening_nullable_list_of_ints() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'list.list.element' => null, ], @@ -284,7 +284,7 @@ public function test_flattening_nullable_map_string_int() : void ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'map_string_int.key_value.key' => null, 'map_string_int.key_value.value' => null, @@ -305,7 +305,7 @@ public function test_flattening_nullable_structure_with_list_of_ints_and_map_str ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'struct.int32' => null, 'struct.list_of_ints.list.element' => null, @@ -336,7 +336,7 @@ public function test_flattening_structure_with_list_of_ints_and_map_string_strin ]; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame( + self::assertSame( [ 'struct.int32' => 1, 'struct.list_of_ints.list.element' => [1, 2, 3], @@ -353,6 +353,6 @@ public function test_flattening_when_column_is_not_present_in_row() : void $row = []; $flattener = new Flattener(new DisabledValidator()); - $this->assertSame([], $flattener->flattenColumn($column, $row)); + self::assertSame([], $flattener->flattenColumn($column, $row)); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/FlatColumnTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/FlatColumnTest.php index 9a409e8bb..b1bca64bf 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/FlatColumnTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/FlatColumnTest.php @@ -11,27 +11,27 @@ final class FlatColumnTest extends TestCase { public function test_is_map_element_on_a_column_without_parent() : void { - $this->assertFalse(FlatColumn::int32('int32')->isMapElement()); + self::assertFalse(FlatColumn::int32('int32')->isMapElement()); } public function test_is_map_element_on_a_map_column() : void { - $this->assertFalse(NestedColumn::map('map', MapKey::int32(), MapValue::string())->isMapElement()); + self::assertFalse(NestedColumn::map('map', MapKey::int32(), MapValue::string())->isMapElement()); } public function test_is_map_element_on_map_key_and_value() : void { - $this->assertTrue(NestedColumn::map('map', MapKey::int32(), MapValue::string())->getMapKeyColumn()->isMapElement()); - $this->assertTrue(NestedColumn::map('map', MapKey::int32(), MapValue::string())->getMapValueColumn()->isMapElement()); + self::assertTrue(NestedColumn::map('map', MapKey::int32(), MapValue::string())->getMapKeyColumn()->isMapElement()); + self::assertTrue(NestedColumn::map('map', MapKey::int32(), MapValue::string())->getMapValueColumn()->isMapElement()); } public function test_is_map_on_a_map_column() : void { - $this->assertTrue(NestedColumn::map('map', MapKey::int32(), MapValue::string())->isMap()); + self::assertTrue(NestedColumn::map('map', MapKey::int32(), MapValue::string())->isMap()); } public function test_is_map_on_a_non_map_column() : void { - $this->assertFalse(FlatColumn::int32('int32')->isMap()); + self::assertFalse(FlatColumn::int32('int32')->isMap()); } } diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/NestedColumnTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/NestedColumnTest.php index 4887511f0..84140112b 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/NestedColumnTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/Schema/NestedColumnTest.php @@ -19,9 +19,9 @@ public function test_column_is_list() : void FlatColumn::string('string'), ]); - $this->assertFalse($map->isList()); - $this->assertTrue($list->isList()); - $this->assertFalse($struct->isList()); + self::assertFalse($map->isList()); + self::assertTrue($list->isList()); + self::assertFalse($struct->isList()); } public function test_column_is_map() : void @@ -33,9 +33,9 @@ public function test_column_is_map() : void FlatColumn::string('string'), ]); - $this->assertTrue($map->isMap()); - $this->assertFalse($list->isMap()); - $this->assertFalse($struct->isMap()); + self::assertTrue($map->isMap()); + self::assertFalse($list->isMap()); + self::assertFalse($struct->isMap()); } public function test_column_is_struct() : void @@ -47,9 +47,9 @@ public function test_column_is_struct() : void FlatColumn::string('string'), ]); - $this->assertFalse($map->isStruct()); - $this->assertFalse($list->isStruct()); - $this->assertTrue($struct->isStruct()); + self::assertFalse($map->isStruct()); + self::assertFalse($list->isStruct()); + self::assertTrue($struct->isStruct()); } public function test_flat_path_for_direct_root_child() : void @@ -60,9 +60,9 @@ public function test_flat_path_for_direct_root_child() : void FlatColumn::boolean('bool'), ); - $this->assertSame('int', $schema->get('int')->flatPath()); - $this->assertSame('string', $schema->get('string')->flatPath()); - $this->assertSame('bool', $schema->get('bool')->flatPath()); + self::assertSame('int', $schema->get('int')->flatPath()); + self::assertSame('string', $schema->get('string')->flatPath()); + self::assertSame('bool', $schema->get('bool')->flatPath()); } public function test_getting_flat_list_of_children() : void @@ -76,7 +76,7 @@ public function test_getting_flat_list_of_children() : void ]), ]); - $this->assertSame( + self::assertSame( [ 'struct_nested.string', 'struct_nested.struct_flat.int', diff --git a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/SchemaTest.php b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/SchemaTest.php index 8619b4375..c44bcf6d5 100644 --- a/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/SchemaTest.php +++ b/src/lib/parquet/tests/Flow/Parquet/Tests/Unit/ParquetFile/SchemaTest.php @@ -31,14 +31,14 @@ public function test_calculating_repetition_and_definition_for_nested_fields() : ), ); - $this->assertSame(1, $schema->get('int')->maxDefinitionsLevel()); - $this->assertSame(0, $schema->get('int')->maxRepetitionsLevel()); - $this->assertSame(2, $schema->get('nested.int')->maxDefinitionsLevel()); - $this->assertSame(0, $schema->get('nested.int')->maxRepetitionsLevel()); - $this->assertSame(3, $schema->get('nested.nested.bool')->maxDefinitionsLevel()); - $this->assertSame(0, $schema->get('nested.nested.bool')->maxRepetitionsLevel()); - $this->assertSame(4, $schema->get('nested.list_of_ints.list.element')->maxDefinitionsLevel()); - $this->assertSame(1, $schema->get('nested.list_of_ints.list.element')->maxRepetitionsLevel()); + self::assertSame(1, $schema->get('int')->maxDefinitionsLevel()); + self::assertSame(0, $schema->get('int')->maxRepetitionsLevel()); + self::assertSame(2, $schema->get('nested.int')->maxDefinitionsLevel()); + self::assertSame(0, $schema->get('nested.int')->maxRepetitionsLevel()); + self::assertSame(3, $schema->get('nested.nested.bool')->maxDefinitionsLevel()); + self::assertSame(0, $schema->get('nested.nested.bool')->maxRepetitionsLevel()); + self::assertSame(4, $schema->get('nested.list_of_ints.list.element')->maxDefinitionsLevel()); + self::assertSame(1, $schema->get('nested.list_of_ints.list.element')->maxRepetitionsLevel()); } public function test_converting_schema_to_thrift() : void @@ -60,8 +60,8 @@ public function test_converting_schema_to_thrift() : void ] ), ); - $this->assertCount(10, $schema->toThrift()); - $this->assertSame( + self::assertCount(10, $schema->toThrift()); + self::assertSame( [ 'schema', 'int', @@ -102,7 +102,7 @@ public function test_flattening_schema_to_receive_simple_array_of_flat_columns() ); foreach ($schema->columnsFlat() as $column) { - $this->assertInstanceOf(FlatColumn::class, $column); + self::assertInstanceOf(FlatColumn::class, $column); } } } diff --git a/src/lib/rdsl/tests/Flow/RDSL/Tests/Integration/ExecutorTest.php b/src/lib/rdsl/tests/Flow/RDSL/Tests/Integration/ExecutorTest.php index e5ad18792..68176046e 100644 --- a/src/lib/rdsl/tests/Flow/RDSL/Tests/Integration/ExecutorTest.php +++ b/src/lib/rdsl/tests/Flow/RDSL/Tests/Integration/ExecutorTest.php @@ -41,8 +41,8 @@ public function test_build_and_execute_dsl() : void $results = (new Executor())->execute($executables); - $this->assertInstanceOf(IntObject::class, $results[0]); - $this->assertSame(5, $results[0]->value()); + self::assertInstanceOf(IntObject::class, $results[0]); + self::assertSame(5, $results[0]->value()); } public function test_executing_not_allowed_methods() : void diff --git a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/AllowAllTest.php b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/AllowAllTest.php index 070f38a63..943da0749 100644 --- a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/AllowAllTest.php +++ b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/AllowAllTest.php @@ -13,8 +13,8 @@ public function test_allow_all() : void { $acl = new AllowAll(); - $this->assertTrue($acl->isAllowed('foo')); - $this->assertTrue($acl->isAllowed('bar')); - $this->assertTrue($acl->isAllowed('baz')); + self::assertTrue($acl->isAllowed('foo')); + self::assertTrue($acl->isAllowed('bar')); + self::assertTrue($acl->isAllowed('baz')); } } diff --git a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/DenyAllTest.php b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/DenyAllTest.php index e80c20572..a550f623c 100644 --- a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/DenyAllTest.php +++ b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/DenyAllTest.php @@ -13,8 +13,8 @@ public function test_deny_all() : void { $acl = new DenyAll(); - $this->assertFalse($acl->isAllowed('foo')); - $this->assertFalse($acl->isAllowed('bar')); - $this->assertFalse($acl->isAllowed('baz')); + self::assertFalse($acl->isAllowed('foo')); + self::assertFalse($acl->isAllowed('bar')); + self::assertFalse($acl->isAllowed('baz')); } } diff --git a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/ExceptTest.php b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/ExceptTest.php index 02d0fc8c5..f3d451fce 100644 --- a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/ExceptTest.php +++ b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/AccessControl/ExceptTest.php @@ -16,8 +16,8 @@ public function test_except() : void ['bar'] ); - $this->assertTrue($acl->isAllowed('foo')); - $this->assertFalse($acl->isAllowed('bar')); - $this->assertFalse($acl->isAllowed('baz')); + self::assertTrue($acl->isAllowed('foo')); + self::assertFalse($acl->isAllowed('bar')); + self::assertFalse($acl->isAllowed('baz')); } } diff --git a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/BuilderTest.php b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/BuilderTest.php index 339cd6a2d..28b86dd5d 100644 --- a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/BuilderTest.php +++ b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/BuilderTest.php @@ -31,9 +31,9 @@ public function test_parsing_array_with_function_defined_as_string() : void $executables = $builder->parse([['function' => 'strlen', 'args' => ['string']]]); - $this->assertInstanceOf(Executable::class, $executables->toArray()[0]); - $this->assertSame('strlen', $executables->toArray()[0]->name()); - $this->assertSame(['string'], $executables->toArray()[0]->arguments()->toArray()); + self::assertInstanceOf(Executable::class, $executables->toArray()[0]); + self::assertSame('strlen', $executables->toArray()[0]->name()); + self::assertSame(['string'], $executables->toArray()[0]->arguments()->toArray()); } public function test_parsing_array_with_non_existing_function() : void diff --git a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/NamespaceTest.php b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/NamespaceTest.php index 3fbe5995c..7fdf7ba7e 100644 --- a/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/NamespaceTest.php +++ b/src/lib/rdsl/tests/Flow/RDSL/Tests/Unit/NamespaceTest.php @@ -40,6 +40,6 @@ public function test_invalid_namespaces(string $ns) : void */ public function test_valid_namespaces(string $ns) : void { - $this->assertInstanceOf(DSLNamespace::class, new DSLNamespace($ns, new AllowAll())); + self::assertInstanceOf(DSLNamespace::class, new DSLNamespace($ns, new AllowAll())); } } diff --git a/src/lib/snappy/tests/Flow/Snappy/Tests/Integration/SnappyTest.php b/src/lib/snappy/tests/Flow/Snappy/Tests/Integration/SnappyTest.php index a71f767a5..f91034de1 100644 --- a/src/lib/snappy/tests/Flow/Snappy/Tests/Integration/SnappyTest.php +++ b/src/lib/snappy/tests/Flow/Snappy/Tests/Integration/SnappyTest.php @@ -13,14 +13,14 @@ final class SnappyTest extends TestCase public function test_decompress_text_compressed_with_extension() : void { if (!\function_exists('snappy_compress')) { - $this->markTestSkipped('Snappy extension is not installed'); + self::markTestSkipped('Snappy extension is not installed'); } $string = 'This is some random string with UTF-8 characters: ąęćźżół'; $snappy = new Snappy(); - $this->assertSame( + self::assertSame( $string, $snappy->uncompress(\snappy_compress($string)) ); @@ -29,14 +29,14 @@ public function test_decompress_text_compressed_with_extension() : void public function test_decompress_with_extension_text_compressed_with_library() : void { if (!\function_exists('snappy_uncompress')) { - $this->markTestSkipped('Snappy extension is not installed'); + self::markTestSkipped('Snappy extension is not installed'); } $string = 'This is some random string with UTF-8 characters: ąęćźżół'; $snappy = new Snappy(); - $this->assertSame( + self::assertSame( $string, \snappy_uncompress($snappy->compress($string)) ); @@ -48,7 +48,7 @@ public function test_snappy_compression() : void $snappy = new Snappy(); - $this->assertSame( + self::assertSame( $string, $snappy->uncompress($snappy->compress($string)) ); @@ -60,7 +60,7 @@ public function test_snappy_compression_on_a_longer_text() : void $snappy = new Snappy(); - $this->assertSame( + self::assertSame( $string, $snappy->uncompress($snappy->compress($string)) ); @@ -73,7 +73,7 @@ public function test_snappy_compression_with_dynamically_generated_texts() : voi for ($iteration = 0; $iteration < 100; $iteration++) { $string = Factory::create()->text(\random_int(10, 1000)); - $this->assertSame( + self::assertSame( $string, $snappy->uncompress($snappy->compress($string)), 'Snappy compression/decomression failed at ' . $iteration . ' iteration, with text: "' . $string . '"' @@ -87,7 +87,7 @@ public function test_snappy_compression_with_utf_8_characters() : void $snappy = new Snappy(); - $this->assertSame( + self::assertSame( $string, $snappy->uncompress($snappy->compress($string)) ); diff --git a/web/landing/tests/Flow/Website/Service/Tests/Integration/ExamplesTest.php b/web/landing/tests/Flow/Website/Service/Tests/Integration/ExamplesTest.php index bfca983a7..38cbdf10d 100644 --- a/web/landing/tests/Flow/Website/Service/Tests/Integration/ExamplesTest.php +++ b/web/landing/tests/Flow/Website/Service/Tests/Integration/ExamplesTest.php @@ -14,7 +14,7 @@ public function test_return_topic_example_code() : void $path = __DIR__ . '/../Fixtures/Valid'; $service = new Examples($path); - $this->assertStringContainsString( + self::assertStringContainsString( 'example code file', $service->code('topic_3', 'example_1') ); @@ -25,7 +25,7 @@ public function test_return_topic_examples_list() : void $path = __DIR__ . '/../Fixtures/Valid'; $service = new Examples($path); - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $service->examples('topic_2'), [ 'example_1', @@ -39,7 +39,7 @@ public function test_return_topics_list() : void $path = __DIR__ . '/../Fixtures/Valid'; $service = new Examples($path); - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $service->topics(), [ 'topic_1',