File tree 4 files changed +16
-21
lines changed
4 files changed +16
-21
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ public function __construct(
110
110
$ this ->setEndPoint ($ endpoint );
111
111
$ this ->authentication = $ authentication ;
112
112
113
- if ( is_null ( $ client) ) {
113
+ if ( $ client === null ) {
114
114
$ client = new CurlClient ();
115
115
}
116
116
@@ -689,7 +689,7 @@ public function createRemoteLink(
689
689
'object ' => $ object ,
690
690
);
691
691
692
- if ( ! is_null ( $ application) ) {
692
+ if ( $ application !== null ) {
693
693
$ options ['application ' ] = $ application ;
694
694
}
695
695
@@ -744,13 +744,11 @@ public function api(
744
744
if ( $ return_as_array ) {
745
745
return $ json ;
746
746
}
747
- else {
748
- return new Result ($ json );
749
- }
750
- }
751
- else {
752
- return false ;
747
+
748
+ return new Result ($ json );
753
749
}
750
+
751
+ return false ;
754
752
}
755
753
756
754
/**
Original file line number Diff line number Diff line change 25
25
namespace chobie \Jira \Api \Client ;
26
26
27
27
28
+ use chobie \Jira \Api \Authentication \Anonymous ;
28
29
use chobie \Jira \Api \Authentication \AuthenticationInterface ;
29
30
use chobie \Jira \Api \Authentication \Basic ;
30
- use chobie \Jira \Api \Authentication \Anonymous ;
31
31
use chobie \Jira \Api \Exception ;
32
32
use chobie \Jira \Api \UnauthorizedException ;
33
33
@@ -146,7 +146,7 @@ public function sendRequest(
146
146
}
147
147
148
148
// @codeCoverageIgnoreStart
149
- if ( is_null ( $ response) ) {
149
+ if ( $ response === null ) {
150
150
throw new Exception ('JIRA Rest server returns unexpected result. ' );
151
151
}
152
152
// @codeCoverageIgnoreEnd
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ public function sendRequest(
181
181
}
182
182
183
183
// @codeCoverageIgnoreStart
184
- if ( is_null ( $ response) ) {
184
+ if ( $ response === null ) {
185
185
throw new Exception ('JIRA Rest server returns unexpected result. ' );
186
186
}
187
187
// @codeCoverageIgnoreEnd
Original file line number Diff line number Diff line change @@ -157,9 +157,8 @@ public function current()
157
157
158
158
return $ callback ($ tmp );
159
159
}
160
- else {
161
- return $ this ->issues [$ this ->offset ];
162
- }
160
+
161
+ return $ this ->issues [$ this ->offset ];
163
162
}
164
163
165
164
/**
@@ -184,9 +183,8 @@ public function key()
184
183
if ( $ this ->startAt > 0 ) {
185
184
return $ this ->offset + (($ this ->startAt - 1 ) * $ this ->perPage );
186
185
}
187
- else {
188
- return 0 ;
189
- }
186
+
187
+ return 0 ;
190
188
}
191
189
192
190
/**
@@ -200,7 +198,7 @@ public function key()
200
198
*/
201
199
public function valid ()
202
200
{
203
- if ( is_null ( $ this ->jql ) ) {
201
+ if ( $ this ->jql === null ) {
204
202
throw new \Exception ('you have to call Jira_Walker::push($jql, $fields) at first ' );
205
203
}
206
204
@@ -247,9 +245,8 @@ public function valid()
247
245
if ( ($ this ->startAt - 1 ) * $ this ->perPage + $ this ->offset < $ this ->total ) {
248
246
return true ;
249
247
}
250
- else {
251
- return false ;
252
- }
248
+
249
+ return false ;
253
250
}
254
251
}
255
252
}
You can’t perform that action at this time.
0 commit comments