private function doubleLeft(BinaryTree $t) { if ($t->right()->isEmpty()) { return $t; } return $this->rotateLeft(new self($t->key(), $t->value(), $t->left(), $this->rotateRight($t->right()))); }