Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9223245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:01:53+00:00 2026-06-18T04:01:53+00:00

I have a problem with Phpstorm’s code completion for inherited properties. There is an

  • 0

I have a problem with Phpstorm’s code completion for inherited properties. There is an example from my code below.

class ParentClass
{
  public $repository;
}

/*
 * @property Entity\SubClassRepository $repository
 */
class SubClass extends ParentClass
{
  public function __construct()
  {
    $this->repository= $this->em->getRepository('Entity\Subclass');
  }

  public function ExampleFunction()
  {
    $this->repository-> !Here i need the code completion!
  }
}

The getRepository function returns SubClassRepository for param = Entity\SubClass or returns OtherClassRepository for param = Entity\OtherClass. Btw there is no exact type that it returns. Thus; i need to say Phpstorm what type $repository object of parent class is.

I know that Phpstorm uses Phpdoc notation for code completion. Thus i tried to use @property notation and added the lines below to SubClass.

/*
 * @property Entity\SubClassRepository $repository
 */

It doesn’t work. Do you have any idea?
Thanks much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:01:55+00:00Added an answer on June 18, 2026 at 4:01 am

    The problem was about my missing * character in annotations as @LazyOne said in his comment. @property tag is working perfect now.

    It should read:

    /**
     * @property Entity\SubClassRepository $repository
     */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with deserialize document to object using XmlSerializer class. Code my function
I'm looking for a way to make PHPStorm hide some methods from code completion.
I have problem starting an intent that extends Fragment , from a class that
I have problem with UIWebView delay when the load image from url. In my
I have problem developing with live555. I already build the lib-files and example projects
I have problem with context menu. I have got: @Override public void onCreateContextMenu(ContextMenu menu,
I have problem. I have this code, and I can`t add session. This is
I have problem to extract extra information from my parsing. I have my own
Have problem with copy constructor and assignment operator. Have written code to multiply matricies:
Have problem while getting data from Memcached on .NET MVC solution. I have this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.