Conditions | 1 |
Paths | 1 |
Total Lines | 643 |
Code Lines | 418 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
711 | public function queryExpressionProvider() |
||
712 | { |
||
713 | yield 'Ascending forward start inclusive with QueryExpression' => [ |
||
714 | function () { |
||
715 | return [ |
||
716 | 'forward' => true, |
||
717 | 'seekable' => true, |
||
718 | 'limit' => 3, |
||
719 | 'order' => [ |
||
720 | new OrderClauseExpression('modified', 'asc'), |
||
721 | new OrderClauseExpression('id', 'asc'), |
||
722 | ], |
||
723 | ]; |
||
724 | }, |
||
725 | new PaginationResult( |
||
726 | [ |
||
727 | new Entity([ |
||
728 | 'id' => 1, |
||
729 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
730 | ]), |
||
731 | new Entity([ |
||
732 | 'id' => 3, |
||
733 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
734 | ]), |
||
735 | new Entity([ |
||
736 | 'id' => 5, |
||
737 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
738 | ]), |
||
739 | ], |
||
740 | [ |
||
741 | 'hasPrevious' => null, |
||
742 | 'previousCursor' => null, |
||
743 | 'hasNext' => true, |
||
744 | 'nextCursor' => [ |
||
745 | 'id' => 2, |
||
746 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
747 | ], |
||
748 | ] |
||
749 | ), |
||
750 | ]; |
||
751 | |||
752 | yield 'Ascending forward start exclusive with QueryExpression' => [ |
||
753 | function () { |
||
754 | return [ |
||
755 | 'forward' => true, |
||
756 | 'seekable' => true, |
||
757 | 'exclusive' => true, |
||
758 | 'limit' => 3, |
||
759 | 'order' => [ |
||
760 | new OrderClauseExpression('modified', 'asc'), |
||
761 | new OrderClauseExpression('id', 'asc'), |
||
762 | ], |
||
763 | ]; |
||
764 | }, |
||
765 | new PaginationResult( |
||
766 | [ |
||
767 | new Entity([ |
||
768 | 'id' => 1, |
||
769 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
770 | ]), |
||
771 | new Entity([ |
||
772 | 'id' => 3, |
||
773 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
774 | ]), |
||
775 | new Entity([ |
||
776 | 'id' => 5, |
||
777 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
778 | ]), |
||
779 | ], |
||
780 | [ |
||
781 | 'hasPrevious' => null, |
||
782 | 'previousCursor' => null, |
||
783 | 'hasNext' => true, |
||
784 | 'nextCursor' => [ |
||
785 | 'id' => 5, |
||
786 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
787 | ], |
||
788 | ] |
||
789 | ), |
||
790 | ]; |
||
791 | |||
792 | yield 'Ascending forward inclusive with QueryExpression' => [ |
||
793 | function () { |
||
794 | return [ |
||
795 | 'forward' => true, |
||
796 | 'seekable' => true, |
||
797 | 'limit' => 3, |
||
798 | 'order' => [ |
||
799 | new OrderClauseExpression('modified', 'asc'), |
||
800 | new OrderClauseExpression('id', 'asc'), |
||
801 | ], |
||
802 | 'cursor' => [ |
||
803 | 'id' => 3, |
||
804 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
805 | ], |
||
806 | ]; |
||
807 | }, |
||
808 | new PaginationResult( |
||
809 | [ |
||
810 | new Entity([ |
||
811 | 'id' => 3, |
||
812 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
813 | ]), |
||
814 | new Entity([ |
||
815 | 'id' => 5, |
||
816 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
817 | ]), |
||
818 | new Entity([ |
||
819 | 'id' => 2, |
||
820 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
821 | ]), |
||
822 | ], |
||
823 | [ |
||
824 | 'hasPrevious' => true, |
||
825 | 'previousCursor' => [ |
||
826 | 'id' => 1, |
||
827 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
828 | ], |
||
829 | 'hasNext' => true, |
||
830 | 'nextCursor' => [ |
||
831 | 'id' => 4, |
||
832 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
833 | ], |
||
834 | ] |
||
835 | ), |
||
836 | ]; |
||
837 | |||
838 | yield 'Ascending forward exclusive with QueryExpression' => [ |
||
839 | function () { |
||
840 | return [ |
||
841 | 'forward' => true, |
||
842 | 'seekable' => true, |
||
843 | 'exclusive' => true, |
||
844 | 'limit' => 3, |
||
845 | 'order' => [ |
||
846 | new OrderClauseExpression('modified', 'asc'), |
||
847 | new OrderClauseExpression('id', 'asc'), |
||
848 | ], |
||
849 | 'cursor' => [ |
||
850 | 'id' => 3, |
||
851 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
852 | ], |
||
853 | ]; |
||
854 | }, |
||
855 | new PaginationResult( |
||
856 | [ |
||
857 | new Entity([ |
||
858 | 'id' => 5, |
||
859 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
860 | ]), |
||
861 | new Entity([ |
||
862 | 'id' => 2, |
||
863 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
864 | ]), |
||
865 | new Entity([ |
||
866 | 'id' => 4, |
||
867 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
868 | ]), |
||
869 | ], |
||
870 | [ |
||
871 | 'hasPrevious' => true, |
||
872 | 'previousCursor' => [ |
||
873 | 'id' => 5, |
||
874 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
875 | ], |
||
876 | 'hasNext' => false, |
||
877 | 'nextCursor' => null, |
||
878 | ] |
||
879 | ), |
||
880 | ]; |
||
881 | |||
882 | yield 'Ascending backward start inclusive with QueryExpression' => [ |
||
883 | function () { |
||
884 | return [ |
||
885 | 'backward' => true, |
||
886 | 'seekable' => true, |
||
887 | 'limit' => 3, |
||
888 | 'order' => [ |
||
889 | new OrderClauseExpression('modified', 'asc'), |
||
890 | new OrderClauseExpression('id', 'asc'), |
||
891 | ], |
||
892 | ]; |
||
893 | }, |
||
894 | new PaginationResult( |
||
895 | [ |
||
896 | new Entity([ |
||
897 | 'id' => 5, |
||
898 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
899 | ]), |
||
900 | new Entity([ |
||
901 | 'id' => 2, |
||
902 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
903 | ]), |
||
904 | new Entity([ |
||
905 | 'id' => 4, |
||
906 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
907 | ]), |
||
908 | ], |
||
909 | [ |
||
910 | 'hasPrevious' => true, |
||
911 | 'previousCursor' => [ |
||
912 | 'id' => 3, |
||
913 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
914 | ], |
||
915 | 'hasNext' => null, |
||
916 | 'nextCursor' => null, |
||
917 | ] |
||
918 | ), |
||
919 | ]; |
||
920 | |||
921 | yield 'Ascending backward start exclusive with QueryExpression' => [ |
||
922 | function () { |
||
923 | return [ |
||
924 | 'backward' => true, |
||
925 | 'seekable' => true, |
||
926 | 'exclusive' => true, |
||
927 | 'limit' => 3, |
||
928 | 'order' => [ |
||
929 | new OrderClauseExpression('modified', 'asc'), |
||
930 | new OrderClauseExpression('id', 'asc'), |
||
931 | ], |
||
932 | ]; |
||
933 | }, |
||
934 | new PaginationResult( |
||
935 | [ |
||
936 | new Entity([ |
||
937 | 'id' => 5, |
||
938 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
939 | ]), |
||
940 | new Entity([ |
||
941 | 'id' => 2, |
||
942 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
943 | ]), |
||
944 | new Entity([ |
||
945 | 'id' => 4, |
||
946 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
947 | ]), |
||
948 | ], |
||
949 | [ |
||
950 | 'hasPrevious' => true, |
||
951 | 'previousCursor' => [ |
||
952 | 'id' => 5, |
||
953 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
954 | ], |
||
955 | 'hasNext' => null, |
||
956 | 'nextCursor' => null, |
||
957 | ] |
||
958 | ), |
||
959 | ]; |
||
960 | |||
961 | yield 'Ascending backward inclusive with QueryExpression' => [ |
||
962 | function () { |
||
963 | return [ |
||
964 | 'backward' => true, |
||
965 | 'seekable' => true, |
||
966 | 'limit' => 3, |
||
967 | 'order' => [ |
||
968 | new OrderClauseExpression('modified', 'asc'), |
||
969 | new OrderClauseExpression('id', 'asc'), |
||
970 | ], |
||
971 | 'cursor' => [ |
||
972 | 'id' => 3, |
||
973 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
974 | ], |
||
975 | ]; |
||
976 | }, |
||
977 | new PaginationResult( |
||
978 | [ |
||
979 | new Entity([ |
||
980 | 'id' => 1, |
||
981 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
982 | ]), |
||
983 | new Entity([ |
||
984 | 'id' => 3, |
||
985 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
986 | ]), |
||
987 | ], |
||
988 | [ |
||
989 | 'hasPrevious' => false, |
||
990 | 'previousCursor' => null, |
||
991 | 'hasNext' => true, |
||
992 | 'nextCursor' => [ |
||
993 | 'id' => 5, |
||
994 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
995 | ], |
||
996 | ] |
||
997 | ), |
||
998 | ]; |
||
999 | |||
1000 | yield 'Ascending backward exclusive with QueryExpression' => [ |
||
1001 | function () { |
||
1002 | return [ |
||
1003 | 'backward' => true, |
||
1004 | 'seekable' => true, |
||
1005 | 'exclusive' => true, |
||
1006 | 'limit' => 3, |
||
1007 | 'order' => [ |
||
1008 | new OrderClauseExpression('modified', 'asc'), |
||
1009 | new OrderClauseExpression('id', 'asc'), |
||
1010 | ], |
||
1011 | 'cursor' => [ |
||
1012 | 'id' => 3, |
||
1013 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1014 | ], |
||
1015 | ]; |
||
1016 | }, |
||
1017 | new PaginationResult( |
||
1018 | [ |
||
1019 | new Entity([ |
||
1020 | 'id' => 1, |
||
1021 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1022 | ]), |
||
1023 | ], |
||
1024 | [ |
||
1025 | 'hasPrevious' => false, |
||
1026 | 'previousCursor' => null, |
||
1027 | 'hasNext' => true, |
||
1028 | 'nextCursor' => [ |
||
1029 | 'id' => 1, |
||
1030 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1031 | ], |
||
1032 | ] |
||
1033 | ), |
||
1034 | ]; |
||
1035 | |||
1036 | yield 'Descending forward start inclusive with QueryExpression' => [ |
||
1037 | function () { |
||
1038 | return [ |
||
1039 | 'forward' => true, |
||
1040 | 'seekable' => true, |
||
1041 | 'limit' => 3, |
||
1042 | 'order' => [ |
||
1043 | new OrderClauseExpression('modified', 'desc'), |
||
1044 | new OrderClauseExpression('id', 'desc'), |
||
1045 | ], |
||
1046 | ]; |
||
1047 | }, |
||
1048 | new PaginationResult( |
||
1049 | [ |
||
1050 | new Entity([ |
||
1051 | 'id' => 4, |
||
1052 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1053 | ]), |
||
1054 | new Entity([ |
||
1055 | 'id' => 2, |
||
1056 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1057 | ]), |
||
1058 | new Entity([ |
||
1059 | 'id' => 5, |
||
1060 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1061 | ]), |
||
1062 | ], |
||
1063 | [ |
||
1064 | 'hasPrevious' => null, |
||
1065 | 'previousCursor' => null, |
||
1066 | 'hasNext' => true, |
||
1067 | 'nextCursor' => [ |
||
1068 | 'id' => 3, |
||
1069 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1070 | ], |
||
1071 | ] |
||
1072 | ), |
||
1073 | ]; |
||
1074 | |||
1075 | yield 'Descending forward start exclusive with QueryExpression' => [ |
||
1076 | function () { |
||
1077 | return [ |
||
1078 | 'forward' => true, |
||
1079 | 'seekable' => true, |
||
1080 | 'exclusive' => true, |
||
1081 | 'limit' => 3, |
||
1082 | 'order' => [ |
||
1083 | new OrderClauseExpression('modified', 'desc'), |
||
1084 | new OrderClauseExpression('id', 'desc'), |
||
1085 | ], |
||
1086 | ]; |
||
1087 | }, |
||
1088 | new PaginationResult( |
||
1089 | [ |
||
1090 | new Entity([ |
||
1091 | 'id' => 4, |
||
1092 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1093 | ]), |
||
1094 | new Entity([ |
||
1095 | 'id' => 2, |
||
1096 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1097 | ]), |
||
1098 | new Entity([ |
||
1099 | 'id' => 5, |
||
1100 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1101 | ]), |
||
1102 | ], |
||
1103 | [ |
||
1104 | 'hasPrevious' => null, |
||
1105 | 'previousCursor' => null, |
||
1106 | 'hasNext' => true, |
||
1107 | 'nextCursor' => [ |
||
1108 | 'id' => 5, |
||
1109 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1110 | ], |
||
1111 | ] |
||
1112 | ), |
||
1113 | ]; |
||
1114 | |||
1115 | yield 'Descending forward inclusive with QueryExpression' => [ |
||
1116 | function () { |
||
1117 | return [ |
||
1118 | 'forward' => true, |
||
1119 | 'seekable' => true, |
||
1120 | 'limit' => 3, |
||
1121 | 'order' => [ |
||
1122 | new OrderClauseExpression('modified', 'desc'), |
||
1123 | new OrderClauseExpression('id', 'desc'), |
||
1124 | ], |
||
1125 | 'cursor' => [ |
||
1126 | 'id' => 3, |
||
1127 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1128 | ], |
||
1129 | ]; |
||
1130 | }, |
||
1131 | new PaginationResult( |
||
1132 | [ |
||
1133 | new Entity([ |
||
1134 | 'id' => 3, |
||
1135 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1136 | ]), |
||
1137 | new Entity([ |
||
1138 | 'id' => 1, |
||
1139 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1140 | ]), |
||
1141 | ], |
||
1142 | [ |
||
1143 | 'hasPrevious' => true, |
||
1144 | 'previousCursor' => [ |
||
1145 | 'id' => 5, |
||
1146 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1147 | ], |
||
1148 | 'hasNext' => false, |
||
1149 | 'nextCursor' => null, |
||
1150 | ] |
||
1151 | ), |
||
1152 | ]; |
||
1153 | |||
1154 | yield 'Descending forward exclusive with QueryExpression' => [ |
||
1155 | function () { |
||
1156 | return [ |
||
1157 | 'forward' => true, |
||
1158 | 'seekable' => true, |
||
1159 | 'exclusive' => true, |
||
1160 | 'limit' => 3, |
||
1161 | 'order' => [ |
||
1162 | new OrderClauseExpression('modified', 'desc'), |
||
1163 | new OrderClauseExpression('id', 'desc'), |
||
1164 | ], |
||
1165 | 'cursor' => [ |
||
1166 | 'id' => 3, |
||
1167 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1168 | ], |
||
1169 | ]; |
||
1170 | }, |
||
1171 | new PaginationResult( |
||
1172 | [ |
||
1173 | new Entity([ |
||
1174 | 'id' => 1, |
||
1175 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1176 | ]), |
||
1177 | ], |
||
1178 | [ |
||
1179 | 'hasPrevious' => true, |
||
1180 | 'previousCursor' => [ |
||
1181 | 'id' => 1, |
||
1182 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1183 | ], |
||
1184 | 'hasNext' => false, |
||
1185 | 'nextCursor' => null, |
||
1186 | ] |
||
1187 | ), |
||
1188 | ]; |
||
1189 | |||
1190 | yield 'Descending backward start inclusive with QueryExpression' => [ |
||
1191 | function () { |
||
1192 | return [ |
||
1193 | 'backward' => true, |
||
1194 | 'seekable' => true, |
||
1195 | 'limit' => 3, |
||
1196 | 'order' => [ |
||
1197 | new OrderClauseExpression('modified', 'desc'), |
||
1198 | new OrderClauseExpression('id', 'desc'), |
||
1199 | ], |
||
1200 | ]; |
||
1201 | }, |
||
1202 | new PaginationResult( |
||
1203 | [ |
||
1204 | new Entity([ |
||
1205 | 'id' => 5, |
||
1206 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1207 | ]), |
||
1208 | new Entity([ |
||
1209 | 'id' => 3, |
||
1210 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1211 | ]), |
||
1212 | new Entity([ |
||
1213 | 'id' => 1, |
||
1214 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1215 | ]), |
||
1216 | ], |
||
1217 | [ |
||
1218 | 'hasPrevious' => true, |
||
1219 | 'previousCursor' => [ |
||
1220 | 'id' => 2, |
||
1221 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1222 | ], |
||
1223 | 'hasNext' => null, |
||
1224 | 'nextCursor' => null, |
||
1225 | ] |
||
1226 | ), |
||
1227 | ]; |
||
1228 | |||
1229 | yield 'Descending backward start exclusive with QueryExpression' => [ |
||
1230 | function () { |
||
1231 | return [ |
||
1232 | 'backward' => true, |
||
1233 | 'seekable' => true, |
||
1234 | 'exclusive' => true, |
||
1235 | 'limit' => 3, |
||
1236 | 'order' => [ |
||
1237 | new OrderClauseExpression('modified', 'desc'), |
||
1238 | new OrderClauseExpression('id', 'desc'), |
||
1239 | ], |
||
1240 | ]; |
||
1241 | }, |
||
1242 | new PaginationResult( |
||
1243 | [ |
||
1244 | new Entity([ |
||
1245 | 'id' => 5, |
||
1246 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1247 | ]), |
||
1248 | new Entity([ |
||
1249 | 'id' => 3, |
||
1250 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1251 | ]), |
||
1252 | new Entity([ |
||
1253 | 'id' => 1, |
||
1254 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1255 | ]), |
||
1256 | ], |
||
1257 | [ |
||
1258 | 'hasPrevious' => true, |
||
1259 | 'previousCursor' => [ |
||
1260 | 'id' => 5, |
||
1261 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1262 | ], |
||
1263 | 'hasNext' => null, |
||
1264 | 'nextCursor' => null, |
||
1265 | ] |
||
1266 | ), |
||
1267 | ]; |
||
1268 | |||
1269 | yield 'Descending backward inclusive with QueryExpression' => [ |
||
1270 | function () { |
||
1271 | return [ |
||
1272 | 'backward' => true, |
||
1273 | 'seekable' => true, |
||
1274 | 'limit' => 3, |
||
1275 | 'order' => [ |
||
1276 | new OrderClauseExpression('modified', 'desc'), |
||
1277 | new OrderClauseExpression('id', 'desc'), |
||
1278 | ], |
||
1279 | 'cursor' => [ |
||
1280 | 'id' => 3, |
||
1281 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1282 | ], |
||
1283 | ]; |
||
1284 | }, |
||
1285 | new PaginationResult( |
||
1286 | [ |
||
1287 | new Entity([ |
||
1288 | 'id' => 2, |
||
1289 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1290 | ]), |
||
1291 | new Entity([ |
||
1292 | 'id' => 5, |
||
1293 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1294 | ]), |
||
1295 | new Entity([ |
||
1296 | 'id' => 3, |
||
1297 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1298 | ]), |
||
1299 | ], |
||
1300 | [ |
||
1301 | 'hasPrevious' => true, |
||
1302 | 'previousCursor' => [ |
||
1303 | 'id' => 4, |
||
1304 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1305 | ], |
||
1306 | 'hasNext' => true, |
||
1307 | 'nextCursor' => [ |
||
1308 | 'id' => 1, |
||
1309 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1310 | ], |
||
1311 | ] |
||
1312 | ), |
||
1313 | ]; |
||
1314 | |||
1315 | yield 'Descending backward exclusive with QueryExpression' => [ |
||
1316 | function () { |
||
1317 | return [ |
||
1318 | 'backward' => true, |
||
1319 | 'seekable' => true, |
||
1320 | 'exclusive' => true, |
||
1321 | 'limit' => 3, |
||
1322 | 'order' => [ |
||
1323 | new OrderClauseExpression('modified', 'desc'), |
||
1324 | new OrderClauseExpression('id', 'desc'), |
||
1325 | ], |
||
1326 | 'cursor' => [ |
||
1327 | 'id' => 3, |
||
1328 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1329 | ], |
||
1330 | ]; |
||
1331 | }, |
||
1332 | new PaginationResult( |
||
1333 | [ |
||
1334 | new Entity([ |
||
1335 | 'id' => 4, |
||
1336 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1337 | ]), |
||
1338 | new Entity([ |
||
1339 | 'id' => 2, |
||
1340 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1341 | ]), |
||
1342 | new Entity([ |
||
1343 | 'id' => 5, |
||
1344 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1345 | ]), |
||
1346 | ], |
||
1347 | [ |
||
1348 | 'hasPrevious' => false, |
||
1349 | 'previousCursor' => null, |
||
1350 | 'hasNext' => true, |
||
1351 | 'nextCursor' => [ |
||
1352 | 'id' => 5, |
||
1353 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1354 | ], |
||
1360 |