Skip to content

Commit

Permalink
remove spaces between links and [] (#114)
Browse files Browse the repository at this point in the history
* remove spaces between links and []

* fix in naming lesson
  • Loading branch information
burenkov-anton authored and mokevnin committed Oct 22, 2019
1 parent 72ba7d3 commit c7cfc2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/20-arithmetics/45-linting/description.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

name: Linter
theory: |
Code must be written in a certain way to be easy to read and maintain. Standards are sets of rules that describe different aspects of coding. The most commonly used PHP standards are **PSR** (PHP Standards Recommendations) by [PHP-GIF] (https://www.php-fig.org/psr/). A recommendation is a set of rules aimed to facilitate a certain aspect of development (or solve a certain problem). Presently, several official recommendations are in use, each of them marked by a number: PSR-1, PSR-2, PSR-3 and [others] (https://en.wikipedia.org/wiki/PHP_Standard_Recommendation). You will learn those recommendations in the process of study and work. For now, we are going to focus at the first two.
Code must be written in a certain way to be easy to read and maintain. Standards are sets of rules that describe different aspects of coding. The most commonly used PHP standards are **PSR** (PHP Standards Recommendations) by [PHP-GIF](https://www.php-fig.org/psr/). A recommendation is a set of rules aimed to facilitate a certain aspect of development (or solve a certain problem). Presently, several official recommendations are in use, each of them marked by a number: PSR-1, PSR-2, PSR-3 and [others](https://en.wikipedia.org/wiki/PHP_Standard_Recommendation). You will learn those recommendations in the process of study and work. For now, we are going to focus at the first two.
* PSR-1: [Basic Coding Standard](https://www.php-fig.org/psr/psr-1/) is a set of rules concerning coding style: how to write PHP tags, naming of classes, class methods and constants. It also covers different aspects of coding, autoloading, namespacing and file structures. The PSR-2 standard extends these rules.
* PSR-2: [PSR-2: Coding Style Guide](https://www.php-fig.org/psr/psr-2/). PSR-2 requires developers to follow PSR-1, and also introduces new requirements concerning indentation, files, strings, key words, classes, control structures, scopes and other elements.
Every programming language has special tools called **linters** that check code for compliance with standards. The most commonly used PHP linter is called [PHP_CodeSniffer] (https://github.com/squizlabs/PHP_CodeSniffer).
Every programming language has special tools called **linters** that check code for compliance with standards. The most commonly used PHP linter is called [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).
Let’s say we have a file with the following PHP code.
Expand Down Expand Up @@ -46,6 +46,6 @@ instructions: |
?>
```
This code breaks two rules that we saw in the previous example. Rewrite the code, fixing the styling errors.
At this stage your code is not checked by linter, however in your future practice on [Hexlet] (https://en.hexlet.io) and in the actual development process, you will use linter and it will warn you about violation of standards.
At this stage your code is not checked by linter, however in your future practice on [Hexlet](https://en.hexlet.io) and in the actual development process, you will use linter and it will warn you about violation of standards.
tips: []
2 changes: 1 addition & 1 deletion modules/30-variables/13-naming/description.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ theory: |
Luckily, we don't have to memorize all the standard rules, because there are special programs that automatically check our code and notify us about any violation. Such programs are called **linters** and you will start using them later when you are a little bit more experienced.
We start using linters on [Hexlet] (https://en.hexlet.io/) almost from the very beginning.
We start using linters on [Hexlet](https://en.hexlet.io/) almost from the very beginning.
instructions: |
Expand Down

0 comments on commit c7cfc2c

Please sign in to comment.