Are you sure that it's good idea to `json_encode` one variable and then concat (via `,`) to another json_encoded variable? Maybe instead we need to:

1. create empty `$arguments` array (as it was done before)
2. add elements to if (will be 2 at most) 
3. do `json_encode` on the array before returning it from the method?