public function findFirstPropertyFetchAssignment(array $statements, $variable, $property, $notFoundError = null)
    {
        foreach ($this->filterAssignments($statements) as $assign) {
            if (!$assign->var instanceof PropertyFetch) {
                continue;
            }
            if ($assign->var->name !== $property) {
                continue;
            }
            $var = $assign->var->var;
            if ($var instanceof Variable && $var->name === $variable) {
                return $assign;
            }
        }

        throw new \RuntimeException($notFoundError ?: sprintf('Variable assignment $%s->%s not found', $variable, $property));
    }