kphp icon indicating copy to clipboard operation
kphp copied to clipboard

Support multistring phpdoc for `shape`

Open Danil42Russia opened this issue 1 year ago • 1 comments

Example code:

<?php

/**
 * @return shape(
 *     uuid?: string,
 *     id: int,
 *  )
 */
function test_shape() {
  return shape([
    'uuid' => 'sss',
    'id'   => 1,
  ]);
}

Expectation reality: No errors in compilation

Actual reality: error during compilation

  another.php:9  in test_shape
    function test_shape() {

Could not parse @return: shape(
expected ':'

Danil42Russia avatar Mar 02 '23 15:03 Danil42Russia

Will be done together with #538

Danil42Russia avatar Mar 02 '23 19:03 Danil42Russia