File tree Expand file tree Collapse file tree 4 files changed +15
-20
lines changed Expand file tree Collapse file tree 4 files changed +15
-20
lines changed Original file line number Diff line number Diff line change 77
77
git fetch origin $TRAVIS_BRANCH;
78
78
fi
79
79
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
80
- - wget https://github.com/diff-sniffer/git/releases/download/0.1 .0/git-phpcs.phar
80
+ - wget https://github.com/diff-sniffer/git/releases/download/0.2 .0/git-phpcs.phar
81
81
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA
82
82
83
83
# - stage: Code Quality
Original file line number Diff line number Diff line change @@ -12,4 +12,8 @@ public static function cannotInsertEmptyValues() : self
12
12
{
13
13
return new self ('Inserting empty values array is not supported in ClickHouse ' );
14
14
}
15
+
16
+ public static function noResponse () : self {
17
+ return new self ('No response returned ' );
18
+ }
15
19
}
Original file line number Diff line number Diff line change @@ -183,14 +183,10 @@ public function isError()
183
183
return ($ this ->response ()->http_code () !== 200 || $ this ->response ()->error_no ());
184
184
}
185
185
186
- /**
187
- * @return bool
188
- * @throws Exception\TransportException
189
- */
190
- private function check ()
186
+ private function check () : bool
191
187
{
192
188
if (!$ this ->_request ->isResponseExists ()) {
193
- throw new QueryException ( ' Not have response ' );
189
+ throw QueryException:: noResponse ( );
194
190
}
195
191
196
192
if ($ this ->isError ()) {
Original file line number Diff line number Diff line change @@ -44,10 +44,8 @@ class CurlerRequest
44
44
*/
45
45
private $ handle ;
46
46
47
- /**
48
- * @var CurlerResponse
49
- */
50
- private $ resp = null ;
47
+ /** @var CurlerResponse */
48
+ private $ response ;
51
49
52
50
/**
53
51
* @var bool
@@ -616,24 +614,21 @@ private function execute($method)
616
614
*/
617
615
public function response ()
618
616
{
619
- if (!$ this ->resp ) {
617
+ if (!$ this ->response ) {
620
618
throw new \ClickHouseDB \Exception \TransportException ('Can`t fetch response - is empty ' );
621
619
}
622
620
623
- return $ this ->resp ;
621
+ return $ this ->response ;
624
622
}
625
623
626
- /**
627
- * @return bool
628
- */
629
- public function isResponseExists ()
624
+ public function isResponseExists () : bool
630
625
{
631
- return ( $ this ->resp ? true : false ) ;
626
+ return $ this ->response !== null ;
632
627
}
633
628
634
- public function setResponse (CurlerResponse $ response )
629
+ public function setResponse (CurlerResponse $ response ) : void
635
630
{
636
- $ this ->resp = $ response ;
631
+ $ this ->response = $ response ;
637
632
}
638
633
639
634
/**
You can’t perform that action at this time.
0 commit comments