diff --git a/.gitignore b/.gitignore index 5e7b1b5a..e50de2eb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.phar /vendor/ docs/reactivex.github.io build/ +.idea diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 00000000..ef9222c6 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"Rx\\Disposable\\ScheduledDisposableTest::it_disposes_the_scheduled_disposable":4,"Rx\\Disposable\\ScheduledDisposableTest::it_does_nothing_if_disposed_twice":4,"Rx\\Functional\\ColdObservableTest::it_calls_relative_to_subscribe_time":4,"Rx\\Functional\\MarbleTest::testColdMarble":4,"Rx\\Functional\\MarbleTest::testHotMarble":4,"Rx\\Functional\\MarbleTest::testSomethingElse":4,"Rx\\Functional\\MarbleTest::testMapMarble":4,"Rx\\Functional\\MarbleTest::testMapErrorMarble":4,"Rx\\Functional\\MarbleTest::testMapDisposeMarble":4,"Rx\\Functional\\MarbleTest::testCountMarble":4,"Rx\\Functional\\Observable\\ErrorObservableTest::testErrorObservableWillAcceptThrowable":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_joins_last_values":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_allows_null":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_joins_last_values_with_selector":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_accepts_single_observable":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_accepts_single_observable_with_selector":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_wont_emit_with_empty_observable":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_empty_empty":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_none":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_empty_return":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_return_empty":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_return_return":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_empty_throw":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_throw_empty":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_return_throw":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_throw_return":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_throw_inside_selector":4,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_disposed_after_emit":4,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_basic":4,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_zero":4,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_Negative":4,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_disposed":4,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_observer_throws":4,"Rx\\Functional\\Observable\\IteratorObservableTest::it_schedules_all_elements_from_the_generator":4,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_yields_null":4,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_yields_one":4,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_throws_error":4,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_dispose":4,"Rx\\Functional\\Observable\\IteratorObservableTest::it_schedules_all_elements_from_the_generator_with_return":4,"Rx\\Functional\\Observable\\IteratorObservableTest::it_completes_if_subscribed_second_time_without_return_value":4,"Rx\\Functional\\Observable\\IteratorObservableTest::it_returns_value_if_subscribed_second_time_with_return_value":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_basic":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_zero":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_zero_non_int":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_negative":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_disposed":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_dispose_before_dueTime":4,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_throws":4,"Rx\\Functional\\ObservableTest::testExceptionInOnNextByDefaultGoesToErrorAndDisposes":4,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableNever":4,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableEmpty":4,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableThrow":4,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableJust":4,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableIsNotEager":4,"Rx\\Functional\\Operator\\AverageTest::average_Number_Empty":4,"Rx\\Functional\\Operator\\AverageTest::average_Number_Return":4,"Rx\\Functional\\Operator\\AverageTest::average_Number_Some":4,"Rx\\Functional\\Operator\\AverageTest::average_Number_Throw":4,"Rx\\Functional\\Operator\\AverageTest::average_Number_Never":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountpartialwindow":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountfullwindows":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountfullandpartialwindows":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountError":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountskipless":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountskipmore":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountbasic":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountdisposed":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCount_invalid_skip":4,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCount_invalid_count":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_NoErrors":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Never":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Empty":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Return":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Never":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Never_Dispose":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Error":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Error_Dispose":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_HandlerThrows":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_handler_returns_invalid_string":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Nested_OuterCatches":4,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_ThrowFromNestedCatch":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_never":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_empty":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_never":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_empty":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_return":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_return":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_return":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_return_return":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_return_no_selector":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_error":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_error_empty":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_throw":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_return":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_throw":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_error_throw":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_error":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_throw":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_never":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_some_throw":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_some":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_after_complete_left":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_after_complete_right":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_interleaved_with_tail":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_consecutive":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_consecutive_end_with_error_left":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_consecutive_end_with_error_right":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_selector_throws":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_delay":4,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_args_order":4,"Rx\\Functional\\Operator\\ComposeTest::testSimpleCompose":4,"Rx\\Functional\\Operator\\ConcatAllTest::concatAll_timer_missing_item":4,"Rx\\Functional\\Operator\\ConcatAllTest::concatAll_errors_when_exception_during_inner_subscribe":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Complete":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Complete_2":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Never_Complete":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Never":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Error":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Error_Complete":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Error_Error":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Complete":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Complete_OuterNotComplete":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Error_Outer":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Error_Inner":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Dispose":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Throw":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_UseFunction":4,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_return_invalid_string":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyEmpty":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyNever":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatNeverEmpty":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatNeverNever":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyThrow":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatThrowEmpty":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatThrowThrow":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnEmpty":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyReturn":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnNever":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatNeverReturn":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnReturn":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatThrowReturn":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnThrow":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatSomeDataOnBothSides":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatAsArguments":4,"Rx\\Functional\\Operator\\ConcatTest::testConcatDispose":4,"Rx\\Functional\\Operator\\CountTest::testCountEmpty":4,"Rx\\Functional\\Operator\\CountTest::testCountSome":4,"Rx\\Functional\\Operator\\CountTest::testCountThrow":4,"Rx\\Functional\\Operator\\CountTest::testCountNever":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateEmptyTrue":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateEmptyFalse":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateReturnTrue":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateReturnFalse":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateAllMatched":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateNoneMatched":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateSomeEven":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateThrowTrue":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateThrowFalse":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateNever":4,"Rx\\Functional\\Operator\\CountTest::testCountPredicateThrowsError":4,"Rx\\Functional\\Operator\\CountTest::testCountAfterRange":4,"Rx\\Functional\\CreateTest::create_next":4,"Rx\\Functional\\CreateTest::create_null_disposable":4,"Rx\\Functional\\CreateTest::create_completed":4,"Rx\\Functional\\CreateTest::create_error":4,"Rx\\Functional\\CreateTest::create_dispose":4,"Rx\\Functional\\Operator\\CustomTest::testCustomOperator":4,"Rx\\Functional\\Operator\\CustomTest::testExternalNamespacedOperator":4,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_nonEmpty_1":4,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_nonEmpty_2":4,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_empty_1":4,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_empty_2":4,"Rx\\Functional\\Operator\\DeferTest::defer_complete":4,"Rx\\Functional\\Operator\\DeferTest::defer_error":4,"Rx\\Functional\\Operator\\DeferTest::defer_dispose":4,"Rx\\Functional\\Operator\\DeferTest::defer_throw":4,"Rx\\Functional\\Operator\\DeferTest::defer_factory_returns_invalid_string":4,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_simple_1":4,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_simple_2_implementation":4,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_simple_3_implementation":4,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_error_1_implementation":4,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_error_2_implementation":4,"Rx\\Functional\\Operator\\DelayTest::delay_empty":4,"Rx\\Functional\\Operator\\DelayTest::delay_error":4,"Rx\\Functional\\Operator\\DelayTest::delay_never":4,"Rx\\Functional\\Operator\\DelayTest::delay_completes_during_subscribe_without_throwing":4,"Rx\\Functional\\Operator\\DelayTest::delay_disposed_after_emit":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_all_distinct":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_some_duplicates":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_some_error":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_dispose":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomComparer_all_distinct":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomComparer_some_duplicates":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomComparer_some_throw":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_all_distinct":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_some_duplicates":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_some_throw":4,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_and_CustomComparer_some_duplicates":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_never":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_empty":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_return":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_throw":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_all_changes":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_all_same":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_some_changes":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_comparer_all_different":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_keyselector_div2":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_key_selector_throws":4,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_comparer_throws":4,"Rx\\Functional\\Operator\\DoOnCompletedTest::doOnCompleted_should_be_called":4,"Rx\\Functional\\Operator\\DoOnCompletedTest::doOnCompleted_should_call_after_resubscription":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_should_see_all_values":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_plain_action":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed_never":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_not":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_error":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_never":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_next_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed_next_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed_completed_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_next_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_error_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_next_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_error_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_completed_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_observer_next_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_observer_error_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_observer_completed_throws":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_plain_action":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_next_completed":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_next_error":4,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_throws_when_args_invalid":4,"Rx\\Functional\\Operator\\DoOnErrorTest::doOnError_should_see_errors":4,"Rx\\Functional\\Operator\\DoOnErrorTest::doOnError_should_call_after_resubscription":4,"Rx\\Functional\\Operator\\DoOnNextTest::doOnNext_should_see_all_values":4,"Rx\\Functional\\Operator\\DoOnNextTest::doOnNext_should_call_after_resubscription":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_finally_when_synchronously_subscribing_to_and_unsubscribing_from_a_shared_observable":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_two_finally_instances_in_succession_on_a_shared_observable":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_empty":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_never":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_throw":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_basic_hot_observable":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_basic_cold_observable":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_basic_error":4,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_unsubscription":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_empty":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_inner_empty":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_many":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_errors":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_inner_errors":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_throws":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_returns_invalid_string":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_dispose":4,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_dispose_before_outer_completes":4,"Rx\\Functional\\FromArrayTest::it_schedules_all_elements_from_the_array":4,"Rx\\Functional\\FromArrayTest::it_calls_on_complete_when_the_array_is_empty":4,"Rx\\Functional\\FromArrayTest::fromArray_one":4,"Rx\\Functional\\FromArrayTest::fromArray_dispose":4,"Rx\\Functional\\Operator\\GroupByTest::it_passes_on_complete":4,"Rx\\Functional\\Operator\\GroupByTest::it_passes_on_error":4,"Rx\\Functional\\Operator\\GroupByTest::it_disposes_the_outer_subscription":4,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_error_if_keyselector_throws":4,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_error_if_elementselector_throws":4,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_error_if_durationselector_throws":4,"Rx\\Functional\\Operator\\GroupByTest::it_passes_on_error_if_duration_observable_calls_on_error":4,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_completed_on_inner_subscription_if_subscription_expires_otherwise_it_passes":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilWithKeyComparer":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilWithKeyComparerDefaultDurationSelector":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterComplete":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterError":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterDispose":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterKeyThrow":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterEleThrow":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerComplete":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerCompleteAll":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerError":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerDispose":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerKeyThrow":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEleThrow":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterIndependence":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerIndependence":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerMultipleIndependence":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEscapeComplete":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEscapeError":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEscapeDispose":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilDefault":4,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilDurationSelectorThrows":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_true_if_source_is_empty":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_false_if_source_emits_element":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_true_if_source_emits_before_subscription":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_raise_error_if_source_raise_error":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_not_complete_if_source_never_emits":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_true_if_source_completes_immediately":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_allow_unsubscribing_explicitly_and_early":4,"Rx\\Functional\\Operator\\IsEmptyTest::should_not_break_unsubscription_chains_when_result_is_unsubscribed_explicitly":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_never":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_empty":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_return":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_throw":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_never":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_empty":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_return":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_throw":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dispose":4,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_dispose":4,"Rx\\Functional\\Operator\\MaxTest::max_number_empty":4,"Rx\\Functional\\Operator\\MaxTest::max_number_Return":4,"Rx\\Functional\\Operator\\MaxTest::max_number_Some":4,"Rx\\Functional\\Operator\\MaxTest::max_number_throw":4,"Rx\\Functional\\Operator\\MaxTest::max_number_Never":4,"Rx\\Functional\\Operator\\MaxTest::max_comparer_empty":4,"Rx\\Functional\\Operator\\MaxTest::max_comparer_return":4,"Rx\\Functional\\Operator\\MaxTest::max_comparer_some":4,"Rx\\Functional\\Operator\\MaxTest::max_comparer_throw":4,"Rx\\Functional\\Operator\\MaxTest::max_comparer_never":4,"Rx\\Functional\\Operator\\MaxTest::max_comparer_throws":4,"Rx\\Functional\\Operator\\MaxTest::max_never_dispose":4,"Rx\\Functional\\Operator\\MaxTest::max_some_dispose":4,"Rx\\Functional\\Operator\\MergeAllTest::it_passes_on_error_from_sources":4,"Rx\\Functional\\Operator\\MergeAllTest::it_passes_on_completed_from_sources":4,"Rx\\Functional\\Operator\\MergeTest::it_passes_the_last_on_complete":4,"Rx\\Functional\\Operator\\MinTest::min_number_empty":4,"Rx\\Functional\\Operator\\MinTest::min_number_Return":4,"Rx\\Functional\\Operator\\MinTest::min_number_Some":4,"Rx\\Functional\\Operator\\MinTest::min_number_throw":4,"Rx\\Functional\\Operator\\MinTest::min_number_Never":4,"Rx\\Functional\\Operator\\MinTest::min_comparer_empty":4,"Rx\\Functional\\Operator\\MinTest::min_comparer_return":4,"Rx\\Functional\\Operator\\MinTest::min_comparer_some":4,"Rx\\Functional\\Operator\\MinTest::min_comparer_throw":4,"Rx\\Functional\\Operator\\MinTest::min_comparer_never":4,"Rx\\Functional\\Operator\\MinTest::min_comparer_throws":4,"Rx\\Functional\\Operator\\MinTest::min_never_dispose":4,"Rx\\Functional\\Operator\\MinTest::min_some_dispose":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_1":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_2":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_3":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_error_1":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_error_2":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_completed":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_completed":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_error":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_dispose":4,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_zip":4,"Rx\\Functional\\Operator\\PartitionTest::partitionEmpty":4,"Rx\\Functional\\Operator\\PartitionTest::partitionSingle":4,"Rx\\Functional\\Operator\\PartitionTest::partitionEach":4,"Rx\\Functional\\Operator\\PartitionTest::partitionCompleted":4,"Rx\\Functional\\Operator\\PartitionTest::partitionNotCompleted":4,"Rx\\Functional\\Operator\\PartitionTest::partitionError":4,"Rx\\Functional\\Operator\\PartitionTest::partitionDisposed":4,"Rx\\Functional\\Operator\\PluckTest::pluck_completed":4,"Rx\\Functional\\Operator\\PluckTest::pluck_error":4,"Rx\\Functional\\Operator\\PluckTest::pluck_completed_array":4,"Rx\\Functional\\Operator\\PluckTest::pluck_array_index_missing":4,"Rx\\Functional\\Operator\\PluckTest::pluck_object_property_missing":4,"Rx\\Functional\\Operator\\PluckTest::pluck_array_numeric_index":4,"Rx\\Functional\\Operator\\PluckTest::pluck_nested":4,"Rx\\Functional\\Operator\\PluckTest::pluck_nested_numeric_key_with_object_properties":4,"Rx\\Functional\\Operator\\PluckTest::pluck_object_property_null":4,"Rx\\Functional\\Operator\\PluckTest::pluck_array_assoc_null":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_basic":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_error":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_complete":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_dispose":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_zip_complete":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_zip_errorr":4,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_zip_dispose":4,"Rx\\Functional\\Operator\\PublishTest::publish_cold_zip":4,"Rx\\Functional\\Operator\\PublishTest::refCount_connects_on_first":4,"Rx\\Functional\\Operator\\PublishTest::refCount_not_connected":4,"Rx\\Functional\\Operator\\PublishTest::refCount_publish_basic":4,"Rx\\Functional\\Operator\\PublishTest::publish_error":4,"Rx\\Functional\\Operator\\PublishTest::publish_complete":4,"Rx\\Functional\\Operator\\PublishTest::publish_dispose":4,"Rx\\Functional\\Operator\\PublishTest::publish_lambda_zip_complete":4,"Rx\\Functional\\Operator\\PublishTest::publish_lambda_zip_error":4,"Rx\\Functional\\Operator\\PublishTest::publish_lambda_zip_dispose":4,"Rx\\Functional\\Operator\\PublishValueTest::publishLast_basic":4,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_error":4,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_complete":4,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_dispose":4,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_zip_complete":4,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_zip_error":4,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_zip_dispose":4,"Rx\\Functional\\Operator\\RaceTest::race_never_2":4,"Rx\\Functional\\Operator\\RaceTest::race_never_3":4,"Rx\\Functional\\Operator\\RaceTest::race_never_empty":4,"Rx\\Functional\\Operator\\RaceTest::race_empty_never":4,"Rx\\Functional\\Operator\\RaceTest::race_regular_should_dispose_loser":4,"Rx\\Functional\\Operator\\RaceTest::race_throws_before_election":4,"Rx\\Functional\\Operator\\RaceTest::race_none":4,"Rx\\Functional\\Operator\\RaceTest::race_one":4,"Rx\\Functional\\Operator\\RangeTest::range_zero":4,"Rx\\Functional\\Operator\\RangeTest::range_one":4,"Rx\\Functional\\Operator\\RangeTest::range_five":4,"Rx\\Functional\\Operator\\RangeTest::range_dispose":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_empty":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_return":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_throw":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_never":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_range":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_empty":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_return":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_throw":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_never":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_range":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_accumulator_throws":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_accumulator_throws_with_seed":4,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_falsy_seed_range":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_basic":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_infinite":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_error":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_1":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_2":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_3":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_basic":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_dispose":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_infinite":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_error":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_1":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_2":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_3":4,"Rx\\Functional\\Operator\\RepeatTest::repeat_returns_empty_when_count_is_zero":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_never":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_never":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_empty":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_next_error":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_complete":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_next_complete":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_infinite":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_dispose":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_dispose_second":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_dispose_between":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_notifier_throws":4,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_notifier_returns_invalid_string":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_basic":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_error":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_complete":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_dispose":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_zip_complete":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_zip_error":4,"Rx\\Functional\\Operator\\ReplayTest::replay_count_zip_dispose":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_basic":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_error":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_complete":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_dispose":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_zip_complete":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_zip_errorr":4,"Rx\\Functional\\Operator\\ReplayTest::replay_time_zip_dispose":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableBasic":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableInfinite":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableError":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableThrows":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableRetryCountBasic":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableRetryCountDispose":4,"Rx\\Functional\\Operator\\RetryTest::testRetryRetryCountDispose":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableCompletes":4,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableRetryCountThrows":4,"Rx\\Functional\\Operator\\RetryTest::testWithImmediateSchedulerWithRecursion":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_never":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_never":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_never_completed":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_Empty":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_Next_Error":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_complete":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_next_complete":4,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_infinite":4,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenDispose":4,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenDisposeBetweenSourceSubscriptions":4,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenInnerEmitsBeforeOuterError":4,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenSelectorThrows":4,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenSelectorReturnsInvalidString":4,"Rx\\Functional\\Operator\\ScanTest::testScanSeedNever":4,"Rx\\Functional\\Operator\\ScanTest::testScanSeedEmpty":4,"Rx\\Functional\\Operator\\ScanTest::testScanSeedReturn":4,"Rx\\Functional\\Operator\\ScanTest::testScanSeedThrow":4,"Rx\\Functional\\Operator\\ScanTest::testScanSeedSomeData":4,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedNever":4,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedEmpty":4,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedReturn":4,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedThrow":4,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedSomeData":4,"Rx\\Functional\\Operator\\ScanTest::scan_accumulator_throws":4,"Rx\\Functional\\Operator\\ScanTest::scan_accumulator_throws_with_seed":4,"Rx\\Functional\\Operator\\SelectManyTest::it_passes_the_last_on_complete":4,"Rx\\Functional\\Operator\\SelectManyTest::it_passes_on_error":4,"Rx\\Functional\\Operator\\SelectManyTest::flatMapTo_it_passes_the_last_on_complete":4,"Rx\\Functional\\Operator\\SelectManyTest::flatMapTo_it_passes_on_error":4,"Rx\\Functional\\Operator\\SelectManyTest::flatMap_it_errors_with_bad_return":4,"Rx\\Functional\\Operator\\SelectTest::calls_on_error_if_selector_throws_an_exception":4,"Rx\\Functional\\Operator\\SelectTest::select_calls_on_completed":4,"Rx\\Functional\\Operator\\SelectTest::select_calls_on_error":4,"Rx\\Functional\\Operator\\SelectTest::select_calls_selector":4,"Rx\\Functional\\Operator\\SelectTest::map_with_index_dispose_inside_selector":4,"Rx\\Functional\\Operator\\SelectTest::map_with_index_completed":4,"Rx\\Functional\\Operator\\SelectTest::map_with_index_not_completed":4,"Rx\\Functional\\Operator\\SelectTest::map_with_index_error":4,"Rx\\Functional\\Operator\\SelectTest::map_with_index_throws":4,"Rx\\Functional\\Operator\\SelectTest::mapTo_value":4,"Rx\\Functional\\Operator\\SelectTest::map_and_map_Optimization":4,"Rx\\Functional\\Operator\\SingleInstanceTest::singleInstance_basic":4,"Rx\\Functional\\Operator\\SingleInstanceTest::singleInstance_subscribe_after_stopped":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastNegative":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastZeroCompleted":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastZeroError":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastZeroDisposed":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastOneCompleted":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastOneError":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastOneDisposed":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastThreeCompleted":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastThreeError":4,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastThreeDisposed":4,"Rx\\Functional\\Operator\\SkipTest::it_passes_on_complete":4,"Rx\\Functional\\Operator\\SkipTest::it_skips_one_value":4,"Rx\\Functional\\Operator\\SkipTest::it_skips_multiple_values":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataNext":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataError":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataEmpty":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverNext":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverError":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataNever":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverEmpty":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverNever":4,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilHasCompletedCausesDisposal":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_complete_before":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_complete_after":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_error_before":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_error_after":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_dispose_before":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_dispose_after":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_zero":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_throw":4,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_index":4,"Rx\\Functional\\Operator\\StartTest::start_action":4,"Rx\\Functional\\Operator\\StartTest::start_action_number":4,"Rx\\Functional\\Operator\\StartTest::start_with_error":4,"Rx\\Functional\\Operator\\StartWithTest::startWith_never":4,"Rx\\Functional\\Operator\\StartWithTest::startWith_empty":4,"Rx\\Functional\\Operator\\StartWithTest::startWith_one":4,"Rx\\Functional\\Operator\\StartWithTest::startWith_multiple":4,"Rx\\Functional\\Operator\\StartWithTest::startWith_multiple_before":4,"Rx\\Functional\\Operator\\StartWithTest::startWith_error":4,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_normal":4,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_error":4,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_empty":4,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_never":4,"Rx\\Functional\\Operator\\SumTest::sum_number_empty":4,"Rx\\Functional\\Operator\\SumTest::sum_number_return":4,"Rx\\Functional\\Operator\\SumTest::sum_number_some":4,"Rx\\Functional\\Operator\\SumTest::sum_number_throw":4,"Rx\\Functional\\Operator\\SumTest::sum_number_never":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Data":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_inner_throws":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_first_inner_throws":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_outer_throws":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_no_inner":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_inner_completes":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Dispose":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Inner_Completes_Last":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Subsequent":4,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_SkipsOneObservable":4,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_Data":4,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_inner_throws":4,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_outer_throws":4,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_no_inner":4,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_inner_completes":4,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_Dispose":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_zero_completed":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_zero_error":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_zero_disposed":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_one_completed":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_one_error":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_one_disposed":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_three_completed":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_three_error":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_three_disposed":4,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_invalid_count":4,"Rx\\Functional\\Operator\\TakeTest::it_passes_on_complete":4,"Rx\\Functional\\Operator\\TakeTest::it_calls_on_complete_after_last_value":4,"Rx\\Functional\\Operator\\TakeTest::take_zero_calls_on_completed":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_next":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_error":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_empty":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_never":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_next":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_error":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_empty":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_never":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_before_first_produced":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_before_first_produced_remain_silent_and_proper_disposed":4,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_no_preempt_after_last_produced_proper_disposed_signal":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_never":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_complete_after":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_error_before":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_error_after":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_dispose_before":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_dispose_after":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_zero":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_throw":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_index":4,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_inclusive":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_completed":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_never":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_empty":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_error":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_no_end":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_dispose":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_dispose_with_value_waiting":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_quiet_observable_emits_immediately":4,"Rx\\Functional\\Operator\\ThrottleTest::throttle_noisy_observable_drops_items":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_in_time":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_relative_time_timeout_occurs_with_default_error":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_relative_time_timeout_occurs_with_custom_error":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_out_of_time":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_1":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_2":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_never":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_completed":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_Error":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_does_not_occur_completed":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_does_not_occur_Error":4,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_does_not_occur":4,"Rx\\Functional\\Operator\\TimestampTest::timestamp_regular":4,"Rx\\Functional\\Operator\\TimestampTest::timestamp_empty":4,"Rx\\Functional\\Operator\\TimestampTest::timestamp_error":4,"Rx\\Functional\\Operator\\TimestampTest::timestamp_never":4,"Rx\\Functional\\Operator\\TimestampTest::timestamp_dispose":4,"Rx\\Functional\\Operator\\ToArrayTest::testToArrayCompleted":4,"Rx\\Functional\\Operator\\ToArrayTest::testToArrayError":4,"Rx\\Functional\\Operator\\ToArrayTest::testToArrayDisposed":4,"Rx\\Functional\\Operator\\WhereTest::it_filters_all_on_false":4,"Rx\\Functional\\Operator\\WhereTest::it_passes_all_on_true":4,"Rx\\Functional\\Operator\\WhereTest::it_passes_on_error":4,"Rx\\Functional\\Operator\\WhereTest::calls_on_error_if_predicate_throws_an_exception":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_never":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_empty":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_never":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_empty":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_return":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_empty":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_return":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_never":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_return":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_return_no_selector":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_error":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_error_empty":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_throw":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_return":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_throw":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_error_throw":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_error":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_throw":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_never":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_some_throw":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_some":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_after_complete_left":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_after_complete_right":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_interleaved_with_tail":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive_array":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive_end_with_error_left":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive_end_with_error_right":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_selector_throws":4,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_return_dispose":4,"Rx\\Functional\\Operator\\WithLatestFromTest::testWithLatestFrom_multiple_dispose_no_selector":4,"Rx\\Functional\\Operator\\WithLatestFromTest::testWithLatestFrom_multiple_dispose_with_selector":4,"Rx\\Functional\\Operator\\WithLatestFromTest::testWithLatestFrom_multiple_with_selector":4,"Rx\\Functional\\Operator\\ZipTest::testZipNArySymmetric":4,"Rx\\Functional\\Operator\\ZipTest::testZipNArySymmetricSelector":4,"Rx\\Functional\\Operator\\ZipTest::testZipNeverNever":4,"Rx\\Functional\\Operator\\ZipTest::testZipNeverEmpty":4,"Rx\\Functional\\Operator\\ZipTest::testZipEmptyEmpty":4,"Rx\\Functional\\Operator\\ZipTest::testZipEmptyNonEmpty":4,"Rx\\Functional\\Operator\\ZipTest::testZipNonEmptyEmpty":4,"Rx\\Functional\\Operator\\ZipTest::testZipNeverNonEmpty":4,"Rx\\Functional\\Operator\\ZipTest::testZipEmptyError":4,"Rx\\Functional\\Operator\\ZipTest::testZipNeverError":4,"Rx\\Functional\\Operator\\ZipTest::testZipErrorError":4,"Rx\\Functional\\Operator\\ZipTest::testZipSomeError":4,"Rx\\Functional\\Operator\\ZipTest::testZipSomeDataAsymmetric":4,"Rx\\Functional\\Operator\\ZipTest::testZipSomeDataSymmetric":4,"Rx\\Functional\\Operator\\ZipTest::testZipSelectorThrows":4,"Rx\\Functional\\Operator\\ZipTest::testZipRightCompletesFirst":4,"Rx\\Functional\\Promise\\FromPromiseTest::two_observables_one_delayed":4,"Rx\\Functional\\React\\PromiseFactoryTest::from_promise_success":4,"Rx\\Functional\\React\\PromiseToObservableTest::to_observable_cancels_on_dispose":4,"Rx\\Functional\\React\\PromiseToObservableTest::two_observables_one_delayed":4,"Rx\\Functional\\React\\PromiseToObservableTest::two_observables_one_disposed_before_resolve":4,"Rx\\Functional\\React\\PromiseToObservableTest::observable_dispose_after_complete":4,"Rx\\Functional\\Subject\\AsyncSubjectTest::infinite":4,"Rx\\Functional\\Subject\\AsyncSubjectTest::finite":4,"Rx\\Functional\\Subject\\AsyncSubjectTest::error":4,"Rx\\Functional\\Subject\\AsyncSubjectTest::dispose":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testInfinite":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testInfinite2":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testFinite":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testError":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testCanceled":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testDisposed":4,"Rx\\Functional\\Subject\\ReplaySubjectTest::testDiesOut":4,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_connected":4,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_disconnected":4,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_disconnect_future":4,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_multiple_non_overlapped_connections":4,"Rx\\Observable\\RefCountObservableTest::testRefCountDisposableOnlyDisposesOnce":4,"Rx\\Observable\\RefCountObservableTest::testDisposesWhenRefcountReachesZero":4,"Rx\\ObservableTest::testShareCallsPublishRefCount":4,"Rx\\ObservableTest::testShareValueCallsPublishValueRefCount":4,"Rx\\ObservableTest::testShareReplayCallsReplayRefCount":4,"Rx\\Observer\\ScheduledObserverTest::it_calls_the_given_callable_on_next":4,"Rx\\Observer\\ScheduledObserverTest::it_calls_the_given_callable_on_error":4,"Rx\\Observer\\ScheduledObserverTest::it_calls_the_given_callable_on_complete":4,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_next_after_an_error":4,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_completed_after_an_error":4,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_error_after_an_error":4,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_next_after_completion":4,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_completed_after_completion":4,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_error_after_completion":4,"Rx\\Observer\\ScheduledObserverTest::throw_inside_onnext_throws":4},"times":{"Rx\\Disposable\\BinaryDisposableTest::it_disposes_the_binary_disposable":0.005,"Rx\\Disposable\\BinaryDisposableTest::it_does_nothing_if_disposed_twice":0.001,"Rx\\Disposable\\CallbackDisposableTest::it_calls_the_callback_on_dispose":0.001,"Rx\\Disposable\\CallbackDisposableTest::it_only_disposes_once":0,"Rx\\Disposable\\CompositeDisposableTest::it_exposes_the_amount_of_disposables_composed":0,"Rx\\Disposable\\CompositeDisposableTest::it_can_be_checked_if_it_contains_a_disposable":0,"Rx\\Disposable\\CompositeDisposableTest::a_disposable_can_be_added_after_creation":0,"Rx\\Disposable\\CompositeDisposableTest::disposing_disposes_all_disposables":0,"Rx\\Disposable\\CompositeDisposableTest::disposing_disposes_all_disposables_only_once":0,"Rx\\Disposable\\CompositeDisposableTest::it_disposes_newly_added_disposables_when_already_disposed":0,"Rx\\Disposable\\CompositeDisposableTest::a_disposable_can_be_removed":0,"Rx\\Disposable\\CompositeDisposableTest::a_removed_disposable_is_disposed":0,"Rx\\Disposable\\CompositeDisposableTest::removing_when_disposed_has_no_effect":0,"Rx\\Disposable\\CompositeDisposableTest::removing_a_disposable_that_is_not_contained_has_no_effect":0,"Rx\\Disposable\\CompositeDisposableTest::clear_disposes_all_contained_disposables_but_not_the_composite_disposable":0,"Rx\\Disposable\\CompositeDisposableTest::it_can_be_disposed_multiple_times":0,"Rx\\Disposable\\CompositeDisposableTest::it_can_distinguish_and_dispose_of_correct_disposable":0,"Rx\\Disposable\\CompositeDisposableTest::it_knows_what_it_contains":0,"Rx\\Disposable\\EmptyDisposableTest::it_can_be_disposed":0,"Rx\\Disposable\\RefCountDisposableTest::it_holds_a_reference_to_one_disposable":0,"Rx\\Disposable\\RefCountDisposableTest::it_disposes_if_all_references_are_disposed":0,"Rx\\Disposable\\RefCountDisposableTest::it_disposes_after_last_reference_is_disposed":0,"Rx\\Disposable\\RefCountDisposableTest::it_does_not_dispose_the_primary_if_refcount_inner_disposable_is_disposed_multiple_times":0,"Rx\\Disposable\\RefCountDisposableTest::it_does_not_dispose_the_primary_if_already_disposed_via_refcount":0,"Rx\\Disposable\\RefCountDisposableTest::it_does_not_dispose_the_primary_if_already_disposed":0,"Rx\\Disposable\\RefCountDisposableTest::it_returns_a_noop_disposable_if_primary_is_already_disposed":0,"Rx\\Disposable\\ScheduledDisposableTest::it_disposes_the_scheduled_disposable":0.002,"Rx\\Disposable\\ScheduledDisposableTest::it_does_nothing_if_disposed_twice":0,"Rx\\Disposable\\SerialDisposableTest::it_disposes_the_assigned_disposable":0,"Rx\\Disposable\\SerialDisposableTest::it_disposes_the_assigned_disposable_on_reassignment":0,"Rx\\Disposable\\SerialDisposableTest::it_unsets_the_disposable_on_dispose":0.001,"Rx\\Disposable\\SerialDisposableTest::it_disposes_the_assigned_disposable_if_already_disposed":0,"Rx\\Disposable\\SingleAssignmentDisposableTest::it_disposes_the_assigned_disposable":0,"Rx\\Disposable\\SingleAssignmentDisposableTest::it_disposes_newly_set_disposable_if_already_disposed":0,"Rx\\Disposable\\SingleAssignmentDisposableTest::it_cannot_be_assignmed_multiple_times":0.001,"Rx\\Functional\\ColdObservableTest::it_calls_relative_to_subscribe_time":0.008,"Rx\\Functional\\MarbleTest::testColdMarble":0,"Rx\\Functional\\MarbleTest::testHotMarble":0,"Rx\\Functional\\MarbleTest::testColdMarbleWithEqualMessages":0,"Rx\\Functional\\MarbleTest::testMessageConversion":0,"Rx\\Functional\\MarbleTest::testSomethingElse":0,"Rx\\Functional\\MarbleTest::testMarbleValues":0,"Rx\\Functional\\MarbleTest::testMarbleValuesDontMatch":0,"Rx\\Functional\\MarbleTest::testMarbleWithMissingValues":0,"Rx\\Functional\\MarbleTest::testGroupedMarbleValues":0,"Rx\\Functional\\MarbleTest::testMultipleGroupedMarbleValues":0,"Rx\\Functional\\MarbleTest::testGroupedMarkerAndComplete":0,"Rx\\Functional\\MarbleTest::testGroupedMarkerAndError":0,"Rx\\Functional\\MarbleTest::testSubscriptions":0,"Rx\\Functional\\MarbleTest::testSubscriptionsMissingUnsubscribeMarker":0,"Rx\\Functional\\MarbleTest::testSubscriptionsGroup":0,"Rx\\Functional\\MarbleTest::testSubscriptionsInvalidMarkers":0.001,"Rx\\Functional\\MarbleTest::testSubscriptionsMultipleSubscribeMarkers":0,"Rx\\Functional\\MarbleTest::testSubscriptionsMultipleUnsubscribeMarkers":0,"Rx\\Functional\\MarbleTest::testMapMarble":0.001,"Rx\\Functional\\MarbleTest::testMapErrorMarble":0,"Rx\\Functional\\MarbleTest::testMapDisposeMarble":0.001,"Rx\\Functional\\MarbleTest::testCountMarble":0,"Rx\\Functional\\Observable\\ErrorObservableTest::testErrorObservableWillAcceptThrowable":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_joins_last_values":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_allows_null":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_joins_last_values_with_selector":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_accepts_single_observable":0.002,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_accepts_single_observable_with_selector":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_wont_emit_with_empty_observable":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_empty_empty":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_none":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_empty_return":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_return_empty":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_return_return":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_empty_throw":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_throw_empty":0,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_return_throw":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_throw_return":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_throw_inside_selector":0.001,"Rx\\Functional\\Observable\\ForkJoinObservableTest::forkjoin_disposed_after_emit":0,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_basic":0,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_zero":0,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_Negative":0,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_disposed":0,"Rx\\Functional\\Observable\\IntervalObservableTest::interval_relative_time_observer_throws":0.001,"Rx\\Functional\\Observable\\IteratorObservableTest::it_schedules_all_elements_from_the_generator":0.001,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_yields_null":0,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_yields_one":0.001,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_throws_error":0,"Rx\\Functional\\Observable\\IteratorObservableTest::generator_dispose":0.001,"Rx\\Functional\\Observable\\IteratorObservableTest::it_schedules_all_elements_from_the_generator_with_return":0,"Rx\\Functional\\Observable\\IteratorObservableTest::it_completes_if_subscribed_second_time_without_return_value":0,"Rx\\Functional\\Observable\\IteratorObservableTest::it_returns_value_if_subscribed_second_time_with_return_value":0,"Rx\\Functional\\Observable\\ReturnObservableTest::testReturnObservableSubscribeTwice":0.001,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_basic":0,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_zero":0,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_zero_non_int":0,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_negative":0.001,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_disposed":0,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_dispose_before_dueTime":0,"Rx\\Functional\\Observable\\TimerObservableTest::timer_one_shot_relative_time_throws":0.001,"Rx\\Functional\\ObservableTest::testExceptionInOnNextByDefaultGoesToErrorAndDisposes":0,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableHides":0.002,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableNever":0,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableEmpty":0,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableThrow":0,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableJust":0,"Rx\\Functional\\Operator\\AsObservableTest::testAsObservableIsNotEager":0,"Rx\\Functional\\Operator\\AverageTest::average_Number_Empty":0,"Rx\\Functional\\Operator\\AverageTest::average_Number_Return":0,"Rx\\Functional\\Operator\\AverageTest::average_Number_Some":0,"Rx\\Functional\\Operator\\AverageTest::average_Number_Throw":0,"Rx\\Functional\\Operator\\AverageTest::average_Number_Never":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountpartialwindow":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountfullwindows":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountfullandpartialwindows":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountError":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountskipless":0.001,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountskipmore":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountbasic":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCountdisposed":0,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCount_invalid_skip":0.001,"Rx\\Functional\\Operator\\BufferWithCountTest::bufferWithCount_invalid_count":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_NoErrors":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Never":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Empty":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Return":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Never":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Never_Dispose":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Error":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Error_Error_Dispose":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_HandlerThrows":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_handler_returns_invalid_string":0.001,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_Nested_OuterCatches":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_ThrowFromNestedCatch":0,"Rx\\Functional\\Operator\\CatchErrorTest::catchError_does_not_lose_subscription":0.001,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_never":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_empty":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_never":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_empty":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_return":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_return":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_return":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_return_return":0.001,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_return_no_selector":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_empty_error":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_error_empty":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_return_throw":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_return":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_throw":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_error_throw":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_error":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_never_throw":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_never":0.001,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_some_throw":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_some":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_after_complete_left":0.001,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_throw_after_complete_right":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_interleaved_with_tail":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_consecutive":0.001,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_consecutive_end_with_error_left":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_consecutive_end_with_error_right":0.001,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_selector_throws":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_delay":0,"Rx\\Functional\\Operator\\CombineLatestTest::combineLatest_args_order":0.003,"Rx\\Functional\\Operator\\ComposeTest::testSimpleCompose":0,"Rx\\Functional\\Operator\\ConcatAllTest::concatAll_timer_missing_item":0,"Rx\\Functional\\Operator\\ConcatAllTest::concatAll_errors_when_exception_during_inner_subscribe":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Task":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Error_Task":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_result_Complete_Task":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_result_Error_Task":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Then_Complete_Task":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Then_Error_Task":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Complete":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Complete_2":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Never_Complete":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Never":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Complete_Error":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Error_Complete":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMapTo_Then_Error_Error":0,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Complete":0.002,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Complete_OuterNotComplete":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Error_Outer":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Error_Inner":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Dispose":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_Throw":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_UseFunction":0.001,"Rx\\Functional\\Operator\\ConcatMapTest::concatMap_return_invalid_string":0.001,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyEmpty":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyNever":0.001,"Rx\\Functional\\Operator\\ConcatTest::testConcatNeverEmpty":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatNeverNever":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyThrow":0.001,"Rx\\Functional\\Operator\\ConcatTest::testConcatThrowEmpty":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatThrowThrow":0.001,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnEmpty":0.001,"Rx\\Functional\\Operator\\ConcatTest::testConcatEmptyReturn":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnNever":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatNeverReturn":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnReturn":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatThrowReturn":0.001,"Rx\\Functional\\Operator\\ConcatTest::testConcatReturnThrow":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatSomeDataOnBothSides":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatAsArguments":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatAll":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatAllError":0,"Rx\\Functional\\Operator\\ConcatTest::testConcatDispose":0.001,"Rx\\Functional\\Operator\\CountTest::testCountEmpty":0,"Rx\\Functional\\Operator\\CountTest::testCountSome":0.001,"Rx\\Functional\\Operator\\CountTest::testCountThrow":0,"Rx\\Functional\\Operator\\CountTest::testCountNever":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateEmptyTrue":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateEmptyFalse":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateReturnTrue":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateReturnFalse":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateAllMatched":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateNoneMatched":0.001,"Rx\\Functional\\Operator\\CountTest::testCountPredicateSomeEven":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateThrowTrue":0.001,"Rx\\Functional\\Operator\\CountTest::testCountPredicateThrowFalse":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateNever":0,"Rx\\Functional\\Operator\\CountTest::testCountPredicateThrowsError":0,"Rx\\Functional\\Operator\\CountTest::testCountAfterRange":0,"Rx\\Functional\\CreateTest::create_next":0,"Rx\\Functional\\CreateTest::create_null_disposable":0,"Rx\\Functional\\CreateTest::create_completed":0,"Rx\\Functional\\CreateTest::create_error":0,"Rx\\Functional\\CreateTest::create_throws_errors":0,"Rx\\Functional\\CreateTest::create_dispose":0,"Rx\\Functional\\CreateTest::create_observer_does_not_catch":0,"Rx\\Functional\\Operator\\CustomTest::testCustomOperator":0,"Rx\\Functional\\Operator\\CustomTest::testExternalNamespacedOperator":0,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_nonEmpty_1":0,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_nonEmpty_2":0,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_empty_1":0,"Rx\\Functional\\Operator\\DefaultIfEmptyTest::defaultIfEmpty_empty_2":0,"Rx\\Functional\\Operator\\DeferTest::defer_complete":0,"Rx\\Functional\\Operator\\DeferTest::defer_error":0,"Rx\\Functional\\Operator\\DeferTest::defer_dispose":0,"Rx\\Functional\\Operator\\DeferTest::defer_throw":0,"Rx\\Functional\\Operator\\DeferTest::defer_factory_returns_invalid_string":0,"Rx\\Functional\\Operator\\DeferTest::defer_error_while_subscribe_with_immediate_scheduler":0.001,"Rx\\Functional\\Operator\\DeferTest::defer_error_while_subscribe_with_immediate_scheduler_passes_through":0,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_simple_1":0,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_simple_2_implementation":0,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_simple_3_implementation":0,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_error_1_implementation":0,"Rx\\Functional\\Operator\\DelayTest::delay_relative_time_error_2_implementation":0,"Rx\\Functional\\Operator\\DelayTest::delay_empty":0,"Rx\\Functional\\Operator\\DelayTest::delay_error":0,"Rx\\Functional\\Operator\\DelayTest::delay_never":0,"Rx\\Functional\\Operator\\DelayTest::delay_completes_during_subscribe_without_throwing":0.001,"Rx\\Functional\\Operator\\DelayTest::delay_disposed_after_emit":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_all_distinct":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_some_duplicates":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_some_error":0.001,"Rx\\Functional\\Operator\\DistinctTest::distinct_default_comparer_dispose":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomComparer_all_distinct":0.002,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomComparer_some_duplicates":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomComparer_some_throw":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_all_distinct":0,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_some_duplicates":0.001,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_some_throw":0.001,"Rx\\Functional\\Operator\\DistinctTest::distinct_CustomKey_and_CustomComparer_some_duplicates":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_never":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_empty":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_return":0.001,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_throw":0.001,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_all_changes":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_all_same":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_some_changes":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_comparer_all_different":0.001,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_keyselector_div2":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_key_selector_throws":0,"Rx\\Functional\\Operator\\DistinctUntilChangedTest::distinct_until_changed_comparer_throws":0.001,"Rx\\Functional\\Operator\\DoOnCompletedTest::doOnCompleted_should_be_called":0,"Rx\\Functional\\Operator\\DoOnCompletedTest::doOnCompleted_should_call_after_resubscription":0.002,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_should_see_all_values":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_plain_action":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed_never":0.001,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_not":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_error":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_never":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_next_throws":0.001,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed_next_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_completed_completed_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_next_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_error_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_next_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_error_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_next_error_completed_completed_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_observer_next_throws":0.001,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_observer_error_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::doOnEach_observer_completed_throws":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_plain_action":0.001,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_next_completed":0,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_next_error":0.001,"Rx\\Functional\\Operator\\DoOnEachOperatorTest::do_throws_when_args_invalid":0,"Rx\\Functional\\Operator\\DoOnErrorTest::doOnError_should_see_errors":0,"Rx\\Functional\\Operator\\DoOnErrorTest::doOnError_should_call_after_resubscription":0.002,"Rx\\Functional\\Operator\\DoOnNextTest::doOnNext_should_see_all_values":0,"Rx\\Functional\\Operator\\DoOnNextTest::doOnNext_should_call_after_resubscription":0.001,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_finally_after_complete":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_finally_after_error":0.001,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_finally_upon_disposal":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_finally_when_synchronously_subscribing_to_and_unsubscribing_from_a_shared_observable":0.002,"Rx\\Functional\\Operator\\FinallyCallTest::should_call_two_finally_instances_in_succession_on_a_shared_observable":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_empty":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_never":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_throw":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_basic_hot_observable":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_basic_cold_observable":0,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_basic_error":0.001,"Rx\\Functional\\Operator\\FinallyCallTest::should_handle_unsubscription":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_empty":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_inner_empty":0.001,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_many":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_errors":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_inner_errors":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_throws":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_returns_invalid_string":0.001,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_dispose":0,"Rx\\Functional\\Operator\\FlatMapLatestTest::flatMapLatest_dispose_before_outer_completes":0,"Rx\\Functional\\FromArrayTest::it_schedules_all_elements_from_the_array":0,"Rx\\Functional\\FromArrayTest::it_calls_on_complete_when_the_array_is_empty":0,"Rx\\Functional\\FromArrayTest::fromArray_one":0,"Rx\\Functional\\FromArrayTest::fromArray_dispose":0,"Rx\\Functional\\Operator\\GroupByTest::it_passes_on_complete":0,"Rx\\Functional\\Operator\\GroupByTest::it_passes_on_error":0.001,"Rx\\Functional\\Operator\\GroupByTest::it_disposes_the_outer_subscription":0.001,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_error_if_keyselector_throws":0,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_error_if_elementselector_throws":0,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_error_if_durationselector_throws":0,"Rx\\Functional\\Operator\\GroupByTest::it_passes_on_error_if_duration_observable_calls_on_error":0.001,"Rx\\Functional\\Operator\\GroupByTest::it_calls_on_completed_on_inner_subscription_if_subscription_expires_otherwise_it_passes":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilWithKeyComparer":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilWithKeyComparerDefaultDurationSelector":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterComplete":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterError":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterDispose":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterKeyThrow":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterEleThrow":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerComplete":0,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerCompleteAll":0,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerError":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerDispose":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerKeyThrow":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEleThrow":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilOuterIndependence":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerIndependence":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerMultipleIndependence":0,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEscapeComplete":0,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEscapeError":0,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilInnerEscapeDispose":0,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilDefault":0.001,"Rx\\Functional\\Operator\\GroupByUntilTest::groupByUntilDurationSelectorThrows":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_true_if_source_is_empty":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_false_if_source_emits_element":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_true_if_source_emits_before_subscription":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_raise_error_if_source_raise_error":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_not_complete_if_source_never_emits":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_return_true_if_source_completes_immediately":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_allow_unsubscribing_explicitly_and_early":0,"Rx\\Functional\\Operator\\IsEmptyTest::should_not_break_unsubscription_chains_when_result_is_unsubscribed_explicitly":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_never":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_empty":0.001,"Rx\\Functional\\Operator\\MaterializeTest::materialize_return":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_throw":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_never":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_empty":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_return":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_throw":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dispose":0,"Rx\\Functional\\Operator\\MaterializeTest::materialize_dematerialize_dispose":0,"Rx\\Functional\\Operator\\MaxTest::max_number_empty":0,"Rx\\Functional\\Operator\\MaxTest::max_number_Return":0,"Rx\\Functional\\Operator\\MaxTest::max_number_Some":0,"Rx\\Functional\\Operator\\MaxTest::max_number_throw":0,"Rx\\Functional\\Operator\\MaxTest::max_number_Never":0,"Rx\\Functional\\Operator\\MaxTest::max_comparer_empty":0,"Rx\\Functional\\Operator\\MaxTest::max_comparer_return":0,"Rx\\Functional\\Operator\\MaxTest::max_comparer_some":0,"Rx\\Functional\\Operator\\MaxTest::max_comparer_throw":0,"Rx\\Functional\\Operator\\MaxTest::max_comparer_never":0,"Rx\\Functional\\Operator\\MaxTest::max_comparer_throws":0,"Rx\\Functional\\Operator\\MaxTest::max_never_dispose":0,"Rx\\Functional\\Operator\\MaxTest::max_some_dispose":0,"Rx\\Functional\\Operator\\MergeAllTest::it_passes_on_error_from_sources":0,"Rx\\Functional\\Operator\\MergeAllTest::it_passes_on_completed_from_sources":0,"Rx\\Functional\\Operator\\MergeTest::it_passes_the_last_on_complete":0,"Rx\\Functional\\Operator\\MinTest::min_number_empty":0,"Rx\\Functional\\Operator\\MinTest::min_number_Return":0,"Rx\\Functional\\Operator\\MinTest::min_number_Some":0,"Rx\\Functional\\Operator\\MinTest::min_number_throw":0,"Rx\\Functional\\Operator\\MinTest::min_number_Never":0,"Rx\\Functional\\Operator\\MinTest::min_comparer_empty":0,"Rx\\Functional\\Operator\\MinTest::min_comparer_return":0,"Rx\\Functional\\Operator\\MinTest::min_comparer_some":0,"Rx\\Functional\\Operator\\MinTest::min_comparer_throw":0,"Rx\\Functional\\Operator\\MinTest::min_comparer_never":0,"Rx\\Functional\\Operator\\MinTest::min_comparer_throws":0,"Rx\\Functional\\Operator\\MinTest::min_never_dispose":0,"Rx\\Functional\\Operator\\MinTest::min_some_dispose":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_1":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_2":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_3":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_error_1":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_error_2":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_hot_completed":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_completed":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_error":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_dispose":0,"Rx\\Functional\\Operator\\MulticastTest::multicast_cold_zip":0,"Rx\\Functional\\Operator\\NeverTest::never_basic":0.001,"Rx\\Functional\\Operator\\PartitionTest::partitionEmpty":0,"Rx\\Functional\\Operator\\PartitionTest::partitionSingle":0,"Rx\\Functional\\Operator\\PartitionTest::partitionEach":0,"Rx\\Functional\\Operator\\PartitionTest::partitionCompleted":0,"Rx\\Functional\\Operator\\PartitionTest::partitionNotCompleted":0,"Rx\\Functional\\Operator\\PartitionTest::partitionError":0,"Rx\\Functional\\Operator\\PartitionTest::partitionDisposed":0,"Rx\\Functional\\Operator\\PluckTest::pluck_completed":0,"Rx\\Functional\\Operator\\PluckTest::pluck_error":0,"Rx\\Functional\\Operator\\PluckTest::pluck_completed_array":0,"Rx\\Functional\\Operator\\PluckTest::pluck_array_index_missing":0,"Rx\\Functional\\Operator\\PluckTest::pluck_object_property_missing":0,"Rx\\Functional\\Operator\\PluckTest::pluck_array_numeric_index":0,"Rx\\Functional\\Operator\\PluckTest::pluck_nested":0,"Rx\\Functional\\Operator\\PluckTest::pluck_nested_numeric_key_with_object_properties":0,"Rx\\Functional\\Operator\\PluckTest::pluck_object_property_null":0,"Rx\\Functional\\Operator\\PluckTest::pluck_array_assoc_null":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_basic":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_error":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_complete":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_dispose":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_multiple_connections":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_zip_complete":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_zip_errorr":0,"Rx\\Functional\\Operator\\PublishLastTest::publishLast_zip_dispose":0,"Rx\\Functional\\Operator\\PublishTest::publish_cold_zip":0,"Rx\\Functional\\Operator\\PublishTest::refCount_connects_on_first":0,"Rx\\Functional\\Operator\\PublishTest::refCount_not_connected":0.001,"Rx\\Functional\\Operator\\PublishTest::refCount_publish_basic":0,"Rx\\Functional\\Operator\\PublishTest::publish_error":0,"Rx\\Functional\\Operator\\PublishTest::publish_complete":0.001,"Rx\\Functional\\Operator\\PublishTest::publish_dispose":0.001,"Rx\\Functional\\Operator\\PublishTest::publish_lambda_zip_complete":0,"Rx\\Functional\\Operator\\PublishTest::publish_lambda_zip_error":0,"Rx\\Functional\\Operator\\PublishTest::publish_lambda_zip_dispose":0,"Rx\\Functional\\Operator\\PublishValueTest::publishLast_basic":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_error":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_complete":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_dispose":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_multiple_connections":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_zip_complete":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_zip_error":0,"Rx\\Functional\\Operator\\PublishValueTest::publishValue_zip_dispose":0,"Rx\\Functional\\Operator\\RaceTest::race_never_2":0,"Rx\\Functional\\Operator\\RaceTest::race_never_3":0,"Rx\\Functional\\Operator\\RaceTest::race_never_empty":0,"Rx\\Functional\\Operator\\RaceTest::race_empty_never":0,"Rx\\Functional\\Operator\\RaceTest::race_regular_should_dispose_loser":0,"Rx\\Functional\\Operator\\RaceTest::race_throws_before_election":0,"Rx\\Functional\\Operator\\RaceTest::race_none":0,"Rx\\Functional\\Operator\\RaceTest::race_one":0,"Rx\\Functional\\Operator\\RangeTest::range_zero":0,"Rx\\Functional\\Operator\\RangeTest::range_one":0,"Rx\\Functional\\Operator\\RangeTest::range_five":0,"Rx\\Functional\\Operator\\RangeTest::range_dispose":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_empty":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_return":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_throw":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_never":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_seed_range":0.001,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_empty":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_return":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_throw":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_never":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_without_seed_range":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_accumulator_throws":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_accumulator_throws_with_seed":0,"Rx\\Functional\\Operator\\ReduceTest::reduce_with_falsy_seed_range":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_basic":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_infinite":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_error":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_1":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_2":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_3":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_throws_4":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_basic":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_dispose":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_infinite":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_error":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_1":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_2":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_3":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_Observable_repeat_count_throws_4":0,"Rx\\Functional\\Operator\\RepeatTest::repeat_returns_empty_when_count_is_zero":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_never":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_never":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_empty":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_next_error":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_complete":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_next_complete":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_infinite":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_dispose":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_dispose_second":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_Observable_dispose_between":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_notifier_throws":0,"Rx\\Functional\\Operator\\RepeatWhenTest::repeatWhen_notifier_returns_invalid_string":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_basic":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_error":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_complete":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_dispose":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_multiple_connections":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_zip_complete":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_zip_error":0,"Rx\\Functional\\Operator\\ReplayTest::replay_count_zip_dispose":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_basic":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_error":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_complete":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_dispose":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_multiple_connections":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_zip_complete":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_zip_errorr":0,"Rx\\Functional\\Operator\\ReplayTest::replay_time_zip_dispose":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableBasic":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableInfinite":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableError":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableThrows":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableRetryCountBasic":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableRetryCountDispose":0,"Rx\\Functional\\Operator\\RetryTest::testRetryRetryCountDispose":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableCompletes":0,"Rx\\Functional\\Operator\\RetryTest::testRetryObservableRetryCountThrows":0,"Rx\\Functional\\Operator\\RetryTest::testWithImmediateSchedulerWithRecursion":0.001,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_never":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_never":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_never_completed":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_Empty":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_Next_Error":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_complete":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_next_complete":0,"Rx\\Functional\\Operator\\RetryWhenTest::retryWhen_Observable_infinite":0,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenDispose":0,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenDisposeBetweenSourceSubscriptions":0,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenInnerEmitsBeforeOuterError":0,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenSelectorThrows":0,"Rx\\Functional\\Operator\\RetryWhenTest::testRetryWhenSelectorReturnsInvalidString":0,"Rx\\Functional\\Operator\\ScanTest::testScanSeedNever":0,"Rx\\Functional\\Operator\\ScanTest::testScanSeedEmpty":0,"Rx\\Functional\\Operator\\ScanTest::testScanSeedReturn":0,"Rx\\Functional\\Operator\\ScanTest::testScanSeedThrow":0,"Rx\\Functional\\Operator\\ScanTest::testScanSeedSomeData":0,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedNever":0,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedEmpty":0,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedReturn":0,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedThrow":0,"Rx\\Functional\\Operator\\ScanTest::testScanNoSeedSomeData":0,"Rx\\Functional\\Operator\\ScanTest::scan_accumulator_throws":0,"Rx\\Functional\\Operator\\ScanTest::scan_accumulator_throws_with_seed":0,"Rx\\Functional\\Operator\\SelectManyTest::it_passes_the_last_on_complete":0,"Rx\\Functional\\Operator\\SelectManyTest::it_passes_on_error":0,"Rx\\Functional\\Operator\\SelectManyTest::flatMapTo_it_passes_the_last_on_complete":0,"Rx\\Functional\\Operator\\SelectManyTest::flatMapTo_it_passes_on_error":0,"Rx\\Functional\\Operator\\SelectManyTest::flatMap_it_errors_with_bad_return":0,"Rx\\Functional\\Operator\\SelectTest::calls_on_error_if_selector_throws_an_exception":0,"Rx\\Functional\\Operator\\SelectTest::select_calls_on_completed":0,"Rx\\Functional\\Operator\\SelectTest::select_calls_on_error":0,"Rx\\Functional\\Operator\\SelectTest::select_calls_selector":0,"Rx\\Functional\\Operator\\SelectTest::map_with_index_dispose_inside_selector":0,"Rx\\Functional\\Operator\\SelectTest::map_with_index_completed":0,"Rx\\Functional\\Operator\\SelectTest::map_with_index_not_completed":0,"Rx\\Functional\\Operator\\SelectTest::map_with_index_error":0,"Rx\\Functional\\Operator\\SelectTest::map_with_index_throws":0,"Rx\\Functional\\Operator\\SelectTest::mapTo_value":0,"Rx\\Functional\\Operator\\SelectTest::map_and_map_Optimization":0,"Rx\\Functional\\Operator\\SingleInstanceTest::singleInstance_basic":0,"Rx\\Functional\\Operator\\SingleInstanceTest::singleInstance_subscribe_after_stopped":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastNegative":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastZeroCompleted":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastZeroError":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastZeroDisposed":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastOneCompleted":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastOneError":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastOneDisposed":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastThreeCompleted":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastThreeError":0,"Rx\\Functional\\Operator\\SkipLastTest::testSkipLastThreeDisposed":0,"Rx\\Functional\\Operator\\SkipTest::it_throws_an_exception_on_negative_amounts":0,"Rx\\Functional\\Operator\\SkipTest::it_passes_on_complete":0,"Rx\\Functional\\Operator\\SkipTest::it_skips_one_value":0,"Rx\\Functional\\Operator\\SkipTest::it_skips_multiple_values":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataNext":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataError":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataEmpty":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverNext":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverError":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilSomeDataNever":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverEmpty":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilNeverNever":0,"Rx\\Functional\\Operator\\SkipUntilTest::testSkipUntilHasCompletedCausesDisposal":0,"Rx\\Functional\\Operator\\SkipUntilTest::testCanCompleteInSubscribeAction":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_complete_before":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_complete_after":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_error_before":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_error_after":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_dispose_before":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_dispose_after":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_zero":0,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_throw":0.001,"Rx\\Functional\\Operator\\SkipWhileTest::skipWhile_index":0.001,"Rx\\Functional\\Operator\\StartTest::start_action":0,"Rx\\Functional\\Operator\\StartTest::start_action_number":0.002,"Rx\\Functional\\Operator\\StartTest::start_with_error":0.002,"Rx\\Functional\\Operator\\StartWithTest::startWith_never":0,"Rx\\Functional\\Operator\\StartWithTest::startWith_empty":0,"Rx\\Functional\\Operator\\StartWithTest::startWith_one":0,"Rx\\Functional\\Operator\\StartWithTest::startWith_multiple":0,"Rx\\Functional\\Operator\\StartWithTest::startWith_multiple_before":0,"Rx\\Functional\\Operator\\StartWithTest::startWith_error":0,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_normal":0,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_error":0,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_empty":0,"Rx\\Functional\\Operator\\SubscribeOnTest::subscribeOn_never":0,"Rx\\Functional\\Operator\\SumTest::sum_number_empty":0,"Rx\\Functional\\Operator\\SumTest::sum_number_return":0,"Rx\\Functional\\Operator\\SumTest::sum_number_some":0,"Rx\\Functional\\Operator\\SumTest::sum_number_throw":0,"Rx\\Functional\\Operator\\SumTest::sum_number_never":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Data":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_inner_throws":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_first_inner_throws":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_outer_throws":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_no_inner":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_inner_completes":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Dispose":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Inner_Completes_Last":0,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_Subsequent":0.001,"Rx\\Functional\\Operator\\SwitchFirstTest::switchFirst_SkipsOneObservable":0,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_Data":0,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_inner_throws":0,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_outer_throws":0,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_no_inner":0,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_inner_completes":0,"Rx\\Functional\\Operator\\SwitchLatestTest::switchLatest_Dispose":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_zero_completed":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_zero_error":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_zero_disposed":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_one_completed":0.001,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_one_error":0.001,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_one_disposed":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_three_completed":0.001,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_three_error":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_three_disposed":0,"Rx\\Functional\\Operator\\TakeLastTest::takeLast_invalid_count":0,"Rx\\Functional\\Operator\\TakeTest::it_throws_an_exception_on_negative_amounts":0.001,"Rx\\Functional\\Operator\\TakeTest::it_passes_on_complete":0,"Rx\\Functional\\Operator\\TakeTest::it_calls_on_complete_after_last_value":0,"Rx\\Functional\\Operator\\TakeTest::take_zero_calls_on_completed":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_next":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_error":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_empty":0.001,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_some_data_never":0.001,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_next":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_error":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_empty":0.002,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_preempt_never_never":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_before_first_produced":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_before_first_produced_remain_silent_and_proper_disposed":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_no_preempt_after_last_produced_proper_disposed_signal":0,"Rx\\Functional\\Operator\\TakeUntilTest::takeUntil_should_subscribe_to_the_notifier_first_with_immediate_scheduler":0.001,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_never":0,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_complete_after":0,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_error_before":0.001,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_error_after":0,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_dispose_before":0,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_dispose_after":0.001,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_zero":0,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_throw":0.001,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_index":0,"Rx\\Functional\\Operator\\TakeWhileTest::takeWhile_inclusive":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_completed":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_never":0,"Rx\\Functional\\Operator\\ThrottleTest::throttle_empty":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_error":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_no_end":0,"Rx\\Functional\\Operator\\ThrottleTest::throttle_dispose":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_dispose_with_value_waiting":0,"Rx\\Functional\\Operator\\ThrottleTest::throttle_quiet_observable_emits_immediately":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_noisy_observable_drops_items":0.001,"Rx\\Functional\\Operator\\ThrottleTest::throttle_scheduler_overrides_subscribe_scheduler":0.028,"Rx\\Functional\\Operator\\TimeoutTest::timeout_in_time":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_relative_time_timeout_occurs_with_default_error":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_relative_time_timeout_occurs_with_custom_error":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_out_of_time":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_1":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_2":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_never":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_completed":0.001,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_occurs_Error":0.001,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_does_not_occur_completed":0,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_does_not_occur_Error":0.001,"Rx\\Functional\\Operator\\TimeoutTest::timeout_timeout_does_not_occur":0,"Rx\\Functional\\Operator\\TimestampTest::timestamp_regular":0,"Rx\\Functional\\Operator\\TimestampTest::timestamp_empty":0,"Rx\\Functional\\Operator\\TimestampTest::timestamp_error":0.001,"Rx\\Functional\\Operator\\TimestampTest::timestamp_never":0.001,"Rx\\Functional\\Operator\\TimestampTest::timestamp_dispose":0,"Rx\\Functional\\Operator\\ToArrayTest::testToArrayCompleted":0.002,"Rx\\Functional\\Operator\\ToArrayTest::testToArrayError":0.001,"Rx\\Functional\\Operator\\ToArrayTest::testToArrayDisposed":0,"Rx\\Functional\\Operator\\WhereTest::it_filters_all_on_false":0.001,"Rx\\Functional\\Operator\\WhereTest::it_passes_all_on_true":0,"Rx\\Functional\\Operator\\WhereTest::it_passes_on_error":0,"Rx\\Functional\\Operator\\WhereTest::calls_on_error_if_predicate_throws_an_exception":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_never":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_empty":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_never":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_empty":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_return":0.002,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_empty":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_return":0.003,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_never":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_return":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_return_no_selector":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_empty_error":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_error_empty":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_throw":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_return":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_throw":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_error_throw":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_error":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_never_throw":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_never":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_some_throw":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_some":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_after_complete_left":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_throw_after_complete_right":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_interleaved_with_tail":0.002,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive_array":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive_end_with_error_left":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_consecutive_end_with_error_right":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_selector_throws":0,"Rx\\Functional\\Operator\\WithLatestFromTest::withLatestFrom_return_return_dispose":0,"Rx\\Functional\\Operator\\WithLatestFromTest::testWithLatestFrom_multiple_dispose_no_selector":0.001,"Rx\\Functional\\Operator\\WithLatestFromTest::testWithLatestFrom_multiple_dispose_with_selector":0,"Rx\\Functional\\Operator\\WithLatestFromTest::testWithLatestFrom_multiple_with_selector":0,"Rx\\Functional\\Operator\\ZipTest::testZipNArySymmetric":0,"Rx\\Functional\\Operator\\ZipTest::testZipNArySymmetricSelector":0,"Rx\\Functional\\Operator\\ZipTest::testZipNeverNever":0,"Rx\\Functional\\Operator\\ZipTest::testZipNeverEmpty":0,"Rx\\Functional\\Operator\\ZipTest::testZipEmptyEmpty":0.001,"Rx\\Functional\\Operator\\ZipTest::testZipEmptyNonEmpty":0.001,"Rx\\Functional\\Operator\\ZipTest::testZipNonEmptyEmpty":0,"Rx\\Functional\\Operator\\ZipTest::testZipNeverNonEmpty":0,"Rx\\Functional\\Operator\\ZipTest::testZipEmptyError":0,"Rx\\Functional\\Operator\\ZipTest::testZipNeverError":0.001,"Rx\\Functional\\Operator\\ZipTest::testZipErrorError":0.001,"Rx\\Functional\\Operator\\ZipTest::testZipSomeError":0,"Rx\\Functional\\Operator\\ZipTest::testZipSomeDataAsymmetric":0,"Rx\\Functional\\Operator\\ZipTest::testZipSomeDataSymmetric":0,"Rx\\Functional\\Operator\\ZipTest::testZipSelectorThrows":0,"Rx\\Functional\\Operator\\ZipTest::testZipRightCompletesFirst":0,"Rx\\Functional\\Operator\\ZipTest::testZipWithImmediateScheduler":0.002,"Rx\\Functional\\Promise\\FromPromiseTest::from_promise_success":0.001,"Rx\\Functional\\Promise\\FromPromiseTest::from_promise_failure":0.004,"Rx\\Functional\\Promise\\FromPromiseTest::two_observables_one_delayed":0.001,"Rx\\Functional\\Promise\\ToPromiseTest::promise_success":0.002,"Rx\\Functional\\Promise\\ToPromiseTest::promise_failure":0.001,"Rx\\Functional\\Promise\\ToPromiseTest::promise_within_promise_success":0,"Rx\\Functional\\Promise\\ToPromiseTest::promise_within_promise_failure":0,"Rx\\Functional\\Promise\\ToPromiseTest::promise_cancel":0.001,"Rx\\Functional\\React\\PromiseFactoryTest::from_promise_success":0.001,"Rx\\Functional\\React\\PromiseFactoryTest::from_promise_reject_non_exception":0.001,"Rx\\Functional\\React\\PromiseFactoryTest::from_promise_reject":0,"Rx\\Functional\\React\\PromiseFromObservableTest::promise_success":0,"Rx\\Functional\\React\\PromiseFromObservableTest::promise_failure":0.001,"Rx\\Functional\\React\\PromiseToObservableTest::from_promise_success":0,"Rx\\Functional\\React\\PromiseToObservableTest::from_promise_failure":0.002,"Rx\\Functional\\React\\PromiseToObservableTest::to_observable_cancels_on_dispose":0,"Rx\\Functional\\React\\PromiseToObservableTest::two_observables_one_delayed":0.001,"Rx\\Functional\\React\\PromiseToObservableTest::two_observables_one_disposed_before_resolve":0,"Rx\\Functional\\React\\PromiseToObservableTest::observable_dispose_after_complete":0,"Rx\\Functional\\Scheduler\\EventLoopSchedulerTest::testDisposeInsideFirstSchedulePeriodicAction":0.051,"Rx\\Functional\\Subject\\AsyncSubjectTest::infinite":0,"Rx\\Functional\\Subject\\AsyncSubjectTest::finite":0,"Rx\\Functional\\Subject\\AsyncSubjectTest::error":0.001,"Rx\\Functional\\Subject\\AsyncSubjectTest::dispose":0.001,"Rx\\Functional\\Subject\\ReplaySubjectTest::testInfinite":0,"Rx\\Functional\\Subject\\ReplaySubjectTest::testInfinite2":0.001,"Rx\\Functional\\Subject\\ReplaySubjectTest::testFinite":0.001,"Rx\\Functional\\Subject\\ReplaySubjectTest::testError":0.001,"Rx\\Functional\\Subject\\ReplaySubjectTest::testCanceled":0,"Rx\\Functional\\Subject\\ReplaySubjectTest::testDisposed":0,"Rx\\Functional\\Subject\\ReplaySubjectTest::testDiesOut":0,"Rx\\Functional\\Subject\\ReplaySubjectTest::it_replays_with_immediate_scheduler":0.001,"Rx\\Observable\\AnonymousObservableTest::it_calls_the_subscribe_action_on_subscribe":0.018,"Rx\\Observable\\AnonymousObservableTest::the_returned_disposable_disposes":0.001,"Rx\\Observable\\AnonymousObservableTest::it_throws_when_args_invalid":0.002,"Rx\\Observable\\ArrayObservableTest::it_starts_again_if_you_subscribe_again":0.001,"Rx\\Observable\\ArrayObservableTest::testRange":0,"Rx\\Observable\\ArrayObservableTest::testOnCompleteIsCalled":0,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_creation":0.002,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_connected":0.003,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_disconnected":0,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_disconnect_future":0.001,"Rx\\Observable\\ConnectableObservableTest::connectable_observable_multiple_non_overlapped_connections":0.002,"Rx\\Observable\\ErrorObservableTest::it_calls_observers_with_error":0.001,"Rx\\Observable\\GroupedObservableTest::it_returns_the_disposable_of_the_underlying_disposable":0.005,"Rx\\Observable\\GroupedObservableTest::it_exposes_its_key":0,"Rx\\Observable\\RefCountObservableTest::testRefCountDisposableOnlyDisposesOnce":0.017,"Rx\\Observable\\RefCountObservableTest::testDisposesWhenRefcountReachesZero":0,"Rx\\ObservableFactoryWrapperTest::testPromiseIsConvertedToObservable":0.012,"Rx\\ObservableFactoryWrapperTest::testObservable":0.001,"Rx\\ObservableFactoryWrapperTest::testNotAnObservableOrPromise":0.002,"Rx\\ObservableTest::testJustIsAliasForOf":0,"Rx\\ObservableTest::testEmptyObservableIsAliasForEmpty":0,"Rx\\ObservableTest::testShareCallsPublishRefCount":0.002,"Rx\\ObservableTest::testShareValueCallsPublishValueRefCount":0.002,"Rx\\ObservableTest::testShareReplayCallsReplayRefCount":0.001,"Rx\\ObservableTest::testCatchErrorCallsCatch":0.014,"Rx\\ObservableTest::testSwitchLatestCallsSwitch":0,"Rx\\ObservableTest::it_sends_throwables_in_onnext_to_onerror":0,"Rx\\Observer\\AutoDetachObserverTest::it_calls_dispose_on_completed":0.013,"Rx\\Observer\\AutoDetachObserverTest::it_calls_dispose_on_error":0,"Rx\\Observer\\AutoDetachObserverTest::it_disposes_if_observer_on_completed_throws":0.001,"Rx\\Observer\\AutoDetachObserverTest::it_disposes_if_observer_on_error_throws":0,"Rx\\Observer\\AutoDetachObserverTest::it_disposes_if_observer_on_next_throws":0,"Rx\\Observer\\CallbackObserverTest::it_calls_the_given_callable_on_next":0,"Rx\\Observer\\CallbackObserverTest::it_calls_the_given_callable_on_error":0,"Rx\\Observer\\CallbackObserverTest::it_calls_the_given_callable_on_complete":0,"Rx\\Observer\\CallbackObserverTest::default_on_error_callable_rethrows_exception":0,"Rx\\Observer\\CallbackObserverTest::it_calls_on_next_with_the_given_value":0.001,"Rx\\Observer\\CallbackObserverTest::it_does_not_call_on_next_after_an_error":0,"Rx\\Observer\\CallbackObserverTest::it_does_not_call_on_completed_after_an_error":0,"Rx\\Observer\\CallbackObserverTest::it_does_not_call_on_error_after_an_error":0,"Rx\\Observer\\CallbackObserverTest::it_does_not_call_on_next_after_completion":0,"Rx\\Observer\\CallbackObserverTest::it_does_not_call_on_completed_after_completion":0,"Rx\\Observer\\CallbackObserverTest::it_does_not_call_on_error_after_completion":0,"Rx\\Observer\\ScheduledObserverTest::it_calls_the_given_callable_on_next":0.013,"Rx\\Observer\\ScheduledObserverTest::it_calls_the_given_callable_on_error":0,"Rx\\Observer\\ScheduledObserverTest::it_calls_the_given_callable_on_complete":0,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_next_after_an_error":0,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_completed_after_an_error":0,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_error_after_an_error":0,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_next_after_completion":0,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_completed_after_completion":0,"Rx\\Observer\\ScheduledObserverTest::it_does_not_call_on_error_after_completion":0,"Rx\\Observer\\ScheduledObserverTest::throw_inside_onnext_throws":0,"Rx\\Scheduler\\EventLoopSchedulerTest::now_returns_time_since_epoch_in_ms":0.003,"Rx\\Scheduler\\EventLoopSchedulerTest::eventloop_schedule":0.004,"Rx\\Scheduler\\EventLoopSchedulerTest::eventloop_schedule_recursive":0.001,"Rx\\Scheduler\\EventLoopSchedulerTest::testDisposedEventDoesNotCauseSkip":0,"Rx\\Scheduler\\EventLoopSchedulerTest::testSchedulerWorkedWithScheduledEventOutsideItself":0.201,"Rx\\Scheduler\\EventLoopSchedulerTest::testScheduledItemsFromOutsideOfSchedulerDontCreateExtraTimers":0.043,"Rx\\Scheduler\\EventLoopSchedulerTest::testMultipleSchedulesFromOutsideInSameTickDontCreateExtraTimers":0.041,"Rx\\Scheduler\\EventLoopSchedulerTest::testThatStuffScheduledWayInTheFutureDoesntKeepTheLoopRunningIfDisposed":0.01,"Rx\\Scheduler\\EventLoopSchedulerTest::testThatDisposalOfSingleScheduledItemOutsideOfInvokeCancelsTimer":0.01,"Rx\\Scheduler\\EventLoopSchedulerTest::testScheduledItemPastNextScheduledItemKillsItOwnTimerIfItBecomesTheNextOneAndIsDisposed":0.05,"Rx\\Scheduler\\ImmediateSchedulerTest::now_returns_the_time":0.001,"Rx\\Scheduler\\ImmediateSchedulerTest::non_zero_delay_throws":0.001,"Rx\\Scheduler\\ImmediateSchedulerTest::schedule_periodic_throws":0.001,"Rx\\Scheduler\\PriorityQueueTest::it_should_remove_a_scheduled_item":0.001,"Rx\\Scheduler\\PriorityQueueTest::it_orders_the_items":0,"Rx\\Scheduler\\PriorityQueueTest::peek_returns_the_top_item":0,"Rx\\Scheduler\\PriorityQueueTest::dequeue_removes_the_top_item_from_the_queue":0,"Rx\\Scheduler\\PriorityQueueTest::first_scheduled_item_with_same_priority_comes_first":0,"Rx\\Scheduler\\PriorityQueueTest::can_remove_scheduled_items_out_of_order":0.001,"Rx\\Scheduler\\PriorityQueueTest::should_not_remove_nonexistent_item":0.015,"Rx\\SchedulerTest::testGetDefaultThrowsIfNotSet":0,"Rx\\SchedulerTest::testSetDefault":0,"Rx\\SchedulerTest::testSetDefaultTwiceBeforeGet":0,"Rx\\SchedulerTest::testSetAsync":0,"Rx\\SchedulerTest::testSetAsyncTwiceBeforeGet":0,"Rx\\SchedulerTest::testSetDefaultTwiceThrowsException":0,"Rx\\SchedulerTest::testSetAsyncTwiceThrowsException":0,"Rx\\SchedulerTest::testGetAsyncBeforeSet":0,"Rx\\SchedulerTest::testGetAsyncAfterSettingDefaultToAsync":0,"Rx\\SchedulerTest::testAsyncSchedulerFactorReturnsNonAsyncScheduler":0.001,"Rx\\SchedulerTest::testDefaultSchedulerFactorReturnsNonScheduler":0,"Rx\\SchedulerTest::testAsyncSchedulerFactorThrowsNonAsyncDefaultScheduler":0,"Rx\\Subject\\BehaviorSubjectTest::it_throws_when_subscribing_to_a_disposed_subject":0.018,"Rx\\Subject\\BehaviorSubjectTest::it_exposes_if_it_has_observers":0.002,"Rx\\Subject\\BehaviorSubjectTest::it_exposes_if_it_is_disposed":0,"Rx\\Subject\\BehaviorSubjectTest::it_has_no_observers_after_disposing":0,"Rx\\Subject\\BehaviorSubjectTest::it_returns_true_if_an_observer_is_removed":0,"Rx\\Subject\\BehaviorSubjectTest::it_returns_false_if_an_observer_is_not_subscribed":0,"Rx\\Subject\\BehaviorSubjectTest::it_passes_exception_on_subscribe_if_already_stopped":0.005,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_complete_on_subscribe_if_already_stopped":0,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_error_if_not_disposed":0.001,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_complete_if_not_disposed":0.001,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_next_if_not_disposed":0.001,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_next_if_not_disposed_with_init":0,"Rx\\Subject\\BehaviorSubjectTest::it_does_not_pass_if_already_stopped":0,"Rx\\Subject\\BehaviorSubjectTest::it_throws_on_error_if_disposed":0,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_complete_if_disposed":0,"Rx\\Subject\\BehaviorSubjectTest::it_passes_on_next_if_disposed":0,"Rx\\Subject\\SubjectTest::it_throws_when_subscribing_to_a_disposed_subject":0,"Rx\\Subject\\SubjectTest::it_exposes_if_it_has_observers":0,"Rx\\Subject\\SubjectTest::it_exposes_if_it_is_disposed":0,"Rx\\Subject\\SubjectTest::it_has_no_observers_after_disposing":0,"Rx\\Subject\\SubjectTest::it_returns_true_if_an_observer_is_removed":0,"Rx\\Subject\\SubjectTest::it_returns_false_if_an_observer_is_not_subscribed":0,"Rx\\Subject\\SubjectTest::it_passes_exception_on_subscribe_if_already_stopped":0,"Rx\\Subject\\SubjectTest::it_passes_on_complete_on_subscribe_if_already_stopped":0,"Rx\\Subject\\SubjectTest::it_passes_on_error_if_not_disposed":0,"Rx\\Subject\\SubjectTest::it_passes_on_complete_if_not_disposed":0,"Rx\\Subject\\SubjectTest::it_passes_on_next_if_not_disposed":0,"Rx\\Subject\\SubjectTest::it_does_not_pass_if_already_stopped":0,"Rx\\Subject\\SubjectTest::it_throws_on_error_if_disposed":0,"Rx\\Subject\\SubjectTest::it_passes_on_complete_if_disposed":0,"Rx\\Subject\\SubjectTest::it_passes_on_next_if_disposed":0,"Rx\\Testing\\HotObservableTest::testRemovingObserverThatNeverSubscribed":0.014,"Rx\\Testing\\RecordedTest::testRecordedWillUseStrictCompareIfNoEqualsMethod":0.001,"Rx\\Testing\\RecordedTest::testRecordedToString":0.002,"Rx\\Testing\\SubscriptionTest::testSubscriptionGetters":0,"Rx\\Testing\\SubscriptionTest::testSubscriptionToString":0,"Rx\\TimestampedTest::testEqualWithScalar":0,"Rx\\TimestampedTest::testNotEqualWithScalar":0,"Rx\\TimestampedTest::testNotEqualInTime":0,"Rx\\TimestampedTest::testEqualNotATimestamp":0,"Rx\\TimestampedTest::testEqualSameTimestamp":0,"Rx\\TimestampedTest::testEqualObjectSameInstance":0,"Rx\\TimestampedTest::testNotEqualObjectDiffentInstance":0,"Rx\\TimestampedTest::testGetValue":0}} \ No newline at end of file diff --git a/composer.json b/composer.json index 79921091..d30209d3 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=7.0.0", + "php": ">=8.2", "react/promise": "^3 || ~2.2" }, "require-dev": { diff --git a/demo/create/createObservable.php b/demo/create/createObservable.php index bf0bd067..99f55125 100644 --- a/demo/create/createObservable.php +++ b/demo/create/createObservable.php @@ -1,11 +1,13 @@ onNext(42); $observer->onCompleted(); diff --git a/demo/custom-operator/Rot13Operator.php b/demo/custom-operator/Rot13Operator.php index 7476e6b5..089d266b 100644 --- a/demo/custom-operator/Rot13Operator.php +++ b/demo/custom-operator/Rot13Operator.php @@ -15,11 +15,9 @@ class Rot13Operator implements OperatorInterface public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { return $observable->subscribe( - function ($json) use ($observer) { - $observer->onNext(str_rot13($json)); - }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($json) => $observer->onNext(str_rot13($json)), + fn ($e) => $observer->onError($e), + fn () => $observer->onCompleted() ); } } \ No newline at end of file diff --git a/demo/zip/zip.php b/demo/zip/zip.php index 1ea94175..076bc8b5 100644 --- a/demo/zip/zip.php +++ b/demo/zip/zip.php @@ -20,6 +20,6 @@ function ($array) use ($observer) { $observer->onNext(json_encode($array)); }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($e) => $observer->onError($e), + fn () => $observer->onCompleted() )); diff --git a/src/Disposable/BinaryDisposable.php b/src/Disposable/BinaryDisposable.php index 2197cc5b..737a9399 100644 --- a/src/Disposable/BinaryDisposable.php +++ b/src/Disposable/BinaryDisposable.php @@ -6,33 +6,16 @@ use Rx\DisposableInterface; -/** - * Class BinaryDisposable - * @package Rx\Disposable - */ class BinaryDisposable implements DisposableInterface { - /** @var \Rx\DisposableInterface */ - private $first; - - /** @var \Rx\DisposableInterface */ - private $second; - - /** @var bool */ - protected $isDisposed = false; - - /** - * BinaryDisposable constructor. - * @param $first - * @param $second - */ - public function __construct(DisposableInterface $first, DisposableInterface $second) - { - $this->first = $first; - $this->second = $second; + public function __construct( + private null|DisposableInterface $first, + private null|DisposableInterface $second, + protected bool $isDisposed = false + ) { } - public function dispose() + public function dispose(): void { if ($this->isDisposed) { return; diff --git a/src/Disposable/CallbackDisposable.php b/src/Disposable/CallbackDisposable.php index 0198b8d9..d87a77da 100644 --- a/src/Disposable/CallbackDisposable.php +++ b/src/Disposable/CallbackDisposable.php @@ -8,15 +8,13 @@ class CallbackDisposable implements DisposableInterface { - private $action; - private $disposed = false; - - public function __construct(callable $action) - { - $this->action = $action; + public function __construct( + private \Closure $action, + private bool $disposed = false + ) { } - public function dispose() + public function dispose(): void { if ($this->disposed) { return; diff --git a/src/Disposable/CompositeDisposable.php b/src/Disposable/CompositeDisposable.php index 3a6621bf..bb8e274d 100644 --- a/src/Disposable/CompositeDisposable.php +++ b/src/Disposable/CompositeDisposable.php @@ -8,15 +8,14 @@ class CompositeDisposable implements DisposableInterface { - private $disposables; - private $isDisposed = false; - public function __construct(array $disposables = []) - { - $this->disposables = $disposables; + public function __construct( + private array $disposables = [], + private bool $isDisposed = false + ) { } - public function dispose() + public function dispose(): void { if ($this->isDisposed) { return; @@ -32,7 +31,7 @@ public function dispose() } } - public function add(DisposableInterface $disposable) + public function add(DisposableInterface $disposable): void { if ($this->isDisposed) { $disposable->dispose(); @@ -65,12 +64,12 @@ public function contains(DisposableInterface $disposable): bool return in_array($disposable, $this->disposables, true); } - public function count() + public function count(): int { return count($this->disposables); } - public function clear() + public function clear(): void { $disposables = $this->disposables; $this->disposables = []; diff --git a/src/Disposable/EmptyDisposable.php b/src/Disposable/EmptyDisposable.php index badc4cd3..a00e183e 100644 --- a/src/Disposable/EmptyDisposable.php +++ b/src/Disposable/EmptyDisposable.php @@ -8,7 +8,7 @@ class EmptyDisposable implements DisposableInterface { - public function dispose() + public function dispose(): void { // do nothing \o/ } diff --git a/src/Disposable/RefCountDisposable.php b/src/Disposable/RefCountDisposable.php index 59d0e67d..4174213d 100644 --- a/src/Disposable/RefCountDisposable.php +++ b/src/Disposable/RefCountDisposable.php @@ -8,17 +8,16 @@ class RefCountDisposable implements DisposableInterface { - private $count = 0; - private $disposable; - private $isDisposed = false; - private $isPrimaryDisposed = false; - public function __construct(DisposableInterface $disposable) - { - $this->disposable = $disposable; + public function __construct( + private readonly DisposableInterface $disposable, + private int $count = 0, + private bool $isDisposed = false, + private bool $isPrimaryDisposed = false + ) { } - public function dispose() + public function dispose(): void { if ($this->isDisposed) { return; @@ -32,13 +31,13 @@ public function dispose() } } - public function getDisposable() + public function getDisposable(): DisposableInterface|CallbackDisposable { if (!$this->isDisposed) { return $this->createInnerDisposable(); } - return new CallbackDisposable(function () { + return new CallbackDisposable(function (): void { }); // no op } @@ -57,7 +56,7 @@ private function createInnerDisposable(): DisposableInterface $this->count++; $isInnerDisposed = false; - return new CallbackDisposable(function () use (&$isInnerDisposed) { + return new CallbackDisposable(function () use (&$isInnerDisposed): void { if ($this->isDisposed()) { return; } diff --git a/src/Disposable/ScheduledDisposable.php b/src/Disposable/ScheduledDisposable.php index 3e6372eb..d8c15bd4 100644 --- a/src/Disposable/ScheduledDisposable.php +++ b/src/Disposable/ScheduledDisposable.php @@ -9,22 +9,14 @@ class ScheduledDisposable implements DisposableInterface { - /** @var DisposableInterface */ - private $disposable; - - /** @var SchedulerInterface */ - private $scheduler; - - /** @var bool */ - protected $isDisposed = false; - - public function __construct(SchedulerInterface $scheduler, DisposableInterface $disposable) - { - $this->scheduler = $scheduler; - $this->disposable = $disposable; + public function __construct( + private SchedulerInterface $scheduler, + private DisposableInterface $disposable, + protected bool $isDisposed = false + ) { } - public function dispose() + public function dispose(): void { if ($this->isDisposed) { return; @@ -32,7 +24,7 @@ public function dispose() $this->isDisposed = true; - $this->scheduler->schedule(function () { + $this->scheduler->schedule(function (): void { $this->disposable->dispose(); }); } diff --git a/src/Disposable/SerialDisposable.php b/src/Disposable/SerialDisposable.php index 30f8e863..1de04a6b 100644 --- a/src/Disposable/SerialDisposable.php +++ b/src/Disposable/SerialDisposable.php @@ -6,19 +6,13 @@ use Rx\DisposableInterface; -/** - * Class SerialDisposable - * @package Rx\Disposable - */ class SerialDisposable implements DisposableInterface { - /** @var bool */ - private $isDisposed = false; + private bool $isDisposed = false; - /** @var DisposableInterface */ - private $disposable = null; + private ?DisposableInterface $disposable = null; - public function dispose() + public function dispose(): void { if ($this->isDisposed) { return; @@ -33,18 +27,12 @@ public function dispose() } } - /** - * @return DisposableInterface - */ - public function getDisposable() + public function getDisposable(): null|DisposableInterface { return $this->disposable; } - /** - * @param DisposableInterface $disposable - */ - public function setDisposable(DisposableInterface $disposable) + public function setDisposable(DisposableInterface $disposable): void { $shouldDispose = $this->isDisposed; diff --git a/src/Disposable/SingleAssignmentDisposable.php b/src/Disposable/SingleAssignmentDisposable.php index cbf5ddaa..6b2fc4ae 100644 --- a/src/Disposable/SingleAssignmentDisposable.php +++ b/src/Disposable/SingleAssignmentDisposable.php @@ -9,10 +9,10 @@ class SingleAssignmentDisposable implements DisposableInterface { - private $current; - private $isDisposed = false; + private null|DisposableInterface $current = null; + private bool $isDisposed = false; - public function dispose() + public function dispose(): void { $old = null; @@ -27,7 +27,7 @@ public function dispose() } } - public function setDisposable(DisposableInterface $disposable = null) + public function setDisposable(DisposableInterface $disposable = null): void { if ($this->current) { throw new RuntimeException('Disposable has already been assigned.'); @@ -42,12 +42,12 @@ public function setDisposable(DisposableInterface $disposable = null) } } - public function getDisposable() + public function getDisposable(): null|DisposableInterface { return $this->current; } - public function isDisposed() + public function isDisposed(): bool { return $this->isDisposed; } diff --git a/src/Notification.php b/src/Notification.php index 6e7d60cd..2a131964 100644 --- a/src/Notification.php +++ b/src/Notification.php @@ -9,14 +9,12 @@ */ abstract class Notification { - private $kind; /** * @param mixed $kind Kind of notification */ - public function __construct($kind) + public function __construct(private $kind) { - $this->kind = $kind; } public function accept($observerOrOnNext, $onError = null, $onCompleted = null) @@ -24,7 +22,7 @@ public function accept($observerOrOnNext, $onError = null, $onCompleted = null) if (null === $onError && null === $onCompleted && $observerOrOnNext instanceof ObserverInterface) { $this->doAcceptObservable($observerOrOnNext); - return; + return null; } return $this->doAccept($observerOrOnNext, $onError, $onCompleted); @@ -32,7 +30,7 @@ public function accept($observerOrOnNext, $onError = null, $onCompleted = null) public function equals($other): bool { - return (string)$this === (string)$other; + return (string) $this === (string)$other; } abstract protected function doAcceptObservable(ObserverInterface $observer); diff --git a/src/Notification/OnErrorNotification.php b/src/Notification/OnErrorNotification.php index c974ee1d..4927471e 100644 --- a/src/Notification/OnErrorNotification.php +++ b/src/Notification/OnErrorNotification.php @@ -9,7 +9,7 @@ class OnErrorNotification extends Notification { - private $exception; + private \Throwable $exception; public function __construct(\Throwable $exception) { diff --git a/src/Notification/OnNextNotification.php b/src/Notification/OnNextNotification.php index 57f5f946..4985e4a9 100644 --- a/src/Notification/OnNextNotification.php +++ b/src/Notification/OnNextNotification.php @@ -9,9 +9,7 @@ class OnNextNotification extends Notification { - private $value; - - public function __construct($value) + public function __construct(private $value) { parent::__construct('N'); @@ -35,10 +33,8 @@ public function __toString(): string public function equals($other): bool { - if (($other instanceof $this) && is_object($this->value) && is_object($other->value)) { - if ($this->value instanceof $other->value && method_exists($this->value, "equals")) { - return $this->value->equals($other->value); - } + if (($other instanceof $this) && is_object($this->value) && is_object($other->value) && ($this->value instanceof $other->value && method_exists($this->value, "equals"))) { + return $this->value->equals($other->value); } return (string)$this === (string)$other; diff --git a/src/Observable.php b/src/Observable.php index a10d2e0d..b818f73d 100644 --- a/src/Observable.php +++ b/src/Observable.php @@ -84,7 +84,6 @@ abstract class Observable implements ObservableInterface * @param callable|ObserverInterface|null $onNextOrObserver * @param callable|null $onError * @param callable|null $onCompleted - * @return DisposableInterface * @throws \InvalidArgumentException * * @operator @@ -103,7 +102,7 @@ public function subscribe($onNextOrObserver = null, callable $onError = null, ca $observer = new CallbackObserver( $onNextOrObserver === null ? null - : function ($value) use ($onNextOrObserver, &$observer, &$disposable) { + : function ($value) use ($onNextOrObserver, &$observer, &$disposable): void { try { $onNextOrObserver($value); } catch (\Throwable $throwable) { @@ -120,10 +119,6 @@ public function subscribe($onNextOrObserver = null, callable $onError = null, ca return $disposable; } - /** - * @param ObserverInterface $observer - * @return DisposableInterface - */ protected abstract function _subscribe(ObserverInterface $observer): DisposableInterface; /** @@ -132,7 +127,6 @@ protected abstract function _subscribe(ObserverInterface $observer): DisposableI * @param callable|null $onNext * @param callable|null $onError * @param callable|null $onCompleted - * @return DisposableInterface */ public function subscribeCallback(callable $onNext = null, callable $onError = null, callable $onCompleted = null): DisposableInterface { @@ -176,7 +170,6 @@ public static function interval(int $interval, AsyncSchedulerInterface $schedule * Returns an observable sequence that contains a single element. * * @param mixed $value Single element in the resulting observable sequence. - * @param SchedulerInterface $scheduler * @return ReturnObservable An observable sequence with the single element. * * @demo of/of.php @@ -194,7 +187,6 @@ public static function of($value, SchedulerInterface $scheduler = null): ReturnO * * @param $value * @param SchedulerInterface|null $scheduler - * @return ReturnObservable */ public static function just($value, SchedulerInterface $scheduler = null): ReturnObservable { @@ -204,7 +196,6 @@ public static function just($value, SchedulerInterface $scheduler = null): Retur /** * Returns an empty observable sequence. * - * @param SchedulerInterface $scheduler * @return EmptyObservable An observable sequence with no elements. * * @demo empty/empty.php @@ -221,7 +212,6 @@ public static function empty(SchedulerInterface $scheduler = null): EmptyObserva * Alias for empty * * @param SchedulerInterface|null $scheduler - * @return EmptyObservable */ public static function emptyObservable(SchedulerInterface $scheduler = null): EmptyObservable { @@ -245,8 +235,6 @@ public static function never(): NeverObservable /** * Returns an observable sequence that terminates with an exception. * - * @param \Throwable $error - * @param SchedulerInterface $scheduler * @return ErrorObservable The observable sequence that terminates exceptionally with the specified exception object. * * @demo error-observable/error-observable.php @@ -261,8 +249,6 @@ public static function error(\Throwable $error, SchedulerInterface $scheduler = /** * Combine an Observable together with another Observable by merging their emissions into a single Observable. * - * @param ObservableInterface $otherObservable - * @return Observable * * @demo merge/merge.php * @operator @@ -270,7 +256,7 @@ public static function error(\Throwable $error, SchedulerInterface $scheduler = */ public function merge(ObservableInterface $otherObservable): Observable { - return (new AnonymousObservable(function (ObserverInterface $observer) use ($otherObservable) { + return (new AnonymousObservable(function (ObserverInterface $observer) use ($otherObservable): void { $observer->onNext($this); $observer->onNext($otherObservable); $observer->onCompleted(); @@ -280,7 +266,6 @@ public function merge(ObservableInterface $otherObservable): Observable /** * Merges an observable sequence of observables into an observable sequence. * - * @return Observable * * @demo merge/merge-all.php * @operator @@ -288,7 +273,7 @@ public function merge(ObservableInterface $otherObservable): Observable */ public function mergeAll(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\MergeAllOperator { return new MergeAllOperator($this); }); } @@ -296,9 +281,6 @@ public function mergeAll(): Observable /** * Converts an array to an observable sequence * - * @param array $array - * @param SchedulerInterface $scheduler - * @return ArrayObservable * * @demo fromArray/fromArray.php * @operator @@ -312,9 +294,6 @@ public static function fromArray(array $array, SchedulerInterface $scheduler = n /** * Converts an Iterator into an observable sequence * - * @param \Iterator $iterator - * @param SchedulerInterface $scheduler - * @return IteratorObservable * * @demo iterator/iterator.php * @operator @@ -328,9 +307,6 @@ public static function fromIterator(\Iterator $iterator, SchedulerInterface $sch /** * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. * - * @param callable $factory - * @param SchedulerInterface $scheduler - * @return Observable * * @demo defer/defer.php * @operator @@ -339,7 +315,7 @@ public static function fromIterator(\Iterator $iterator, SchedulerInterface $sch public static function defer(callable $factory, SchedulerInterface $scheduler = null): Observable { return static::empty($scheduler) - ->lift(function () use ($factory) { + ->lift(function () use ($factory): \Rx\Operator\DeferOperator { return new DeferOperator(new ObservableFactoryWrapper($factory)); }); } @@ -350,8 +326,6 @@ public static function defer(callable $factory, SchedulerInterface $scheduler = * * @param $start * @param $count - * @param SchedulerInterface $scheduler - * @return RangeObservable * @throws \InvalidArgumentException * * @demo range/range.php @@ -367,9 +341,6 @@ public static function range(int $start, int $count, SchedulerInterface $schedul * Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an * observable sequence. * - * @param callable $action - * @param SchedulerInterface $scheduler - * @return Observable * * @demo start/start.php * @operator @@ -380,7 +351,7 @@ public static function start(callable $action, SchedulerInterface $scheduler = n $scheduler = $scheduler ?? Scheduler::getDefault(); $subject = new AsyncSubject(); - $scheduler->schedule(function () use ($subject, $action) { + $scheduler->schedule(function () use ($subject, $action): void { $result = null; try { $result = $action(); @@ -398,8 +369,6 @@ public static function start(callable $action, SchedulerInterface $scheduler = n /** * Takes a transforming function that operates on each element. * - * @param callable $selector - * @return Observable * * @demo map/map.php * @operator @@ -407,7 +376,7 @@ public static function start(callable $action, SchedulerInterface $scheduler = n */ public function map(callable $selector): Observable { - return $this->lift(function () use ($selector) { + return $this->lift(function () use ($selector): \Rx\Operator\MapOperator { return new MapOperator($selector); }); } @@ -415,8 +384,6 @@ public function map(callable $selector): Observable /** * Maps operator variant that calls the map selector with the index and value * - * @param callable $selector - * @return Observable * * @demo map/mapWithIndex.php * @operator @@ -434,7 +401,6 @@ public function mapWithIndex(callable $selector): Observable * Maps every value to the same value every time * * @param $value - * @return Observable * * @demo map/mapTo.php * @operator @@ -450,8 +416,6 @@ public function mapTo($value): Observable /** * Alias for Map * - * @param callable $selector - * @return Observable * * @operator * @reactivex map @@ -464,8 +428,6 @@ public function select(callable $selector): Observable /** * Emit only those items from an Observable that pass a predicate test. * - * @param callable $predicate - * @return Observable * * @demo filter/filter.php * @operator @@ -473,7 +435,7 @@ public function select(callable $selector): Observable */ public function filter(callable $predicate): Observable { - return $this->lift(function () use ($predicate) { + return $this->lift(function () use ($predicate): \Rx\Operator\FilterOperator { return new FilterOperator($predicate); }); } @@ -481,8 +443,6 @@ public function filter(callable $predicate): Observable /** * Alias for filter * - * @param callable $predicate - * @return Observable * * @operator * @reactivex filter @@ -495,8 +455,6 @@ public function where(callable $predicate): Observable /** * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. * - * @param callable $selector - * @return Observable * * @demo flatMap/flatMap.php * @operator @@ -514,7 +472,6 @@ public function flatMap(callable $selector): Observable * @param ObservableInterface $observable - An an observable sequence to project each element from the source * sequence onto. * - * @return Observable * * @demo concat/concatMapTo.php * @operator @@ -522,7 +479,7 @@ public function flatMap(callable $selector): Observable */ public function flatMapTo(ObservableInterface $observable): Observable { - return $this->flatMap(function () use ($observable) { + return $this->flatMap(function () use ($observable): \Rx\ObservableInterface { return $observable; }); } @@ -531,12 +488,11 @@ public function flatMapTo(ObservableInterface $observable): Observable * Alias for flatMap * * @param $selector - * @return Observable * * @operator * @reactivex flatMap */ - public function selectMany($selector): Observable + public function selectMany(callable $selector): Observable { return $this->flatMap($selector); } @@ -567,8 +523,6 @@ public function flatMapLatest(callable $selector): Observable } /** - * @param integer $count - * @return Observable * * @demo skip/skip.php * @operator @@ -576,7 +530,7 @@ public function flatMapLatest(callable $selector): Observable */ public function skip(int $count): Observable { - return $this->lift(function () use ($count) { + return $this->lift(function () use ($count): \Rx\Operator\SkipOperator { return new SkipOperator($count); }); } @@ -596,7 +550,7 @@ public function skip(int $count): Observable */ public function skipWhile(callable $predicate): Observable { - return $this->lift(function () use ($predicate) { + return $this->lift(function () use ($predicate): \Rx\Operator\SkipWhileOperator { return new SkipWhileOperator($predicate); }); } @@ -626,8 +580,6 @@ public function skipWhileWithIndex(callable $predicate): Observable /** * Returns a specified number of contiguous elements from the start of an observable sequence * - * @param integer $count - * @return Observable|EmptyObservable * * @demo take/take.php * @operator @@ -639,7 +591,7 @@ public function take(int $count): Observable return self::empty(); } - return $this->lift(function () use ($count) { + return $this->lift(function () use ($count): \Rx\Operator\TakeOperator { return new TakeOperator($count); }); } @@ -658,7 +610,7 @@ public function take(int $count): Observable */ public function takeUntil(ObservableInterface $other): Observable { - return $this->lift(function () use ($other) { + return $this->lift(function () use ($other): \Rx\Operator\TakeUntilOperator { return new TakeUntilOperator($other); }); } @@ -668,8 +620,6 @@ public function takeUntil(ObservableInterface $other): Observable * a callback to test each source element for a condition. The callback predicate is called with the value of the * element. * - * @param callable $predicate - * @return Observable * * @demo take/takeWhile.php * @operator @@ -677,7 +627,7 @@ public function takeUntil(ObservableInterface $other): Observable */ public function takeWhile(callable $predicate, bool $inclusive = false): Observable { - return $this->lift(function () use ($predicate, $inclusive) { + return $this->lift(function () use ($predicate, $inclusive): \Rx\Operator\TakeWhileOperator { return new TakeWhileOperator($predicate, $inclusive); }); } @@ -687,8 +637,6 @@ public function takeWhile(callable $predicate, bool $inclusive = false): Observa * a callback to test each source element for a condition. The callback predicate is called with the index and the * value of the element. * - * @param callable $predicate - * @return Observable * * @demo take/takeWhileWithIndex.php * @operator @@ -706,7 +654,6 @@ public function takeWhileWithIndex(callable $predicate): Observable * Returns a specified number of contiguous elements from the end of an observable sequence. * * @param $count - * @return Observable * * @demo take/takeLast.php * @operator @@ -714,7 +661,7 @@ public function takeWhileWithIndex(callable $predicate): Observable */ public function takeLast(int $count): Observable { - return $this->lift(function () use ($count) { + return $this->lift(function () use ($count): \Rx\Operator\TakeLastOperator { return new TakeLastOperator($count); }); } @@ -722,10 +669,8 @@ public function takeLast(int $count): Observable /** * Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. * - * @param callable $keySelector * @param callable|null $elementSelector * @param callable|null $keySerializer - * @return Observable * * @demo groupBy/groupBy.php * @operator @@ -733,7 +678,7 @@ public function takeLast(int $count): Observable */ public function groupBy(callable $keySelector, callable $elementSelector = null, callable $keySerializer = null): Observable { - return $this->groupByUntil($keySelector, $elementSelector, function () { + return $this->groupByUntil($keySelector, $elementSelector, function (): \Rx\Observable\NeverObservable { return static::never(); }, $keySerializer); } @@ -741,11 +686,9 @@ public function groupBy(callable $keySelector, callable $elementSelector = null, /** * Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. * - * @param callable $keySelector * @param callable|null $elementSelector * @param callable|null $durationSelector * @param callable|null $keySerializer - * @return Observable * * @demo groupBy/groupByUntil.php * @operator @@ -753,7 +696,7 @@ public function groupBy(callable $keySelector, callable $elementSelector = null, */ public function groupByUntil(callable $keySelector, callable $elementSelector = null, callable $durationSelector = null, callable $keySerializer = null): Observable { - return $this->lift(function () use ($keySelector, $elementSelector, $durationSelector, $keySerializer) { + return $this->lift(function () use ($keySelector, $elementSelector, $durationSelector, $keySerializer): \Rx\Operator\GroupByUntilOperator { return new GroupByUntilOperator($keySelector, $elementSelector, $durationSelector, $keySerializer); }); } @@ -761,9 +704,6 @@ public function groupByUntil(callable $keySelector, callable $elementSelector = /** * Lifts a function to the current Observable and returns a new Observable that when subscribed to will pass * the values of the current Observable through the Operator function. - * - * @param callable $operatorFactory - * @return Observable */ public function lift(callable $operatorFactory): Observable { @@ -782,7 +722,6 @@ public function lift(callable $operatorFactory): Observable * * @param $name * @param $arguments - * @return Observable * * @demo custom-operator/rot13.php */ @@ -796,7 +735,7 @@ public function __call($name, array $arguments): Observable } $className = $fullNamespace . ucfirst($name) . 'Operator'; - return $this->lift(function () use ($className, $arguments) { + return $this->lift(function () use ($className, $arguments): object { return (new \ReflectionClass($className))->newInstanceArgs($arguments); }); } @@ -818,7 +757,7 @@ public function __call($name, array $arguments): Observable */ public function reduce(callable $accumulator, $seed = null): Observable { - return $this->lift(function () use ($accumulator, $seed) { + return $this->lift(function () use ($accumulator, $seed): \Rx\Operator\ReduceOperator { return new ReduceOperator($accumulator, $seed); }); } @@ -829,7 +768,6 @@ public function reduce(callable $accumulator, $seed = null): Observable * structure which can grow large. * * @param callable|null $comparer - * @return Observable * * @demo distinct/distinct.php * @operator @@ -837,7 +775,7 @@ public function reduce(callable $accumulator, $seed = null): Observable */ public function distinct(callable $comparer = null): Observable { - return $this->lift(function () use ($comparer) { + return $this->lift(function () use ($comparer): \Rx\Operator\DistinctOperator { return new DistinctOperator(null, $comparer); }); } @@ -847,7 +785,6 @@ public function distinct(callable $comparer = null): Observable * * @param callable|null $keySelector * @param callable|null $comparer - * @return Observable * * @demo distinct/distinctKey.php * @operator @@ -855,7 +792,7 @@ public function distinct(callable $comparer = null): Observable */ public function distinctKey(callable $keySelector, callable $comparer = null): Observable { - return $this->lift(function () use ($keySelector, $comparer) { + return $this->lift(function () use ($keySelector, $comparer): \Rx\Operator\DistinctOperator { return new DistinctOperator($keySelector, $comparer); }); } @@ -863,8 +800,6 @@ public function distinctKey(callable $keySelector, callable $comparer = null): O /** * A variant of distinct that only compares emitted items from the source Observable against their immediate predecessors in order to determine whether or not they are distinct. * - * @param callable $comparer - * @return Observable * * @demo distinct/distinctUntilChanged.php * @operator @@ -872,7 +807,7 @@ public function distinctKey(callable $keySelector, callable $comparer = null): O */ public function distinctUntilChanged(callable $comparer = null): Observable { - return $this->lift(function () use ($comparer) { + return $this->lift(function () use ($comparer): \Rx\Operator\DistinctUntilChangedOperator { return new DistinctUntilChangedOperator(null, $comparer); }); } @@ -881,9 +816,6 @@ public function distinctUntilChanged(callable $comparer = null): Observable * Variant of distinctUntilChanged that takes a key selector * and the comparer. * - * @param callable $keySelector - * @param callable $comparer - * @return Observable * * @demo distinct/distinctUntilKeyChanged.php * @operator @@ -891,7 +823,7 @@ public function distinctUntilChanged(callable $comparer = null): Observable */ public function distinctUntilKeyChanged(callable $keySelector = null, callable $comparer = null): Observable { - return $this->lift(function () use ($keySelector, $comparer) { + return $this->lift(function () use ($keySelector, $comparer): \Rx\Operator\DistinctUntilChangedOperator { return new DistinctUntilChangedOperator($keySelector, $comparer); }); } @@ -911,11 +843,7 @@ public function distinctUntilKeyChanged(callable $keySelector = null, callable $ * additional events. * * @param callable|ObserverInterface $onNextOrObserver - * @param callable $onError - * @param callable $onCompleted - * @return Observable * @throws \InvalidArgumentException - * * @demo do/do.php * @operator * @reactivex do @@ -930,7 +858,7 @@ public function do($onNextOrObserver = null, callable $onError = null, callable throw new \InvalidArgumentException('The first argument needs to be a "callable" or "Observer"'); } - return $this->lift(function () use ($observer) { + return $this->lift(function () use ($observer): \Rx\Operator\DoOnEachOperator { return new DoOnEachOperator($observer); }); } @@ -938,9 +866,6 @@ public function do($onNextOrObserver = null, callable $onError = null, callable /** * @deprecated Use `do` * Alias for do - * - * @param ObserverInterface $observer - * @return mixed */ public function doOnEach(ObserverInterface $observer): Observable { @@ -949,8 +874,6 @@ public function doOnEach(ObserverInterface $observer): Observable /** * @deprecated Use `do` - * @param callable $onNext - * @return Observable * * @demo do/doOnNext.php * @operator @@ -964,8 +887,6 @@ public function doOnNext(callable $onNext): Observable } /** - * @param callable $onError - * @return Observable * * @demo do/doOnError.php * @operator @@ -980,8 +901,6 @@ public function doOnError(callable $onError): Observable } /** - * @param callable $onCompleted - * @return Observable * * @demo do/doOnCompleted.php * @operator @@ -1002,7 +921,6 @@ public function doOnCompleted(callable $onCompleted): Observable * * @param $accumulator * @param mixed $seed - * @return Observable * * @demo scan/scan.php * @demo scan/scan-with-seed.php @@ -1011,7 +929,7 @@ public function doOnCompleted(callable $onCompleted): Observable */ public function scan(callable $accumulator, $seed = null): Observable { - return $this->lift(function () use ($accumulator, $seed) { + return $this->lift(function () use ($accumulator, $seed): \Rx\Operator\ScanOperator { return new ScanOperator($accumulator, $seed); }); } @@ -1028,7 +946,7 @@ public function scan(callable $accumulator, $seed = null): Observable */ public function toArray(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\ToArrayOperator { return new ToArrayOperator(); }); } @@ -1050,7 +968,7 @@ public function toArray(): Observable */ public function skipLast(int $count): Observable { - return $this->lift(function () use ($count) { + return $this->lift(function () use ($count): \Rx\Operator\SkipLastOperator { return new SkipLastOperator($count); }); } @@ -1068,7 +986,7 @@ public function skipLast(int $count): Observable */ public function skipUntil(ObservableInterface $other): Observable { - return $this->lift(function () use ($other) { + return $this->lift(function () use ($other): \Rx\Operator\SkipUntilOperator { return new SkipUntilOperator($other); }); } @@ -1077,8 +995,6 @@ public function skipUntil(ObservableInterface $other): Observable * Returns an observable sequence that produces a value after dueTime has elapsed. * * @param integer $dueTime - milliseconds - * @param AsyncSchedulerInterface $scheduler - * @return TimerObservable * * @demo timer/timer.php * @operator @@ -1100,7 +1016,7 @@ public static function timer(int $dueTime, AsyncSchedulerInterface $scheduler = */ public function asObservable(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\AsObservableOperator { return new AsObservableOperator(); }); } @@ -1108,8 +1024,6 @@ public function asObservable(): Observable /** * Concatenate an observable sequence onto the end of the source observable. * - * @param ObservableInterface $observable - * @return Observable * * @demo concat/concat.php * @operator @@ -1117,7 +1031,7 @@ public function asObservable(): Observable */ public function concat(ObservableInterface $observable): Observable { - return $this->lift(function () use ($observable) { + return $this->lift(function () use ($observable): \Rx\Operator\ConcatOperator { return new ConcatOperator($observable); }); } @@ -1149,7 +1063,7 @@ public function concat(ObservableInterface $observable): Observable */ public function concatMap(callable $selector, callable $resultSelector = null): Observable { - return $this->lift(function () use ($selector, $resultSelector) { + return $this->lift(function () use ($selector, $resultSelector): ConcatMapOperator { return new ConcatMapOperator(new ObservableFactoryWrapper($selector), $resultSelector); }); } @@ -1178,7 +1092,7 @@ public function concatMap(callable $selector, callable $resultSelector = null): */ public function concatMapTo(ObservableInterface $observable, callable $resultSelector = null): Observable { - return $this->concatMap(function () use ($observable) { + return $this->concatMap(function () use ($observable): \Rx\ObservableInterface { return $observable; }, $resultSelector); } @@ -1194,7 +1108,7 @@ public function concatMapTo(ObservableInterface $observable, callable $resultSel */ public function concatAll(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\ConcatAllOperator { return new ConcatAllOperator(); }); } @@ -1203,8 +1117,6 @@ public function concatAll(): Observable * Returns an observable sequence containing a value that represents how many elements in the specified observable * sequence satisfy a condition if provided, else the count of items. * - * @param callable $predicate - * @return Observable * * @demo count/count.php * @operator @@ -1212,7 +1124,7 @@ public function concatAll(): Observable */ public function count(callable $predicate = null): Observable { - return $this->lift(function () use ($predicate) { + return $this->lift(function () use ($predicate): \Rx\Operator\CountOperator { return new CountOperator($predicate); }); } @@ -1223,9 +1135,7 @@ public function count(callable $predicate = null): Observable * exposing the sequence resulting from the selector function's invocation. For specializations with fixed subject * types, see Publish, PublishLast, and Replay. * - * @param \Rx\Subject\Subject $subject * @param callable|null $selector - * @return Observable * * @demo multicast/multicast.php * @operator @@ -1234,7 +1144,7 @@ public function count(callable $predicate = null): Observable public function multicast(Subject $subject, callable $selector = null): Observable { return $selector ? - new MulticastObservable($this, function () use ($subject) { + new MulticastObservable($this, function () use ($subject): \Rx\Subject\Subject { return $subject; }, $selector) : new ConnectableObservable($this, $subject); @@ -1246,7 +1156,6 @@ public function multicast(Subject $subject, callable $selector = null): Observab * separate multicast invocation, exposing the sequence resulting from the selector function's invocation. * For specializations with fixed subject types, see Publish, PublishLast, and Replay. * - * @param callable $subjectSelector * @param callable|null $selector * @return \Rx\Observable\ConnectableObservable|\Rx\Observable\MulticastObservable * @@ -1298,7 +1207,6 @@ public function publishLast(callable $selector = null): Observable * This operator is a specialization of Multicast using a BehaviorSubject. * * @param mixed $initialValue - * @param callable $selector * @return \Rx\Observable\ConnectableObservable|\Rx\Observable\MulticastObservable * * @demo publish/publishValue.php @@ -1352,7 +1260,7 @@ public function singleInstance(): Observable if (!$hasObservable) { $hasObservable = true; $observable = $source - ->finally(function () use (&$hasObservable) { + ->finally(function () use (&$hasObservable): void { $hasObservable = false; }) ->publish() @@ -1361,7 +1269,7 @@ public function singleInstance(): Observable return $observable; }; - return new Observable\AnonymousObservable(function (ObserverInterface $o) use ($getObservable) { + return new Observable\AnonymousObservable(function (ObserverInterface $o) use ($getObservable): \Rx\DisposableInterface { return $getObservable()->subscribe($o); }); } @@ -1375,7 +1283,6 @@ public function singleInstance(): Observable * returns to zero, at which point the subscription is disposed. * * @param $initialValue - * @return \Rx\Observable\RefCountObservable * * @demo share/shareValue.php * @operator @@ -1416,10 +1323,7 @@ public function replay(callable $selector = null, int $bufferSize = null, int $w * zero to one, then shares that subscription with all subsequent observers until the number of observers returns * to zero, at which point the subscription is disposed. * - * @param integer $bufferSize - * @param integer $windowSize * @param $scheduler - * @return \Rx\Observable\RefCountObservable * * @demo share/shareReplay.php * @operator @@ -1436,9 +1340,6 @@ public function shareReplay(int $bufferSize, int $windowSize = null, SchedulerIn * result selector function is omitted, a list with the elements of the observable sequences at corresponding * indexes will be yielded. * - * @param array $observables - * @param callable $selector - * @return Observable * * @demo zip/zip.php * @demo zip/zip-result-selector.php @@ -1447,7 +1348,7 @@ public function shareReplay(int $bufferSize, int $windowSize = null, SchedulerIn */ public function zip(array $observables, callable $selector = null): Observable { - return $this->lift(function () use ($observables, $selector) { + return $this->lift(function () use ($observables, $selector): \Rx\Operator\ZipOperator { return new ZipOperator($observables, $selector); }); } @@ -1455,9 +1356,7 @@ public function zip(array $observables, callable $selector = null): Observable /** * Runs all observable sequences in parallel and collect their last elements. * - * @param array $observables * @param callable|null $resultSelector - * @return ForkJoinObservable * * @demo forkJoin/forkJoin.php * @operator @@ -1473,8 +1372,6 @@ public static function forkJoin(array $observables = [], callable $resultSelecto * If the retry count is not specified, it retries indefinitely. Note if you encounter an error and want it to * retry once, then you must use ->retry(2). * - * @param int $retryCount - * @return Observable * * @demo retry/retry.php * @operator @@ -1482,7 +1379,7 @@ public static function forkJoin(array $observables = [], callable $resultSelecto */ public function retry(int $retryCount = -1): Observable { - return $this->lift(function () use ($retryCount) { + return $this->lift(function () use ($retryCount): \Rx\Operator\RetryOperator { return new RetryOperator($retryCount); }); } @@ -1491,8 +1388,6 @@ public function retry(int $retryCount = -1): Observable * Repeats the source observable sequence on error when the notifier emits a next value. If the source observable * errors and the notifier completes, it will complete the source sequence. * - * @param callable $notifier - * @return Observable * * @demo retry/retryWhen.php * @operator @@ -1500,7 +1395,7 @@ public function retry(int $retryCount = -1): Observable */ public function retryWhen(callable $notifier): Observable { - return $this->lift(function () use ($notifier) { + return $this->lift(function () use ($notifier): \Rx\Operator\RetryWhenOperator { return new RetryWhenOperator(new ObservableFactoryWrapper($notifier)); }); } @@ -1510,9 +1405,7 @@ public function retryWhen(callable $notifier): Observable * any of the observable sequences produces an element. Observables need to be an array. * If the result selector is omitted, a list with the elements will be yielded. * - * @param array $observables * @param callable|null $selector - * @return Observable * * @demo combineLatest/combineLatest.php * @operator @@ -1520,7 +1413,7 @@ public function retryWhen(callable $notifier): Observable */ public function combineLatest(array $observables, callable $selector = null): Observable { - return $this->lift(function () use ($observables, $selector) { + return $this->lift(function () use ($observables, $selector): \Rx\Operator\CombineLatestOperator { return new CombineLatestOperator($observables, $selector); }); } @@ -1528,7 +1421,6 @@ public function combineLatest(array $observables, callable $selector = null): Ob /** * Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element. * - * @param array $observables * @param callable|null $selector * @return Observable - An observable sequence containing the result of combining elements of the sources using the specified result selector function. * @@ -1538,7 +1430,7 @@ public function combineLatest(array $observables, callable $selector = null): Ob */ public function withLatestFrom(array $observables, callable $selector = null): Observable { - return $this->lift(function () use ($observables, $selector) { + return $this->lift(function () use ($observables, $selector): \Rx\Operator\WithLatestFromOperator { return new WithLatestFromOperator($observables, $selector); }); } @@ -1546,8 +1438,6 @@ public function withLatestFrom(array $observables, callable $selector = null): O /** * Returns the specified value of an observable if the sequence is empty. * - * @param ObservableInterface $observable - * @return Observable * * @demo defaultIfEmpty/defaultIfEmpty.php * @operator @@ -1555,7 +1445,7 @@ public function withLatestFrom(array $observables, callable $selector = null): O */ public function defaultIfEmpty(ObservableInterface $observable): Observable { - return $this->lift(function () use ($observable) { + return $this->lift(function () use ($observable): \Rx\Operator\DefaultIfEmptyOperator { return new DefaultIfEmptyOperator($observable); }); } @@ -1563,8 +1453,6 @@ public function defaultIfEmpty(ObservableInterface $observable): Observable /** * Generates an observable sequence that repeats the given element the specified number of times. * - * @param int $count - * @return Observable|EmptyObservable * * @demo repeat/repeat.php * @operator @@ -1576,7 +1464,7 @@ public function repeat(int $count = -1): Observable return self::empty(); } - return $this->lift(function () use ($count) { + return $this->lift(function () use ($count): \Rx\Operator\RepeatOperator { return new RepeatOperator($count); }); } @@ -1588,8 +1476,6 @@ public function repeat(int $count = -1): Observable * repeatWhen will call onCompleted or onError on the child subscription. Otherwise, this Observable will * resubscribe to the source observable. * - * @param callable $notifier - * @return Observable * * @demo repeat/repeatWhen.php * @operator @@ -1597,20 +1483,17 @@ public function repeat(int $count = -1): Observable */ public function repeatWhen(callable $notifier): Observable { - return $this->lift(function () use ($notifier) { + return $this->lift(function () use ($notifier): \Rx\Operator\RepeatWhenOperator { return new RepeatWhenOperator(new ObservableFactoryWrapper($notifier)); }); } /** * Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. - * - * @param SchedulerInterface $scheduler - * @return Observable */ public function subscribeOn(SchedulerInterface $scheduler): Observable { - return $this->lift(function () use ($scheduler) { + return $this->lift(function () use ($scheduler): \Rx\Operator\SubscribeOnOperator { return new SubscribeOnOperator($scheduler); }); } @@ -1620,7 +1503,6 @@ public function subscribeOn(SchedulerInterface $scheduler): Observable * * @param $delay * @param AsyncSchedulerInterface|null $scheduler - * @return Observable * * @demo delay/delay.php * @operator @@ -1628,7 +1510,7 @@ public function subscribeOn(SchedulerInterface $scheduler): Observable */ public function delay(int $delay, AsyncSchedulerInterface $scheduler = null): Observable { - return $this->lift(function () use ($delay, $scheduler) { + return $this->lift(function () use ($delay, $scheduler): \Rx\Operator\DelayOperator { return new DelayOperator($delay, $scheduler ?: Scheduler::getAsync()); }); } @@ -1638,9 +1520,6 @@ public function delay(int $delay, AsyncSchedulerInterface $scheduler = null): Ob * When a timeout occurs, this operator errors with an instance of Rx\Exception\TimeoutException * * @param $timeout - * @param ObservableInterface $timeoutObservable - * @param AsyncSchedulerInterface $scheduler - * @return Observable * * @demo timeout/timeout.php * @operator @@ -1648,8 +1527,8 @@ public function delay(int $delay, AsyncSchedulerInterface $scheduler = null): Ob */ public function timeout(int $timeout, ObservableInterface $timeoutObservable = null, AsyncSchedulerInterface $scheduler = null): Observable { - return $this->lift(function () use ($timeout, $timeoutObservable, $scheduler) { - return new TimeoutOperator($timeout, $timeoutObservable, $scheduler ?: Scheduler::getAsync()); + return $this->lift(function () use ($timeout, $timeoutObservable, $scheduler): \Rx\Operator\TimeoutOperator { + return new TimeoutOperator($timeout, $scheduler ?: Scheduler::getAsync(), $timeoutObservable); }); } @@ -1658,8 +1537,6 @@ public function timeout(int $timeout, ObservableInterface $timeoutObservable = n * element count information. * * @param $count - * @param int $skip - * @return Observable * @throws \InvalidArgumentException * * @demo bufferWithCount/bufferWithCount.php @@ -1669,7 +1546,7 @@ public function timeout(int $timeout, ObservableInterface $timeoutObservable = n */ public function bufferWithCount(int $count, int $skip = null): Observable { - return $this->lift(function () use ($count, $skip) { + return $this->lift(function () use ($count, $skip): \Rx\Operator\BufferWithCountOperator { return new BufferWithCountOperator($count, $skip); }); } @@ -1677,8 +1554,6 @@ public function bufferWithCount(int $count, int $skip = null): Observable /** * Continues an observable sequence that is terminated by an exception with the next observable sequence. * - * @param callable $selector - * @return Observable * * @demo catch/catch.php * @operator @@ -1686,7 +1561,7 @@ public function bufferWithCount(int $count, int $skip = null): Observable */ public function catch(callable $selector): Observable { - return $this->lift(function () use ($selector) { + return $this->lift(function () use ($selector): \Rx\Operator\CatchErrorOperator { return new CatchErrorOperator(new ObservableFactoryWrapper($selector)); }); } @@ -1694,9 +1569,6 @@ public function catch(callable $selector): Observable /** * @deprecated Use `catch` * Alias for catch - * - * @param callable $selector - * @return Observable */ public function catchError(callable $selector): Observable { @@ -1707,8 +1579,6 @@ public function catchError(callable $selector): Observable * Prepends a value to an observable sequence with an argument of a signal value to prepend. * * @param mixed $startValue - * @param SchedulerInterface $scheduler - * @return Observable * * @demo startWith/startWith.php * @operator @@ -1722,9 +1592,6 @@ public function startWith($startValue, SchedulerInterface $scheduler = null): Ob /** * Prepends a sequence of values to an observable sequence with an argument of an array of values to prepend. * - * @param array $startArray - * @param SchedulerInterface $scheduler - * @return Observable * * @demo startWith/startWithArray.php * @operator @@ -1732,7 +1599,7 @@ public function startWith($startValue, SchedulerInterface $scheduler = null): Ob */ public function startWithArray(array $startArray, SchedulerInterface $scheduler = null): Observable { - return $this->lift(function () use ($startArray, $scheduler) { + return $this->lift(function () use ($startArray, $scheduler): \Rx\Operator\StartWithArrayOperator { return new StartWithArrayOperator($startArray, $scheduler ?: Scheduler::getDefault()); }); } @@ -1740,8 +1607,6 @@ public function startWithArray(array $startArray, SchedulerInterface $scheduler /** * Returns the minimum value in an observable sequence according to the specified comparer. * - * @param callable $comparer - * @return Observable * * @demo min/min.php * @demo min/min-with-comparer.php @@ -1750,7 +1615,7 @@ public function startWithArray(array $startArray, SchedulerInterface $scheduler */ public function min(callable $comparer = null): Observable { - return $this->lift(function () use ($comparer) { + return $this->lift(function () use ($comparer): \Rx\Operator\MinOperator { return new MinOperator($comparer); }); } @@ -1758,8 +1623,6 @@ public function min(callable $comparer = null): Observable /** * Returns the maximum value in an observable sequence according to the specified comparer. * - * @param callable $comparer - * @return Observable * * @demo max/max.php * @demo max/max-with-comparer.php @@ -1768,7 +1631,7 @@ public function min(callable $comparer = null): Observable */ public function max(callable $comparer = null): Observable { - return $this->lift(function () use ($comparer) { + return $this->lift(function () use ($comparer): \Rx\Operator\MaxOperator { return new MaxOperator($comparer); }); } @@ -1776,14 +1639,13 @@ public function max(callable $comparer = null): Observable /** * Materializes the implicit notifications of an observable sequence as explicit notifications. * - * @return Observable * * @operator * @reactivex materialize-dematerialize */ public function materialize(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\MaterializeOperator { return new MaterializeOperator(); }); } @@ -1791,14 +1653,13 @@ public function materialize(): Observable /** * Dematerializes the explicit notification values of an observable sequence as implicit notifications. * - * @return Observable * * @operator * @reactivex materialize-dematerialize */ public function dematerialize(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\DematerializeOperator { return new DematerializeOperator(); }); } @@ -1807,7 +1668,6 @@ public function dematerialize(): Observable * Records the timestamp for each value in an observable sequence. * * @param SchedulerInterface|null $scheduler - * @return Observable * * @demo timestamp/timestamp.php * @operator @@ -1815,7 +1675,7 @@ public function dematerialize(): Observable */ public function timestamp(SchedulerInterface $scheduler = null): Observable { - return $this->lift(function () use ($scheduler) { + return $this->lift(function () use ($scheduler): \Rx\Operator\TimestampOperator { return new TimestampOperator($scheduler ?: Scheduler::getDefault()); }); } @@ -1833,7 +1693,7 @@ public function timestamp(SchedulerInterface $scheduler = null): Observable */ public function switch(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\SwitchLatestOperator { return new SwitchLatestOperator(); }); } @@ -1841,8 +1701,6 @@ public function switch(): Observable /** * @deprecated Use `switch` * Alias for switch - * - * @return Observable */ public function switchLatest(): Observable { @@ -1866,7 +1724,7 @@ public function switchLatest(): Observable */ public function switchFirst(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\SwitchFirstOperator { return new SwitchFirstOperator(); }); } @@ -1879,7 +1737,6 @@ public function switchFirst(): Observable * Both also propagate all error observations arising from the source and each completes * when the source completes. * - * @param callable $predicate * @return Observable[] * * @demo partition/partition.php @@ -1890,7 +1747,7 @@ public function partition(callable $predicate): array { return [ $this->filter($predicate), - $this->filter(function () use ($predicate) { + $this->filter(function () use ($predicate): bool { return !call_user_func_array($predicate, func_get_args()); }) ]; @@ -1900,8 +1757,6 @@ public function partition(callable $predicate): array * Propagates the observable sequence that reacts first. Also known as 'amb'. * * @param Observable[] $observables - * @param SchedulerInterface $scheduler - * @return Observable * * @demo race/race.php * @operator @@ -1913,7 +1768,7 @@ public static function race(array $observables, SchedulerInterface $scheduler = return $observables[0]; } - return static::fromArray($observables, $scheduler)->lift(function () { + return static::fromArray($observables, $scheduler)->lift(function (): \Rx\Operator\RaceOperator { return new RaceOperator(); }); } @@ -1921,7 +1776,6 @@ public static function race(array $observables, SchedulerInterface $scheduler = /** * Computes the sum of a sequence of values * - * @return Observable * * @demo sum/sum.php * @operator @@ -1930,7 +1784,7 @@ public static function race(array $observables, SchedulerInterface $scheduler = public function sum(): Observable { return $this - ->reduce(function ($a, $x) { + ->reduce(function ($a, $x): float|int|array { return $a + $x; }, 0); } @@ -1938,7 +1792,6 @@ public function sum(): Observable /** * Computes the average of an observable sequence of values. * - * @return Observable * * @demo average/average.php * @operator @@ -1948,7 +1801,7 @@ public function average(): Observable { return $this ->defaultIfEmpty(Observable::error(new \UnderflowException())) - ->reduce(function ($a, $x) { + ->reduce(function ($a, $x): float|int { static $count = 0; static $total = 0; @@ -1964,7 +1817,6 @@ public function average(): Observable * all elements in the Observable sequence. If a property can't be resolved the observable will error. * * @param mixed $property - * @return Observable * * @demo pluck/pluck.php * @operator @@ -1997,8 +1849,6 @@ public function pluck($property): Observable * the last item emitted on the source observable will be emitted. * * @param $throttleDuration - * @param SchedulerInterface $scheduler - * @return Observable * * @demo throttle/throttle.php * @operator @@ -2006,7 +1856,7 @@ public function pluck($property): Observable */ public function throttle(int $throttleDuration, SchedulerInterface $scheduler = null): Observable { - return $this->lift(function () use ($throttleDuration, $scheduler) { + return $this->lift(function () use ($throttleDuration, $scheduler): \Rx\Operator\ThrottleOperator { return new ThrottleOperator($throttleDuration, $scheduler ?: Scheduler::getDefault()); }); } @@ -2014,7 +1864,6 @@ public function throttle(int $throttleDuration, SchedulerInterface $scheduler = /** * If the source Observable is empty it returns an Observable that emits true, otherwise it emits false. * - * @return Observable * * @demo isEmpty/isEmpty.php * @demo isEmpty/isEmpty-false.php @@ -2023,7 +1872,7 @@ public function throttle(int $throttleDuration, SchedulerInterface $scheduler = */ public function isEmpty(): Observable { - return $this->lift(function () { + return $this->lift(function (): \Rx\Operator\IsEmptyOperator { return new IsEmptyOperator(); }); } @@ -2031,8 +1880,6 @@ public function isEmpty(): Observable /** * Will call a specified function when the source terminates on complete or error. * - * @param callable $callback - * @return Observable * * @demo finally/finally.php * @demo finally/finally-error.php @@ -2041,7 +1888,7 @@ public function isEmpty(): Observable */ public function finally(callable $callback): Observable { - return $this->lift(function () use ($callback) { + return $this->lift(function () use ($callback): \Rx\Operator\FinallyOperator { return new FinallyOperator($callback); }); } @@ -2049,8 +1896,6 @@ public function finally(callable $callback): Observable /** * Converts a promise into an observable * - * @param PromiseInterface $promise - * @return Observable * @throws \InvalidArgumentException * * @demo promise/fromPromise.php @@ -2065,8 +1910,6 @@ public static function fromPromise(PromiseInterface $promise): Observable /** * Converts Observable into a Promise * - * @param Deferred $deferred - * @return PromiseInterface * @throws \InvalidArgumentException */ public function toPromise(Deferred $deferred = null): PromiseInterface @@ -2078,7 +1921,6 @@ public function toPromise(Deferred $deferred = null): PromiseInterface * Will apply given function to the source observable. * * @param callable $compose function that applies operators to source observable. Must return observable. - * @return Observable * * @demo compose/compose.php */ diff --git a/src/Observable/AnonymousObservable.php b/src/Observable/AnonymousObservable.php index edcfd693..bd6f701a 100644 --- a/src/Observable/AnonymousObservable.php +++ b/src/Observable/AnonymousObservable.php @@ -12,11 +12,8 @@ class AnonymousObservable extends Observable { - private $subscribeAction; - - public function __construct(callable $subscribeAction) + public function __construct(private $subscribeAction) { - $this->subscribeAction = $subscribeAction; } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -27,7 +24,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $autoDetachObserver->setDisposable($subscribeAction($autoDetachObserver)); - return new CallbackDisposable(function () use ($autoDetachObserver) { + return new CallbackDisposable(function () use ($autoDetachObserver): void { $autoDetachObserver->dispose(); }); } diff --git a/src/Observable/ArrayObservable.php b/src/Observable/ArrayObservable.php index 7b1be03e..bdf16fce 100644 --- a/src/Observable/ArrayObservable.php +++ b/src/Observable/ArrayObservable.php @@ -11,14 +11,10 @@ class ArrayObservable extends Observable { - private $data; - - private $scheduler; - - public function __construct(array $data, SchedulerInterface $scheduler) - { - $this->data = $data; - $this->scheduler = $scheduler; + public function __construct( + private array $data, + private SchedulerInterface $scheduler + ){ } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -28,14 +24,12 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $keys = array_keys($values); $count = 0; - return $this->scheduler->scheduleRecursive(function ($reschedule) use (&$observer, &$values, $max, &$count, $keys) { + return $this->scheduler->scheduleRecursive(function ($reschedule) use (&$observer, &$values, $max, &$count, $keys): void { if ($count < $max) { $observer->onNext($values[$keys[$count]]); $count++; - if ($count >= 1) { - $reschedule(); - return; - } + $reschedule(); + return; } $observer->onCompleted(); }); diff --git a/src/Observable/ConnectableObservable.php b/src/Observable/ConnectableObservable.php index 377fc32f..fdd2e7d9 100644 --- a/src/Observable/ConnectableObservable.php +++ b/src/Observable/ConnectableObservable.php @@ -11,34 +11,22 @@ use Rx\ObserverInterface; use Rx\Subject\Subject; -/** - * Class ConnectableObservable - * @package Rx\Observable - */ class ConnectableObservable extends Observable { - /** @var \Rx\Subject\Subject */ - protected $subject; + protected Subject $subject; - /** @var BinaryDisposable */ - protected $subscription; + protected BinaryDisposable $subscription; - /** @var Observable */ - protected $sourceObservable; + protected Observable $sourceObservable; - /** @var bool */ - protected $hasSubscription; + protected bool $hasSubscription = false; - /** - * ConnectableObservable constructor. - * @param Observable $source - * @param \Rx\Subject\Subject $subject - */ - public function __construct(Observable $source, Subject $subject = null) - { + public function __construct( + Observable $source, + Subject $subject = null + ) { $this->sourceObservable = $source->asObservable(); $this->subject = $subject ?: new Subject(); - $this->hasSubscription = false; } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -54,7 +42,7 @@ public function connect(): DisposableInterface $this->hasSubscription = true; - $connectableDisposable = new CallbackDisposable(function () { + $connectableDisposable = new CallbackDisposable(function (): void { $this->hasSubscription = false; }); diff --git a/src/Observable/EmptyObservable.php b/src/Observable/EmptyObservable.php index 57b4b3b6..6404db5b 100644 --- a/src/Observable/EmptyObservable.php +++ b/src/Observable/EmptyObservable.php @@ -11,16 +11,13 @@ class EmptyObservable extends Observable { - private $scheduler; - - public function __construct(SchedulerInterface $scheduler) + public function __construct(private readonly SchedulerInterface $scheduler) { - $this->scheduler = $scheduler; } protected function _subscribe(ObserverInterface $observer): DisposableInterface { - return $this->scheduler->schedule(function () use ($observer) { + return $this->scheduler->schedule(function () use ($observer): void { $observer->onCompleted(); }); } diff --git a/src/Observable/ErrorObservable.php b/src/Observable/ErrorObservable.php index 53a95d58..e4097160 100644 --- a/src/Observable/ErrorObservable.php +++ b/src/Observable/ErrorObservable.php @@ -11,18 +11,16 @@ class ErrorObservable extends Observable { - private $error; - private $scheduler; - public function __construct(\Throwable $error, SchedulerInterface $scheduler) - { - $this->error = $error; - $this->scheduler = $scheduler; + public function __construct( + private readonly \Throwable $error, + private readonly SchedulerInterface $scheduler + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface { - return $this->scheduler->schedule(function () use ($observer) { + return $this->scheduler->schedule(function () use ($observer): void { $observer->onError($this->error); }); } diff --git a/src/Observable/ForkJoinObservable.php b/src/Observable/ForkJoinObservable.php index d7f35221..cd6ee833 100644 --- a/src/Observable/ForkJoinObservable.php +++ b/src/Observable/ForkJoinObservable.php @@ -12,21 +12,12 @@ class ForkJoinObservable extends Observable { - /** - * @var Observable[] - */ - private $observables; - - private $values = []; - - private $completed = 0; - - private $resultSelector; - - public function __construct(array $observables = [], callable $resultSelector = null) - { - $this->observables = $observables; - $this->resultSelector = $resultSelector; + public function __construct( + private readonly array $observables = [], + private readonly null|\Closure $resultSelector = null, + private array $values = [], + private int $completed = 0 + ) { } public function _subscribe(ObserverInterface $observer): DisposableInterface @@ -43,11 +34,11 @@ public function _subscribe(ObserverInterface $observer): DisposableInterface foreach ($this->observables as $i => $observable) { $innerDisp = $observable->subscribe( - function ($v) use ($i) { + function ($v) use ($i): void { $this->values[$i] = $v; }, - [$autoObs, 'onError'], - function () use ($len, $i, $autoObs) { + fn ($e) => $autoObs->onError($e), + function () use ($len, $i, $autoObs): void { $this->completed++; if (!array_key_exists($i, $this->values)) { diff --git a/src/Observable/GroupedObservable.php b/src/Observable/GroupedObservable.php index 36ba1d33..660db258 100644 --- a/src/Observable/GroupedObservable.php +++ b/src/Observable/GroupedObservable.php @@ -13,16 +13,18 @@ class GroupedObservable extends Observable { - private $key; - private $underlyingObservable; + private ObservableInterface $underlyingObservable; - public function __construct($key, ObservableInterface $underlyingObservable, RefCountDisposable $mergedDisposable = null) - { + public function __construct( + private $key, + ObservableInterface $underlyingObservable, + RefCountDisposable $mergedDisposable = null + ) { $this->key = $key; - $this->underlyingObservable = !$mergedDisposable ? - $underlyingObservable : - $this->newUnderlyingObservable($mergedDisposable, $underlyingObservable); + $this->underlyingObservable = $mergedDisposable instanceof RefCountDisposable ? + $this->newUnderlyingObservable($mergedDisposable, $underlyingObservable) : + $underlyingObservable; } public function getKey() @@ -38,7 +40,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface private function newUnderlyingObservable(RefCountDisposable $mergedDisposable, ObservableInterface $underlyingObservable): Observable { return new AnonymousObservable( - function ($observer) use ($mergedDisposable, $underlyingObservable) { + function ($observer) use ($mergedDisposable, $underlyingObservable): \Rx\Disposable\BinaryDisposable { return new BinaryDisposable($mergedDisposable->getDisposable(), $underlyingObservable->subscribe($observer)); } ); diff --git a/src/Observable/IntervalObservable.php b/src/Observable/IntervalObservable.php index 90845c1e..e98d40b7 100644 --- a/src/Observable/IntervalObservable.php +++ b/src/Observable/IntervalObservable.php @@ -11,20 +11,10 @@ class IntervalObservable extends Observable { - private $interval; - - /** @var AsyncSchedulerInterface */ - private $scheduler; - - /** - * IntervalObservable constructor. - * @param $interval - * @param AsyncSchedulerInterface $scheduler - */ - public function __construct(int $interval, AsyncSchedulerInterface $scheduler) - { - $this->interval = $interval; - $this->scheduler = $scheduler; + public function __construct( + private int $interval, + private AsyncSchedulerInterface $scheduler + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -32,7 +22,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $counter = 0; return $this->scheduler->schedulePeriodic( - function () use (&$counter, $observer) { + function () use (&$counter, $observer): void { $observer->onNext($counter++); }, $this->interval, // this is to match RxJS behavior which delays the first item by the interval diff --git a/src/Observable/IteratorObservable.php b/src/Observable/IteratorObservable.php index 3bfb3958..3278ee33 100644 --- a/src/Observable/IteratorObservable.php +++ b/src/Observable/IteratorObservable.php @@ -11,21 +11,17 @@ class IteratorObservable extends Observable { - private $items; - - private $scheduler; - - public function __construct(\Iterator $items, SchedulerInterface $scheduler = null) - { - $this->items = $items; - $this->scheduler = $scheduler; + public function __construct( + private readonly \Iterator $items, + private readonly null|SchedulerInterface $scheduler = null + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface { $key = 0; - $action = function ($reschedule) use (&$observer, &$key) { + $action = function ($reschedule) use (&$observer, &$key): void { try { if (null === $key || !$this->items->valid()) { diff --git a/src/Observable/MulticastObservable.php b/src/Observable/MulticastObservable.php index 027340ab..13bfb61c 100644 --- a/src/Observable/MulticastObservable.php +++ b/src/Observable/MulticastObservable.php @@ -9,32 +9,13 @@ use Rx\Observable; use Rx\ObserverInterface; -/** - * Class MulticastObservable - * @package Rx\Observable - */ class MulticastObservable extends Observable { - /** @var \Rx\Observable */ - private $source; - - /** @var callable */ - private $fn1; - - /** @var callable */ - private $fn2; - - /** - * MulticastObservable constructor. - * @param $source - * @param $fn1 - * @param $fn2 - */ - public function __construct(Observable $source, callable $fn1, callable $fn2) - { - $this->source = $source; - $this->fn1 = $fn1; - $this->fn2 = $fn2; + public function __construct( + private readonly Observable $source, + private readonly \Closure $fn1, + private readonly \Closure $fn2 + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface diff --git a/src/Observable/RangeObservable.php b/src/Observable/RangeObservable.php index 785033a0..27d0a3af 100644 --- a/src/Observable/RangeObservable.php +++ b/src/Observable/RangeObservable.php @@ -11,24 +11,19 @@ class RangeObservable extends Observable { - private $start; - private $count; - - private $scheduler; - - public function __construct(int $start, int $count, SchedulerInterface $scheduler) - { - $this->start = $start; - $this->count = $count; - $this->scheduler = $scheduler; + public function __construct( + private readonly int $start, + private readonly int $count, + private readonly SchedulerInterface $scheduler + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface { $i = 0; - return $this->scheduler->scheduleRecursive(function ($reschedule) use (&$observer, &$i) { + return $this->scheduler->scheduleRecursive(function ($reschedule) use (&$observer, &$i): void { if ($i < $this->count) { $observer->onNext($this->start + $i); $i++; diff --git a/src/Observable/RefCountObservable.php b/src/Observable/RefCountObservable.php index 970d055d..1cf7358c 100644 --- a/src/Observable/RefCountObservable.php +++ b/src/Observable/RefCountObservable.php @@ -10,25 +10,14 @@ use Rx\Observable; use Rx\ObserverInterface; -/** - * Class RefCountObservable - * @package Rx\Observable - */ class RefCountObservable extends Observable { - /** @var \Rx\Observable\ConnectableObservable */ - protected $source; - /** @var int */ - protected $count; - - /** @var BinaryDisposable */ - protected $connectableSubscription; - - public function __construct(ConnectableObservable $source) - { - $this->source = $source; - $this->count = 0; + public function __construct( + private readonly ConnectableObservable $source, + protected int $count = 0, + protected $connectableSubscription = null + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -41,7 +30,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $this->connectableSubscription = $this->source->connect(); } - return new CallbackDisposable(function () use ($subscription) { + return new CallbackDisposable(function () use ($subscription): void { $subscription->dispose(); $this->count--; diff --git a/src/Observable/ReturnObservable.php b/src/Observable/ReturnObservable.php index c777e148..17cab0f1 100644 --- a/src/Observable/ReturnObservable.php +++ b/src/Observable/ReturnObservable.php @@ -12,24 +12,21 @@ class ReturnObservable extends Observable { - private $value; - private $scheduler; - - public function __construct($value, SchedulerInterface $scheduler) - { - $this->value = $value; - $this->scheduler = $scheduler; + public function __construct( + private $value, + private SchedulerInterface $scheduler + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface { $disposable = new CompositeDisposable(); - $disposable->add($this->scheduler->schedule(function () use ($observer) { + $disposable->add($this->scheduler->schedule(function () use ($observer): void { $observer->onNext($this->value); })); - $disposable->add($this->scheduler->schedule(function () use ($observer) { + $disposable->add($this->scheduler->schedule(function () use ($observer): void { $observer->onCompleted(); })); diff --git a/src/Observable/TimerObservable.php b/src/Observable/TimerObservable.php index 1402b7a0..42cf3b64 100644 --- a/src/Observable/TimerObservable.php +++ b/src/Observable/TimerObservable.php @@ -11,20 +11,17 @@ class TimerObservable extends Observable { - private $dueTime; - private $scheduler; - - public function __construct(int $dueTime, AsyncSchedulerInterface $scheduler) - { - $this->dueTime = $dueTime; - $this->scheduler = $scheduler; + public function __construct( + private readonly int $dueTime, + private readonly AsyncSchedulerInterface $scheduler + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface { return $this->scheduler->schedule( - function () use ($observer) { + function () use ($observer): void { $observer->onNext(0); $observer->onCompleted(); }, diff --git a/src/ObservableInterface.php b/src/ObservableInterface.php index 754118f6..333a6738 100644 --- a/src/ObservableInterface.php +++ b/src/ObservableInterface.php @@ -10,7 +10,6 @@ interface ObservableInterface * @param callable|ObserverInterface|null $onNextOrObserver * @param callable|null $onError * @param callable|null $onCompleted - * @return DisposableInterface * @throws \InvalidArgumentException */ public function subscribe($onNextOrObserver = null, callable $onError = null, callable $onCompleted = null): DisposableInterface; diff --git a/src/Observer/AbstractObserver.php b/src/Observer/AbstractObserver.php index 016b866d..05a2dd93 100644 --- a/src/Observer/AbstractObserver.php +++ b/src/Observer/AbstractObserver.php @@ -8,9 +8,9 @@ abstract class AbstractObserver implements ObserverInterface { - private $isStopped = false; + private bool $isStopped = false; - public function onCompleted() + public function onCompleted(): void { if ($this->isStopped) { return; @@ -20,7 +20,7 @@ public function onCompleted() $this->completed(); } - public function onError(\Throwable $error) + public function onError(\Throwable $error): void { if ($this->isStopped) { return; @@ -30,7 +30,7 @@ public function onError(\Throwable $error) $this->error($error); } - public function onNext($value) + public function onNext($value): void { if ($this->isStopped) { return; diff --git a/src/Observer/AutoDetachObserver.php b/src/Observer/AutoDetachObserver.php index fd6a31c1..00f85af4 100644 --- a/src/Observer/AutoDetachObserver.php +++ b/src/Observer/AutoDetachObserver.php @@ -11,24 +11,21 @@ class AutoDetachObserver extends AbstractObserver { - private $observer; + private SingleAssignmentDisposable $disposable; - private $disposable; - - public function __construct(ObserverInterface $observer) + public function __construct(private readonly ObserverInterface $observer) { - $this->observer = $observer; $this->disposable = new SingleAssignmentDisposable(); } - public function setDisposable(DisposableInterface $disposable = null) + public function setDisposable(DisposableInterface $disposable = null): void { $disposable = $disposable ?: new EmptyDisposable(); $this->disposable->setDisposable($disposable); } - protected function completed() + protected function completed(): void { try { $this->observer->onCompleted(); @@ -39,7 +36,7 @@ protected function completed() } } - protected function error(\Throwable $exception) + protected function error(\Throwable $exception): void { try { $this->observer->onError($exception); @@ -50,7 +47,7 @@ protected function error(\Throwable $exception) } } - protected function next($value) + protected function next($value): void { try { $this->observer->onNext($value); @@ -60,7 +57,7 @@ protected function next($value) } } - public function dispose() + public function dispose(): void { $this->disposable->dispose(); } diff --git a/src/Observer/CallbackObserver.php b/src/Observer/CallbackObserver.php index 2234c028..256294b3 100644 --- a/src/Observer/CallbackObserver.php +++ b/src/Observer/CallbackObserver.php @@ -6,41 +6,36 @@ class CallbackObserver extends AbstractObserver { - /** @var callable|null */ - private $onNext; - /** @var callable|null */ - private $onError; - - /** @var callable|null */ - private $onCompleted; - - public function __construct(callable $onNext = null, callable $onError = null, callable $onCompleted = null) - { - $default = function () { + public function __construct( + private $onNext = null, + private $onError = null, + private $onCompleted = null + ) { + $default = function (): void { }; $this->onNext = $this->getOrDefault($onNext, $default); - $this->onError = $this->getOrDefault($onError, function ($e) { + $this->onError = $this->getOrDefault($onError, function ($e): void { throw $e; }); $this->onCompleted = $this->getOrDefault($onCompleted, $default); } - protected function completed() + protected function completed(): void { // Cannot use $foo() here, see: https://bugs.php.net/bug.php?id=47160 ($this->onCompleted)(); } - protected function error(\Throwable $error) + protected function error(\Throwable $error): void { ($this->onError)($error); } - protected function next($value) + protected function next($value): void { ($this->onNext)($value); } diff --git a/src/Observer/DoObserver.php b/src/Observer/DoObserver.php index 04bfc094..2a67c400 100644 --- a/src/Observer/DoObserver.php +++ b/src/Observer/DoObserver.php @@ -8,40 +8,34 @@ class DoObserver implements ObserverInterface { - /** @var callable|null */ - private $onNext; - - /** @var callable|null */ - private $onError; - - /** @var callable|null */ - private $onCompleted; - - public function __construct(callable $onNext = null, callable $onError = null, callable $onCompleted = null) - { - $default = function () { + public function __construct( + private null|\Closure $onNext = null, + private null|\Closure $onError = null, + private null|\Closure $onCompleted = null + ) { + $default = function (): void { }; $this->onNext = $this->getOrDefault($onNext, $default); - $this->onError = $this->getOrDefault($onError, function ($e) { + $this->onError = $this->getOrDefault($onError, function ($e): void { throw $e; }); $this->onCompleted = $this->getOrDefault($onCompleted, $default); } - public function onCompleted() + public function onCompleted(): void { ($this->onCompleted)(); } - public function onError(\Throwable $error) + public function onError(\Throwable $error): void { ($this->onError)($error); } - public function onNext($value) + public function onNext($value): void { ($this->onNext)($value); } diff --git a/src/Observer/ScheduledObserver.php b/src/Observer/ScheduledObserver.php index a3dc7de2..b28bb51d 100644 --- a/src/Observer/ScheduledObserver.php +++ b/src/Observer/ScheduledObserver.php @@ -10,59 +10,45 @@ final class ScheduledObserver extends AbstractObserver { - /** @var SchedulerInterface */ - private $scheduler; - - /** @var ObserverInterface */ - private $observer; - - /** @var bool */ - private $isAcquired = false; - - /** @var bool */ - private $hasFaulted = false; - - /** @var \Closure[] */ - private $queue = []; - - /** @var SerialDisposable */ - private $disposable; + private SerialDisposable $disposable; /** * ScheduledObserver constructor. - * @param SchedulerInterface $scheduler - * @param ObserverInterface $observer */ - public function __construct(SchedulerInterface $scheduler, ObserverInterface $observer) - { - $this->scheduler = $scheduler; - $this->observer = $observer; + public function __construct( + private SchedulerInterface $scheduler, + private ObserverInterface $observer, + private bool $isAcquired = false, + private bool $hasFaulted = false, + /** @var \Closure[] */ + private array $queue = [] + ) { $this->disposable = new SerialDisposable(); } - protected function completed() + protected function completed(): void { - $this->queue[] = function () { + $this->queue[] = function (): void { $this->observer->onCompleted(); }; } - protected function next($value) + protected function next($value): void { - $this->queue[] = function () use ($value) { + $this->queue[] = function () use ($value): void { $this->observer->onNext($value); }; } - protected function error(\Throwable $error) + protected function error(\Throwable $error): void { - $this->queue[] = function () use ($error) { + $this->queue[] = function () use ($error): void { $this->observer->onError($error); }; } - public function ensureActive() + public function ensureActive(): void { $isOwner = false; if (!$this->hasFaulted && count($this->queue) > 0) { @@ -76,7 +62,7 @@ public function ensureActive() $this->disposable->setDisposable( $this->scheduler->scheduleRecursive( - function ($recurse) { + function ($recurse): void { $parent = $this; if (count($parent->queue) > 0) { $work = array_shift($parent->queue); @@ -99,7 +85,7 @@ function ($recurse) { ); } - public function dispose() + public function dispose(): void { $this->disposable->dispose(); } diff --git a/src/Operator/BufferWithCountOperator.php b/src/Operator/BufferWithCountOperator.php index b41dd826..ad205268 100644 --- a/src/Operator/BufferWithCountOperator.php +++ b/src/Operator/BufferWithCountOperator.php @@ -11,23 +11,11 @@ final class BufferWithCountOperator implements OperatorInterface { - /** @var int */ - private $count; - - /** @var */ - private $skip; - - /** @var int */ - private $index = 0; - - /** - * BufferOperator constructor. - * @param int $count - * @param int $skip - * @throws \InvalidArgumentException - */ - public function __construct(int $count, int $skip = null) - { + public function __construct( + private int $count, + private null|int $skip = null, + private int $index = 0 + ) { if ($count < 1) { throw new \InvalidArgumentException('count must be greater than or equal to 1'); } @@ -49,7 +37,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $currentGroups = []; return $observable->subscribe(new CallbackObserver( - function ($x) use (&$currentGroups, $observer) { + function ($x) use (&$currentGroups, $observer): void { if ($this->index % $this->skip === 0) { $currentGroups[] = []; } @@ -63,10 +51,10 @@ function ($x) use (&$currentGroups, $observer) { } } }, - function ($err) use ($observer) { + function ($err) use ($observer): void { $observer->onError($err); }, - function () use (&$currentGroups, $observer) { + function () use (&$currentGroups, $observer): void { foreach ($currentGroups as &$group) { $observer->onNext($group); } diff --git a/src/Operator/CatchErrorOperator.php b/src/Operator/CatchErrorOperator.php index 77d95a33..68d6ccd2 100644 --- a/src/Operator/CatchErrorOperator.php +++ b/src/Operator/CatchErrorOperator.php @@ -28,7 +28,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $isDisposed = false; $disposable = new CompositeDisposable(); - $onError = function (\Throwable $e) use (&$isDisposed, $observer, $observable, $disposable) { + $onError = function (\Throwable $e) use (&$isDisposed, $observer, $observable, $disposable): void { if ($isDisposed) { return; @@ -48,16 +48,16 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs }; $callbackObserver = new CallbackObserver( - [$observer, 'onNext'], + fn ($x) => $observer->onNext($x), $onError, - [$observer, 'onCompleted'] + fn () => $observer->onCompleted(), ); $subscription = $observable->subscribe($callbackObserver); $disposable->add($subscription); - $disposable->add(new CallbackDisposable(function () use (&$isDisposed) { + $disposable->add(new CallbackDisposable(function () use (&$isDisposed): void { $isDisposed = true; })); diff --git a/src/Operator/CombineLatestOperator.php b/src/Operator/CombineLatestOperator.php index a53dce7d..9dff9d18 100644 --- a/src/Operator/CombineLatestOperator.php +++ b/src/Operator/CombineLatestOperator.php @@ -13,7 +13,7 @@ final class CombineLatestOperator implements OperatorInterface { /** @var ObservableInterface[] */ - private $observables; + private array $observables; /** @var callable */ private $resultSelector; @@ -21,7 +21,7 @@ final class CombineLatestOperator implements OperatorInterface public function __construct(array $observables, callable $resultSelector = null) { if (null === $resultSelector) { - $resultSelector = function () { + $resultSelector = function (): array { return func_get_args(); }; } @@ -53,7 +53,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $hasValue[$key] = false; $cbObserver = new CallbackObserver( - function ($value) use ($count, &$hasValue, $key, &$values, $observer, &$waitingForValues, &$waitingToComplete) { + function ($value) use ($count, &$hasValue, $key, &$values, $observer, &$waitingForValues, &$waitingToComplete): void { // If an observable has completed before it has emitted, we need to complete right away if ($waitingForValues > $waitingToComplete) { @@ -76,8 +76,8 @@ function ($value) use ($count, &$hasValue, $key, &$values, $observer, &$waitingF } } }, - [$observer, 'onError'], - function () use (&$waitingToComplete, $observer) { + fn ($err) => $observer->onError($err), + function () use (&$waitingToComplete, $observer): void { $waitingToComplete--; if ($waitingToComplete === 0) { $observer->onCompleted(); diff --git a/src/Operator/ConcatAllOperator.php b/src/Operator/ConcatAllOperator.php index f749a02f..1c408634 100644 --- a/src/Operator/ConcatAllOperator.php +++ b/src/Operator/ConcatAllOperator.php @@ -14,38 +14,23 @@ final class ConcatAllOperator implements OperatorInterface { - /** @var array */ - private $buffer; - - /** @var CompositeDisposable */ - private $disposable; - - /** @var SerialDisposable */ - private $innerDisposable; - - /** @var bool */ - private $startBuffering; - - /** @var bool */ - private $sourceCompleted; - - /** @var bool */ - private $innerCompleted; + private array $buffer = []; + private CompositeDisposable $disposable; + private DisposableInterface $innerDisposable; + private bool $startBuffering = false; + private bool $sourceCompleted = false; + private bool $innerCompleted = true; public function __construct() { - $this->buffer = []; $this->disposable = new CompositeDisposable(); $this->innerDisposable = new EmptyDisposable(); - $this->startBuffering = false; - $this->sourceCompleted = false; - $this->innerCompleted = true; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $subscription = $observable->subscribe(new CallbackObserver( - function (ObservableInterface $innerObservable) use ($observable, $observer) { + function (ObservableInterface $innerObservable) use ($observable, $observer): void { try { if ($this->startBuffering === true) { @@ -53,7 +38,7 @@ function (ObservableInterface $innerObservable) use ($observable, $observer) { return; } - $onCompleted = function () use (&$subscribeToInner, $observer) { + $onCompleted = function () use (&$subscribeToInner, $observer): void { $this->disposable->remove($this->innerDisposable); $this->innerDisposable->dispose(); @@ -62,7 +47,7 @@ function (ObservableInterface $innerObservable) use ($observable, $observer) { $obs = array_shift($this->buffer); - if (empty($this->buffer)) { + if ($this->buffer === []) { $this->startBuffering = false; } @@ -73,10 +58,10 @@ function (ObservableInterface $innerObservable) use ($observable, $observer) { } }; - $subscribeToInner = function ($observable) use ($observer, &$onCompleted) { + $subscribeToInner = function ($observable) use ($observer, &$onCompleted): void { $callbackObserver = new CallbackObserver( - [$observer, 'onNext'], - [$observer, 'onError'], + fn ($x) => $observer->onNext($x), + fn ($err) => $observer->onError($err), $onCompleted ); @@ -93,8 +78,8 @@ function (ObservableInterface $innerObservable) use ($observable, $observer) { $observer->onError($e); } }, - [$observer, 'onError'], - function () use ($observer) { + fn ($err) => $observer->onError($err), + function () use ($observer): void { $this->sourceCompleted = true; if ($this->innerCompleted === true) { $observer->onCompleted(); diff --git a/src/Operator/ConcatMapOperator.php b/src/Operator/ConcatMapOperator.php index 208f4293..a2eedd8e 100644 --- a/src/Operator/ConcatMapOperator.php +++ b/src/Operator/ConcatMapOperator.php @@ -10,16 +10,10 @@ final class ConcatMapOperator implements OperatorInterface { - /** @var callable */ - private $selector; - - /** @var callable */ - private $resultSelector; - - public function __construct(callable $selector, callable $resultSelector = null) - { - $this->selector = $selector; - $this->resultSelector = $resultSelector; + public function __construct( + private $selector, + private $resultSelector = null + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface diff --git a/src/Operator/ConcatOperator.php b/src/Operator/ConcatOperator.php index 40e0834c..89628359 100644 --- a/src/Operator/ConcatOperator.php +++ b/src/Operator/ConcatOperator.php @@ -10,18 +10,10 @@ use Rx\Observer\CallbackObserver; use Rx\ObserverInterface; -final class ConcatOperator implements OperatorInterface +final readonly class ConcatOperator implements OperatorInterface { - /** @var \Rx\ObservableInterface */ - private $subsequentObservable; - - /** - * Concat constructor. - * @param ObservableInterface $subsequentObservable - */ - public function __construct(ObservableInterface $subsequentObservable) + public function __construct(private ObservableInterface $subsequentObservable) { - $this->subsequentObservable = $subsequentObservable; } /** @@ -32,9 +24,9 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $disp = new SerialDisposable(); $cbObserver = new CallbackObserver( - [$observer, 'onNext'], - [$observer, 'onError'], - function () use ($observer, $disp) { + fn ($x) => $observer->onNext($x), + fn ($err) => $observer->onError($err), + function () use ($observer, $disp): void { $disp->setDisposable($this->subsequentObservable->subscribe($observer)); } ); diff --git a/src/Operator/CountOperator.php b/src/Operator/CountOperator.php index 2f0a3eef..4d62eb9a 100644 --- a/src/Operator/CountOperator.php +++ b/src/Operator/CountOperator.php @@ -11,18 +11,16 @@ final class CountOperator implements OperatorInterface { - private $count = 0; - private $predicate; - - public function __construct(callable $predicate = null) - { - $this->predicate = $predicate; + public function __construct( + private readonly null|\Closure $predicate = null, + private int $count = 0 + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $callbackObserver = new CallbackObserver( - function ($x) use ($observer) { + function ($x) use ($observer): void { if ($this->predicate === null) { $this->count++; @@ -37,8 +35,8 @@ function ($x) use ($observer) { $observer->onError($e); } }, - [$observer, 'onError'], - function () use ($observer) { + fn ($err) => $observer->onError($err), + function () use ($observer): void { $observer->onNext($this->count); $observer->onCompleted(); } diff --git a/src/Operator/DefaultIfEmptyOperator.php b/src/Operator/DefaultIfEmptyOperator.php index 01e61ffd..9c0cba73 100644 --- a/src/Operator/DefaultIfEmptyOperator.php +++ b/src/Operator/DefaultIfEmptyOperator.php @@ -12,27 +12,22 @@ final class DefaultIfEmptyOperator implements OperatorInterface { - /** @var ObservableInterface */ - private $observable; - - /** @var bool */ - private $passThrough = false; - - public function __construct(ObservableInterface $observable) - { - $this->observable = $observable; + public function __construct( + private ObservableInterface $observable, + private bool $passThrough = false + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $disposable = new SerialDisposable(); $cbObserver = new CallbackObserver( - function ($x) use ($observer) { + function ($x) use ($observer): void { $this->passThrough = true; $observer->onNext($x); }, - [$observer, 'onError'], - function () use ($observer, $disposable) { + fn ($err) => $observer->onError($err), + function () use ($observer, $disposable): void { if (!$this->passThrough) { $disposable->setDisposable($this->observable->subscribe($observer)); return; diff --git a/src/Operator/DeferOperator.php b/src/Operator/DeferOperator.php index 2459deea..8b6faa8c 100644 --- a/src/Operator/DeferOperator.php +++ b/src/Operator/DeferOperator.php @@ -12,12 +12,8 @@ final class DeferOperator implements OperatorInterface { - /* @var Callable */ - private $factory; - - public function __construct(callable $factory) + public function __construct(private $factory) { - $this->factory = $factory; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface diff --git a/src/Operator/DelayOperator.php b/src/Operator/DelayOperator.php index 6e486683..86c7bd47 100644 --- a/src/Operator/DelayOperator.php +++ b/src/Operator/DelayOperator.php @@ -16,23 +16,16 @@ final class DelayOperator implements OperatorInterface { - /** @var int */ - private $delayTime; - - /** @var \SplQueue */ - private $queue; + private \SplQueue $queue; /** @var DisposableInterface */ private $schedulerDisposable; - /** @var AsyncSchedulerInterface */ - private $scheduler; - - public function __construct(int $delayTime, AsyncSchedulerInterface $scheduler) - { - $this->delayTime = $delayTime; + public function __construct( + private readonly int $delayTime, + private readonly AsyncSchedulerInterface $scheduler + ) { $this->queue = new \SplQueue(); - $this->scheduler = $scheduler; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -41,18 +34,18 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $disp = $observable ->materialize() ->timestamp($this->scheduler) - ->map(function (Timestamped $x) { + ->map(function (Timestamped $x): \Rx\Timestamped { return new Timestamped($x->getTimestampMillis() + $this->delayTime, $x->getValue()); }) ->subscribe(new CallbackObserver( - function (Timestamped $x) use ($observer) { + function (Timestamped $x) use ($observer): void { if ($x->getValue() instanceof Notification\OnErrorNotification) { $x->getValue()->accept($observer); return; } $this->queue->enqueue($x); if ($this->schedulerDisposable === null) { - $doScheduledStuff = function () use ($observer, &$doScheduledStuff) { + $doScheduledStuff = function () use ($observer, &$doScheduledStuff): void { while ((!$this->queue->isEmpty()) && $this->scheduler->now() >= $this->queue->bottom()->getTimestampMillis()) { /** @var Timestamped $item */ $item = $this->queue->dequeue(); @@ -77,7 +70,7 @@ function (Timestamped $x) use ($observer) { [$observer, 'onError'] )); - return new CallbackDisposable(function () use ($disp) { + return new CallbackDisposable(function () use ($disp): void { if ($this->schedulerDisposable) { $this->schedulerDisposable->dispose(); } diff --git a/src/Operator/DematerializeOperator.php b/src/Operator/DematerializeOperator.php index 791cf0de..133fd913 100644 --- a/src/Operator/DematerializeOperator.php +++ b/src/Operator/DematerializeOperator.php @@ -15,11 +15,11 @@ final class DematerializeOperator implements OperatorInterface public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { return $observable->subscribe(new CallbackObserver( - function (Notification $x) use ($observer) { + function (Notification $x) use ($observer): void { $x->accept($observer); }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() )); } } diff --git a/src/Operator/DistinctOperator.php b/src/Operator/DistinctOperator.php index 095c63f3..87b06b9f 100644 --- a/src/Operator/DistinctOperator.php +++ b/src/Operator/DistinctOperator.php @@ -13,17 +13,10 @@ final class DistinctOperator implements OperatorInterface { - - /** @var callable */ - protected $keySelector; - - /** @var callable */ - protected $comparer; - - public function __construct(callable $keySelector = null, callable $comparer = null) - { - $this->comparer = $comparer; - $this->keySelector = $keySelector; + public function __construct( + private readonly null|\Closure $keySelector = null, + private readonly null|\Closure $comparer = null + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -58,8 +51,8 @@ function ($value) use ($observer, &$values) { return $observer->onError($e); } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($callbackObserver); diff --git a/src/Operator/DistinctUntilChangedOperator.php b/src/Operator/DistinctUntilChangedOperator.php index 11a98ab5..bd7c1dd1 100644 --- a/src/Operator/DistinctUntilChangedOperator.php +++ b/src/Operator/DistinctUntilChangedOperator.php @@ -11,17 +11,13 @@ final class DistinctUntilChangedOperator implements OperatorInterface { - protected $keySelector; - - protected $comparer; - - public function __construct(callable $keySelector = null, callable $comparer = null) - { - $this->comparer = $comparer ?: function ($x, $y) { + public function __construct( + private readonly null|\Closure $keySelector = null, + protected null|\Closure $comparer = null + ) { + $this->comparer = $comparer ?: function ($x, $y): bool { return $x == $y; }; - - $this->keySelector = $keySelector; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -55,8 +51,8 @@ function ($value) use ($observer, &$hasCurrentKey, &$currentKey) { } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($cbObserver); diff --git a/src/Operator/DoOnEachOperator.php b/src/Operator/DoOnEachOperator.php index 4358757d..b3fcc2e6 100644 --- a/src/Operator/DoOnEachOperator.php +++ b/src/Operator/DoOnEachOperator.php @@ -11,11 +11,8 @@ final class DoOnEachOperator implements OperatorInterface { - private $onEachObserver; - - public function __construct(ObserverInterface $observer) + public function __construct(private ObserverInterface $onEachObserver) { - $this->onEachObserver = $observer; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface diff --git a/src/Operator/FilterOperator.php b/src/Operator/FilterOperator.php index a6e7bea7..3ddcff3c 100644 --- a/src/Operator/FilterOperator.php +++ b/src/Operator/FilterOperator.php @@ -11,17 +11,14 @@ final class FilterOperator implements OperatorInterface { - private $predicate; - - public function __construct(callable $predicate) + public function __construct(private readonly null|\Closure $predicate) { - $this->predicate = $predicate; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $selectObserver = new CallbackObserver( - function ($nextValue) use ($observer) { + function ($nextValue) use ($observer): void { $shouldFire = false; try { $shouldFire = ($this->predicate)($nextValue); @@ -33,8 +30,8 @@ function ($nextValue) use ($observer) { $observer->onNext($nextValue); } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($selectObserver); diff --git a/src/Operator/FinallyOperator.php b/src/Operator/FinallyOperator.php index e9ca6fd2..d7f3ecf8 100644 --- a/src/Operator/FinallyOperator.php +++ b/src/Operator/FinallyOperator.php @@ -10,22 +10,10 @@ final class FinallyOperator implements OperatorInterface { - /** @var callable */ - private $callback; - - /** - * @param callable $callback - */ - public function __construct(callable $callback) + public function __construct(private readonly null|\Closure $callback) { - $this->callback = $callback; } - /** - * @param \Rx\ObservableInterface $observable - * @param \Rx\ObserverInterface $observer - * @return \Rx\DisposableInterface - */ public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { return new BinaryDisposable( diff --git a/src/Operator/GroupByUntilOperator.php b/src/Operator/GroupByUntilOperator.php index 62946d73..9ca86d16 100644 --- a/src/Operator/GroupByUntilOperator.php +++ b/src/Operator/GroupByUntilOperator.php @@ -16,14 +16,13 @@ final class GroupByUntilOperator implements OperatorInterface { - private $keySelector; - private $elementSelector; - private $durationSelector; - private $keySerializer; - private $map = []; - - public function __construct(callable $keySelector, callable $elementSelector = null, callable $durationSelector = null, callable $keySerializer = null) - { + public function __construct( + private readonly null|\Closure $keySelector, + private null|\Closure $elementSelector = null, + private null|\Closure $durationSelector = null, + private null|\Closure $keySerializer = null, + private array $map = [] + ) { if (null === $elementSelector) { $elementSelector = function ($elem) { return $elem; @@ -42,7 +41,6 @@ public function __construct(callable $keySelector, callable $elementSelector = n }; } - $this->keySelector = $keySelector; $this->elementSelector = $elementSelector; $this->durationSelector = $durationSelector; $this->keySerializer = $keySerializer; @@ -54,17 +52,15 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $refCountDisposable = new RefCountDisposable($groupDisposable); $sourceEmits = true; - $handleError = function (\Throwable $e) use ($observer, &$sourceEmits) { + $handleError = function (\Throwable $e) use ($observer, &$sourceEmits): void { foreach ($this->map as $w) { $w->onError($e); } - if ($sourceEmits) { - $observer->onError($e); - } + $observer->onError($e); }; $subscription = $observable->subscribe( - function ($element) use ($observer, $handleError, $refCountDisposable, $groupDisposable, &$sourceEmits) { + function ($element) use ($observer, $handleError, $refCountDisposable, $groupDisposable, &$sourceEmits): void { try { $key = call_user_func($this->keySelector, $element); $serializedKey = call_user_func($this->keySerializer, $key); @@ -98,7 +94,7 @@ function ($element) use ($observer, $handleError, $refCountDisposable, $groupDis $durationSubscription = $duration->take(1)->subscribe( null, $handleError, - function () use ($groupDisposable, $md, $writer, $serializedKey) { + function () use ($groupDisposable, $md, $writer, $serializedKey): void { unset($this->map[$serializedKey]); $writer->onCompleted(); @@ -120,18 +116,16 @@ function () use ($groupDisposable, $md, $writer, $serializedKey) { $this->map[$serializedKey]->onNext($element); }, $handleError, - function () use ($observer, &$sourceEmits) { + function () use ($observer, &$sourceEmits): void { foreach ($this->map as $w) { $w->onCompleted(); } - if ($sourceEmits) { - $observer->onCompleted(); - } + $observer->onCompleted(); }); $groupDisposable->add($subscription); - return new CallbackDisposable(function () use (&$sourceEmits, $refCountDisposable) { + return new CallbackDisposable(function () use (&$sourceEmits, $refCountDisposable): void { $sourceEmits = false; $refCountDisposable->dispose(); }); diff --git a/src/Operator/IsEmptyOperator.php b/src/Operator/IsEmptyOperator.php index d8bf7ca8..4d5c9976 100644 --- a/src/Operator/IsEmptyOperator.php +++ b/src/Operator/IsEmptyOperator.php @@ -12,12 +12,12 @@ final class IsEmptyOperator implements OperatorInterface public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { return $observable->subscribe( - function() use ($observer) { + function() use ($observer): void { $observer->onNext(false); $observer->onCompleted(); }, - [$observer, 'onError'], - function() use ($observer) { + fn ($err) => $observer->onError($err), + function() use ($observer): void { $observer->onNext(true); $observer->onCompleted(); } diff --git a/src/Operator/MapOperator.php b/src/Operator/MapOperator.php index 38436d79..bd550065 100644 --- a/src/Operator/MapOperator.php +++ b/src/Operator/MapOperator.php @@ -13,11 +13,8 @@ final class MapOperator implements OperatorInterface { - private $selector; - - public function __construct(callable $selector) + public function __construct(private $selector) { - $this->selector = $selector; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -26,7 +23,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $disposable = new CompositeDisposable(); $selectObserver = new CallbackObserver( - function ($nextValue) use ($observer, &$disposed) { + function ($nextValue) use ($observer, &$disposed): void { $value = null; try { @@ -34,15 +31,13 @@ function ($nextValue) use ($observer, &$disposed) { } catch (\Throwable $e) { $observer->onError($e); } - if (!$disposed) { - $observer->onNext($value); - } + $observer->onNext($value); }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); - $disposable->add(new CallbackDisposable(function () use (&$disposed) { + $disposable->add(new CallbackDisposable(function () use (&$disposed): void { $disposed = true; })); diff --git a/src/Operator/MaterializeOperator.php b/src/Operator/MaterializeOperator.php index 6859fcfc..bafcfbdc 100644 --- a/src/Operator/MaterializeOperator.php +++ b/src/Operator/MaterializeOperator.php @@ -17,14 +17,14 @@ final class MaterializeOperator implements OperatorInterface public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { return $observable->subscribe(new CallbackObserver( - function ($x) use ($observer) { + function ($x) use ($observer): void { $observer->onNext(new OnNextNotification($x)); }, - function ($error) use ($observer) { + function ($error) use ($observer): void { $observer->onNext(new OnErrorNotification($error)); $observer->onCompleted(); }, - function () use ($observer) { + function () use ($observer): void { $observer->onNext(new OnCompletedNotification()); $observer->onCompleted(); } diff --git a/src/Operator/MaxOperator.php b/src/Operator/MaxOperator.php index d444dd5e..79ba87a1 100644 --- a/src/Operator/MaxOperator.php +++ b/src/Operator/MaxOperator.php @@ -11,12 +11,10 @@ final class MaxOperator implements OperatorInterface { - private $comparer; - - public function __construct(callable $comparer = null) + public function __construct(private null|\Closure $comparer = null) { if ($comparer === null) { - $comparer = function ($x, $y) { + $comparer = function ($x, $y): int { return $x > $y ? 1 : ($x < $y ? -1 : 0); }; } @@ -30,7 +28,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $comparing = false; return $observable->subscribe(new CallbackObserver( - function ($x) use (&$comparing, &$previousMax, $observer) { + function ($x) use (&$comparing, &$previousMax, $observer): void { if (!$comparing) { $comparing = true; $previousMax = $x; @@ -47,8 +45,8 @@ function ($x) use (&$comparing, &$previousMax, $observer) { $observer->onError($e); } }, - [$observer, 'onError'], - function () use (&$comparing, &$previousMax, $observer) { + fn ($err) => $observer->onError($err), + function () use (&$comparing, &$previousMax, $observer): void { if ($comparing) { $observer->onNext($previousMax); $observer->onCompleted(); diff --git a/src/Operator/MergeAllOperator.php b/src/Operator/MergeAllOperator.php index 5cd63403..22fa83ee 100644 --- a/src/Operator/MergeAllOperator.php +++ b/src/Operator/MergeAllOperator.php @@ -22,19 +22,19 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $group->add($sourceSubscription); $callbackObserver = new CallbackObserver( - function (ObservableInterface $innerSource) use (&$group, &$isStopped, $observer) { + function (ObservableInterface $innerSource) use (&$group, &$isStopped, $observer): void { $innerSubscription = new SingleAssignmentDisposable(); $group->add($innerSubscription); $innerSubscription->setDisposable( $innerSource->subscribe(new CallbackObserver( - function ($nextValue) use ($observer) { + function ($nextValue) use ($observer): void { $observer->onNext($nextValue); }, - function ($error) use ($observer) { + function ($error) use ($observer): void { $observer->onError($error); }, - function () use (&$group, &$innerSubscription, &$isStopped, $observer) { + function () use (&$group, &$innerSubscription, &$isStopped, $observer): void { $group->remove($innerSubscription); if ($isStopped && $group->count() === 1) { @@ -44,8 +44,8 @@ function () use (&$group, &$innerSubscription, &$isStopped, $observer) { )) ); }, - [$observer, 'onError'], - function () use (&$group, &$isStopped, $observer) { + fn ($err) => $observer->onError($err), + function () use (&$group, &$isStopped, $observer): void { $isStopped = true; if ($group->count() === 1) { $observer->onCompleted(); diff --git a/src/Operator/MinOperator.php b/src/Operator/MinOperator.php index 4bd85389..a46d7f2a 100644 --- a/src/Operator/MinOperator.php +++ b/src/Operator/MinOperator.php @@ -11,12 +11,10 @@ final class MinOperator implements OperatorInterface { - private $comparer; - - public function __construct(callable $comparer = null) + public function __construct(private null|\Closure $comparer = null) { if ($comparer === null) { - $comparer = function ($x, $y) { + $comparer = function ($x, $y): int { return $x > $y ? 1 : ($x < $y ? -1 : 0); }; } @@ -30,7 +28,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $comparing = false; return $observable->subscribe(new CallbackObserver( - function ($x) use (&$comparing, &$previousMin, $observer) { + function ($x) use (&$comparing, &$previousMin, $observer): void { if (!$comparing) { $comparing = true; $previousMin = $x; @@ -47,8 +45,8 @@ function ($x) use (&$comparing, &$previousMin, $observer) { $observer->onError($e); } }, - [$observer, 'onError'], - function () use (&$comparing, &$previousMin, $observer) { + fn ($err) => $observer->onError($err), + function () use (&$comparing, &$previousMin, $observer): void { if ($comparing) { $observer->onNext($previousMin); $observer->onCompleted(); diff --git a/src/Operator/RaceOperator.php b/src/Operator/RaceOperator.php index b5438267..8eb1fc53 100644 --- a/src/Operator/RaceOperator.php +++ b/src/Operator/RaceOperator.php @@ -15,17 +15,15 @@ final class RaceOperator implements OperatorInterface { - /** @var bool */ - private $hasFirst = false; + private bool $hasFirst = false; /** @var Observable[] */ - private $observables = []; + private ?array $observables = []; /** @var DisposableInterface[] */ - private $subscriptions = []; + private array $subscriptions = []; - /** @var CompositeDisposable */ - private $innerSubscription; + private CompositeDisposable $innerSubscription; public function __construct() @@ -37,11 +35,11 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs { $callbackObserver = new CallbackObserver( - function (Observable $innerObservable) { + function (Observable $innerObservable): void { $this->observables[] = $innerObservable; }, - [$observer, 'onError'], - function () use ($observer) { + fn ($err) => $observer->onError($err), + function () use ($observer): void { if (count($this->observables) === 0) { $observer->onCompleted(); @@ -65,10 +63,10 @@ function () use ($observer) { } - private function subscribeToResult(ObservableInterface $observable, ObserverInterface $observer, $outerIndex) + private function subscribeToResult(ObservableInterface $observable, ObserverInterface $observer, $outerIndex): \Rx\DisposableInterface { return $observable->subscribe(new CallbackObserver( - function ($value) use ($observer, $outerIndex) { + function ($value) use ($observer, $outerIndex): void { if (!$this->hasFirst) { $this->hasFirst = true; @@ -85,8 +83,8 @@ function ($value) use ($observer, $outerIndex) { $observer->onNext($value); }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() )); } diff --git a/src/Operator/ReduceOperator.php b/src/Operator/ReduceOperator.php index 6ff158f9..399e0c70 100644 --- a/src/Operator/ReduceOperator.php +++ b/src/Operator/ReduceOperator.php @@ -11,19 +11,10 @@ final class ReduceOperator implements OperatorInterface { - /** @var callable */ - protected $accumulator; - protected $seed; - protected $hasSeed; + protected bool $hasSeed; - /** - * @param callable $accumulator - * @param $seed - */ - public function __construct(callable $accumulator, $seed) + public function __construct(private readonly null|\Closure $accumulator, protected $seed) { - $this->accumulator = $accumulator; - $this->seed = $seed; $this->hasSeed = null !== $seed; } @@ -33,7 +24,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $accumulation = null; $hasValue = false; $cbObserver = new CallbackObserver( - function ($x) use ($observer, &$hasAccumulation, &$accumulation, &$hasValue) { + function ($x) use ($observer, &$hasAccumulation, &$accumulation, &$hasValue): void { $hasValue = true; @@ -48,10 +39,10 @@ function ($x) use ($observer, &$hasAccumulation, &$accumulation, &$hasValue) { $observer->onError($e); } }, - function ($e) use ($observer) { + function ($e) use ($observer): void { $observer->onError($e); }, - function () use ($observer, &$hasAccumulation, &$accumulation, &$hasValue) { + function () use ($observer, &$hasAccumulation, &$accumulation, &$hasValue): void { if ($hasValue) { $observer->onNext($accumulation); } else { diff --git a/src/Operator/RepeatOperator.php b/src/Operator/RepeatOperator.php index e11ccdae..29d78052 100644 --- a/src/Operator/RepeatOperator.php +++ b/src/Operator/RepeatOperator.php @@ -13,9 +13,7 @@ final class RepeatOperator implements OperatorInterface { - private $repeatCount; - - public function __construct(int $repeatCount = -1) + public function __construct(private int $repeatCount = -1) { if ($repeatCount < 0) { $repeatCount = -1; @@ -30,11 +28,11 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $disposable = new SerialDisposable(); - $subscribe = function () use (&$disposable, $observable, $observer, &$completeCount, &$subscribe) { + $subscribe = function () use (&$disposable, $observable, $observer, &$completeCount, &$subscribe): void { $disposable->setDisposable($observable->subscribe(new CallbackObserver( - [$observer, 'onNext'], - [$observer, 'onError'], - function () use (&$completeCount, $observable, $observer, &$disposable, &$subscribe) { + fn ($x) => $observer->onNext($x), + fn ($err) => $observer->onError($err), + function () use (&$completeCount, $observable, $observer, &$disposable, &$subscribe): void { $completeCount++; if ($this->repeatCount === -1 || $completeCount < $this->repeatCount) { $subscribe(); @@ -49,7 +47,7 @@ function () use (&$completeCount, $observable, $observer, &$disposable, &$subscr $subscribe(); - return new CallbackDisposable(function () use (&$disposable) { + return new CallbackDisposable(function () use (&$disposable): void { $disposable->dispose(); }); } diff --git a/src/Operator/RepeatWhenOperator.php b/src/Operator/RepeatWhenOperator.php index ccc84cfe..54bbdc45 100644 --- a/src/Operator/RepeatWhenOperator.php +++ b/src/Operator/RepeatWhenOperator.php @@ -15,36 +15,18 @@ final class RepeatWhenOperator implements OperatorInterface { - /** @var callable */ - private $notificationHandler; - - /** @var Subject */ - private $completions; - - /** @var Subject */ - private $notifier; - - /** @var CompositeDisposable */ - private $disposable; - - /** @var bool */ - private $repeat; - - /** @var int */ - private $count; - - /** @var bool */ - private $sourceComplete; - - public function __construct(callable $notificationHandler) + private Subject $completions; + private Subject $notifier; + private CompositeDisposable $disposable; + private bool $repeat = true; + private int $count = 0; + private bool $sourceComplete = false; + + public function __construct(private $notificationHandler) { - $this->notificationHandler = $notificationHandler; $this->completions = new Subject(); $this->disposable = new CompositeDisposable(); $this->notifier = new Subject(); - $this->repeat = true; - $this->count = 0; - $this->sourceComplete = false; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -52,12 +34,12 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $outerDisposable = new SerialDisposable(); $this->disposable->add($outerDisposable); - $subscribe = function () use ($outerDisposable, $observable, $observer, &$subscribe) { + $subscribe = function () use ($outerDisposable, $observable, $observer, &$subscribe): void { $this->sourceComplete = false; $outerSubscription = $observable->subscribe(new CallbackObserver( - [$observer, 'onNext'], - [$observer, 'onError'], - function () use ($observer, &$subscribe, $outerDisposable) { + fn ($x) => $observer->onNext($x), + fn ($err) => $observer->onError($err), + function () use ($observer, &$subscribe, $outerDisposable): void { $this->sourceComplete = true; if (!$this->repeat) { $observer->onCompleted(); @@ -72,14 +54,14 @@ function () use ($observer, &$subscribe, $outerDisposable) { }; $notifierDisposable = $this->notifier->subscribe(new CallbackObserver( - function () use (&$subscribe) { + function () use (&$subscribe): void { $subscribe(); }, - function ($ex) use ($observer) { + function ($ex) use ($observer): void { $this->repeat = false; $observer->onError($ex); }, - function () use ($observer) { + function () use ($observer): void { $this->repeat = false; if ($this->sourceComplete) { $observer->onCompleted(); diff --git a/src/Operator/RetryOperator.php b/src/Operator/RetryOperator.php index b2eaf85b..ef8960e6 100644 --- a/src/Operator/RetryOperator.php +++ b/src/Operator/RetryOperator.php @@ -13,21 +13,18 @@ final class RetryOperator implements OperatorInterface { - private $retryCount; - - public function __construct(int $retryCount = -1) + public function __construct(private int $retryCount = -1) { - $this->retryCount = $retryCount; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $disposable = new SerialDisposable(); - $getNewObserver = function () use ($observable, $observer, $disposable, &$getNewObserver) { + $getNewObserver = function () use ($observable, $observer, $disposable, &$getNewObserver): \Rx\Observer\CallbackObserver { return new CallbackObserver( - [$observer, 'onNext'], - function ($error) use ($observable, $observer, $disposable, &$getNewObserver) { + fn ($x) => $observer->onNext($x), + function ($error) use ($observable, $observer, $disposable, &$getNewObserver): void { $this->retryCount--; if ($this->retryCount === 0) { $observer->onError($error); @@ -37,7 +34,7 @@ function ($error) use ($observable, $observer, $disposable, &$getNewObserver) { $subscription = $observable->subscribe($getNewObserver()); $disposable->setDisposable($subscription); }, - function () use ($observer) { + function () use ($observer): void { $observer->onCompleted(); $this->retryCount = 0; } @@ -47,7 +44,7 @@ function () use ($observer) { $subscription = $observable->subscribe($getNewObserver()); $disposable->setDisposable($subscription); - return new CallbackDisposable(function () use (&$disposable) { + return new CallbackDisposable(function () use (&$disposable): void { $disposable->dispose(); }); } diff --git a/src/Operator/RetryWhenOperator.php b/src/Operator/RetryWhenOperator.php index 17a91350..5bbc93df 100644 --- a/src/Operator/RetryWhenOperator.php +++ b/src/Operator/RetryWhenOperator.php @@ -14,11 +14,8 @@ final class RetryWhenOperator implements OperatorInterface { - private $notificationHandler; - - public function __construct(callable $notificationHandler) + public function __construct(private $notificationHandler) { - $this->notificationHandler = $notificationHandler; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -36,10 +33,10 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs return new EmptyDisposable(); } - $subscribeToSource = function () use ($observer, $disposable, $observable, &$sourceError, $errors, &$sourceDisposable, &$innerCompleted) { + $subscribeToSource = function () use ($observer, $disposable, $observable, &$sourceError, $errors, &$sourceDisposable, &$innerCompleted): void { $sourceError = false; $sourceDisposable = $observable->subscribe(new CallbackObserver( - [$observer, 'onNext'], + fn ($x) => $observer->onNext($x), function ($err) use ( &$sourceError, $errors, @@ -47,7 +44,7 @@ function ($err) use ( &$sourceDisposable, &$innerCompleted, $observer - ) { + ): void { $sourceError = true; $disposable->remove($sourceDisposable); $sourceDisposable->dispose(); @@ -58,21 +55,21 @@ function ($err) use ( } $errors->onNext($err); }, - [$observer, 'onCompleted'] + fn () => $observer->onCompleted() )); $disposable->add($sourceDisposable); }; $whenDisposable = $when->subscribe(new CallbackObserver( - function ($x) use ($subscribeToSource, &$sourceError) { + function ($x) use ($subscribeToSource, &$sourceError): void { if ($sourceError) { $sourceError = false; $subscribeToSource(); } }, - [$observer, 'onError'], - function () use (&$innerCompleted, &$sourceError, $observer) { + fn ($err) => $observer->onError($err), + function () use (&$innerCompleted, &$sourceError, $observer): void { $innerCompleted = true; if ($sourceError) { $observer->onCompleted(); diff --git a/src/Operator/ScanOperator.php b/src/Operator/ScanOperator.php index 3b38a4b3..efff9f03 100644 --- a/src/Operator/ScanOperator.php +++ b/src/Operator/ScanOperator.php @@ -11,14 +11,10 @@ final class ScanOperator implements OperatorInterface { - private $accumulator; - - private $seed; - - public function __construct(callable $accumulator, $seed = null) - { - $this->accumulator = $accumulator; - $this->seed = $seed; + public function __construct( + private readonly null|\Closure $accumulator, + private $seed = null + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -28,7 +24,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $accumulation = $this->seed; $hasSeed = $this->seed !== null; $cbObserver = new CallbackObserver( - function ($x) use ($observer, &$hasAccumulation, &$accumulation, &$hasSeed, &$hasValue) { + function ($x) use ($observer, &$hasAccumulation, &$accumulation, &$hasSeed, &$hasValue): void { $hasValue = true; if ($hasAccumulation) { $accumulation = ($this->tryCatch($this->accumulator))($accumulation, $x); @@ -42,8 +38,8 @@ function ($x) use ($observer, &$hasAccumulation, &$accumulation, &$hasSeed, &$ha } $observer->onNext($accumulation); }, - [$observer, 'onError'], - function () use ($observer, &$hasValue, &$hasSeed) { + fn ($err) => $observer->onError($err), + function () use ($observer, &$hasValue, &$hasSeed): void { if (!$hasValue && $hasSeed) { $observer->onNext($this->seed); } diff --git a/src/Operator/SkipLastOperator.php b/src/Operator/SkipLastOperator.php index 45f97c68..3129a0bc 100644 --- a/src/Operator/SkipLastOperator.php +++ b/src/Operator/SkipLastOperator.php @@ -11,14 +11,10 @@ final class SkipLastOperator implements OperatorInterface { - private $count; + private array $q = []; - /** @var array */ - private $q; - - public function __construct(int $count) + public function __construct(private readonly int $count) { - $this->count = $count; if ($this->count < 0) { throw new \InvalidArgumentException('Argument Out of Range'); } @@ -28,14 +24,14 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs { $this->q = []; $cbObserver = new CallbackObserver( - function ($x) use ($observer) { + function ($x) use ($observer): void { $this->q[] = $x; if (count($this->q) > $this->count) { $observer->onNext(array_shift($this->q)); } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($cbObserver); diff --git a/src/Operator/SkipOperator.php b/src/Operator/SkipOperator.php index 56c6f6cf..b6373dd7 100644 --- a/src/Operator/SkipOperator.php +++ b/src/Operator/SkipOperator.php @@ -11,9 +11,7 @@ final class SkipOperator implements OperatorInterface { - private $count; - - public function __construct(int $count) + public function __construct(private int $count) { if ($count < 0) { throw new \InvalidArgumentException('Count must be >= 0'); @@ -27,15 +25,15 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $remaining = $this->count; $cbObserver = new CallbackObserver( - function ($nextValue) use ($observer, &$remaining) { + function ($nextValue) use ($observer, &$remaining): void { if ($remaining <= 0) { $observer->onNext($nextValue); } else { $remaining--; } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($cbObserver); diff --git a/src/Operator/SkipUntilOperator.php b/src/Operator/SkipUntilOperator.php index f38107d2..787c7f2a 100644 --- a/src/Operator/SkipUntilOperator.php +++ b/src/Operator/SkipUntilOperator.php @@ -13,11 +13,8 @@ final class SkipUntilOperator implements OperatorInterface { - private $other; - - public function __construct(ObservableInterface $other) + public function __construct(private ObservableInterface $other) { - $this->other = $other; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -28,28 +25,28 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs /** @var DisposableInterface $otherDisposable */ $otherDisposable = $this->other->subscribe(new CallbackObserver( - function ($x) use (&$isOpen, &$otherDisposable) { + function ($x) use (&$isOpen, &$otherDisposable): void { $isOpen = true; $otherDisposable->dispose(); }, - function ($e) use ($observer) { + function ($e) use ($observer): void { $observer->onError($e); }, - function () use (&$otherDisposable) { + function () use (&$otherDisposable): void { $otherDisposable->dispose(); } )); $sourceDisposable = $observable->subscribe(new CallbackObserver( - function ($x) use ($observer, &$isOpen) { + function ($x) use ($observer, &$isOpen): void { if ($isOpen) { $observer->onNext($x); } }, - function ($e) use ($observer) { + function ($e) use ($observer): void { $observer->onError($e); }, - function () use ($observer, &$isOpen) { + function () use ($observer, &$isOpen): void { if ($isOpen) { $observer->onCompleted(); } diff --git a/src/Operator/SkipWhileOperator.php b/src/Operator/SkipWhileOperator.php index 2e2206b8..56034373 100644 --- a/src/Operator/SkipWhileOperator.php +++ b/src/Operator/SkipWhileOperator.php @@ -11,22 +11,16 @@ final class SkipWhileOperator implements OperatorInterface { - /** @var callable */ - private $predicate; + private bool $isSkipping = true; - /** @var bool */ - private $isSkipping; - - public function __construct(callable $predicate) + public function __construct(private readonly null|\Closure $predicate) { - $this->predicate = $predicate; - $this->isSkipping = true; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $callbackObserver = new CallbackObserver( - function ($value) use ($observer, $observable) { + function ($value) use ($observer, $observable): void { try { if ($this->isSkipping) { @@ -41,8 +35,8 @@ function ($value) use ($observer, $observable) { $observer->onError($e); } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($callbackObserver); diff --git a/src/Operator/StartWithArrayOperator.php b/src/Operator/StartWithArrayOperator.php index 62441456..ed8a66e2 100644 --- a/src/Operator/StartWithArrayOperator.php +++ b/src/Operator/StartWithArrayOperator.php @@ -10,15 +10,12 @@ use Rx\ObserverInterface; use Rx\SchedulerInterface; -final class StartWithArrayOperator implements OperatorInterface +final readonly class StartWithArrayOperator implements OperatorInterface { - private $startArray; - private $scheduler; - - public function __construct(array $startArray, SchedulerInterface $scheduler) - { - $this->startArray = $startArray; - $this->scheduler = $scheduler; + public function __construct( + private array $startArray, + private SchedulerInterface $scheduler + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface diff --git a/src/Operator/SubscribeOnOperator.php b/src/Operator/SubscribeOnOperator.php index 473f4dcb..de7d9286 100644 --- a/src/Operator/SubscribeOnOperator.php +++ b/src/Operator/SubscribeOnOperator.php @@ -14,11 +14,8 @@ final class SubscribeOnOperator implements OperatorInterface { - private $scheduler; - - public function __construct(SchedulerInterface $scheduler) + public function __construct(private readonly SchedulerInterface $scheduler) { - $this->scheduler = $scheduler; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -28,7 +25,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $disposable->setDisposable($singleDisposable); $singleDisposable->setDisposable( - $this->scheduler->schedule(function () use ($disposable, $observer, $observable) { + $this->scheduler->schedule(function () use ($disposable, $observer, $observable): void { $subscription = $observable->subscribe($observer); $disposable->setDisposable(new ScheduledDisposable($this->scheduler, $subscription)); }) diff --git a/src/Operator/SwitchFirstOperator.php b/src/Operator/SwitchFirstOperator.php index 1dafe55c..f7d151b5 100644 --- a/src/Operator/SwitchFirstOperator.php +++ b/src/Operator/SwitchFirstOperator.php @@ -14,8 +14,8 @@ final class SwitchFirstOperator implements OperatorInterface { - private $isStopped = false; - private $hasCurrent = false; + private bool $isStopped = false; + private bool $hasCurrent = false; public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { @@ -25,7 +25,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $disposable->add($singleDisposable); $callbackObserver = new CallbackObserver( - function (Observable $x) use ($disposable, $observer) { + function (Observable $x) use ($disposable, $observer): void { if ($this->hasCurrent) { return; } @@ -35,9 +35,9 @@ function (Observable $x) use ($disposable, $observer) { $disposable->add($inner); $innerSub = $x->subscribe(new CallbackObserver( - [$observer, 'onNext'], - [$observer, 'onError'], - function () use ($disposable, $inner, $observer) { + fn ($x) => $observer->onNext($x), + fn ($err) => $observer->onError($err), + function () use ($disposable, $inner, $observer): void { $disposable->remove($inner); $this->hasCurrent = false; @@ -49,8 +49,8 @@ function () use ($disposable, $inner, $observer) { $inner->setDisposable($innerSub); }, - [$observer, 'onError'], - function () use ($disposable, $observer) { + fn ($err) => $observer->onError($err), + function () use ($disposable, $observer): void { $this->isStopped = true; if (!$this->hasCurrent && $disposable->count() === 1) { $observer->onCompleted(); diff --git a/src/Operator/SwitchLatestOperator.php b/src/Operator/SwitchLatestOperator.php index e3b5ad46..d0a319ba 100644 --- a/src/Operator/SwitchLatestOperator.php +++ b/src/Operator/SwitchLatestOperator.php @@ -14,29 +14,22 @@ final class SwitchLatestOperator implements OperatorInterface { - /** @var bool */ - private $hasLatest; + private bool $hasLatest = false; - /** @var bool */ - private $isStopped; + private bool $isStopped = false; - /** @var int */ - private $latest; + private int $latest = 0; - /** @var SerialDisposable */ - private $innerSubscription; + private SerialDisposable $innerSubscription; public function __construct() { - $this->hasLatest = false; - $this->isStopped = false; - $this->latest = 0; $this->innerSubscription = new SerialDisposable(); } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { - $onNext = function ($innerSource) use ($observer) { + $onNext = function ($innerSource) use ($observer): void { $innerDisposable = new SingleAssignmentDisposable(); $id = ++$this->latest; @@ -45,17 +38,17 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $this->innerSubscription->setDisposable($innerDisposable); $innerCallbackObserver = new CallbackObserver( - function ($x) use ($id, $observer) { + function ($x) use ($id, $observer): void { if ($this->latest === $id) { $observer->onNext($x); } }, - function ($e) use ($id, $observer) { + function ($e) use ($id, $observer): void { if ($this->latest === $id) { $observer->onError($e); } }, - function () use ($id, $observer) { + function () use ($id, $observer): void { if ($this->latest === $id) { $this->hasLatest = false; if ($this->isStopped) { @@ -71,8 +64,8 @@ function () use ($id, $observer) { $callbackObserver = new CallbackObserver( $onNext, - [$observer, 'onError'], - function () use ($observer) { + fn ($err) => $observer->onError($err), + function () use ($observer): void { $this->isStopped = true; if (!$this->hasLatest) { $observer->onCompleted(); diff --git a/src/Operator/TakeLastOperator.php b/src/Operator/TakeLastOperator.php index 81e3cae3..8a8b77c8 100644 --- a/src/Operator/TakeLastOperator.php +++ b/src/Operator/TakeLastOperator.php @@ -11,33 +11,27 @@ final class TakeLastOperator implements OperatorInterface { - /** @var integer */ - private $count; + private array $items = []; - /** @var array */ - private $items = []; - - public function __construct(int $count) + public function __construct(private readonly int $count) { if ($count < 0) { throw new \InvalidArgumentException('Count must be >= 0'); } - - $this->count = $count; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $callbackObserver = new CallbackObserver( - function ($nextValue) use ($observer) { + function ($nextValue) use ($observer): void { $this->items[] = $nextValue; if (count($this->items) > $this->count) { array_shift($this->items); } }, - [$observer, 'onError'], - function () use ($observer) { + fn ($err) => $observer->onError($err), + function () use ($observer): void { while (count($this->items) > 0) { $observer->onNext(array_shift($this->items)); diff --git a/src/Operator/TakeOperator.php b/src/Operator/TakeOperator.php index f9585e96..fdff2efc 100644 --- a/src/Operator/TakeOperator.php +++ b/src/Operator/TakeOperator.php @@ -11,15 +11,11 @@ final class TakeOperator implements OperatorInterface { - private $count; - - public function __construct(int $count) + public function __construct(private readonly int $count) { if ($count < 0) { throw new \InvalidArgumentException('Count must be >= 0'); } - - $this->count = $count; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -27,7 +23,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $remaining = $this->count; $callbackObserver = new CallbackObserver( - function ($nextValue) use ($observer, &$remaining) { + function ($nextValue) use ($observer, &$remaining): void { if ($remaining > 0) { $remaining--; $observer->onNext($nextValue); @@ -36,8 +32,8 @@ function ($nextValue) use ($observer, &$remaining) { } } }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($callbackObserver); diff --git a/src/Operator/TakeUntilOperator.php b/src/Operator/TakeUntilOperator.php index 4732bb7b..1b2979ce 100644 --- a/src/Operator/TakeUntilOperator.php +++ b/src/Operator/TakeUntilOperator.php @@ -12,11 +12,8 @@ final class TakeUntilOperator implements OperatorInterface { - private $other; - - public function __construct(ObservableInterface $other) + public function __construct(private ObservableInterface $other) { - $this->other = $other; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -25,7 +22,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs return new CompositeDisposable([ $this->other->subscribe( new CallbackObserver( - [$observer, 'onCompleted'], + fn () => $observer->onCompleted(), [$observer, 'onError'] ) ), diff --git a/src/Operator/TakeWhileOperator.php b/src/Operator/TakeWhileOperator.php index 8d0fb35b..f1cd25a2 100644 --- a/src/Operator/TakeWhileOperator.php +++ b/src/Operator/TakeWhileOperator.php @@ -11,18 +11,15 @@ final class TakeWhileOperator implements OperatorInterface { - private $predicate; - private $inclusive; - - public function __construct(callable $predicate, bool $inclusive = false) - { - $this->predicate = $predicate; - $this->inclusive = $inclusive; + public function __construct( + private readonly null|\Closure $predicate, + private readonly bool $inclusive = false + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { - $onNext = function ($value) use ($observer) { + $onNext = function ($value) use ($observer): void { try { if (($this->predicate)($value)) { $observer->onNext($value); @@ -39,8 +36,8 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $callbackObserver = new CallbackObserver( $onNext, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() ); return $observable->subscribe($callbackObserver); diff --git a/src/Operator/ThrottleOperator.php b/src/Operator/ThrottleOperator.php index 41dc9684..0cd349e5 100644 --- a/src/Operator/ThrottleOperator.php +++ b/src/Operator/ThrottleOperator.php @@ -16,18 +16,14 @@ final class ThrottleOperator implements OperatorInterface { - private $nextSend = 0; + private float|int $nextSend = 0; - private $throttleTime = 0; + private bool $completed = false; - private $completed = false; - - private $scheduler; - - public function __construct(int $debounceTime, SchedulerInterface $scheduler) - { - $this->throttleTime = $debounceTime; - $this->scheduler = $scheduler; + public function __construct( + private readonly int $throttleTime, + private readonly SchedulerInterface $scheduler + ) { } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface @@ -35,7 +31,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $innerDisp = new SerialDisposable(); $disp = $observable->subscribe(new CallbackObserver( - function ($x) use ($innerDisp, $observer) { + function ($x) use ($innerDisp, $observer): void { $now = $this->scheduler->now(); if ($this->nextSend <= $now) { $innerDisp->setDisposable(new EmptyDisposable()); @@ -47,7 +43,7 @@ function ($x) use ($innerDisp, $observer) { $newDisp = Observable::of($x, $this->scheduler) ->delay($this->nextSend - $now, $this->scheduler) ->subscribe(new CallbackObserver( - function ($x) use ($observer) { + function ($x) use ($observer): void { $observer->onNext($x); $this->nextSend = $this->scheduler->now() + $this->throttleTime - 1; if ($this->completed) { @@ -59,11 +55,11 @@ function ($x) use ($observer) { $innerDisp->setDisposable($newDisp); }, - function (\Throwable $e) use ($observer, $innerDisp) { + function (\Throwable $e) use ($observer, $innerDisp): void { $innerDisp->dispose(); $observer->onError($e); }, - function () use ($observer) { + function () use ($observer): void { $this->completed = true; if ($this->nextSend === 0) { $observer->onCompleted(); diff --git a/src/Operator/TimeoutOperator.php b/src/Operator/TimeoutOperator.php index 4802f805..12c8e392 100644 --- a/src/Operator/TimeoutOperator.php +++ b/src/Operator/TimeoutOperator.php @@ -16,19 +16,13 @@ final class TimeoutOperator implements OperatorInterface { - private $timeout; + public function __construct( + private readonly int $timeout, + private readonly AsyncSchedulerInterface $scheduler, + private null|ObservableInterface $timeoutObservable = null + ) { - private $scheduler; - - private $timeoutObservable; - - public function __construct(int $timeout, ObservableInterface $timeoutObservable = null, AsyncSchedulerInterface $scheduler) - { - $this->timeout = $timeout; - $this->scheduler = $scheduler; - $this->timeoutObservable = $timeoutObservable; - - if ($this->timeoutObservable === null) { + if (!$this->timeoutObservable instanceof \Rx\ObservableInterface) { $this->timeoutObservable = new ErrorObservable(new TimeoutException('timeout'), $scheduler); } } @@ -42,7 +36,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $sourceDisposable = new EmptyDisposable(); - $doTimeout = function () use ($observer, $disposable, &$sourceDisposable) { + $doTimeout = function () use ($observer, $disposable, &$sourceDisposable): void { $disposable->remove($sourceDisposable); $sourceDisposable->dispose(); $disposable->add($this->timeoutObservable->subscribe($observer)); @@ -51,7 +45,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $doTimeoutDisposable = $this->scheduler->schedule($doTimeout, $this->timeout); $disposable->add($doTimeoutDisposable); - $rescheduleTimeout = function () use ($disposable, &$doTimeoutDisposable, $doTimeout) { + $rescheduleTimeout = function () use ($disposable, &$doTimeoutDisposable, $doTimeout): void { $disposable->remove($doTimeoutDisposable); $doTimeoutDisposable->dispose(); @@ -60,15 +54,15 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs }; $sourceDisposable = $observable->subscribe(new CallbackObserver( - function ($x) use ($observer, $rescheduleTimeout) { + function ($x) use ($observer, $rescheduleTimeout): void { $rescheduleTimeout(); $observer->onNext($x); }, - function ($err) use ($observer, $rescheduleTimeout) { + function ($err) use ($observer, $rescheduleTimeout): void { $rescheduleTimeout(); $observer->onError($err); }, - function () use ($observer, $rescheduleTimeout) { + function () use ($observer, $rescheduleTimeout): void { $rescheduleTimeout(); $observer->onCompleted(); } diff --git a/src/Operator/TimestampOperator.php b/src/Operator/TimestampOperator.php index 7dbddf2e..3dd6dac4 100644 --- a/src/Operator/TimestampOperator.php +++ b/src/Operator/TimestampOperator.php @@ -13,21 +13,18 @@ final class TimestampOperator implements OperatorInterface { - private $scheduler; - - public function __construct(SchedulerInterface $scheduler = null) + public function __construct(private readonly null|SchedulerInterface $scheduler = null) { - $this->scheduler = $scheduler; } public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { return $observable->subscribe(new CallbackObserver( - function ($x) use ($observer) { + function ($x) use ($observer): void { $observer->onNext(new Timestamped($this->scheduler->now(), $x)); }, - [$observer, 'onError'], - [$observer, 'onCompleted'] + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted() )); } } diff --git a/src/Operator/ToArrayOperator.php b/src/Operator/ToArrayOperator.php index 19c5acdc..07752712 100644 --- a/src/Operator/ToArrayOperator.php +++ b/src/Operator/ToArrayOperator.php @@ -11,17 +11,16 @@ final class ToArrayOperator implements OperatorInterface { - /** @var array */ - private $arr = []; + private array $arr = []; public function __invoke(ObservableInterface $observable, ObserverInterface $observer): DisposableInterface { $cbObserver = new CallbackObserver( - function ($x) { + function ($x): void { $this->arr[] = $x; }, - [$observer, 'onError'], - function () use ($observer) { + fn ($err) => $observer->onError($err), + function () use ($observer): void { $observer->onNext($this->arr); $observer->onCompleted(); } diff --git a/src/Operator/WithLatestFromOperator.php b/src/Operator/WithLatestFromOperator.php index 5062fea4..6c3130bb 100644 --- a/src/Operator/WithLatestFromOperator.php +++ b/src/Operator/WithLatestFromOperator.php @@ -12,16 +12,13 @@ final class WithLatestFromOperator implements OperatorInterface { - /** @var ObservableInterface[] */ - private $observables; - - /** @var callable */ - private $resultSelector; - - public function __construct(array $observables, callable $resultSelector = null) - { + public function __construct( + /** @var ObservableInterface[] */ + private array $observables, + private null|\Closure $resultSelector = null + ) { if (null === $resultSelector) { - $resultSelector = function () { + $resultSelector = function (): array { return func_get_args(); }; } @@ -49,12 +46,12 @@ public function __invoke(ObservableInterface $source, ObserverInterface $observe $sad = new SingleAssignmentDisposable(); $subscription = $o->subscribe( - function ($value) use ($key, &$values, $count, &$hasAllValues) { + function ($value) use ($key, &$values, $count, &$hasAllValues): void { $values[$key] = $value; $hasAllValues = $count === count($values); }, - [$observer, 'onError'], - function () { + fn ($err) => $observer->onError($err), + function (): void { //noop }); @@ -64,7 +61,7 @@ function () { $outerSad = new SingleAssignmentDisposable(); $outerSad->setDisposable($source->subscribe( - function ($value) use ($observer, &$values, &$hasAllValues) { + function ($value) use ($observer, &$values, &$hasAllValues): void { ksort($values); $allValues = array_merge([$value], $values); @@ -79,8 +76,8 @@ function ($value) use ($observer, &$values, &$hasAllValues) { $observer->onError($ex); } }, - [$observer, 'onError'], - [$observer, 'onCompleted'])); + fn ($err) => $observer->onError($err), + fn () => $observer->onCompleted())); $subscriptions[] = $outerSad; return new CompositeDisposable($subscriptions); diff --git a/src/Operator/ZipOperator.php b/src/Operator/ZipOperator.php index 674661bd..ffe8fea5 100644 --- a/src/Operator/ZipOperator.php +++ b/src/Operator/ZipOperator.php @@ -12,30 +12,21 @@ final class ZipOperator implements OperatorInterface { - /** @var ObservableInterface[] */ - private $sources; - - /** @var callable */ - private $resultSelector; - /** @var \SplQueue[] */ - private $queues = []; - - /** @var int */ - private $completesRemaining = 0; - - /** @var int */ - private $numberOfSources; - + private array $queues = []; + private int $completesRemaining = 0; + private ?int $numberOfSources = null; /** @var bool[] */ - private $completed = []; + private array $completed = []; - public function __construct(array $sources, callable $resultSelector = null) - { - $this->sources = $sources; + public function __construct( + /** @var ObservableInterface[] */ + private array $sources, + private null|\Closure $resultSelector = null + ) { if ($resultSelector === null) { - $resultSelector = function () { + $resultSelector = function (): array { return func_get_args(); }; } @@ -61,7 +52,7 @@ public function __invoke(ObservableInterface $observable, ObserverInterface $obs $source = $this->sources[$i]; $cbObserver = new CallbackObserver( - function ($x) use ($i, $observer) { + function ($x) use ($i, $observer): void { // if there is another item in the sequence after one of the other source // observables completes, we need to complete at this time to match the // behavior of RxJS @@ -94,10 +85,10 @@ function ($x) use ($i, $observer) { $observer->onError($e); } }, - function ($e) use ($observer) { + function ($e) use ($observer): void { $observer->onError($e); }, - function () use ($i, $observer) { + function () use ($i, $observer): void { $this->completesRemaining--; $this->completed[$i] = true; if ($this->completesRemaining === 0) { diff --git a/src/React/Promise.php b/src/React/Promise.php index bd384191..104e9fa0 100644 --- a/src/React/Promise.php +++ b/src/React/Promise.php @@ -39,28 +39,25 @@ public static function rejected($exception): ReactPromise /** * Converts an existing observable sequence to React Promise * - * @param ObservableInterface $observable - * @param Deferred $deferred - * @return ReactPromise * @throws \InvalidArgumentException */ public static function fromObservable(ObservableInterface $observable, Deferred $deferred = null): ReactPromise { - $d = $deferred ?: new Deferred(function () use (&$subscription) { + $d = $deferred ?: new Deferred(function () use (&$subscription): void { $subscription->dispose(); }); $value = null; $subscription = $observable->subscribe( - function ($v) use (&$value) { + function ($v) use (&$value): void { $value = $v; }, - function ($error) use ($d) { + function ($error) use ($d): void { $d->reject($error); }, - function () use ($d, &$value) { + function () use ($d, &$value): void { $d->resolve($value); } ); @@ -71,8 +68,6 @@ function () use ($d, &$value) { /** * Converts a Promise to an Observable sequence * - * @param PromiseInterface $promise - * @return Observable * @throws \InvalidArgumentException */ public static function toObservable(PromiseInterface $promise): Observable @@ -80,19 +75,19 @@ public static function toObservable(PromiseInterface $promise): Observable $subject = new AsyncSubject(); $p = $promise->then( - function ($value) use ($subject) { + function ($value) use ($subject): void { $subject->onNext($value); $subject->onCompleted(); }, - function ($error) use ($subject) { + function ($error) use ($subject): void { $error = $error instanceof \Throwable ? $error : new RejectedPromiseException($error); $subject->onError($error); } ); - return new AnonymousObservable(function ($observer) use ($subject, $p) { + return new AnonymousObservable(function ($observer) use ($subject, $p): \Rx\Disposable\CallbackDisposable { $disp = $subject->subscribe($observer); - return new CallbackDisposable(function () use ($p, $disp) { + return new CallbackDisposable(function () use ($p, $disp): void { $disp->dispose(); if (\method_exists($p, 'cancel')) { $p->cancel(); diff --git a/src/React/PromiseFactory.php b/src/React/PromiseFactory.php index 7d7225ec..92482b5a 100644 --- a/src/React/PromiseFactory.php +++ b/src/React/PromiseFactory.php @@ -9,13 +9,11 @@ final class PromiseFactory /** * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. * - * @param callable $factory - * @return Observable * @throws \InvalidArgumentException */ public static function toObservable(callable $factory): Observable { - $observableFactory = function () use ($factory) { + $observableFactory = function () use ($factory): \Rx\Observable { return Promise::toObservable($factory()); }; diff --git a/src/Scheduler.php b/src/Scheduler.php index c37b672d..db51ec32 100644 --- a/src/Scheduler.php +++ b/src/Scheduler.php @@ -10,9 +10,9 @@ final class Scheduler { private static $default; private static $async; - private static $immediate; - private static $defaultFactory; - private static $asyncFactory; + private static null|ImmediateScheduler $immediate = null; + private static null|\Closure $defaultFactory = null; + private static null|\Closure $asyncFactory = null; public static function getDefault(): SchedulerInterface { @@ -29,7 +29,7 @@ public static function getDefault(): SchedulerInterface return static::$default; } - public static function setDefaultFactory(callable $factory) + public static function setDefaultFactory(callable $factory): void { if (static::$default !== null) { throw new \Exception("The default factory can not be set after the scheduler has been created"); @@ -44,7 +44,7 @@ public static function getAsync(): AsyncSchedulerInterface return static::$async; } - if (static::$asyncFactory === null && static::getDefault() instanceof AsyncSchedulerInterface) { + if (static::$asyncFactory === null && self::getDefault() instanceof AsyncSchedulerInterface) { static::$async = static::$default; return static::$async; } @@ -58,7 +58,7 @@ public static function getAsync(): AsyncSchedulerInterface return static::$async; } - public static function setAsyncFactory(callable $factory) + public static function setAsyncFactory(callable $factory): void { if (static::$async !== null) { throw new \Exception("The async factory can not be set after the scheduler has been created"); diff --git a/src/Scheduler/EventLoopScheduler.php b/src/Scheduler/EventLoopScheduler.php index 98059a1b..3324c9d4 100644 --- a/src/Scheduler/EventLoopScheduler.php +++ b/src/Scheduler/EventLoopScheduler.php @@ -12,24 +12,20 @@ final class EventLoopScheduler extends VirtualTimeScheduler { - private $nextTimer = PHP_INT_MAX; + private int $nextTimer = PHP_INT_MAX; - private $insideInvoke = false; + private bool $insideInvoke = false; private $delayCallback; private $currentTimer; - /** - * EventLoopScheduler constructor. - * @param callable|LoopInterface $timerCallableOrLoop - */ - public function __construct($timerCallableOrLoop) + public function __construct(\Closure|LoopInterface $timerCallableOrLoop) { $this->delayCallback = $timerCallableOrLoop instanceof LoopInterface ? - function ($ms, $callable) use ($timerCallableOrLoop) { + function ($ms, $callable) use ($timerCallableOrLoop): CallbackDisposable { $timer = $timerCallableOrLoop->addTimer($ms / 1000, $callable); - return new CallbackDisposable(function () use ($timer, $timerCallableOrLoop) { + return new CallbackDisposable(function () use ($timer, $timerCallableOrLoop): void { $timerCallableOrLoop->cancelTimer($timer); }); } : @@ -37,12 +33,12 @@ function ($ms, $callable) use ($timerCallableOrLoop) { $this->currentTimer = new EmptyDisposable(); - parent::__construct($this->now(), function ($a, $b) { + parent::__construct($this->now(), function ($a, $b): int|float { return $a - $b; }); } - private function scheduleStartup() + private function scheduleStartup(): void { if ($this->insideInvoke) { return; @@ -56,7 +52,7 @@ public function scheduleAbsoluteWithState($state, int $dueTime, callable $action { $disp = new CompositeDisposable([ parent::scheduleAbsoluteWithState($state, $dueTime, $action), - new CallbackDisposable(function () use ($dueTime) { + new CallbackDisposable(function () use ($dueTime): void { if ($dueTime > $this->nextTimer) { return; } @@ -77,7 +73,7 @@ public function scheduleAbsoluteWithState($state, int $dueTime, callable $action return $disp; } - public function start() + public function start(): void { $this->clock = $this->now(); diff --git a/src/Scheduler/ImmediateScheduler.php b/src/Scheduler/ImmediateScheduler.php index 42278aca..39217d5c 100644 --- a/src/Scheduler/ImmediateScheduler.php +++ b/src/Scheduler/ImmediateScheduler.php @@ -28,11 +28,11 @@ public function scheduleRecursive(callable $action): DisposableInterface $goAgain = true; $disposable = new CompositeDisposable(); - $recursiveAction = function () use ($action, &$goAgain, $disposable) { + $recursiveAction = function () use ($action, &$goAgain, $disposable): void { while ($goAgain) { $goAgain = false; $disposable->add($this->schedule(function () use ($action, &$goAgain) { - return $action(function () use (&$goAgain) { + return $action(function () use (&$goAgain): void { $goAgain = true; }); })); diff --git a/src/Scheduler/PriorityQueue.php b/src/Scheduler/PriorityQueue.php index 88e8d9c8..7fe15986 100644 --- a/src/Scheduler/PriorityQueue.php +++ b/src/Scheduler/PriorityQueue.php @@ -9,14 +9,14 @@ class PriorityQueue { - private $queue; + private InternalPriorityQueue $queue; public function __construct() { $this->queue = new InternalPriorityQueue; } - public function enqueue(ScheduledItem $item) + public function enqueue(ScheduledItem $item): void { $this->queue->insert($item, $item); } @@ -48,7 +48,7 @@ public function remove($item) return $removed; } - public function count() + public function count(): int { return $this->queue->count(); } @@ -70,9 +70,9 @@ public function dequeue() class InternalPriorityQueue extends SplPriorityQueue { // use this value to "stabilize" the priority queue - private $serial = PHP_INT_MAX; + private int $serial = PHP_INT_MAX; - public function insert($item, $priority) + public function insert($item, $priority): void { parent::insert($item, [$priority, $this->serial--]); } diff --git a/src/Scheduler/ScheduledItem.php b/src/Scheduler/ScheduledItem.php index 5b8bcb79..a10ee831 100644 --- a/src/Scheduler/ScheduledItem.php +++ b/src/Scheduler/ScheduledItem.php @@ -8,26 +8,22 @@ class ScheduledItem { - private $scheduler; - private $state; - private $action; - private $dueTime; - private $comparer; - private $disposable; - - public function __construct($scheduler, $state, $action, $dueTime, $comparer = null) - { - $this->scheduler = $scheduler; - $this->state = $state; - $this->action = $action; - $this->dueTime = $dueTime; - $this->comparer = $comparer ?: function ($a, $b) { + private SingleAssignmentDisposable $disposable; + + public function __construct( + private $scheduler, + private $state, + private $action, + private $dueTime, + private null|\Closure $comparer = null + ) { + $this->comparer = $comparer ?: function ($a, $b): int|float { return $a - $b; }; $this->disposable = new SingleAssignmentDisposable(); } - public function invoke() + public function invoke(): void { $this->disposable->setDisposable($this->invokeCore()); } diff --git a/src/Scheduler/VirtualTimeScheduler.php b/src/Scheduler/VirtualTimeScheduler.php index 161723e2..cc2df279 100644 --- a/src/Scheduler/VirtualTimeScheduler.php +++ b/src/Scheduler/VirtualTimeScheduler.php @@ -12,26 +12,22 @@ class VirtualTimeScheduler implements AsyncSchedulerInterface { - protected $clock; - protected $comparer; - protected $isEnabled = false; - protected $queue; + protected bool $isEnabled = false; + protected PriorityQueue $queue; /** - * @param integer $initialClock Initial value for the clock. + * @param integer $clock Initial value for the clock. * @param callable $comparer Comparer to determine causality of events based on absolute time. */ - public function __construct(int $initialClock, callable $comparer) + public function __construct(protected int $clock, protected null|\Closure $comparer) { - $this->clock = $initialClock; - $this->comparer = $comparer; $this->queue = new PriorityQueue(); } public function schedule(callable $action, $delay = 0): DisposableInterface { - $invokeAction = function ($scheduler, $action) { + $invokeAction = function ($scheduler, $action): \Rx\Disposable\EmptyDisposable { $action(); return new EmptyDisposable(); }; @@ -44,9 +40,9 @@ public function scheduleRecursive(callable $action): DisposableInterface $goAgain = true; $disposable = new SerialDisposable(); - $recursiveAction = function () use ($action, &$goAgain, $disposable, &$recursiveAction) { - $disposable->setDisposable($this->schedule(function () use ($action, &$recursiveAction) { - $action(function () use (&$recursiveAction) { + $recursiveAction = function () use ($action, &$goAgain, $disposable, &$recursiveAction): void { + $disposable->setDisposable($this->schedule(function () use ($action, &$recursiveAction): void { + $action(function () use (&$recursiveAction): void { $recursiveAction(); }); })); @@ -64,7 +60,7 @@ public function getClock(): int public function scheduleAbsolute(int $dueTime, $action): DisposableInterface { - $invokeAction = function ($scheduler, $action) { + $invokeAction = function ($scheduler, $action): \Rx\Disposable\EmptyDisposable { $action(); return new EmptyDisposable(); }; @@ -88,13 +84,13 @@ public function scheduleAbsoluteWithState($state, int $dueTime, callable $action $this->queue->enqueue($scheduledItem); - return new CallbackDisposable(function () use ($scheduledItem) { + return new CallbackDisposable(function () use ($scheduledItem): void { $scheduledItem->getDisposable()->dispose(); $this->queue->remove($scheduledItem); }); } - public function scheduleRelativeWithState($state, $dueTime, $action): DisposableInterface + public function scheduleRelativeWithState($state, $dueTime, callable $action): DisposableInterface { $runAt = $this->now() + $dueTime; @@ -112,7 +108,7 @@ public function schedulePeriodic(callable $action, $delay, $period): DisposableI $disposable = new SerialDisposable(); - $doActionAndReschedule = function () use (&$nextTime, $period, $disposable, $action, &$doActionAndReschedule) { + $doActionAndReschedule = function () use (&$nextTime, $period, $disposable, $action, &$doActionAndReschedule): void { $action(); $nextTime += $period; $delay = $nextTime - $this->now(); @@ -127,7 +123,7 @@ public function schedulePeriodic(callable $action, $delay, $period): DisposableI return $disposable; } - public function start() + public function start(): void { if (!$this->isEnabled) { diff --git a/src/SchedulerInterface.php b/src/SchedulerInterface.php index 4ebbbcb3..4d70c929 100644 --- a/src/SchedulerInterface.php +++ b/src/SchedulerInterface.php @@ -7,33 +7,23 @@ interface SchedulerInterface { /** - * @param callable $action * @param $delay * - * @return DisposableInterface */ public function schedule(callable $action, $delay = 0): DisposableInterface; - /** - * @param callable $action - * - * @return DisposableInterface - */ + public function scheduleRecursive(callable $action): DisposableInterface; /** - * @param callable $action * @param int $delay * @param $period * - * @return mixed */ public function schedulePeriodic(callable $action, $delay, $period): DisposableInterface; /** * Gets the current representation of now for the scheduler - * - * @return mixed */ public function now(): int; } diff --git a/src/Subject/AsyncSubject.php b/src/Subject/AsyncSubject.php index ef3200cc..eb37bb8a 100644 --- a/src/Subject/AsyncSubject.php +++ b/src/Subject/AsyncSubject.php @@ -8,37 +8,19 @@ use Rx\DisposableInterface; use Rx\ObserverInterface; -/** - * Class AsyncSubject - * @package Rx\Subject - */ class AsyncSubject extends Subject { - /** - * @var - */ private $value; + private bool $valueSet = false; - /** - * @var bool - */ - private $valueSet = false; - - /** - * @return mixed - */ - public function getValue() + public function getValue(): mixed { return $this->value; } - /** - * @param $value - */ - public function onNext($value) + public function onNext($value): void { - $this->assertNotDisposed(); if ($this->isStopped) { @@ -49,7 +31,7 @@ public function onNext($value) $this->valueSet = true; } - public function onCompleted() + public function onCompleted(): void { if ($this->valueSet) { parent::onNext($this->value); @@ -84,7 +66,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface } - public function dispose() + public function dispose(): void { parent::dispose(); diff --git a/src/Subject/BehaviorSubject.php b/src/Subject/BehaviorSubject.php index 4729b75f..433c4b2b 100644 --- a/src/Subject/BehaviorSubject.php +++ b/src/Subject/BehaviorSubject.php @@ -21,7 +21,7 @@ public function getValue() return $this->value; } - public function onNext($value) + public function onNext($value): void { $this->value = $value; @@ -37,7 +37,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface return $disposable; } - public function dispose() + public function dispose(): void { parent::dispose(); diff --git a/src/Subject/InnerSubscriptionDisposable.php b/src/Subject/InnerSubscriptionDisposable.php index ccea81d7..00e32afc 100644 --- a/src/Subject/InnerSubscriptionDisposable.php +++ b/src/Subject/InnerSubscriptionDisposable.php @@ -9,16 +9,13 @@ class InnerSubscriptionDisposable implements DisposableInterface { - private $observer; - private $subject; - - public function __construct(Subject $subject, ObserverInterface $observer) - { - $this->subject = $subject; - $this->observer = $observer; + public function __construct( + private readonly Subject $subject, + private null|ObserverInterface $observer + ) { } - public function dispose() + public function dispose(): void { if ($this->subject->isDisposed()) { return; diff --git a/src/Subject/ReplaySubject.php b/src/Subject/ReplaySubject.php index e0ac85d8..633cf268 100644 --- a/src/Subject/ReplaySubject.php +++ b/src/Subject/ReplaySubject.php @@ -17,23 +17,17 @@ */ class ReplaySubject extends Subject { - /** @var int */ - private $bufferSize; + private ?int $bufferSize; - /** @var int */ - private $windowSize; + private ?int $windowSize; - /** @var array */ - private $queue = []; + private array $queue = []; - /** @var int */ - private $maxSafeInt = PHP_INT_MAX; + private int $maxSafeInt = PHP_INT_MAX; - /** @var bool */ - private $hasError = false; + private bool $hasError = false; - /** @var SchedulerInterface */ - private $scheduler; + private \Rx\SchedulerInterface $scheduler; public function __construct(int $bufferSize = null, int $windowSize = null, SchedulerInterface $scheduler = null) { @@ -70,10 +64,8 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface if ($this->hasError) { $so->onError($this->exception); - } else { - if ($this->isStopped) { - $so->onCompleted(); - } + } elseif ($this->isStopped) { + $so->onCompleted(); } $so->ensureActive(); @@ -81,7 +73,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface return $subscription; } - public function onNext($value) + public function onNext($value): void { $this->assertNotDisposed(); @@ -102,7 +94,7 @@ public function onNext($value) } - public function onCompleted() + public function onCompleted(): void { $this->assertNotDisposed(); @@ -121,7 +113,7 @@ public function onCompleted() $this->observers = []; } - public function onError(\Throwable $exception) + public function onError(\Throwable $exception): void { $this->assertNotDisposed(); @@ -144,9 +136,9 @@ public function onError(\Throwable $exception) $this->observers = []; } - private function createRemovableDisposable($subject, $observer): DisposableInterface + private function createRemovableDisposable(self $subject, \Rx\Observer\ScheduledObserver $observer): DisposableInterface { - return new CallbackDisposable(function () use ($observer, $subject) { + return new CallbackDisposable(function () use ($observer, $subject): void { $observer->dispose(); if (!$subject->isDisposed()) { array_splice($subject->observers, (int)array_search($observer, $subject->observers, true), 1); @@ -154,7 +146,7 @@ private function createRemovableDisposable($subject, $observer): DisposableInter }); } - private function trim() + private function trim(): void { if (count($this->queue) > $this->bufferSize) { array_shift($this->queue); diff --git a/src/Subject/Subject.php b/src/Subject/Subject.php index f5e2cdcb..cf53ee20 100644 --- a/src/Subject/Subject.php +++ b/src/Subject/Subject.php @@ -43,7 +43,7 @@ public function isDisposed() return $this->isDisposed; } - public function hasObservers() + public function hasObservers(): bool { return count($this->observers) > 0; } @@ -55,7 +55,7 @@ protected function assertNotDisposed() } } - public function onCompleted() + public function onCompleted(): void { $this->assertNotDisposed(); @@ -73,7 +73,7 @@ public function onCompleted() $this->observers = []; } - public function onError(\Throwable $exception) + public function onError(\Throwable $exception): void { $this->assertNotDisposed(); @@ -92,7 +92,7 @@ public function onError(\Throwable $exception) $this->observers = []; } - public function onNext($value) + public function onNext($value): void { $this->assertNotDisposed(); @@ -106,7 +106,7 @@ public function onNext($value) } } - public function dispose() + public function dispose(): void { $this->isDisposed = true; $this->observers = []; diff --git a/src/Testing/ColdObservable.php b/src/Testing/ColdObservable.php index fce41240..17c51ce7 100644 --- a/src/Testing/ColdObservable.php +++ b/src/Testing/ColdObservable.php @@ -14,14 +14,11 @@ class ColdObservable extends Observable { - private $scheduler; - private $messages; - private $subscriptions = []; - - public function __construct(TestScheduler $scheduler, array $messages = []) - { - $this->scheduler = $scheduler; - $this->messages = $messages; + public function __construct( + private readonly TestScheduler $scheduler, + private readonly array $messages = [], + private array $subscriptions = [] + ) { } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -38,11 +35,9 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $notification = $message->getValue(); $time = $message->getTime(); - $schedule = function (Notification $innerNotification) use (&$disposable, &$currentObservable, $observer, $scheduler, $time, &$isDisposed) { - $disposable->add($scheduler->scheduleRelativeWithState(null, $time, function () use ($observer, $innerNotification, &$isDisposed) { - if (!$isDisposed) { - $innerNotification->accept($observer); - } + $schedule = function (Notification $innerNotification) use (&$disposable, &$currentObservable, $observer, $scheduler, $time, &$isDisposed): void { + $disposable->add($scheduler->scheduleRelativeWithState(null, $time, function () use ($observer, $innerNotification, &$isDisposed): \Rx\Disposable\EmptyDisposable { + $innerNotification->accept($observer); return new EmptyDisposable(); })); }; @@ -52,7 +47,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $subscriptions = &$this->subscriptions; - return new CallbackDisposable(function () use (&$currentObservable, $index, $observer, $scheduler, &$subscriptions, &$isDisposed) { + return new CallbackDisposable(function () use (&$currentObservable, $index, $observer, $scheduler, &$subscriptions, &$isDisposed): void { $isDisposed = true; $subscriptions[$index] = new Subscription($subscriptions[$index]->getSubscribed(), $scheduler->getClock()); }); diff --git a/src/Testing/HotObservable.php b/src/Testing/HotObservable.php index a86bdfed..1714b3e3 100644 --- a/src/Testing/HotObservable.php +++ b/src/Testing/HotObservable.php @@ -13,23 +13,20 @@ class HotObservable extends Observable { - private $scheduler; - private $messages; - private $subscriptions = []; - private $observers = []; + private array $subscriptions = []; + private array $observers = []; - public function __construct(TestScheduler $scheduler, array $messages) + public function __construct(private TestScheduler $scheduler, array $messages) { $this->scheduler = $scheduler; - $this->messages = $messages; $currentObservable = $this; foreach ($messages as $message) { $time = $message->getTime(); $notification = $message->getValue(); - $schedule = function (Notification $innerNotification) use (&$currentObservable, $scheduler, $time) { - $scheduler->scheduleAbsolute($time, function () use (&$currentObservable, $innerNotification) { + $schedule = function (Notification $innerNotification) use (&$currentObservable, $scheduler, $time): void { + $scheduler->scheduleAbsolute($time, function () use (&$currentObservable, $innerNotification): \Rx\Disposable\EmptyDisposable { $observers = $currentObservable->getObservers(); foreach ($observers as $observer) { @@ -56,7 +53,7 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $index = count($this->subscriptions) - 1; $scheduler = $this->scheduler; - return new CallbackDisposable(function () use (&$currentObservable, $index, $observer, $scheduler, &$subscriptions) { + return new CallbackDisposable(function () use (&$currentObservable, $index, $observer, $scheduler, &$subscriptions): void { $currentObservable->removeObserver($observer); $subscriptions[$index] = new Subscription($subscriptions[$index]->getSubscribed(), $scheduler->getClock()); }); diff --git a/src/Testing/MockObserver.php b/src/Testing/MockObserver.php index a30a050c..5fc685c2 100644 --- a/src/Testing/MockObserver.php +++ b/src/Testing/MockObserver.php @@ -14,15 +14,13 @@ */ class MockObserver implements ObserverInterface { - private $scheduler; - private $messages = []; + private array $messages = []; - public function __construct(TestScheduler $scheduler) + public function __construct(private readonly TestScheduler $scheduler) { - $this->scheduler = $scheduler; } - public function onNext($value) + public function onNext($value): void { $this->messages[] = new Recorded( $this->scheduler->getClock(), @@ -30,7 +28,7 @@ public function onNext($value) ); } - public function onError(\Throwable $error) + public function onError(\Throwable $error): void { $this->messages[] = new Recorded( $this->scheduler->getClock(), @@ -38,7 +36,7 @@ public function onError(\Throwable $error) ); } - public function onCompleted() + public function onCompleted(): void { $this->messages[] = new Recorded( $this->scheduler->getClock(), @@ -46,7 +44,7 @@ public function onCompleted() ); } - public function getMessages() + public function getMessages(): array { return $this->messages; } diff --git a/src/Testing/Recorded.php b/src/Testing/Recorded.php index 50356d7b..82a372e4 100644 --- a/src/Testing/Recorded.php +++ b/src/Testing/Recorded.php @@ -6,14 +6,11 @@ class Recorded { - private $time; - private $value; - private $comparer; - - public function __construct(int $time, $value, callable $comparer = null) - { - $this->time = $time; - $this->value = $value; + public function __construct( + private int $time, + private $value, + private null|\Closure $comparer = null + ) { $this->comparer = $comparer ?: function ($a, $b) { if (is_object($a) && method_exists($a, 'equals')) { return $a->equals($b); @@ -23,7 +20,7 @@ public function __construct(int $time, $value, callable $comparer = null) }; } - public function equals(Recorded $other) + public function equals(Recorded $other): bool { $comparer = $this->comparer; @@ -31,7 +28,7 @@ public function equals(Recorded $other) && $comparer($this->value, $other->value); } - public function __toString() + public function __toString(): string { return $this->value . '@' . $this->time; } diff --git a/src/Testing/Subscription.php b/src/Testing/Subscription.php index c6915e2d..3f61f55f 100644 --- a/src/Testing/Subscription.php +++ b/src/Testing/Subscription.php @@ -6,8 +6,8 @@ class Subscription { - private $subscribed; - private $unsubscribed; + private int $subscribed; + private int $unsubscribed; public function __construct(int $start, int $end = PHP_INT_MAX) { @@ -15,23 +15,23 @@ public function __construct(int $start, int $end = PHP_INT_MAX) $this->unsubscribed = $end; } - public function equals(Subscription $other) + public function equals(Subscription $other): bool { return $this->subscribed === $other->subscribed && $this->unsubscribed === $other->unsubscribed; } - public function getSubscribed() + public function getSubscribed(): int { return $this->subscribed; } - public function getUnsubscribed() + public function getUnsubscribed(): int { return $this->unsubscribed; } - public function __toString() + public function __toString(): string { $end = $this->unsubscribed === PHP_INT_MAX ? 'Infinite' : $this->unsubscribed; return "Subscription({$this->subscribed}, {$end})"; diff --git a/src/Testing/TestScheduler.php b/src/Testing/TestScheduler.php index 4d7312b6..f4eee948 100644 --- a/src/Testing/TestScheduler.php +++ b/src/Testing/TestScheduler.php @@ -18,7 +18,7 @@ class TestScheduler extends VirtualTimeScheduler public function __construct() { - parent::__construct(0, function ($a, $b) { + parent::__construct(0, function ($a, $b): int|float { return $a - $b; }); } @@ -42,25 +42,25 @@ public function startWithDispose($create, $disposed): MockObserver return $this->startWithTiming($create, self::CREATED, self::SUBSCRIBED, $disposed); } - public function startWithTiming($create, $created = self::CREATED, $subscribed = self::SUBSCRIBED, $disposed = self::DISPOSED): ObserverInterface + public function startWithTiming($create, int $created = self::CREATED, int $subscribed = self::SUBSCRIBED, int $disposed = self::DISPOSED): ObserverInterface { $observer = new MockObserver($this); $source = null; $subscription = null; - $this->scheduleAbsoluteWithState(null, $created, function () use ($create, &$source) { + $this->scheduleAbsoluteWithState(null, $created, function () use ($create, &$source): \Rx\Disposable\EmptyDisposable { $source = $create(); return new EmptyDisposable(); }); - $this->scheduleAbsoluteWithState(null, $subscribed, function () use (&$observer, &$source, &$subscription) { + $this->scheduleAbsoluteWithState(null, $subscribed, function () use (&$observer, &$source, &$subscription): \Rx\Disposable\EmptyDisposable { $subscription = $source->subscribe($observer); return new EmptyDisposable(); }); - $this->scheduleAbsoluteWithState(null, $disposed, function () use (&$subscription) { + $this->scheduleAbsoluteWithState(null, $disposed, function () use (&$subscription): \Rx\Disposable\EmptyDisposable { $subscription->dispose(); return new EmptyDisposable(); diff --git a/src/Testing/TestSubject.php b/src/Testing/TestSubject.php index 9be8929f..7f99042f 100644 --- a/src/Testing/TestSubject.php +++ b/src/Testing/TestSubject.php @@ -9,24 +9,17 @@ use Rx\ObserverInterface; use Rx\Subject\Subject; -/** - * Class TestSubject - * @package Rx\Testing - */ class TestSubject extends Subject { - /** @var int */ - private $subscribeCount; + private int $subscribeCount = 0; - /** @var ObserverInterface */ - private $observer; + private ?\Rx\ObserverInterface $observer = null; /* @var DisposableInterface[] */ - private $disposeOnMap; + private ?array $disposeOnMap = null; public function __construct() { - $this->subscribeCount = 0; } protected function _subscribe(ObserverInterface $observer): DisposableInterface @@ -35,25 +28,18 @@ protected function _subscribe(ObserverInterface $observer): DisposableInterface $this->subscribeCount++; $this->observer = $observer; - return new CallbackDisposable(function () { + return new CallbackDisposable(function (): void { $this->dispose(); }); } - /** - * @param $value - * @param $disposable - */ - public function disposeOn($value, DisposableInterface $disposable) + public function disposeOn($value, DisposableInterface $disposable): void { $this->disposeOnMap[$value] = $disposable; } - /** - * @param $value - */ - public function onNext($value) + public function onNext($value): void { $this->observer->onNext($value); if (isset($this->disposeOnMap[$value])) { @@ -61,22 +47,16 @@ public function onNext($value) } } - /** - * @param \Throwable $exception - */ - public function onError(\Throwable $exception) + public function onError(\Throwable $exception): void { $this->observer->onError($exception); } - public function onCompleted() + public function onCompleted(): void { $this->observer->onCompleted(); } - /** - * @return int - */ public function getSubscribeCount(): int { return $this->subscribeCount; diff --git a/src/Timestamped.php b/src/Timestamped.php index baa99f8b..e9768c56 100644 --- a/src/Timestamped.php +++ b/src/Timestamped.php @@ -38,11 +38,7 @@ public function equals($other) if (is_scalar($this->value) && $this->value == $other->value) { return true; } - if ($this->value === $other->value) { - return true; - } - - return false; + return $this->value === $other->value; } /**