docblocks Questions
4
Solved
Is there a standard way to document the expected class of entities inside a Collection in the docblock comment in a Doctrine project? Something like:
/**
* @var Collection<User>
*/
protect...
Stipulate asked 3/9, 2011 at 21:47
1
Solved
I could see this PHPDoc block in the FakerPHP/Faker package, and I'm not aware what does @template mean? you can find it in the package's main branch on this line
/**
* @template T of Extension\Ex...
Epifocal asked 21/10, 2021 at 21:11
2
I'm getting objects from JSON string in my PHP code. I want my IDE (NetBeans) to know the parameters of the objects without creating special class for them.
Can I do it?
It would look something lik...
Cronk asked 28/1, 2021 at 22:17
0
At the moment on my PhpStorm I have the following options enabled:
File | Settings | Editor | Inspections | Missing @return tag` -> Marked both options there (Ignore PHPDoc without @param + Ign...
4
After I create a method I use /**<enter> to generate the DocBlock. It auto fills the @param and @return for that function.
Example:
/**
*
* @param type $str
* @return type
*/
public fun...
Saltsman asked 7/5, 2011 at 17:31
3
Solved
Is there a way to ask phpStorm to update the contents of a docblock? eg if I have the following code
//-------------------------------------------------------------------------
/**
* @param strin...
3
I've always used annotations to declare return type. For example:
/**
* @return SomeClass
*/
public function () { ... }
But now I see there's another way:
public function () : SomeClass { ......
Crock asked 1/12, 2016 at 11:45
2
Solved
After many happy years coding in notepad++ and sublime, I've been advised to give a PHP IDE a go. I'm trying out phpStorm and it seems nice. The code completion and documentation is a great feature...
Dastard asked 26/3, 2013 at 9:54
1
Solved
In PhpStorm, what is a quick way to collapse or expand all the comment (doc) blocks in a file?
In the docs here it says:
Folding and expanding code blocks works for entire classes, inner and
anon...
0
I'm having a really hard time to get phpDocumentor 2 working.
I have several files in procedural style, that must be documented. The only I found to do that is to use page-level docblocks, but it...
Gowk asked 14/11, 2014 at 8:24
4
Solved
I would like to build some smaller scale but hightly customized documentation sites for a few projects. PhpDocumentor is pretty great but it is very heavy. I thought about trying to tweak the...
Corespondent asked 27/3, 2010 at 21:49
3
Lets say I have a function (obviously a trivial example):
public function dot(){
return implode('.', func_get_args());
}
Now I know I could modify this to be
public function dot(array $items)...
Purine asked 9/12, 2012 at 12:38
2
Although this question is about DocBlocks in general, my use-case is about PHP.
Consider the following PHP code:
<?php
class ParentClass {
/**
* Says 'hi' to the world.
* @return ParentCla...
1
Solved
Possible Duplicate:
Is there a way for phpDoc to document an array of objects as a parameter?
I've been searching, and looked at the phpDocumentor documentation but cannot find if the...
2
I am confused about when to use the null as a type when describing variables with PHPDoc. Are type hints supposed to describe hopes and expectations for external callers to anticipate and comply wi...
1
Solved
When using automatic php docblock generation in PhpStorm, I ended up with the @static annotation on a static method:
/**
* Reset the singleton instance, for the tests only
* @static
*/
public s...
4
Solved
Is it possible to generate Doctrine 2 entities, with the relevant docblock annotations, from an existing database schema?
Alie asked 31/10, 2010 at 22:59
6
Solved
I'm quite familiar with PHP dockblocks since it's been my job for the last 15+ years.
/**
* Description
*
* @tag bla bla
* @tag more bla bla
*/
What I'm trying to understand is if there is ...
Efficiency asked 15/4, 2009 at 8:41
1
© 2022 - 2024 — McMap. All rights reserved.