@@ -2475,9 +2475,7 @@ public function testOrWheresHaveConsistentResults()
2475
2475
2476
2476
public function testWhereWithArrayConditions ()
2477
2477
{
2478
- /*
2479
- * where(key, value)
2480
- */
2478
+ // where(key, value)
2481
2479
2482
2480
$ builder = $ this ->getBuilder ();
2483
2481
$ builder ->select ('* ' )->from ('users ' )->where ([['foo ' , 1 ], ['bar ' , 2 ]]);
@@ -2509,9 +2507,7 @@ public function testWhereWithArrayConditions()
2509
2507
$ this ->assertSame ('select * from "users" where ("foo" = ? and "bar" = ?) ' , $ builder ->toSql ());
2510
2508
$ this ->assertEquals ([0 => 1 , 1 => 2 ], $ builder ->getBindings ());
2511
2509
2512
- /*
2513
- * where(key, <, value)
2514
- */
2510
+ // where(key, <, value)
2515
2511
2516
2512
$ builder = $ this ->getBuilder ();
2517
2513
$ builder ->select ('* ' )->from ('users ' )->where ([['foo ' , 1 ], ['bar ' , '< ' , 2 ]]);
@@ -2528,9 +2524,7 @@ public function testWhereWithArrayConditions()
2528
2524
$ this ->assertSame ('select * from "users" where ("foo" = ? and "bar" < ?) ' , $ builder ->toSql ());
2529
2525
$ this ->assertEquals ([0 => 1 , 1 => 2 ], $ builder ->getBindings ());
2530
2526
2531
- /*
2532
- * whereNot(key, value)
2533
- */
2527
+ // whereNot(key, value)
2534
2528
2535
2529
$ builder = $ this ->getBuilder ();
2536
2530
$ builder ->select ('* ' )->from ('users ' )->whereNot ([['foo ' , 1 ], ['bar ' , 2 ]]);
@@ -2562,9 +2556,7 @@ public function testWhereWithArrayConditions()
2562
2556
$ this ->assertSame ('select * from "users" where not (("foo" = ? and "bar" = ?)) ' , $ builder ->toSql ());
2563
2557
$ this ->assertEquals ([0 => 1 , 1 => 2 ], $ builder ->getBindings ());
2564
2558
2565
- /*
2566
- * whereNot(key, <, value)
2567
- */
2559
+ // whereNot(key, <, value)
2568
2560
2569
2561
$ builder = $ this ->getBuilder ();
2570
2562
$ builder ->select ('* ' )->from ('users ' )->whereNot ([['foo ' , 1 ], ['bar ' , '< ' , 2 ]]);
@@ -2581,9 +2573,7 @@ public function testWhereWithArrayConditions()
2581
2573
$ this ->assertSame ('select * from "users" where not (("foo" = ? and "bar" < ?)) ' , $ builder ->toSql ());
2582
2574
$ this ->assertEquals ([0 => 1 , 1 => 2 ], $ builder ->getBindings ());
2583
2575
2584
- /*
2585
- * whereColumn(col1, col2)
2586
- */
2576
+ // whereColumn(col1, col2)
2587
2577
2588
2578
$ builder = $ this ->getBuilder ();
2589
2579
$ builder ->select ('* ' )->from ('users ' )->whereColumn ([['foo ' , '_foo ' ], ['bar ' , '_bar ' ]]);
@@ -2615,9 +2605,7 @@ public function testWhereWithArrayConditions()
2615
2605
$ this ->assertSame ('select * from "users" where ("foo" = "_foo" and "bar" = "_bar") ' , $ builder ->toSql ());
2616
2606
$ this ->assertEquals ([], $ builder ->getBindings ());
2617
2607
2618
- /*
2619
- * whereColumn(col1, <, col2)
2620
- */
2608
+ // whereColumn(col1, <, col2)
2621
2609
2622
2610
$ builder = $ this ->getBuilder ();
2623
2611
$ builder ->select ('* ' )->from ('users ' )->whereColumn ([['foo ' , '_foo ' ], ['bar ' , '< ' , '_bar ' ]]);
@@ -2634,9 +2622,7 @@ public function testWhereWithArrayConditions()
2634
2622
$ this ->assertSame ('select * from "users" where ("foo" = "_foo" and "bar" < "_bar") ' , $ builder ->toSql ());
2635
2623
$ this ->assertEquals ([], $ builder ->getBindings ());
2636
2624
2637
- /*
2638
- * whereAll([...keys], value)
2639
- */
2625
+ // whereAll([...keys], value)
2640
2626
2641
2627
$ builder = $ this ->getBuilder ();
2642
2628
$ builder ->select ('* ' )->from ('users ' )->whereAll (['foo ' , 'bar ' ], 2 );
@@ -2648,9 +2634,7 @@ public function testWhereWithArrayConditions()
2648
2634
$ this ->assertSame ('select * from "users" where ("foo" = ? and "bar" = ?) ' , $ builder ->toSql ());
2649
2635
$ this ->assertEquals ([0 => 2 , 1 => 2 ], $ builder ->getBindings ());
2650
2636
2651
- /*
2652
- * whereAny([...keys], value)
2653
- */
2637
+ // whereAny([...keys], value)
2654
2638
2655
2639
$ builder = $ this ->getBuilder ();
2656
2640
$ builder ->select ('* ' )->from ('users ' )->whereAny (['foo ' , 'bar ' ], 2 );
@@ -2662,9 +2646,7 @@ public function testWhereWithArrayConditions()
2662
2646
$ this ->assertSame ('select * from "users" where ("foo" = ? or "bar" = ?) ' , $ builder ->toSql ());
2663
2647
$ this ->assertEquals ([0 => 2 , 1 => 2 ], $ builder ->getBindings ());
2664
2648
2665
- /*
2666
- * whereNone([...keys], value)
2667
- */
2649
+ // whereNone([...keys], value)
2668
2650
2669
2651
$ builder = $ this ->getBuilder ();
2670
2652
$ builder ->select ('* ' )->from ('users ' )->whereNone (['foo ' , 'bar ' ], 2 );
@@ -2676,9 +2658,7 @@ public function testWhereWithArrayConditions()
2676
2658
$ this ->assertSame ('select * from "users" where not ("foo" = ? or "bar" = ?) ' , $ builder ->toSql ());
2677
2659
$ this ->assertEquals ([0 => 2 , 1 => 2 ], $ builder ->getBindings ());
2678
2660
2679
- /*
2680
- * where()->orWhere(key, value)
2681
- */
2661
+ // where()->orWhere(key, value)
2682
2662
2683
2663
$ builder = $ this ->getBuilder ();
2684
2664
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhere ([['foo ' , 1 ], ['bar ' , 2 ]]);
@@ -2690,18 +2670,14 @@ public function testWhereWithArrayConditions()
2690
2670
$ this ->assertSame ('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" = ?) ' , $ builder ->toSql ());
2691
2671
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 1 , 2 => 2 ], $ builder ->getBindings ());
2692
2672
2693
- /*
2694
- * where()->orWhere(key, <, value)
2695
- */
2673
+ // where()->orWhere(key, <, value)
2696
2674
2697
2675
$ builder = $ this ->getBuilder ();
2698
2676
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhere ([['foo ' , 1 ], ['bar ' , '< ' , 2 ]]);
2699
2677
$ this ->assertSame ('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" < ?) ' , $ builder ->toSql ());
2700
2678
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 1 , 2 => 2 ], $ builder ->getBindings ());
2701
2679
2702
- /*
2703
- * where()->orWhereColumn(col1, col2)
2704
- */
2680
+ // where()->orWhereColumn(col1, col2)
2705
2681
2706
2682
$ builder = $ this ->getBuilder ();
2707
2683
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhereColumn ([['foo ' , '_foo ' ], ['bar ' , '_bar ' ]]);
@@ -2713,18 +2689,14 @@ public function testWhereWithArrayConditions()
2713
2689
$ this ->assertSame ('select * from "users" where "xxxx" = ? or ("foo" = "_foo" or "bar" = "_bar") ' , $ builder ->toSql ());
2714
2690
$ this ->assertEquals ([0 => 'xxxx ' ], $ builder ->getBindings ());
2715
2691
2716
- /*
2717
- * where()->orWhere(key, <, value)
2718
- */
2692
+ // where()->orWhere(key, <, value)
2719
2693
2720
2694
$ builder = $ this ->getBuilder ();
2721
2695
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhere ([['foo ' , 1 ], ['bar ' , '< ' , 2 ]]);
2722
2696
$ this ->assertSame ('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" < ?) ' , $ builder ->toSql ());
2723
2697
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 1 , 2 => 2 ], $ builder ->getBindings ());
2724
2698
2725
- /*
2726
- * where()->orWhereNot(key, value)
2727
- */
2699
+ // where()->orWhereNot(key, value)
2728
2700
2729
2701
$ builder = $ this ->getBuilder ();
2730
2702
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhereNot ([['foo ' , 1 ], ['bar ' , 2 ]]);
@@ -2736,18 +2708,14 @@ public function testWhereWithArrayConditions()
2736
2708
$ this ->assertSame ('select * from "users" where "xxxx" = ? or not (("foo" = ? or "bar" = ?)) ' , $ builder ->toSql ());
2737
2709
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 1 , 2 => 2 ], $ builder ->getBindings ());
2738
2710
2739
- /*
2740
- * where()->orWhereNot(key, <, value)
2741
- */
2711
+ // where()->orWhereNot(key, <, value)
2742
2712
2743
2713
$ builder = $ this ->getBuilder ();
2744
2714
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhereNot ([['foo ' , 1 ], ['bar ' , '< ' , 2 ]]);
2745
2715
$ this ->assertSame ('select * from "users" where "xxxx" = ? or not (("foo" = ? or "bar" < ?)) ' , $ builder ->toSql ());
2746
2716
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 1 , 2 => 2 ], $ builder ->getBindings ());
2747
2717
2748
- /*
2749
- * where()->orWhereAll([...keys], value)
2750
- */
2718
+ // where()->orWhereAll([...keys], value)
2751
2719
2752
2720
$ builder = $ this ->getBuilder ();
2753
2721
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhereAll (['foo ' , 'bar ' ], 2 );
@@ -2759,9 +2727,7 @@ public function testWhereWithArrayConditions()
2759
2727
$ this ->assertSame ('select * from "users" where "xxxx" = ? or ("foo" = ? and "bar" = ?) ' , $ builder ->toSql ());
2760
2728
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 2 , 2 => 2 ], $ builder ->getBindings ());
2761
2729
2762
- /*
2763
- * where()->orWhereAny([...keys], value)
2764
- */
2730
+ // where()->orWhereAny([...keys], value)
2765
2731
2766
2732
$ builder = $ this ->getBuilder ();
2767
2733
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhereAny (['foo ' , 'bar ' ], 2 );
@@ -2773,9 +2739,7 @@ public function testWhereWithArrayConditions()
2773
2739
$ this ->assertSame ('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" = ?) ' , $ builder ->toSql ());
2774
2740
$ this ->assertEquals ([0 => 'xxxx ' , 1 => 2 , 2 => 2 ], $ builder ->getBindings ());
2775
2741
2776
- /*
2777
- * where()->orWhereNone([...keys], value)
2778
- */
2742
+ // where()->orWhereNone([...keys], value)
2779
2743
2780
2744
$ builder = $ this ->getBuilder ();
2781
2745
$ builder ->select ('* ' )->from ('users ' )->where ('xxxx ' , 'xxxx ' )->orWhereNone (['foo ' , 'bar ' ], 2 );
0 commit comments