/** * @query Malocher\CqrsTest\Coverage\Mock\Query\MockQuery * @param MockQuery $query * @return array */ public function handleAnnotationQuery(MockQuery $query) { if ($query instanceof MockQuery) { $query->edit(); } return array(1, 2, 3, 4, 5); }
/** * @query Malocher\CqrsTest\Coverage\Mock\Query\MockQuery * @param MockQuery $query * @return array */ public function handleAnnotationQuery(MockQuery $query) { if (is_callable($query->callback)) { $query->edit(); call_user_func($query->callback, $query->isEdited()); } return array(1, 2, 3, 4, 5); }
/** * @param MockQuery $query * @return bool */ public function executeQueryHandler(MockQuery $query) { $query->edit(); return $query->isEdited(); }