From fbfc5313fc808bc0998e6dc51e917b3e8744d4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Wed, 16 Oct 2013 14:52:04 +0200 Subject: [PATCH] Updated phpdoc --- Item/ItemProcessorInterface.php | 9 +++++---- Item/ItemReaderInterface.php | 14 +++++--------- Item/ItemWriterInterface.php | 2 ++ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Item/ItemProcessorInterface.php b/Item/ItemProcessorInterface.php index 312fad0..a9ef35e 100644 --- a/Item/ItemProcessorInterface.php +++ b/Item/ItemProcessorInterface.php @@ -16,13 +16,14 @@ interface ItemProcessorInterface { /** * Process the provided item, returning a potentially modified or new item for continued - * processing. If the returned result is null, it is assumed that processing of the item - * should not continue. + * processing. It should not return null, instead it should throw an InvalidItemException + * in case of warning; * * @param mixed $item item to be processed * - * @return mixed Potentially modified or new item for continued processing, null if processing of the - * provided item should not continue. + * @return mixed Potentially modified or new item for continued processing + * @throws InvalidItemException if there is a problem processing the current record + * (but the next one may still be valid) * @throws \Exception */ public function process($item); diff --git a/Item/ItemReaderInterface.php b/Item/ItemReaderInterface.php index cb042a3..c1d83d2 100644 --- a/Item/ItemReaderInterface.php +++ b/Item/ItemReaderInterface.php @@ -21,16 +21,12 @@ interface ItemReaderInterface * must return null at the end of the input * data set. * - * @throws ParseException if there is a problem parsing the current record + * @throws InvalidItemException if there is a problem reading the current record * (but the next one may still be valid) - * @throws NonTransientResourceException if there is a fatal exception in - * the underlying resource. After throwing this exception implementations - * should endeavour to return null from subsequent calls to read. - * @throws UnexpectedInputException if there is an uncategorised problem - * with the input data. Assume potentially transient, so subsequent calls to - * read might succeed. - * @throws \Exception if an there is a non-specific error. - * @return null|mixed Returns false in case of reading error + * @throws \Exception if an there is a non-specific error. (step execution will + * be stopped in that case) + * + * @return null|mixed */ public function read(); } diff --git a/Item/ItemWriterInterface.php b/Item/ItemWriterInterface.php index 3bf6170..23f35d7 100644 --- a/Item/ItemWriterInterface.php +++ b/Item/ItemWriterInterface.php @@ -28,6 +28,8 @@ interface ItemWriterInterface * * FIXME: array is not maybe the best structure to hold the items. Investigate this point. * + * @throw InvalidItemException if there is a warning, step execution will continue to the + * next item. * @throws \Exception if there are errors. The framework will catch the * exception and convert or rethrow it as appropriate. */