Skip to content

Commit

Permalink
[#.0.x] - fixing docblock for autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Aug 23, 2022
1 parent 66ce294 commit 0129658
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions phalcon/Html/TagFactory.zep
Original file line number Diff line number Diff line change
Expand Up @@ -26,47 +26,47 @@ use Phalcon\Factory\AbstractFactory;
* @property EscaperInterface $escaper
* @property array $services
*
* @method a(string $href, string $text, array $attributes = [], bool $raw = false): string
* @method base(string $href, array $attributes = []): string
* @method body(array $attributes = []): string
* @method button(string $text, array $attributes = [], bool $raw = false): string
* @method close(string $tag, bool $raw = false): string
* @method doctype(int $flag, string $delimiter): string
* @method element(string $tag, string $text, array $attributes = [], bool $raw = false): string
* @method form(array $attributes = []): string
* @method img(string $src, array $attributes = []): string
* @method inputCheckbox(string $name, string $value = null, array $attributes = []): string
* @method inputColor(string $name, string $value = null, array $attributes = []): string
* @method inputDate(string $name, string $value = null, array $attributes = []): string
* @method inputDateTime(string $name, string $value = null, array $attributes = []): string
* @method inputDateTimeLocal(string $name, string $value = null, array $attributes = []): string
* @method inputEmail(string $name, string $value = null, array $attributes = []): string
* @method inputFile(string $name, string $value = null, array $attributes = []): string
* @method inputHidden(string $name, string $value = null, array $attributes = []): string
* @method inputImage(string $name, string $value = null, array $attributes = []): string
* @method inputInput(string $name, string $value = null, array $attributes = []): string
* @method inputMonth(string $name, string $value = null, array $attributes = []): string
* @method inputNumeric(string $name, string $value = null, array $attributes = []): string
* @method inputPassword(string $name, string $value = null, array $attributes = []): string
* @method inputRadio(string $name, string $value = null, array $attributes = []): string
* @method inputRange(string $name, string $value = null, array $attributes = []): string
* @method inputSearch(string $name, string $value = null, array $attributes = []): string
* @method inputSelect(string $name, string $value = null, array $attributes = []): string
* @method inputSubmit(string $name, string $value = null, array $attributes = []): string
* @method inputTel(string $name, string $value = null, array $attributes = []): string
* @method inputText(string $name, string $value = null, array $attributes = []): string
* @method inputTextarea(string $name, string $value = null, array $attributes = []): string
* @method inputTime(string $name, string $value = null, array $attributes = []): string
* @method inputUrl(string $name, string $value = null, array $attributes = []): string
* @method inputWeek(string $name, string $value = null, array $attributes = []): string
* @method label(string $label, array $attributes = [], bool $raw = false): string
* @method link(string $indent = ' ', string $delimiter = PHP_EOL): string
* @method meta(string $indent = ' ', string $delimiter = PHP_EOL): string
* @method ol(string $text, array $attributes = [], bool $raw = false): string
* @method script(string $indent = ' ', string $delimiter = PHP_EOL): string
* @method style(string $indent = ' ', string $delimiter = PHP_EOL): string
* @method title(string $indent = ' ', string $delimiter = PHP_EOL): string
* @method ul(string $text, array $attributes = [], bool $raw = false): string
* @method string a(string $href, string $text, array $attributes = [], bool $raw = false)
* @method string base(string $href, array $attributes = [])
* @method string body(array $attributes = [])
* @method string button(string $text, array $attributes = [], bool $raw = false)
* @method string close(string $tag, bool $raw = false)
* @method string doctype(int $flag, string $delimiter)
* @method string element(string $tag, string $text, array $attributes = [], bool $raw = false)
* @method string form(array $attributes = [])
* @method string img(string $src, array $attributes = [])
* @method string inputCheckbox(string $name, string $value = null, array $attributes = [])
* @method string inputColor(string $name, string $value = null, array $attributes = [])
* @method string inputDate(string $name, string $value = null, array $attributes = [])
* @method string inputDateTime(string $name, string $value = null, array $attributes = [])
* @method string inputDateTimeLocal(string $name, string $value = null, array $attributes = [])
* @method string inputEmail(string $name, string $value = null, array $attributes = [])
* @method string inputFile(string $name, string $value = null, array $attributes = [])
* @method string inputHidden(string $name, string $value = null, array $attributes = [])
* @method string inputImage(string $name, string $value = null, array $attributes = [])
* @method string inputInput(string $name, string $value = null, array $attributes = [])
* @method string inputMonth(string $name, string $value = null, array $attributes = [])
* @method string inputNumeric(string $name, string $value = null, array $attributes = [])
* @method string inputPassword(string $name, string $value = null, array $attributes = [])
* @method string inputRadio(string $name, string $value = null, array $attributes = [])
* @method string inputRange(string $name, string $value = null, array $attributes = [])
* @method string inputSearch(string $name, string $value = null, array $attributes = [])
* @method string inputSelect(string $name, string $value = null, array $attributes = [])
* @method string inputSubmit(string $name, string $value = null, array $attributes = [])
* @method string inputTel(string $name, string $value = null, array $attributes = [])
* @method string inputText(string $name, string $value = null, array $attributes = [])
* @method string inputTextarea(string $name, string $value = null, array $attributes = [])
* @method string inputTime(string $name, string $value = null, array $attributes = [])
* @method string inputUrl(string $name, string $value = null, array $attributes = [])
* @method string inputWeek(string $name, string $value = null, array $attributes = [])
* @method string label(string $label, array $attributes = [], bool $raw = false)
* @method string link(string $indent = ' ', string $delimiter = PHP_EOL)
* @method string meta(string $indent = ' ', string $delimiter = PHP_EOL)
* @method string ol(string $text, array $attributes = [], bool $raw = false)
* @method string script(string $indent = ' ', string $delimiter = PHP_EOL)
* @method string style(string $indent = ' ', string $delimiter = PHP_EOL)
* @method string title(string $indent = ' ', string $delimiter = PHP_EOL)
* @method string ul(string $text, array $attributes = [], bool $raw = false)
*/
class TagFactory extends AbstractFactory
{
Expand Down

7 comments on commit 0129658

@s-ohnishi
Copy link

@s-ohnishi s-ohnishi commented on 0129658 Nov 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the methods below return an object, not a string.
doctype
input*
link
meta
ol
scripts
style
title
ul

If these are wrong, shouldn't the stub be generated wrong too?

@niden
Copy link
Member Author

@niden niden commented on 0129658 Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the methods below return an object, not a string. doctype input* link meta ol scripts style title ul

If these are wrong, shouldn't the stub be generated wrong too?

For stubs it should not matter since the stubs parses the methods and their return types. The docblock above is for PHPStorm and other editors. We can fix that shortly. Thank you

@s-ohnishi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love PhpStorm, so I would be happy if it was improved.

@niden
Copy link
Member Author

@niden niden commented on 0129658 Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love PhpStorm, so I would be happy if it was improved.

The latest version has the docblock corrected. The same with the stubs.

@s-ohnishi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen the update, but I have a question.

For example for title():

  • @method Title title(string $indent = ' ', string $delimiter = PHP_EOL)

Isn't this Helper\Title instead of Title?
In the case of Titel, it is not possible to jump because it cannot find the definition part, but if it is Helper\Title, PhpStorm can find the definition and jump to it.

@niden
Copy link
Member Author

@niden niden commented on 0129658 Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @s-ohnishi. You are correct. I added the relevant use references and corrected the spelling of Style.

Do a composer update and the ide-stubs 5.1.3 have the correct functionality.

@s-ohnishi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.
I confirmed that I can jump without problems on PhpStorm.
Thank you very much.

Please sign in to comment.