protected function sortAndWrite(array $content, $key)
{
usort($content, function (array $a, array $b) {
list($a_score, ) = $a;
list($b_score, ) = $b;
if ($a_score == $b_score) {
return 0;
} else {
return $a_score < $b_score ? -1 : 1;
}
});
$this->io_driver->write($key, json_encode($content));
}