Fix the issues reported by phpcs

Created on 9 December 2016, over 7 years ago
Updated 19 January 2024, 5 months ago

Thanks for providing this "module", it's a good resource for beginners. However, I strongly disagree teaching them bad habits.

PHP_CodeSniffer reports the following issues that needs to be fixed.

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_04\oop_example_04.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_04\oop_example_04.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_04\src\Classes\Car.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_04\src\Classes\Motorcycle.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_04\src\Classes\Vehicle.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_04\src\Controller\OopExample04Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 13 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 45 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_05\oop_example_05.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_05\oop_example_05.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_05\src\BusinessLogic\Vehicle\Car\Car.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 19 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_05\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 19 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_05\src\BusinessLogic\Vehicle\Vehicle.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_05\src\Controller\OopExample05Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 13 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 45 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_06\oop_example_06.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_06\oop_example_06.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_06\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_06\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_06\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_06\src\Controller\OopExample06Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 13 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 47 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\oop_example_07.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\oop_example_07.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_07\src\Controller\OopExample07Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 15 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 63 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\oop_example_08.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\oop_example_08.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Common\ColorInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Fruit\Banana.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Fruit\Fruit.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 19 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Fruit\Orange.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_08\src\Controller\OopExample08Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 18 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 76 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\oop_example_09.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\oop_example_09.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Common\ColorInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Fruit\Banana.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Fruit\Fruit.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 19 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Fruit\JuiceInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  8 | ERROR | [x] There must be one blank line after the namespace declaration
 18 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Fruit\Mango.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Fruit\Orange.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\DriveInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_09\src\Controller\OopExample09Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 18 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 82 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\oop_example_10.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\oop_example_10.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Common\ColorInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Fruit\Banana.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Fruit\Fruit.php
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 10 | WARNING | [x] Unused use statement
 19 | ERROR   | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Fruit\FruitInterface.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 8 | ERROR | [x] There must be one blank line after the namespace declaration

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Fruit\JuiceInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  8 | ERROR | [x] There must be one blank line after the namespace declaration
 18 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Fruit\Mango.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Fruit\Orange.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\DriveInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\BusinessLogic\Vehicle\VehicleInterface.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 8 | ERROR | [x] There must be one blank line after the namespace declaration

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_10\src\Controller\OopExample10Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 18 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 82 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\oop_example_11.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\oop_example_11.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Common\ColorInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Driver\Driver.php
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 26 | ERROR | [x] Data types in @var tags need to be fully namespaced

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\DriveInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\BusinessLogic\Vehicle\VehicleInterface.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 8 | ERROR | [x] There must be one blank line after the namespace declaration

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_11\src\Controller\OopExample11Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 13 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 46 | ERROR | [x] Short array syntax must be used to define arrays
 55 | ERROR | [x] Short array syntax must be used to define arrays
 65 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\oop_example_12.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\oop_example_12.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Common\ColorableFactory.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  8 | ERROR | [x] There must be one blank line after the namespace declaration
 13 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Common\ColorInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Fruit\Banana.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Fruit\Fruit.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 19 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Fruit\Orange.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_12\src\Controller\OopExample12Controller.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 12 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
 49 | ERROR | [x] Short array syntax must be used to define arrays

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\oop_example_13.module
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\oop_example_13.routing.yml
 11 | ERROR | [x] Expected 1 newline at end of file; 2 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Common\ColorableFactory.php
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  8 | ERROR   | [x] There must be one blank line after the namespace declaration
  9 | WARNING | [x] Unused use statement
 12 | WARNING | [x] Unused use statement
 13 | WARNING | [x] Unused use statement
 14 | WARNING | [x] Unused use statement
 15 | ERROR   | [x] There must be one blank line after the last USE statement; 2 found;

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Common\ColorableFactoryInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 18 | ERROR | [x] Expected 1 blank line after function; 0 found
 19 | ERROR | [x] The closing brace for the interface must have an empty line before it

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Common\ColorInterface.php
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 17 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Fruit\Banana.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Fruit\Fruit.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Fruit\FruitFactory.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 8 | ERROR | [x] There must be one blank line after the namespace declaration

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Fruit\Orange.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Vehicle\Car\Car.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Vehicle\Car\Toyota\Toyota.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaCamry.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Vehicle\Car\Toyota\ToyotaYaris.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Vehicle\Motorcycle\Motorcycle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment

FILE: D:\xampp\htdocs\drupal88\modules\oop_examples\oop_example_13\src\BusinessLogic\Vehicle\Vehicle.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇭🇺Hungary Boobaa

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +    # Access to this path is not restricted. This is notated as _access: 'TRUE'.
         _access: 'TRUE'

    That does not explain why it is not restricted.

     package: OOP Example modules
     core: 8.x
     dependencies:
    -  - oop_examples
    +  - drupal:oop_examples

    That is not a Drupal core module. Its namespace cannot start with drupal:.

    -    $s = t('This car has') . ' ';
    +    $s = $this->t('This car has') . ' ';
         $s .= $this->doors;
    -    $s .= ' ' . t('doors.');
    +    $s .= ' ' . $this->t('doors.');
         return $s;

    Since that code is changed, translatable strings need to use placeholders. It is a security issue, to pass user input to $this->t() without sanitizing it.

  • Status changed to Needs review 9 months ago
  • 🇮🇳India Amit.Rawat777

    I have resolved the issues. please verify.

  • Issue was unassigned.
Production build 0.69.0 2024