Skip to content

Move response messages to lang/files  #3

@mohd4cs

Description

@mohd4cs

Hi @alhoqbani ,
Thanks for your great job!
I have some suggestions to refactoring your package if you allow to me!

In MobilyWsApi.php file you hard coded the messages and it should be called from lang/filename.php file that will help you to make your package much easier for improvements.

class MobilyWsApi
{
  .
  .
  .
protected function msgSendResponse($code)
    {
        $arraySendMsg = [];

        //     Current way .. before refactoring
        $arraySendMsg[0] = 'لم يتم الاتصال بالخادم';


        //     After refactoring
        // $arraySendMsg[0] = __('filename.disconnected');   and so on ...
       
       .
       .
       .

    }
}

Best regards M. Saud 🤠

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions