for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Manticoresearch\Response;
use Manticoresearch\Response;
class Bulk extends Response
{
/*
* Check whenever response has error
* @return bool
*/
public function hasError()
$response = $this->getResponse();
foreach ($response as $r) {
if (isset($r['error']) && $r['error'] !== '') {
return true;
}
return false;
* Return error
* @return false|string
public function getError()
$errors = "";
$errors .= json_encode($r['error'], true);
true
integer
$options
json_encode()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
$errors .= json_encode($r['error'], /** @scrutinizer ignore-type */ true);
return $errors;