Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for static analysis: fix types #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

szepeviktor
Copy link

@szepeviktor szepeviktor commented Sep 13, 2020

Purpose

@jplhomer Preparations for static analysis.

Level of Changes

  • few hard bug
  • many types

Tests

@phpstan config included

Docs

no need

@@ -62,7 +62,7 @@ protected function insertModel()
*/
protected function persistDefaultFields()
{
$this->persistModel();
return $this->persistModel();
Copy link
Author

Choose a reason for hiding this comment

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

🐛

@@ -152,7 +152,7 @@ public function delete()

wp_delete_post($this->id);

parent::delete();
return parent::delete();
Copy link
Author

Choose a reason for hiding this comment

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

🐛

@szepeviktor
Copy link
Author

szepeviktor commented Sep 13, 2020

BTW Relative class names in PHPDoc blocks are confusing.

@szepeviktor
Copy link
Author

szepeviktor commented Sep 13, 2020

@jplhomer PHPStan will occupy you for few hours if you feel its huge Benefit.

@szepeviktor
Copy link
Author

I think I do not understand this project.
So this PR must be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant