codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.4k stars 1.9k forks source link

Dev: Update documentation code examples to reflect new coding standards #4816

Closed paulbalandan closed 3 years ago

paulbalandan commented 3 years ago

As we're all aware of the latest developments in our coding styles in a bid to shift to PSR-12 plus some of our custom styling, we've started rolling out code style changes in our code base. However, our new coding style tool cannot automatically correct also our documentation, which needs manual intervention.

We will be appreciative of a helping hand to assist us in updating also the code examples used in our documentation. Please submit pull requests while you can! 😎

kenjis commented 3 years ago

@paulbalandan What are some of our custom styling?

It seems Coding Style Guide is not updated. Why don't you update it at first?

WinterSilence commented 3 years ago

@paulbalandan I can write auto fix for examples in *.rst files but I don't know how skip non php examples.

paulbalandan commented 3 years ago

@WinterSilence thanks for the initiative! If you can tell me your general approach how you'll handle this maybe I can provide insights on skipping non php examples.

WinterSilence commented 3 years ago

@paulbalandan

  1. extract examples from *.rst files(lines with whitespaces at begin)
  2. fix code style (phpcbf + codeigniter4/coding-standard)
  3. replace examples