Lines Matching refs:annotations
145 * @param array $annotations annotation list
148 public function statsFor(array $annotations) argument
152 foreach ($annotations as $a) {
206 $annotations = $this->getAnnotations($id);
207 $outcome = $modifier($annotations);
214 $ok = $this->writeFile($id, $annotations);
260 return $this->mutate($id, function (array &$annotations) use ($new) {
261 $annotations[] = $new;
280 return (bool) $this->mutate($id, function (array &$annotations) use ($annId, $body) {
281 foreach ($annotations as $i => $a) {
283 $annotations[$i]['body'] = $body;
284 $annotations[$i]['modified'] = time();
301 return (bool) $this->mutate($id, function (array &$annotations) use ($annId) {
302 foreach ($annotations as $i => $a) {
304 array_splice($annotations, $i, 1);
326 … return (bool) $this->mutate($id, function (array &$annotations) use ($annId, $status, $actor) {
327 foreach ($annotations as $i => $a) {
329 $annotations[$i]['status'] = $status;
331 $annotations[$i]['resolved_by'] = $actor;
332 $annotations[$i]['resolved_at'] = time();
334 $annotations[$i]['resolved_by'] = '';
335 $annotations[$i]['resolved_at'] = 0;
377 return $this->mutate($id, function (array &$annotations) use ($annId, $reply) {
378 foreach ($annotations as $i => $a) {
380 $annotations[$i]['replies'][] = $reply;
403 … return (bool) $this->mutate($id, function (array &$annotations) use ($annId, $replyId, $body) {
404 foreach ($annotations as $i => $a) {
410 $annotations[$i]['replies'][$j]['body'] = $body;
411 $annotations[$i]['replies'][$j]['modified'] = time();
430 return (bool) $this->mutate($id, function (array &$annotations) use ($annId, $replyId) {
431 foreach ($annotations as $i => $a) {
437 array_splice($annotations[$i]['replies'], $j, 1);
461 return $this->mutate($id, function (array &$annotations) {
462 $before = count($annotations);
463 $annotations = array_values(array_filter($annotations, function ($a) {
466 return $before - count($annotations);
509 return $this->mutate($id, function (array &$annotations) use ($orphanIds) {
510 $before = count($annotations);
511 $annotations = array_values(array_filter($annotations, function ($a) use ($orphanIds) {
514 return $before - count($annotations);
578 $annotations = $this->getAnnotations($id);
579 if (empty($annotations)) {
585 foreach ($annotations as $a) {
692 $annotations = $this->getAnnotations($id);
693 $total = count($annotations);
700 foreach ($annotations as $a) {