From aa37b7221738e2baf0216320d85a605acbab28a7 Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Wed, 24 Apr 2019 11:29:53 -0500 Subject: [PATCH 1/6] Combine multiple line deprecation messages --- src/Parser/PhpDocParser.php | 13 +++++++++- tests/PHPStan/Parser/PhpDocParserTest.php | 31 ++++++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/Parser/PhpDocParser.php b/src/Parser/PhpDocParser.php index a0efa34f..7d991c26 100644 --- a/src/Parser/PhpDocParser.php +++ b/src/Parser/PhpDocParser.php @@ -170,7 +170,18 @@ private function parseThrowsTagValue(TokenIterator $tokens): Ast\PhpDoc\ThrowsTa private function parseDeprecatedTagValue(TokenIterator $tokens): Ast\PhpDoc\DeprecatedTagValueNode { - $description = $this->parseOptionalDescription($tokens); + $description = ''; + while ($tokens->currentTokenType() !== Lexer::TOKEN_CLOSE_PHPDOC) { + $description .= $tokens->joinUntil(Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END); + $description = rtrim($description, " \t"); + if ($tokens->currentTokenType() !== Lexer::TOKEN_PHPDOC_EOL) { + break; + } + // There's more text on a new line, ensure spacing. + $description .= ' '; + $tokens->next(); + } + $description = rtrim($description, " \t"); return new Ast\PhpDoc\DeprecatedTagValueNode($description); } diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index dd9f3aff..af688fc3 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -1004,11 +1004,34 @@ public function provideDeprecatedTagsData(): \Iterator new PhpDocNode([ new PhpDocTagNode( '@deprecated', - new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In') + new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In Drupal 9 there will be no way to set the status and in Drupal 8 this ability has been removed because mb_*() functions are supplied using Symfony\'s polyfill.') + ), + ]), + ]; + yield [ + 'OK with multiple and long descriptions', + '/** + * Sample class + * + * @author Foo Baz + * + * @deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In + * Drupal 9 there will be no way to set the status and in Drupal 8 this + * ability has been removed because mb_*() functions are supplied using + * Symfony\'s polyfill. + */', + new PhpDocNode([ + new PhpDocTextNode('Sample class'), + new PhpDocTextNode(''), + new PhpDocTagNode( + '@author', + new GenericTagValueNode('Foo Baz ') + ), + new PhpDocTextNode(''), + new PhpDocTagNode( + '@deprecated', + new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In Drupal 9 there will be no way to set the status and in Drupal 8 this ability has been removed because mb_*() functions are supplied using Symfony\'s polyfill.') ), - new PhpDocTextNode('Drupal 9 there will be no way to set the status and in Drupal 8 this'), - new PhpDocTextNode('ability has been removed because mb_*() functions are supplied using'), - new PhpDocTextNode('Symfony\'s polyfill.'), ]), ]; } From 06d18bd63f7d351ee53af024720f50a9c4d33c8d Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Thu, 25 Apr 2019 10:40:59 -0500 Subject: [PATCH 2/6] Support multiple line descriptions for all tags --- src/Parser/PhpDocParser.php | 47 +++++++++++++++------- tests/PHPStan/Parser/PhpDocParserTest.php | 48 ++++++++++++++++++++--- 2 files changed, 75 insertions(+), 20 deletions(-) diff --git a/src/Parser/PhpDocParser.php b/src/Parser/PhpDocParser.php index 7d991c26..e7ab6013 100644 --- a/src/Parser/PhpDocParser.php +++ b/src/Parser/PhpDocParser.php @@ -61,8 +61,38 @@ private function parseChild(TokenIterator $tokens): Ast\PhpDoc\PhpDocChildNode private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode { - $text = $tokens->joinUntil(Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END); - $text = rtrim($text, " \t"); // the trimmed characters MUST match Lexer::TOKEN_HORIZONTAL_WS + $text = ''; + while (true) { + // If we received a Lexer::TOKEN_PHPDOC_EOL, exit early to prevent + // them from being processed. + if ($tokens->currentTokenType() === Lexer::TOKEN_PHPDOC_EOL) { + break; + } + $text .= $tokens->joinUntil(Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END); + $text = rtrim($text, " \t"); + + // If we joined until TOKEN_PHPDOC_EOL, peak at the next tokens to see + // if we have a multiline string to join. + if ($tokens->currentTokenType() !== Lexer::TOKEN_PHPDOC_EOL) { + break; + } + + // Peek at the next token to determine if it is more text that needs + // to be combined. + $tokens->pushSavePoint(); + $tokens->next(); + if ($tokens->currentTokenType() === Lexer::TOKEN_PHPDOC_EOL) { + $tokens->next(); + } + if ($tokens->currentTokenType() !== Lexer::TOKEN_IDENTIFIER) { + $tokens->rollback(); + break; + } + + // There's more text on a new line, ensure spacing. + $text .= ' '; + } + $text = trim($text, " \t"); return new Ast\PhpDoc\PhpDocTextNode($text); } @@ -170,18 +200,7 @@ private function parseThrowsTagValue(TokenIterator $tokens): Ast\PhpDoc\ThrowsTa private function parseDeprecatedTagValue(TokenIterator $tokens): Ast\PhpDoc\DeprecatedTagValueNode { - $description = ''; - while ($tokens->currentTokenType() !== Lexer::TOKEN_CLOSE_PHPDOC) { - $description .= $tokens->joinUntil(Lexer::TOKEN_PHPDOC_EOL, Lexer::TOKEN_CLOSE_PHPDOC, Lexer::TOKEN_END); - $description = rtrim($description, " \t"); - if ($tokens->currentTokenType() !== Lexer::TOKEN_PHPDOC_EOL) { - break; - } - // There's more text on a new line, ensure spacing. - $description .= ' '; - $tokens->next(); - } - $description = rtrim($description, " \t"); + $description = $this->parseOptionalDescription($tokens); return new Ast\PhpDoc\DeprecatedTagValueNode($description); } diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index af688fc3..43ca6b83 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -994,6 +994,41 @@ public function provideDeprecatedTagsData(): \Iterator ), ]), ]; + yield [ + 'OK with two simple description with break', + '/** @deprecated text first + * + * @deprecated text second + */', + new PhpDocNode([ + new PhpDocTagNode( + '@deprecated', + new DeprecatedTagValueNode('text first') + ), + new PhpDocTextNode(''), + new PhpDocTagNode( + '@deprecated', + new DeprecatedTagValueNode('text second') + ), + ]), + ]; + + yield [ + 'OK with two simple description without break', + '/** @deprecated text first + * @deprecated text second + */', + new PhpDocNode([ + new PhpDocTagNode( + '@deprecated', + new DeprecatedTagValueNode('text first') + ), + new PhpDocTagNode( + '@deprecated', + new DeprecatedTagValueNode('text second') + ), + ]), + ]; yield [ 'OK with long descriptions', @@ -1543,10 +1578,9 @@ public function provideMultiLinePhpDocData(): array new IdentifierTypeNode('Foo'), false, '$foo', - '1st multi world description' + '1st multi world description some text in the middle' ) ), - new PhpDocTextNode('some text in the middle'), new PhpDocTagNode( '@param', new ParamTagValueNode( @@ -1563,15 +1597,16 @@ public function provideMultiLinePhpDocData(): array '/** * * - * @param Foo $foo 1st multi world description + * @param Foo $foo 1st multi world description with empty lines * * * some text in the middle * * - * @param Bar $bar 2nd multi world description + * @param Bar $bar 2nd multi world description with empty lines * * + * test */', new PhpDocNode([ new PhpDocTextNode(''), @@ -1582,7 +1617,7 @@ public function provideMultiLinePhpDocData(): array new IdentifierTypeNode('Foo'), false, '$foo', - '1st multi world description' + '1st multi world description with empty lines' ) ), new PhpDocTextNode(''), @@ -1596,11 +1631,12 @@ public function provideMultiLinePhpDocData(): array new IdentifierTypeNode('Bar'), false, '$bar', - '2nd multi world description' + '2nd multi world description with empty lines' ) ), new PhpDocTextNode(''), new PhpDocTextNode(''), + new PhpDocTextNode('test'), ]), ], [ From 3ea6f2cb6a162d48f4fe2a5986b2d0a39efa7982 Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Fri, 26 Apr 2019 17:02:37 -0500 Subject: [PATCH 3/6] Add a real world example --- tests/PHPStan/Parser/PhpDocParserTest.php | 84 ++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index 43ca6b83..99eac6dd 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -50,7 +50,11 @@ protected function setUp(): void * @dataProvider provideMethodTagsData * @dataProvider provideSingleLinePhpDocData * @dataProvider provideMultiLinePhpDocData +<<<<<<< HEAD * @dataProvider provideTemplateTagsData +======= + * @dataProvider provideRealWorldExampleData +>>>>>>> Add a real world example * @param string $label * @param string $input * @param PhpDocNode $expectedPhpDocNode @@ -2259,7 +2263,6 @@ public function provideMultiLinePhpDocData(): array ]; } - public function provideTemplateTagsData(): \Iterator { yield [ @@ -2361,4 +2364,83 @@ public function provideTemplateTagsData(): \Iterator ]; } + public function provideRealWorldExampleData(): \Iterator + { + yield [ + 'OK with two param and paragraph description', + << Date: Mon, 29 Apr 2019 22:46:33 -0500 Subject: [PATCH 4/6] Fix and remove heredoc --- tests/PHPStan/Parser/PhpDocParserTest.php | 173 +++++++++++----------- 1 file changed, 85 insertions(+), 88 deletions(-) diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index 99eac6dd..ff187543 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -50,11 +50,8 @@ protected function setUp(): void * @dataProvider provideMethodTagsData * @dataProvider provideSingleLinePhpDocData * @dataProvider provideMultiLinePhpDocData -<<<<<<< HEAD * @dataProvider provideTemplateTagsData -======= * @dataProvider provideRealWorldExampleData ->>>>>>> Add a real world example * @param string $label * @param string $input * @param PhpDocNode $expectedPhpDocNode @@ -1000,9 +997,9 @@ public function provideDeprecatedTagsData(): \Iterator ]; yield [ 'OK with two simple description with break', - '/** @deprecated text first + '/** @deprecated text first * - * @deprecated text second + * @deprecated text second */', new PhpDocNode([ new PhpDocTagNode( @@ -1019,8 +1016,8 @@ public function provideDeprecatedTagsData(): \Iterator yield [ 'OK with two simple description without break', - '/** @deprecated text first - * @deprecated text second + '/** @deprecated text first + * @deprecated text second */', new PhpDocNode([ new PhpDocTagNode( @@ -1051,13 +1048,13 @@ public function provideDeprecatedTagsData(): \Iterator 'OK with multiple and long descriptions', '/** * Sample class - * + * * @author Foo Baz - * + * * @deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In * Drupal 9 there will be no way to set the status and in Drupal 8 this * ability has been removed because mb_*() functions are supplied using - * Symfony\'s polyfill. + * Symfony\'s polyfill. */', new PhpDocNode([ new PhpDocTextNode('Sample class'), @@ -2365,82 +2362,82 @@ public function provideTemplateTagsData(): \Iterator } public function provideRealWorldExampleData(): \Iterator - { - yield [ - 'OK with two param and paragraph description', - << Date: Thu, 9 May 2019 07:36:02 -0500 Subject: [PATCH 5/6] Use "\n" --- src/Parser/PhpDocParser.php | 2 +- tests/PHPStan/Parser/PhpDocParserTest.php | 49 ++++++++++++++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/src/Parser/PhpDocParser.php b/src/Parser/PhpDocParser.php index e7ab6013..966e0ddb 100644 --- a/src/Parser/PhpDocParser.php +++ b/src/Parser/PhpDocParser.php @@ -90,7 +90,7 @@ private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode } // There's more text on a new line, ensure spacing. - $text .= ' '; + $text .= "\n"; } $text = trim($text, " \t"); diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index ff187543..977f1efd 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -1040,7 +1040,10 @@ public function provideDeprecatedTagsData(): \Iterator new PhpDocNode([ new PhpDocTagNode( '@deprecated', - new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In Drupal 9 there will be no way to set the status and in Drupal 8 this ability has been removed because mb_*() functions are supplied using Symfony\'s polyfill.') + new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In +Drupal 9 there will be no way to set the status and in Drupal 8 this +ability has been removed because mb_*() functions are supplied using +Symfony\'s polyfill.') ), ]), ]; @@ -1066,7 +1069,10 @@ public function provideDeprecatedTagsData(): \Iterator new PhpDocTextNode(''), new PhpDocTagNode( '@deprecated', - new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In Drupal 9 there will be no way to set the status and in Drupal 8 this ability has been removed because mb_*() functions are supplied using Symfony\'s polyfill.') + new DeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In +Drupal 9 there will be no way to set the status and in Drupal 8 this +ability has been removed because mb_*() functions are supplied using +Symfony\'s polyfill.') ), ]), ]; @@ -1579,7 +1585,8 @@ public function provideMultiLinePhpDocData(): array new IdentifierTypeNode('Foo'), false, '$foo', - '1st multi world description some text in the middle' + '1st multi world description +some text in the middle' ) ), new PhpDocTagNode( @@ -2404,7 +2411,11 @@ public function provideRealWorldExampleData(): \Iterator 'OK with two param and paragraph description', $sample, new PhpDocNode([ - new PhpDocTextNode('Returns the schema for the field. This method is static because the field schema information is needed on creation of the field. FieldItemInterface objects instantiated at that time are not reliable as field settings might be missing. Computed fields having no schema should return an empty array.'), + new PhpDocTextNode('Returns the schema for the field. +This method is static because the field schema information is needed on +creation of the field. FieldItemInterface objects instantiated at that +time are not reliable as field settings might be missing. +Computed fields having no schema should return an empty array.'), // @todo the commented out items should be correct. //new PhpDocTextNode('Returns the schema for the field.'), new PhpDocTextNode(''), @@ -2420,7 +2431,6 @@ public function provideRealWorldExampleData(): \Iterator '' ) ), - // @todo this should be the param description, but new line param descriptions are not handled. new PhpDocTextNode('The field definition.'), new PhpDocTextNode(''), new PhpDocTagNode( @@ -2430,12 +2440,29 @@ public function provideRealWorldExampleData(): \Iterator '' ) ), - // @todo these are actually the @return description. - new PhpDocTextNode('An empty array if there is no schema, or an associative array with the following key/value pairs:'), - new PhpDocTextNode('- columns: An array of Schema API column specifications, keyed by column name. The columns need to be a subset of the properties defined in propertyDefinitions(). The \'not null\' property is ignored if present, as it is determined automatically by the storage controller depending on the table layout and the property definitions. It is recommended to avoid having the column definitions depend on field settings when possible. No assumptions should be made on how storage engines internally use the original column name to structure their storage.'), - new PhpDocTextNode('- unique keys: (optional) An array of Schema API unique key definitions. Only columns that appear in the \'columns\' array are allowed.'), - new PhpDocTextNode('- indexes: (optional) An array of Schema API index definitions. Only columns that appear in the \'columns\' array are allowed. Those indexes will be used as default indexes. Field definitions can specify additional indexes or, at their own risk, modify the default indexes specified by the field-type module. Some storage engines might not support indexes.'), - new PhpDocTextNode('- foreign keys: (optional) An array of Schema API foreign key definitions. Note, however, that the field data is not necessarily stored in SQL. Also, the possible usage is limited, as you cannot specify another field as related, only existing SQL tables, such as {taxonomy_term_data}.'), + new PhpDocTextNode('An empty array if there is no schema, or an associative array with the +following key/value pairs:'), + new PhpDocTextNode('- columns: An array of Schema API column specifications, keyed by column +name. The columns need to be a subset of the properties defined in +propertyDefinitions(). The \'not null\' property is ignored if present, +as it is determined automatically by the storage controller depending +on the table layout and the property definitions. It is recommended to +avoid having the column definitions depend on field settings when +possible. No assumptions should be made on how storage engines +internally use the original column name to structure their storage.'), + new PhpDocTextNode('- unique keys: (optional) An array of Schema API unique key definitions. +Only columns that appear in the \'columns\' array are allowed.'), + new PhpDocTextNode('- indexes: (optional) An array of Schema API index definitions. Only +columns that appear in the \'columns\' array are allowed. Those indexes +will be used as default indexes. Field definitions can specify +additional indexes or, at their own risk, modify the default indexes +specified by the field-type module. Some storage engines might not +support indexes.'), + new PhpDocTextNode('- foreign keys: (optional) An array of Schema API foreign key +definitions. Note, however, that the field data is not necessarily +stored in SQL. Also, the possible usage is limited, as you cannot +specify another field as related, only existing SQL tables, +such as {taxonomy_term_data}.'), ]), ]; } From 882d580fea8b40464feb2b17f3ada38a9bde6e11 Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Thu, 9 May 2019 08:05:45 -0500 Subject: [PATCH 6/6] Fix skipped new lines --- src/Parser/PhpDocParser.php | 3 - tests/PHPStan/Parser/PhpDocParserTest.php | 98 ++++++++++++++++++++--- 2 files changed, 87 insertions(+), 14 deletions(-) diff --git a/src/Parser/PhpDocParser.php b/src/Parser/PhpDocParser.php index 966e0ddb..ae930953 100644 --- a/src/Parser/PhpDocParser.php +++ b/src/Parser/PhpDocParser.php @@ -81,9 +81,6 @@ private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode // to be combined. $tokens->pushSavePoint(); $tokens->next(); - if ($tokens->currentTokenType() === Lexer::TOKEN_PHPDOC_EOL) { - $tokens->next(); - } if ($tokens->currentTokenType() !== Lexer::TOKEN_IDENTIFIER) { $tokens->rollback(); break; diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index 977f1efd..8c6c951e 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -51,7 +51,7 @@ protected function setUp(): void * @dataProvider provideSingleLinePhpDocData * @dataProvider provideMultiLinePhpDocData * @dataProvider provideTemplateTagsData - * @dataProvider provideRealWorldExampleData + * @dataProvider provideRealWorldExampleData * @param string $label * @param string $input * @param PhpDocNode $expectedPhpDocNode @@ -2368,6 +2368,32 @@ public function provideTemplateTagsData(): \Iterator ]; } + public function providerDebug(): \Iterator + { + $sample = '/** + * Returns the schema for the field. + * + * This method is static because the field schema information is needed on + * creation of the field. FieldItemInterface objects instantiated at that + * time are not reliable as field settings might be missing. + * + * Computed fields having no schema should return an empty array. + */'; + yield [ + 'OK class line', + $sample, + new PhpDocNode([ + new PhpDocTextNode('Returns the schema for the field.'), + new PhpDocTextNode(''), + new PhpDocTextNode('This method is static because the field schema information is needed on +creation of the field. FieldItemInterface objects instantiated at that +time are not reliable as field settings might be missing.'), + new PhpDocTextNode(''), + new PhpDocTextNode('Computed fields having no schema should return an empty array.'), + ]), + ]; + } + public function provideRealWorldExampleData(): \Iterator { $sample = "/** @@ -2408,20 +2434,17 @@ public function provideRealWorldExampleData(): \Iterator * such as {taxonomy_term_data}. */"; yield [ - 'OK with two param and paragraph description', + 'OK FieldItemInterface::schema', $sample, new PhpDocNode([ - new PhpDocTextNode('Returns the schema for the field. -This method is static because the field schema information is needed on + new PhpDocTextNode('Returns the schema for the field.'), + new PhpDocTextNode(''), + new PhpDocTextNode('This method is static because the field schema information is needed on creation of the field. FieldItemInterface objects instantiated at that -time are not reliable as field settings might be missing. -Computed fields having no schema should return an empty array.'), - // @todo the commented out items should be correct. - //new PhpDocTextNode('Returns the schema for the field.'), +time are not reliable as field settings might be missing.'), + new PhpDocTextNode(''), + new PhpDocTextNode('Computed fields having no schema should return an empty array.'), new PhpDocTextNode(''), - //new PhpDocTextNode('This method is static because the field schema information is needed on creation of the field. FieldItemInterface objects instantiated at that time are not reliable as field settings might be missing.'), - //new PhpDocTextNode(''), - //new PhpDocTextNode('Computed fields having no schema should return an empty array.'), new PhpDocTagNode( '@param', new ParamTagValueNode( @@ -2465,6 +2488,59 @@ public function provideRealWorldExampleData(): \Iterator such as {taxonomy_term_data}.'), ]), ]; + + $sample = '/** + * Parses a chunked request and return relevant information. + * + * This function must return an array containing the following + * keys and their corresponding values: + * - last: Wheter this is the last chunk of the uploaded file + * - uuid: A unique id which distinguishes two uploaded files + * This uuid must stay the same among the task of + * uploading a chunked file. + * - index: A numerical representation of the currently uploaded + * chunk. Must be higher that in the previous request. + * - orig: The original file name. + * + * @param Request $request - The request object + * + * @return array + */'; + yield [ + 'OK AbstractChunkedController::parseChunkedRequest', + $sample, + new PhpDocNode([ + new PhpDocTextNode('Parses a chunked request and return relevant information.'), + new PhpDocTextNode(''), + new PhpDocTextNode('This function must return an array containing the following +keys and their corresponding values:'), + new PhpDocTextNode('- last: Wheter this is the last chunk of the uploaded file'), + new PhpDocTextNode('- uuid: A unique id which distinguishes two uploaded files +This uuid must stay the same among the task of +uploading a chunked file.'), + new PhpDocTextNode('- index: A numerical representation of the currently uploaded +chunk. Must be higher that in the previous request.'), + new PhpDocTextNode('- orig: The original file name.'), + new PhpDocTextNode(''), + new PhpDocTagNode( + '@param', + new ParamTagValueNode( + new IdentifierTypeNode('Request'), + false, + '$request', + '- The request object' + ) + ), + new PhpDocTextNode(''), + new PhpDocTagNode( + '@return', + new ReturnTagValueNode( + new IdentifierTypeNode('array'), + '' + ) + ), + ]), + ]; } }