thanasis-oob opened a new issue #3783:
URL: https://github.com/apache/netbeans/issues/3783


   ### Apache NetBeans version
   
   Apache NetBeans 13
   
   ### What happened
   
   I use the IDE for a php project(PHP7.4 as PHP version).  I am going to give 
you an example to understand the problem because it is about inheritance and I 
think it is more practical to view the class definitions.
   
   The problem is that the system displays me a false alarm error hint that the 
Class does satisfy a method from an interface.
   [screenshot](https://ibb.co/Rgb6MCB)
   
   Specifically, The error appeared in the CookiesPage class and informs me 
that the class should implement the cancelUrl method of the 
HasCancelPageInterface interface
   
   There is not any compilation error in the web application. it is just 
problem in the development because confuses the programmer.
   
   ```
   \App\Logic\Template\Page\Frontend\CookiesPage is not abstract and does not 
override abstract method  cancelUrl(array $parameters = []) in 
\App\Logic\Template\Page\Contracts\HasCancelPageInterface
   ```
   
   The class relationships are
   
   ```
   class CookiesPage extends PageModelWebPageAbstract
   {
   }
   ```
   ```
   abstract class PageModelWebPageAbstract extends FrontendWebPage
   {
   }
   ```
   ```
   abstract class FrontendWebPage implements FrontendWebPageInterface
   {
       use FrontendWebPageTrait;
   }
   ```
   ```
   interface FrontendWebPageInterface extends WebPageInterface, 
HasCancelPageInterface
   {
       public function enabled();
   
       public function displayedDate();
   
       public function lastUpdatedDate();
   
       public function hasAuthUser()
      
       public function authUser();
   }
   ```
   ```
   interface WebPageInterface
   {
       public function type();
   
       public function title();
   
       public function description();
   
       public function content();
   
       public function metaTitle();
   
       public function metaDescription();
   
       public function url(array $parameters = []);
   
       public function viewName();
       
       public function htmlBodyClass();
   }
   ```
   ```
   interface HasCancelPageInterface
   {
       public function cancelPage();
       
       public function cancelTitle()
   
       public function cancelUrl(array $parameters = [])
   }
   ```
   ```
   trait FrontendWebPageTrait
   {
       use CancelablePageTrait;
       use WebPageTrait;
   
       public function __construct()
       {
       }
   
       public function type()
       {
           return null;
       }
       
       public function enabled()
       {
       }
   
       public function ogType()
       {
       }
   
       public function displayedDate()
       {
       }
   
       public function lastUpdatedDate()
       {
       }
   }
   ```
   ```
   trait CancelablePageTrait
   {
       
       public function cancelPage()
       {
       }
   
       public function hasCancelPage()
       {
       }
   
       public function cancelTitle()
       {
       }
   
       public function cancelUrl(array $parameters = [])
       {
       }
   }
   ```
   ```
   trait WebPageTrait
   {
       
       public function hasAuthUser()
       {
       }
   
       public function authUser()
       {
       }
       
       public function setActionUser(Authenticatable $user)
       {
       }
   
       public function getActionUser()
       {
       }
   
       public function htmlBodyClass()
       {
       }
       
       public function viewName()
       {
       }
   
       public function viewPath()
       {
       }
   
       public function title()
       {
       }
   
       public function description()
       {
       }
   
       public function content()
       {
       }
   
       public function metaTitle()
       {
       }
   
       public function metaDescription()
       {
       }
   
       public function metaKeywords()
       {
       }
   
       public function url(array $parameters = [])
       {
       }
   
       public function checkActive($request)
       {
       }
   }
   ```
   
   
   ### How to reproduce
   
   Create a new PHP project(using PHP7.4 as php version). Create the files 
which I described above. Open the Cookies class file for editing and check the 
the re is any error hint in the line of the class definition.
   
   ### Did this work correctly in an earlier version?
   
   No
   
   ### Operating System
   
   Ubuntu 16.04
   
   ### JDK
   
   openjdk 1.8.0_292
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to