PHP Tools not complaining when using accesors for constants

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

PHP Tools not complaining when using accesors for constants

Postby davidbcn » February 9th, 2017, 10:42 am

Code: Select all
class DataExportController {
  public const PATH = '/turboviews/data-export/{settings}';
}


This is invalid PHP as constants cannot have accesors (public, private, whatever).

Support for this was added in PHP 7.1:

https://wiki.php.net/rfc/class_const_visibility
davidbcn
 
Posts: 87
Joined: September 10th, 2014, 3:07 am

Re: PHP Tools not complaining when using accesors for consta

Postby Miloslav Beno » February 9th, 2017, 3:55 pm

Hello!

Thank you very much for the suggestion.

We actually warn if it's anything else than public, but public will be done in the future as well ;-)

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 49 guests

cron

User Control Panel

Login

Who is online

In total there are 49 users online :: 0 registered, 0 hidden and 49 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 49 guests