Skip to content

Commit 29aa4b9

Browse files
committed
Cleanup: Scrutinizer fixes.
1 parent 0db2e94 commit 29aa4b9

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/VCR/LibraryHooks/CurlHook.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static function curlInit($url = null)
176176
* Perform a cURL session.
177177
*
178178
* @link http://www.php.net/manual/en/function.curl-exec.php
179-
* @param string $curlHandle A cURL handle returned by curl_init().
179+
* @param resource $curlHandle A cURL handle returned by curl_init().
180180
*
181181
* @return mixed Returns TRUE on success or FALSE on failure.
182182
* However, if the CURLOPT_RETURNTRANSFER option is set, it will return the
@@ -307,7 +307,7 @@ public static function curlSetopt($curlHandle, $option, $value)
307307

308308
static::$curlOptions[(int) $curlHandle][$option] = $value;
309309

310-
\curl_setopt($curlHandle, $option, $value);
310+
return \curl_setopt($curlHandle, $option, $value);
311311
}
312312

313313
/**

src/VCR/Storage/Json.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function current()
8383
/**
8484
* Returns the current key.
8585
*
86-
* @return void
86+
* @return integer
8787
*/
8888
public function key()
8989
{
@@ -125,7 +125,6 @@ protected function readNextRecord()
125125
}
126126

127127
if ($isInRecord && $char === '}' && $depth == 0) {
128-
$isInRecord = false;
129128
break;
130129
}
131130
}

src/VCR/Storage/Yaml.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function current()
9292
/**
9393
* Returns the current key.
9494
*
95-
* @return void
95+
* @return integer
9696
*/
9797
public function key()
9898
{
@@ -131,7 +131,6 @@ private function readNextRecord()
131131
$lastChar = $char;
132132

133133
if ($isInRecord && $isNewArrayStart) {
134-
$isInRecord = false;
135134
fseek($this->handle, -1, SEEK_CUR);
136135
break;
137136
}

src/VCR/Util/StreamProcessor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ public function unlink($path)
362362
public function stream_metadata($path, $option, $value)
363363
{
364364
$this->restore();
365+
$result = null;
366+
365367
switch ($option) {
366368
case STREAM_META_TOUCH:
367369
if (empty($value)) {

0 commit comments

Comments
 (0)