@@ -263,7 +263,7 @@ public static function dateTime($timezone = null): DateTimeType
263
263
*/
264
264
public static function dateTimeYMD ($ year , $ month = null , $ day = null , $ hour = null , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null , $ timezone = null ): DateTimeType
265
265
{
266
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
266
+ $ variables = self ::checkOrderAndConvertToNumeral ([
267
267
"month " => $ month ,
268
268
"day " => $ day ,
269
269
"hour " => $ hour ,
@@ -280,18 +280,43 @@ public static function dateTimeYMD($year, $month = null, $day = null, $hour = nu
280
280
281
281
$ map = ["year " => $ year ];
282
282
283
- if ($ month !== null ) $ map ["month " ] = $ setVariables ["month " ];
284
- if ($ day !== null ) $ map ["day " ] = $ setVariables ["day " ];
285
- if ($ hour !== null ) $ map ["hour " ] = $ setVariables ["hour " ];
286
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
287
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
288
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
289
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
290
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
283
+ if ($ month !== null ) {
284
+ $ map ["month " ] = $ variables ["month " ];
285
+ }
286
+
287
+ if ($ day !== null ) {
288
+ $ map ["day " ] = $ variables ["day " ];
289
+ }
290
+
291
+ if ($ hour !== null ) {
292
+ $ map ["hour " ] = $ variables ["hour " ];
293
+ }
294
+
295
+ if ($ minute !== null ) {
296
+ $ map ["minute " ] = $ variables ["minute " ];
297
+ }
298
+
299
+ if ($ second !== null ) {
300
+ $ map ["second " ] = $ variables ["second " ];
301
+ }
302
+
303
+ if ($ millisecond !== null ) {
304
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
305
+ }
306
+
307
+ if ($ microsecond !== null ) {
308
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
309
+ }
310
+
311
+ if ($ nanosecond !== null ) {
312
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
313
+ }
314
+
291
315
if ($ timezone !== null ) {
292
316
if (!($ timezone instanceof StringType)) {
293
317
$ timezone = self ::string ($ timezone );
294
318
}
319
+
295
320
$ map ["timezone " ] = $ timezone ;
296
321
}
297
322
@@ -576,7 +601,7 @@ public static function localDatetime($timezone = null): LocalDateTimeType {
576
601
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localdatetime-calendar
577
602
*/
578
603
public static function localDatetimeYMD ($ year , $ month = null , $ day = null , $ hour = null , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null ): LocalDateTimeType {
579
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
604
+ $ variables = self ::checkOrderAndConvertToNumeral ([
580
605
"month " => $ month ,
581
606
"day " => $ day ,
582
607
"hour " => $ hour ,
@@ -593,14 +618,37 @@ public static function localDatetimeYMD($year, $month = null, $day = null, $hour
593
618
594
619
$ map = ["year " => $ year ];
595
620
596
- if ($ month !== null ) $ map ["month " ] = $ setVariables ["month " ];
597
- if ($ day !== null ) $ map ["day " ] = $ setVariables ["day " ];
598
- if ($ hour !== null ) $ map ["hour " ] = $ setVariables ["hour " ];
599
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
600
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
601
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
602
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
603
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
621
+ if ($ month !== null ) {
622
+ $ map ["month " ] = $ variables ["month " ];
623
+ }
624
+
625
+ if ($ day !== null ) {
626
+ $ map ["day " ] = $ variables ["day " ];
627
+ }
628
+
629
+ if ($ hour !== null ) {
630
+ $ map ["hour " ] = $ variables ["hour " ];
631
+ }
632
+
633
+ if ($ minute !== null ) {
634
+ $ map ["minute " ] = $ variables ["minute " ];
635
+ }
636
+
637
+ if ($ second !== null ) {
638
+ $ map ["second " ] = $ variables ["second " ];
639
+ }
640
+
641
+ if ($ millisecond !== null ) {
642
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
643
+ }
644
+
645
+ if ($ microsecond !== null ) {
646
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
647
+ }
648
+
649
+ if ($ nanosecond !== null ) {
650
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
651
+ }
604
652
605
653
return FunctionCall::localdatetime (Query::map ($ map ));
606
654
}
@@ -623,7 +671,7 @@ public static function localDatetimeYMD($year, $month = null, $day = null, $hour
623
671
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localdatetime-week
624
672
*/
625
673
public static function localDatetimeYWD ($ year , $ week = null , $ dayOfWeek = null , $ hour = null , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null ): LocalDateTimeType {
626
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
674
+ $ variables = self ::checkOrderAndConvertToNumeral ([
627
675
"week " => $ week ,
628
676
"dayOfWeek " => $ dayOfWeek ,
629
677
"hour " => $ hour ,
@@ -640,14 +688,37 @@ public static function localDatetimeYWD($year, $week = null, $dayOfWeek = null,
640
688
641
689
$ map = ["year " => $ year ];
642
690
643
- if ($ week !== null ) $ map ["week " ] = $ setVariables ["week " ];
644
- if ($ dayOfWeek !== null ) $ map ["dayOfWeek " ] = $ setVariables ["dayOfWeek " ];
645
- if ($ hour !== null ) $ map ["hour " ] = $ setVariables ["hour " ];
646
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
647
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
648
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
649
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
650
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
691
+ if ($ week !== null ) {
692
+ $ map ["week " ] = $ variables ["week " ];
693
+ }
694
+
695
+ if ($ dayOfWeek !== null ) {
696
+ $ map ["dayOfWeek " ] = $ variables ["dayOfWeek " ];
697
+ }
698
+
699
+ if ($ hour !== null ) {
700
+ $ map ["hour " ] = $ variables ["hour " ];
701
+ }
702
+
703
+ if ($ minute !== null ) {
704
+ $ map ["minute " ] = $ variables ["minute " ];
705
+ }
706
+
707
+ if ($ second !== null ) {
708
+ $ map ["second " ] = $ variables ["second " ];
709
+ }
710
+
711
+ if ($ millisecond !== null ) {
712
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
713
+ }
714
+
715
+ if ($ microsecond !== null ) {
716
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
717
+ }
718
+
719
+ if ($ nanosecond !== null ) {
720
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
721
+ }
651
722
652
723
return FunctionCall::localdatetime (Query::map ($ map ));
653
724
}
@@ -669,7 +740,7 @@ public static function localDatetimeYWD($year, $week = null, $dayOfWeek = null,
669
740
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localdatetime-quarter
670
741
*/
671
742
public static function localDatetimeYQD ($ year , $ quarter = null , $ dayOfQuarter = null , $ hour = null , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null ): LocalDateTimeType {
672
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
743
+ $ variables = self ::checkOrderAndConvertToNumeral ([
673
744
"quarter " => $ quarter ,
674
745
"dayOfQuarter " => $ dayOfQuarter ,
675
746
"hour " => $ hour ,
@@ -686,14 +757,37 @@ public static function localDatetimeYQD($year, $quarter = null, $dayOfQuarter =
686
757
687
758
$ map = ["year " => $ year ];
688
759
689
- if ($ quarter !== null ) $ map ["quarter " ] = $ setVariables ["quarter " ];
690
- if ($ dayOfQuarter !== null ) $ map ["dayOfQuarter " ] = $ setVariables ["dayOfQuarter " ];
691
- if ($ hour !== null ) $ map ["hour " ] = $ setVariables ["hour " ];
692
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
693
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
694
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
695
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
696
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
760
+ if ($ quarter !== null ) {
761
+ $ map ["quarter " ] = $ variables ["quarter " ];
762
+ }
763
+
764
+ if ($ dayOfQuarter !== null ) {
765
+ $ map ["dayOfQuarter " ] = $ variables ["dayOfQuarter " ];
766
+ }
767
+
768
+ if ($ hour !== null ) {
769
+ $ map ["hour " ] = $ variables ["hour " ];
770
+ }
771
+
772
+ if ($ minute !== null ) {
773
+ $ map ["minute " ] = $ variables ["minute " ];
774
+ }
775
+
776
+ if ($ second !== null ) {
777
+ $ map ["second " ] = $ variables ["second " ];
778
+ }
779
+
780
+ if ($ millisecond !== null ) {
781
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
782
+ }
783
+
784
+ if ($ microsecond !== null ) {
785
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
786
+ }
787
+
788
+ if ($ nanosecond !== null ) {
789
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
790
+ }
697
791
698
792
return FunctionCall::localdatetime (Query::map ($ map ));
699
793
}
@@ -714,7 +808,7 @@ public static function localDatetimeYQD($year, $quarter = null, $dayOfQuarter =
714
808
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localdatetime-ordinal
715
809
*/
716
810
public static function localDatetimeYD ($ year , $ ordinalDay = null , $ hour = null , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null ): LocalDateTimeType {
717
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
811
+ $ variables = self ::checkOrderAndConvertToNumeral ([
718
812
"ordinalDay " => $ ordinalDay ,
719
813
"hour " => $ hour ,
720
814
"minute " => $ minute ,
@@ -730,13 +824,33 @@ public static function localDatetimeYD($year, $ordinalDay = null, $hour = null,
730
824
731
825
$ map = ["year " => $ year ];
732
826
733
- if ($ ordinalDay !== null ) $ map ["ordinalDay " ] = $ setVariables ["ordinalDay " ];
734
- if ($ hour !== null ) $ map ["hour " ] = $ setVariables ["hour " ];
735
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
736
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
737
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
738
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
739
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
827
+ if ($ ordinalDay !== null ) {
828
+ $ map ["ordinalDay " ] = $ variables ["ordinalDay " ];
829
+ }
830
+
831
+ if ($ hour !== null ) {
832
+ $ map ["hour " ] = $ variables ["hour " ];
833
+ }
834
+
835
+ if ($ minute !== null ) {
836
+ $ map ["minute " ] = $ variables ["minute " ];
837
+ }
838
+
839
+ if ($ second !== null ) {
840
+ $ map ["second " ] = $ variables ["second " ];
841
+ }
842
+
843
+ if ($ millisecond !== null ) {
844
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
845
+ }
846
+
847
+ if ($ microsecond !== null ) {
848
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
849
+ }
850
+
851
+ if ($ nanosecond !== null ) {
852
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
853
+ }
740
854
741
855
return FunctionCall::localdatetime (Query::map ($ map ));
742
856
}
@@ -790,7 +904,7 @@ public static function localTimeCurrent($timezone = null): LocalTimeType {
790
904
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localtime-create
791
905
*/
792
906
public static function localTime ($ hour , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null ): LocalTimeType {
793
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
907
+ $ variables = self ::checkOrderAndConvertToNumeral ([
794
908
"minute " => $ minute ,
795
909
"second " => $ second ,
796
910
"millisecond " => $ millisecond ,
@@ -804,11 +918,25 @@ public static function localTime($hour, $minute = null, $second = null, $millise
804
918
805
919
$ map = ["hour " => $ hour ];
806
920
807
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
808
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
809
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
810
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
811
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
921
+ if ($ minute !== null ) {
922
+ $ map ["minute " ] = $ variables ["minute " ];
923
+ }
924
+
925
+ if ($ second !== null ) {
926
+ $ map ["second " ] = $ variables ["second " ];
927
+ }
928
+
929
+ if ($ millisecond !== null ) {
930
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
931
+ }
932
+
933
+ if ($ microsecond !== null ) {
934
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
935
+ }
936
+
937
+ if ($ nanosecond !== null ) {
938
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
939
+ }
812
940
813
941
return FunctionCall::localtime (Query::map ($ map ));
814
942
}
@@ -835,14 +963,15 @@ public static function localTimeString($localTimeString): LocalTimeType {
835
963
*
836
964
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-time-current
837
965
*/
838
- public static function timeCurrent ($ timezone = null ): TimeType {
966
+ public static function time ($ timezone = null ): TimeType {
839
967
if ($ timezone === null ) {
840
968
return FunctionCall::time ();
841
969
}
842
970
843
971
if (!($ timezone instanceof StringType)) {
844
972
$ timezone = self ::string ($ timezone );
845
973
}
974
+
846
975
return FunctionCall::time (Query::map (["timezone " => $ timezone ]));
847
976
}
848
977
@@ -860,8 +989,8 @@ public static function timeCurrent($timezone = null): TimeType {
860
989
*
861
990
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-time-create
862
991
*/
863
- public static function time ($ hour , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null , $ timezone = null ): TimeType {
864
- $ setVariables = self ::checkOrderAndConvertToNumeral ([
992
+ public static function timeHMS ($ hour , $ minute = null , $ second = null , $ millisecond = null , $ microsecond = null , $ nanosecond = null , $ timezone = null ): TimeType {
993
+ $ variables = self ::checkOrderAndConvertToNumeral ([
865
994
"minute " => $ minute ,
866
995
"second " => $ second ,
867
996
"millisecond " => $ millisecond ,
@@ -875,15 +1004,31 @@ public static function time($hour, $minute = null, $second = null, $millisecond
875
1004
876
1005
$ map = ["hour " => $ hour ];
877
1006
878
- if ($ minute !== null ) $ map ["minute " ] = $ setVariables ["minute " ];
879
- if ($ second !== null ) $ map ["second " ] = $ setVariables ["second " ];
880
- if ($ millisecond !== null ) $ map ["millisecond " ] = $ setVariables ["millisecond " ];
881
- if ($ microsecond !== null ) $ map ["microsecond " ] = $ setVariables ["microsecond " ];
882
- if ($ nanosecond !== null ) $ map ["nanosecond " ] = $ setVariables ["nanosecond " ];
1007
+ if ($ minute !== null ) {
1008
+ $ map ["minute " ] = $ variables ["minute " ];
1009
+ }
1010
+
1011
+ if ($ second !== null ) {
1012
+ $ map ["second " ] = $ variables ["second " ];
1013
+ }
1014
+
1015
+ if ($ millisecond !== null ) {
1016
+ $ map ["millisecond " ] = $ variables ["millisecond " ];
1017
+ }
1018
+
1019
+ if ($ microsecond !== null ) {
1020
+ $ map ["microsecond " ] = $ variables ["microsecond " ];
1021
+ }
1022
+
1023
+ if ($ nanosecond !== null ) {
1024
+ $ map ["nanosecond " ] = $ variables ["nanosecond " ];
1025
+ }
1026
+
883
1027
if ($ timezone !== null ) {
884
1028
if (!($ timezone instanceof StringType)) {
885
1029
$ timezone = self ::string ($ timezone );
886
1030
}
1031
+
887
1032
$ map ["timezone " ] = $ timezone ;
888
1033
}
889
1034
@@ -902,6 +1047,7 @@ public static function timeString($timeString): TimeType {
902
1047
if (!($ timeString instanceof StringType)) {
903
1048
$ timeString = self ::string ($ timeString );
904
1049
}
1050
+
905
1051
return FunctionCall::time ($ timeString );
906
1052
}
907
1053
0 commit comments