for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bavix\Diff;
use Bavix\Exceptions\Runtime;
class Native implements Driver
{
/**
* Native constructor.
*
* @throws Runtime
*/
public function __construct()
if (!function_exists('xdiff_string_diff'))
throw new Runtime('Extension `xdiff` not found');
}
* @param string $oldData
* @param string $newData
* @return string
public function diff($oldData, $newData)
return \xdiff_string_diff($oldData, $newData);
xdiff_string_diff
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ \xdiff_string_diff($oldData, $newData);
* @param string $data
* @param string $patch
public function patch($data, $patch)
return \xdiff_string_patch($data, $patch);
xdiff_string_patch
return /** @scrutinizer ignore-call */ \xdiff_string_patch($data, $patch);