Comments (9)
try adding this line to the top of the tmhOAuth class.
var $response = array();
so tmhOAuth.php will start something like:
class tmhOAuth {
const VERSION = 0.621;
var $response = array();
/**
* Creates a new tmhOAuth object
*
* @param string $config, the configuration to use for this request
*/
function __construct($config) {
if that solves the issue let me know.
from tmhoauth.
Thank you. Warnings for response were disappeared.
But still IDE complains about request.
$code=$tmhOAuth->request('GET', $tmhOAuth->url('1/account/totals') );
Warning: 'void' method 'request' result used
I suppose this warning is IDE's bug?
from tmhoauth.
"request" function's warnings are solved when i changed phpDoc of function.
Return tag, from void to int.
Is "void" word typo there ?
Thank you
/**
- Makes a curl request. Takes no parameters as all should have been prepared
- by the request method
* - @return int response data is stored in the class variable 'response'
*/
from tmhoauth.
interesting, to be honest i should review those phpdocs. i don't use an IDE which reads them so these ommissions are generally obscured from me.
thanks for sharing your findings.
from tmhoauth.
Thank you for help.
from tmhoauth.
Hello, is there a change about this:
#47 (comment)
tmhouath->request has no "return" parameter in phpDoc.
Also in document it is written that function "Make an HTTP request using this library. This method doesn't return anything."
But we can get integer status code with $code=$tmhOAuth->request(...)
Which gives warning inside IDE.
All errors are suppressed when I add:
* @return int
to the phpdoc of request function.
But I think it should be added to commited version?
Or do I miss something?
from tmhoauth.
My IDE says that both of these two methods are defined as "returns void" inside PHPdoc. But when I use them I get $code as output. So my IDE gives warning. Everytime I download a newer tmhoauth version, I add @return int
to the top of each function.
public function request($method, $url, $params=array(), $useauth=true, $multipart=false, $headers=array()) private function curlit()
from tmhoauth.
thanks. the PHPDoc got left behind when extra features were added. fixing that up now
from tmhoauth.
fixed in 0.7.3 and shipped
from tmhoauth.
Related Issues (20)
- Wrong username password warning if user isn't logged in HOT 1
- update_profile_background_image not updating the bg image (Not a library issue) HOT 1
- 401 Error HOT 1
- error with PHP 5.3 HOT 6
- Using proxies HOT 1
- curl_setopt(): The usage of the @filename API for file uploading is deprecated HOT 2
- 'geocode' parameter doesn't seem to work for search/tweets.json HOT 3
- Auth problems HOT 3
- Not updating image: update_profile_background_image
- php5.6 HOT 11
- Getting an image of original tweet author
- Deprecated "curl_setopt" error on PHP 5.5.24
- Response code 0. HOT 1
- Support for Upload Videos/ Gifs HOT 8
- No composer install instructions HOT 1
- Post with Json
- Parameters for direct message on twitter
- Parameters for direct message on twitter HOT 4
- Rate limiting headers HOT 1
- DELETE requests return HTTP 401: 32 - "Could not authenticate you"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmhoauth.