Permalink
Browse files

Merge pull request #16 from nette/spaces-test

spaces between constants, properties and first method
  • Loading branch information...
Tomáš Votruba
Tomáš Votruba committed Sep 26, 2017
2 parents c00f0d0 + ae2426d commit ecff17f49367aa7dbf81593b9fa4767b7a04c6b3
Showing with 26 additions and 4 deletions.
  1. +8 −0 coding-standard-php56.neon
  2. +1 −1 composer.json
  3. +2 −3 examples/ValidClass.php
  4. +15 −0 examples/ValidPropertyAndMethodSpacing.php
@@ -143,6 +143,14 @@ checkers:
Nette\CodingStandard\Fixer\ClassNotation\ClassAndTraitVisibilityRequiredFixer:
elements: [property, method]

# Constants and Properties should be separated by 1 space
Symplify\CodingStandard\Fixer\ClassNotation\PropertyAndConstantSeparationFixer:
space_count: 1

# Last property and 1st method should be separated by 2 spaces
Symplify\CodingStandard\Fixer\ClassNotation\LastPropertyAndFirstMethodSeparationFixer:
space_count: 2

# Control Statements - https://nette.org/en/coding-standard#toc-control-statements

# The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
@@ -3,7 +3,7 @@
"license": "MIT",
"require": {
"php": "^7.1",
"symplify/easy-coding-standard": "^2.3"
"symplify/easy-coding-standard": "^2.4"
},
"autoload": {
"psr-4": {
@@ -6,9 +6,8 @@
class ValidClass
{
public const JOY_COUNT = 5;
protected const CHILD_COUNT = 1;
protected const CHILD_COUNT = 1,
HOUSE_COUNT = 10; // allow comment
private const DREAM_COUNT = 250;
@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace Nette\CodingStandard\Examples;
class ValidPropertyAndMethodSpacing
{
private $var;
public function __construct()
{
}
}

0 comments on commit ecff17f

Please sign in to comment.