Expected to be of type integer, integer given

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

Expected to be of type integer, integer given

Postby jorrit » December 30th, 2016, 10:05 am

Check out attachment. This warning does not make sense to me. The variable $img is of type Intervention\Image\Image.
You do not have the required permissions to view the files attached to this post.
jorrit
 
Posts: 21
Joined: March 26th, 2015, 8:08 am
Location: Amsterdam

Re: Expected to be of type integer, integer given

Postby Jakub Misek » January 4th, 2017, 5:25 pm

Thanks for the feedback.

It seams the Intervention framework annotates parameters with "integer" instead of "int".

"integer" might be a class name in PHP, "int" would be a correct name for a number.

Furthermore the PHP Tools tool tip message spells "int" as "integer" which makes this message little confusing.

---

In future we might handle this case and recognize "integer" PHPDoc type hint as a number.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP Tools

Who is online

Users browsing this forum: Majestic-12 [Bot] and 46 guests

cron

User Control Panel

Login

Who is online

In total there are 47 users online :: 1 registered, 0 hidden and 46 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: Majestic-12 [Bot] and 46 guests