input: Write a python function to detect errors in code using the StaticAnalysis class.
  assert StaticAnalysis().detect_errors("def foo(): pass") == [('No parameters passed to function', 1)]
  assert StaticAnalysis().detect_errors("foo()") == [('No arguments passed to function call', 1)]
  assert StaticAnalysis().detect_errors("def bar(a): pass\nbar()") == [('No arguments passed to function call', 2)]
output: class StaticAnalysis:
      def detect_errors(self, code: str):
          errors = []
          lines = code.split('\n')
          for i, line in enumerate(lines, start=1):
              if line.startswith('def '):
                  func_name = line.split('(')[0][4:]
                  params = line.split('(')[1].split(')')[0].strip()
                  if not params:
                      errors.append(('No parameters passed to function', i))
              elif '(' in line and line.endswith(')'):
                  func_name = line.split('(')[0].strip()
                  args = line.split('(')[1].split(')')[0].strip()
                  if not args:
                      errors.append(('No arguments passed to function call', i))
          return errors