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 |
||
754 | public function queryExpressionProvider(): Generator |
||
755 | { |
||
756 | yield 'Ascending forward start inclusive with QueryExpression' => [ |
||
757 | function () { |
||
758 | return [ |
||
759 | 'forward' => true, |
||
760 | 'seekable' => true, |
||
761 | 'limit' => 3, |
||
762 | 'order' => [ |
||
763 | new OrderClauseExpression('modified', 'asc'), |
||
764 | new OrderClauseExpression('id', 'asc'), |
||
765 | ], |
||
766 | ]; |
||
767 | }, |
||
768 | new PaginationResult( |
||
769 | [ |
||
770 | new Entity([ |
||
771 | 'id' => 1, |
||
772 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
773 | ]), |
||
774 | new Entity([ |
||
775 | 'id' => 3, |
||
776 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
777 | ]), |
||
778 | new Entity([ |
||
779 | 'id' => 5, |
||
780 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
781 | ]), |
||
782 | ], |
||
783 | [ |
||
784 | 'hasPrevious' => null, |
||
785 | 'previousCursor' => null, |
||
786 | 'hasNext' => true, |
||
787 | 'nextCursor' => [ |
||
788 | 'id' => 2, |
||
789 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
790 | ], |
||
791 | ] |
||
792 | ), |
||
793 | ]; |
||
794 | |||
795 | yield 'Ascending forward start exclusive with QueryExpression' => [ |
||
796 | function () { |
||
797 | return [ |
||
798 | 'forward' => true, |
||
799 | 'seekable' => true, |
||
800 | 'exclusive' => true, |
||
801 | 'limit' => 3, |
||
802 | 'order' => [ |
||
803 | new OrderClauseExpression('modified', 'asc'), |
||
804 | new OrderClauseExpression('id', 'asc'), |
||
805 | ], |
||
806 | ]; |
||
807 | }, |
||
808 | new PaginationResult( |
||
809 | [ |
||
810 | new Entity([ |
||
811 | 'id' => 1, |
||
812 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
813 | ]), |
||
814 | new Entity([ |
||
815 | 'id' => 3, |
||
816 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
817 | ]), |
||
818 | new Entity([ |
||
819 | 'id' => 5, |
||
820 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
821 | ]), |
||
822 | ], |
||
823 | [ |
||
824 | 'hasPrevious' => null, |
||
825 | 'previousCursor' => null, |
||
826 | 'hasNext' => true, |
||
827 | 'nextCursor' => [ |
||
828 | 'id' => 5, |
||
829 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
830 | ], |
||
831 | ] |
||
832 | ), |
||
833 | ]; |
||
834 | |||
835 | yield 'Ascending forward inclusive with QueryExpression' => [ |
||
836 | function () { |
||
837 | return [ |
||
838 | 'forward' => true, |
||
839 | 'seekable' => true, |
||
840 | 'limit' => 3, |
||
841 | 'order' => [ |
||
842 | new OrderClauseExpression('modified', 'asc'), |
||
843 | new OrderClauseExpression('id', 'asc'), |
||
844 | ], |
||
845 | 'cursor' => [ |
||
846 | 'id' => 3, |
||
847 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
848 | ], |
||
849 | ]; |
||
850 | }, |
||
851 | new PaginationResult( |
||
852 | [ |
||
853 | new Entity([ |
||
854 | 'id' => 3, |
||
855 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
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 | ], |
||
866 | [ |
||
867 | 'hasPrevious' => true, |
||
868 | 'previousCursor' => [ |
||
869 | 'id' => 1, |
||
870 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
871 | ], |
||
872 | 'hasNext' => true, |
||
873 | 'nextCursor' => [ |
||
874 | 'id' => 4, |
||
875 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
876 | ], |
||
877 | ] |
||
878 | ), |
||
879 | ]; |
||
880 | |||
881 | yield 'Ascending forward exclusive with QueryExpression' => [ |
||
882 | function () { |
||
883 | return [ |
||
884 | 'forward' => true, |
||
885 | 'seekable' => true, |
||
886 | 'exclusive' => true, |
||
887 | 'limit' => 3, |
||
888 | 'order' => [ |
||
889 | new OrderClauseExpression('modified', 'asc'), |
||
890 | new OrderClauseExpression('id', 'asc'), |
||
891 | ], |
||
892 | 'cursor' => [ |
||
893 | 'id' => 3, |
||
894 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
895 | ], |
||
896 | ]; |
||
897 | }, |
||
898 | new PaginationResult( |
||
899 | [ |
||
900 | new Entity([ |
||
901 | 'id' => 5, |
||
902 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
903 | ]), |
||
904 | new Entity([ |
||
905 | 'id' => 2, |
||
906 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
907 | ]), |
||
908 | new Entity([ |
||
909 | 'id' => 4, |
||
910 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
911 | ]), |
||
912 | ], |
||
913 | [ |
||
914 | 'hasPrevious' => true, |
||
915 | 'previousCursor' => [ |
||
916 | 'id' => 5, |
||
917 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
918 | ], |
||
919 | 'hasNext' => false, |
||
920 | 'nextCursor' => null, |
||
921 | ] |
||
922 | ), |
||
923 | ]; |
||
924 | |||
925 | yield 'Ascending backward start inclusive with QueryExpression' => [ |
||
926 | function () { |
||
927 | return [ |
||
928 | 'backward' => true, |
||
929 | 'seekable' => true, |
||
930 | 'limit' => 3, |
||
931 | 'order' => [ |
||
932 | new OrderClauseExpression('modified', 'asc'), |
||
933 | new OrderClauseExpression('id', 'asc'), |
||
934 | ], |
||
935 | ]; |
||
936 | }, |
||
937 | new PaginationResult( |
||
938 | [ |
||
939 | new Entity([ |
||
940 | 'id' => 5, |
||
941 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
942 | ]), |
||
943 | new Entity([ |
||
944 | 'id' => 2, |
||
945 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
946 | ]), |
||
947 | new Entity([ |
||
948 | 'id' => 4, |
||
949 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
950 | ]), |
||
951 | ], |
||
952 | [ |
||
953 | 'hasPrevious' => true, |
||
954 | 'previousCursor' => [ |
||
955 | 'id' => 3, |
||
956 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
957 | ], |
||
958 | 'hasNext' => null, |
||
959 | 'nextCursor' => null, |
||
960 | ] |
||
961 | ), |
||
962 | ]; |
||
963 | |||
964 | yield 'Ascending backward start exclusive with QueryExpression' => [ |
||
965 | function () { |
||
966 | return [ |
||
967 | 'backward' => true, |
||
968 | 'seekable' => true, |
||
969 | 'exclusive' => true, |
||
970 | 'limit' => 3, |
||
971 | 'order' => [ |
||
972 | new OrderClauseExpression('modified', 'asc'), |
||
973 | new OrderClauseExpression('id', 'asc'), |
||
974 | ], |
||
975 | ]; |
||
976 | }, |
||
977 | new PaginationResult( |
||
978 | [ |
||
979 | new Entity([ |
||
980 | 'id' => 5, |
||
981 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
982 | ]), |
||
983 | new Entity([ |
||
984 | 'id' => 2, |
||
985 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
986 | ]), |
||
987 | new Entity([ |
||
988 | 'id' => 4, |
||
989 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
990 | ]), |
||
991 | ], |
||
992 | [ |
||
993 | 'hasPrevious' => true, |
||
994 | 'previousCursor' => [ |
||
995 | 'id' => 5, |
||
996 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
997 | ], |
||
998 | 'hasNext' => null, |
||
999 | 'nextCursor' => null, |
||
1000 | ] |
||
1001 | ), |
||
1002 | ]; |
||
1003 | |||
1004 | yield 'Ascending backward inclusive with QueryExpression' => [ |
||
1005 | function () { |
||
1006 | return [ |
||
1007 | 'backward' => true, |
||
1008 | 'seekable' => true, |
||
1009 | 'limit' => 3, |
||
1010 | 'order' => [ |
||
1011 | new OrderClauseExpression('modified', 'asc'), |
||
1012 | new OrderClauseExpression('id', 'asc'), |
||
1013 | ], |
||
1014 | 'cursor' => [ |
||
1015 | 'id' => 3, |
||
1016 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1017 | ], |
||
1018 | ]; |
||
1019 | }, |
||
1020 | new PaginationResult( |
||
1021 | [ |
||
1022 | new Entity([ |
||
1023 | 'id' => 1, |
||
1024 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1025 | ]), |
||
1026 | new Entity([ |
||
1027 | 'id' => 3, |
||
1028 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1029 | ]), |
||
1030 | ], |
||
1031 | [ |
||
1032 | 'hasPrevious' => false, |
||
1033 | 'previousCursor' => null, |
||
1034 | 'hasNext' => true, |
||
1035 | 'nextCursor' => [ |
||
1036 | 'id' => 5, |
||
1037 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1038 | ], |
||
1039 | ] |
||
1040 | ), |
||
1041 | ]; |
||
1042 | |||
1043 | yield 'Ascending backward exclusive with QueryExpression' => [ |
||
1044 | function () { |
||
1045 | return [ |
||
1046 | 'backward' => true, |
||
1047 | 'seekable' => true, |
||
1048 | 'exclusive' => true, |
||
1049 | 'limit' => 3, |
||
1050 | 'order' => [ |
||
1051 | new OrderClauseExpression('modified', 'asc'), |
||
1052 | new OrderClauseExpression('id', 'asc'), |
||
1053 | ], |
||
1054 | 'cursor' => [ |
||
1055 | 'id' => 3, |
||
1056 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1057 | ], |
||
1058 | ]; |
||
1059 | }, |
||
1060 | new PaginationResult( |
||
1061 | [ |
||
1062 | new Entity([ |
||
1063 | 'id' => 1, |
||
1064 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1065 | ]), |
||
1066 | ], |
||
1067 | [ |
||
1068 | 'hasPrevious' => false, |
||
1069 | 'previousCursor' => null, |
||
1070 | 'hasNext' => true, |
||
1071 | 'nextCursor' => [ |
||
1072 | 'id' => 1, |
||
1073 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1074 | ], |
||
1075 | ] |
||
1076 | ), |
||
1077 | ]; |
||
1078 | |||
1079 | yield 'Descending forward start inclusive with QueryExpression' => [ |
||
1080 | function () { |
||
1081 | return [ |
||
1082 | 'forward' => true, |
||
1083 | 'seekable' => true, |
||
1084 | 'limit' => 3, |
||
1085 | 'order' => [ |
||
1086 | new OrderClauseExpression('modified', 'desc'), |
||
1087 | new OrderClauseExpression('id', 'desc'), |
||
1088 | ], |
||
1089 | ]; |
||
1090 | }, |
||
1091 | new PaginationResult( |
||
1092 | [ |
||
1093 | new Entity([ |
||
1094 | 'id' => 4, |
||
1095 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1096 | ]), |
||
1097 | new Entity([ |
||
1098 | 'id' => 2, |
||
1099 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1100 | ]), |
||
1101 | new Entity([ |
||
1102 | 'id' => 5, |
||
1103 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1104 | ]), |
||
1105 | ], |
||
1106 | [ |
||
1107 | 'hasPrevious' => null, |
||
1108 | 'previousCursor' => null, |
||
1109 | 'hasNext' => true, |
||
1110 | 'nextCursor' => [ |
||
1111 | 'id' => 3, |
||
1112 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1113 | ], |
||
1114 | ] |
||
1115 | ), |
||
1116 | ]; |
||
1117 | |||
1118 | yield 'Descending forward start exclusive with QueryExpression' => [ |
||
1119 | function () { |
||
1120 | return [ |
||
1121 | 'forward' => true, |
||
1122 | 'seekable' => true, |
||
1123 | 'exclusive' => true, |
||
1124 | 'limit' => 3, |
||
1125 | 'order' => [ |
||
1126 | new OrderClauseExpression('modified', 'desc'), |
||
1127 | new OrderClauseExpression('id', 'desc'), |
||
1128 | ], |
||
1129 | ]; |
||
1130 | }, |
||
1131 | new PaginationResult( |
||
1132 | [ |
||
1133 | new Entity([ |
||
1134 | 'id' => 4, |
||
1135 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1136 | ]), |
||
1137 | new Entity([ |
||
1138 | 'id' => 2, |
||
1139 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1140 | ]), |
||
1141 | new Entity([ |
||
1142 | 'id' => 5, |
||
1143 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1144 | ]), |
||
1145 | ], |
||
1146 | [ |
||
1147 | 'hasPrevious' => null, |
||
1148 | 'previousCursor' => null, |
||
1149 | 'hasNext' => true, |
||
1150 | 'nextCursor' => [ |
||
1151 | 'id' => 5, |
||
1152 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1153 | ], |
||
1154 | ] |
||
1155 | ), |
||
1156 | ]; |
||
1157 | |||
1158 | yield 'Descending forward inclusive with QueryExpression' => [ |
||
1159 | function () { |
||
1160 | return [ |
||
1161 | 'forward' => true, |
||
1162 | 'seekable' => true, |
||
1163 | 'limit' => 3, |
||
1164 | 'order' => [ |
||
1165 | new OrderClauseExpression('modified', 'desc'), |
||
1166 | new OrderClauseExpression('id', 'desc'), |
||
1167 | ], |
||
1168 | 'cursor' => [ |
||
1169 | 'id' => 3, |
||
1170 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1171 | ], |
||
1172 | ]; |
||
1173 | }, |
||
1174 | new PaginationResult( |
||
1175 | [ |
||
1176 | new Entity([ |
||
1177 | 'id' => 3, |
||
1178 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1179 | ]), |
||
1180 | new Entity([ |
||
1181 | 'id' => 1, |
||
1182 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1183 | ]), |
||
1184 | ], |
||
1185 | [ |
||
1186 | 'hasPrevious' => true, |
||
1187 | 'previousCursor' => [ |
||
1188 | 'id' => 5, |
||
1189 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1190 | ], |
||
1191 | 'hasNext' => false, |
||
1192 | 'nextCursor' => null, |
||
1193 | ] |
||
1194 | ), |
||
1195 | ]; |
||
1196 | |||
1197 | yield 'Descending forward exclusive with QueryExpression' => [ |
||
1198 | function () { |
||
1199 | return [ |
||
1200 | 'forward' => true, |
||
1201 | 'seekable' => true, |
||
1202 | 'exclusive' => true, |
||
1203 | 'limit' => 3, |
||
1204 | 'order' => [ |
||
1205 | new OrderClauseExpression('modified', 'desc'), |
||
1206 | new OrderClauseExpression('id', 'desc'), |
||
1207 | ], |
||
1208 | 'cursor' => [ |
||
1209 | 'id' => 3, |
||
1210 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1211 | ], |
||
1212 | ]; |
||
1213 | }, |
||
1214 | new PaginationResult( |
||
1215 | [ |
||
1216 | new Entity([ |
||
1217 | 'id' => 1, |
||
1218 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1219 | ]), |
||
1220 | ], |
||
1221 | [ |
||
1222 | 'hasPrevious' => true, |
||
1223 | 'previousCursor' => [ |
||
1224 | 'id' => 1, |
||
1225 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1226 | ], |
||
1227 | 'hasNext' => false, |
||
1228 | 'nextCursor' => null, |
||
1229 | ] |
||
1230 | ), |
||
1231 | ]; |
||
1232 | |||
1233 | yield 'Descending backward start inclusive with QueryExpression' => [ |
||
1234 | function () { |
||
1235 | return [ |
||
1236 | 'backward' => true, |
||
1237 | 'seekable' => true, |
||
1238 | 'limit' => 3, |
||
1239 | 'order' => [ |
||
1240 | new OrderClauseExpression('modified', 'desc'), |
||
1241 | new OrderClauseExpression('id', 'desc'), |
||
1242 | ], |
||
1243 | ]; |
||
1244 | }, |
||
1245 | new PaginationResult( |
||
1246 | [ |
||
1247 | new Entity([ |
||
1248 | 'id' => 5, |
||
1249 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1250 | ]), |
||
1251 | new Entity([ |
||
1252 | 'id' => 3, |
||
1253 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1254 | ]), |
||
1255 | new Entity([ |
||
1256 | 'id' => 1, |
||
1257 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1258 | ]), |
||
1259 | ], |
||
1260 | [ |
||
1261 | 'hasPrevious' => true, |
||
1262 | 'previousCursor' => [ |
||
1263 | 'id' => 2, |
||
1264 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1265 | ], |
||
1266 | 'hasNext' => null, |
||
1267 | 'nextCursor' => null, |
||
1268 | ] |
||
1269 | ), |
||
1270 | ]; |
||
1271 | |||
1272 | yield 'Descending backward start exclusive with QueryExpression' => [ |
||
1273 | function () { |
||
1274 | return [ |
||
1275 | 'backward' => true, |
||
1276 | 'seekable' => true, |
||
1277 | 'exclusive' => true, |
||
1278 | 'limit' => 3, |
||
1279 | 'order' => [ |
||
1280 | new OrderClauseExpression('modified', 'desc'), |
||
1281 | new OrderClauseExpression('id', 'desc'), |
||
1282 | ], |
||
1283 | ]; |
||
1284 | }, |
||
1285 | new PaginationResult( |
||
1286 | [ |
||
1287 | new Entity([ |
||
1288 | 'id' => 5, |
||
1289 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1290 | ]), |
||
1291 | new Entity([ |
||
1292 | 'id' => 3, |
||
1293 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1294 | ]), |
||
1295 | new Entity([ |
||
1296 | 'id' => 1, |
||
1297 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1298 | ]), |
||
1299 | ], |
||
1300 | [ |
||
1301 | 'hasPrevious' => true, |
||
1302 | 'previousCursor' => [ |
||
1303 | 'id' => 5, |
||
1304 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1305 | ], |
||
1306 | 'hasNext' => null, |
||
1307 | 'nextCursor' => null, |
||
1308 | ] |
||
1309 | ), |
||
1310 | ]; |
||
1311 | |||
1312 | yield 'Descending backward inclusive with QueryExpression' => [ |
||
1313 | function () { |
||
1314 | return [ |
||
1315 | 'backward' => true, |
||
1316 | 'seekable' => true, |
||
1317 | 'limit' => 3, |
||
1318 | 'order' => [ |
||
1319 | new OrderClauseExpression('modified', 'desc'), |
||
1320 | new OrderClauseExpression('id', 'desc'), |
||
1321 | ], |
||
1322 | 'cursor' => [ |
||
1323 | 'id' => 3, |
||
1324 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1325 | ], |
||
1326 | ]; |
||
1327 | }, |
||
1328 | new PaginationResult( |
||
1329 | [ |
||
1330 | new Entity([ |
||
1331 | 'id' => 2, |
||
1332 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1333 | ]), |
||
1334 | new Entity([ |
||
1335 | 'id' => 5, |
||
1336 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1337 | ]), |
||
1338 | new Entity([ |
||
1339 | 'id' => 3, |
||
1340 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1341 | ]), |
||
1342 | ], |
||
1343 | [ |
||
1344 | 'hasPrevious' => true, |
||
1345 | 'previousCursor' => [ |
||
1346 | 'id' => 4, |
||
1347 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1348 | ], |
||
1349 | 'hasNext' => true, |
||
1350 | 'nextCursor' => [ |
||
1351 | 'id' => 1, |
||
1352 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1353 | ], |
||
1354 | ] |
||
1355 | ), |
||
1356 | ]; |
||
1357 | |||
1358 | yield 'Descending backward exclusive with QueryExpression' => [ |
||
1359 | function () { |
||
1360 | return [ |
||
1361 | 'backward' => true, |
||
1362 | 'seekable' => true, |
||
1363 | 'exclusive' => true, |
||
1364 | 'limit' => 3, |
||
1365 | 'order' => [ |
||
1366 | new OrderClauseExpression('modified', 'desc'), |
||
1367 | new OrderClauseExpression('id', 'desc'), |
||
1368 | ], |
||
1369 | 'cursor' => [ |
||
1370 | 'id' => 3, |
||
1371 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1372 | ], |
||
1373 | ]; |
||
1374 | }, |
||
1375 | new PaginationResult( |
||
1376 | [ |
||
1377 | new Entity([ |
||
1378 | 'id' => 4, |
||
1379 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1380 | ]), |
||
1381 | new Entity([ |
||
1382 | 'id' => 2, |
||
1383 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1384 | ]), |
||
1385 | new Entity([ |
||
1386 | 'id' => 5, |
||
1387 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1388 | ]), |
||
1389 | ], |
||
1390 | [ |
||
1391 | 'hasPrevious' => false, |
||
1392 | 'previousCursor' => null, |
||
1393 | 'hasNext' => true, |
||
1394 | 'nextCursor' => [ |
||
1395 | 'id' => 5, |
||
1396 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1397 | ], |
||
1403 |