Run Rector on your code to see what it can do for you:
return 'Todo not found'; } - if (!array_key_exists($this->todos[$index]['unique_key'], $this->selectedTodos)) { + if (!array_key_exists((string) $this->todos[$index]['unique_key'], $this->selectedTodos)) { $this->selectedTodos[$this->todos[$index]['unique_key']] = $this->todos[$index]['label']; return 'Todo selected !'; }
Applied Rules:
Not a change you expect?
rector.php