title: CakePHP 3.7: Function name must be a string
body: <p>I've got a method in UsersController</p>
  
  <pre class="lang-php prettyprint-override"><code>    public function addMailbox($data)
      {
                $this-&gt;LoadModel('Mailbox');
                $mailbox = $this-&gt;Mailbox-&gt;newEntity();
                $mailbox-&gt;username = $data('username');
                $mailbox-&gt;name = $data('name');
  
          if ($this-&gt;Mailbox-&gt;save($mailbox)) {
              return $this-&gt;redirect(['action' =&gt; 'index']);
              }
          $this-&gt;Flash-&gt;error(__('Error'));
         }
  </code></pre>
  
  <p>, the code works fine when pasted into the add() method, but after using</p>
  
  <pre class="lang-php prettyprint-override"><code>     $this-&gt;addMailbox($this-&gt;request-&gt;getData());
  </code></pre>
  
  <p>all i get is
  error: Function name must be a string</p>
  
  <p>Any ideas?</p>