Closed williamdes closed 1 year ago
Thanks for the PR. I'm afraid I won't accept it all. For example, I will not accept such corrections:
- * @param Domain|null $domain Domain for which the information is needed. Null is for all domains.
- * @param array $range Array with two dates
+ * @param \Liuch\DmarcSrg\Domains\Domain|null $domain Domain for which the information is needed. Null is for all domains.
+ * @param array $range Array with two dates
all domains.
These add a lot of spaces without solving any problem.
Well, it actually solves something your type is wrong, it would need a use to get it right
Do you prefer uses but only useful for documentation or should I add native types too for the use to be technically useful
The phpdoc is technically wrong since the actual documentation depends on the file it's on
Do you understand what I mean?
I can revert back and add some use
statements?
When started commenting on my year, I decided to stick to some markup. I chose phpdoc. But I don't want to follow the standard exactly if it hurts the readability of the code. The text goes to the right, which means that I have to use line breaks more often. I use Domain
inside the method and see no reason to use \Liuch\DmarcSrg\Domains\Domain
in the documentation of this method. Note that I don't mind this fix:
- * @param PDOStatement $st PDO Statement to bind to
- * @param ind $pos Start position for binding
- * @param array $data Domain data
+ * @param \PDOStatement $st PDO Statement to bind to
+ * @param int $pos Start position for binding
+ * @param array $data Domain data
If you propose a new PR with my wishes in mind, I will gratefully accept it. Or I can make corrections myself based on the information you provide.
Thank you again for your work!
You can do the changes on this PR, I am going to sleep for now
But the phpdoc changes are because there is a mistake
You can not do
namespace Foo;
@param Bar
// means Foo\Bar
It's all about the namespace, so I had to use a fully qualified type to go back to the root namespace and get it right
is this better to understand?
So you have another option
namespace Liuch\DmarcSrg\Foo;
use \Liuch\DmarcSrg\Domains\Domain;
@param Domain
Or fully qualify the param annotation
It's my fault. Now I understand what you mean. I thought there was a statement use
at the top of these files. Sorry.
It's my fault. Now I understand what you mean. I thought there was a statement
use
at the top of these files. Sorry.
That's okay, I will revert the changes and put uses
That's okay, I will revert the changes and put uses
There is no need to put uses. Let it be as it is.
Should be okay now
Thank you for 01636a1e820ed960aa78753278b69aa5ceaa4b1d 🎉
Ref: https://github.com/liuch/dmarc-srg/pull/74#issuecomment-1596335453
phpstan is a tool that analyses your PHP code without running it and finds bugs or mistakes
In this PR I think 2 bugs are killed:
classes/Database/Mariadb/DomainMapper.php
logout.php
This is the errors that I did not fix