Open dimitrystd opened 7 years ago
@dimitrystd
In example above we don't expect data, thus it means our function can return only
true
.
I believe you meant cancelJob
or authorizeJob
method - only they return boolean true
. Because getJob
actually should return an array
with a job info.
I've removed return statement from cancelJob
and authorizeJob
methods and updated comments for all the JobaAPI methods.
Thanks, probably added getJob
accidentally.
I noticed that all functions that call
BaseApiAbstract->sendRequest()
returnbool
. An example,But if you look at
sendRequest()
more close that it can return only:true
In example above we don't expect data, thus it means our function can return only
true
. Such "contract" may confuse end-developer. If i seereturn bool
then i addif () then
statement in code. But actually i should addtry catch
.So we should review SDK methods and remove
return
statement if it returns only a single value. Let's refactor only Jobs API because we don't use it yet.DoD: