Numbered Posted November 1, 2019 Share Posted November 1, 2019 Hello. I have one of my application, which have this method: As you can see my PhpStorm asks me to cast the array into the string, because of \IPS\Output::i()->json method wait string type as the first param. But this is not true. This method (and json_encode function in order) accept an array as the primary usual incoming type. That fact that we can run json_encode('test') and got "test" as valid JSON result is just one behavior that is out if the usual scope for JSON using. Another part of this method that we use 'return $this->sendOuput...' but this method doesn't return anything. So we can just use $this->sendOutput without return and declare the method as void. If we jump inside 'stripVLETags' function inside of the json_decode method we can see that there have the same problem. Incoming wait for string, but ok to get an array and return a string (which is not true for incoming array). This is not one place of something similar. The main reason why I create this ticket post is another question - is there any way to join your git project (I heard somewhere that you using svn, is that true?)? I (and I'm sure other people) easier to send the pull requests for you to fix these parts of code, fix bugs founded (following your rules, linters, markup, etc). It will be much more powerful than delivering these parts by the ticket with screenshots. I wouldn't waste a lot of time on that (if that not so critical and don't break my needs). I could just fix that in my IDE and make a pull request for your review. It would be very useful for all sides! Thank you. Link to comment Share on other sites More sharing options...
Daniel F Posted November 1, 2019 Share Posted November 1, 2019 Thanks I have changed this for an upcoming release. 8 minutes ago, Upgradeovec said: I heard somewhere that you using svn, is that true?) No Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.