Skip to content

Commit

Permalink
csfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Jan 18, 2017
1 parent 3c7144d commit 3650409
Show file tree
Hide file tree
Showing 73 changed files with 345 additions and 295 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# hidev internals
.hidev/composer.json
.hidev/composer.lock
.hidev/config-local.yml
.hidev/vendor

# IDE & OS files
Expand All @@ -13,15 +14,19 @@
Thumbs.db
nbproject

# php-cs-fixer cache
.php_cs.cache
# HiSite directories
/runtime/*
/web/assets/*

# vendor dirs
vendor

# composer lock files
composer.lock

# php-cs-fixer cache
.php_cs.cache

# phpunit generated files
coverage.clover

Expand All @@ -30,3 +35,7 @@ composer.phar
php-cs-fixer.phar
phpunit-skelgen.phar
phpunit.phar

# Binaries
chkipper.phar
ocular.phar
4 changes: 0 additions & 4 deletions .hidev/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ package:
[HiPanel](http://hipanel.com) is next generation control panel for hosting, domains and more.
This package provides domain management for HiPanel.
require:
hiqdev/hidev-php: "*"
hiqdev/hidev-vendor: "*"
76 changes: 38 additions & 38 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@ Domain plugin for HiPanel
@link https://github.com/hiqdev/hipanel-module-domain
@package hipanel-module-domain
@license BSD-3-Clause
@copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
@copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
EOF;

Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);

return Symfony\CS\Config\Config::create()
return PhpCsFixer\Config::create()
->setUsingCache(true)
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->fixers([
'-long_array_syntax', /// Arrays should use the long syntax
'-php4_constructor', /// Convert PHP4-style constructors to __construct. Warning! This could change code behavior
'-phpdoc_var_to_type', /// @var should always be written as @type
'-align_double_arrow', /// Align double arrow symbols in consecutive lines
'-unalign_double_arrow', /// Unalign double arrow symbols in consecutive lines
'-align_equals', /// Align equals symbols in consecutive lines
'-unalign_equals', /// Unalign equals symbols in consecutive lines
'-blankline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
'-phpdoc_no_empty_return', /// @return void and @return null annotations should be omitted from phpdocs
'-empty_return', /// A return statement wishing to return nothing should be simply "return"
'-return', /// An empty line feed should precede a return statement
'-phpdoc_params', /// All items of the @param, @throws, @return, @var, and @type phpdoc tags must be aligned vertically
'-phpdoc_scalar', /// Scalar types should always be written in the same form. "int", not "integer"; "bool", not "boolean"
'-phpdoc_separation', /// Annotations of a different type are separated by a single blank line
'-phpdoc_to_comment', /// Docblocks should only be used on structural elements
'header_comment', /// Add, replace or remove header comment
'concat_with_spaces', /// Concatenation should be used with at least one whitespace around
'ereg_to_preg', /// Replace deprecated ereg regular expression functions with preg. Warning! This could change code behavior
'multiline_spaces_before_semicolon', /// Multi-line whitespace before closing semicolon are prohibited
'newline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag
'single_blank_line_before_namespace', /// There should be no blank lines before a namespace declaration
'ordered_use', /// Ordering use statements
'phpdoc_order', /// Annotations in phpdocs should be ordered so that @param come first, then @throws, then @return
'pre_increment', /// Pre incrementation/decrementation should be used if possible
'short_array_syntax', /// PHP arrays should use the PHP 5.4 short-syntax
'strict', /// Comparison should be strict. Warning! This could change code behavior
'strict_param', /// Functions should be used with $strict param. Warning! This could change code behavior
])
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->setRiskyAllowed(true)
->setRules(array(
'@Symfony' => true,
'header_comment' => [
'header' => $header,
'separate' => 'bottom',
'location' => 'after_declare_strict',
'commentType' => 'PHPDoc',
],
'binary_operator_spaces' => [
'align_double_arrow' => null,
'align_equals' => null,
],
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'empty_return' => false,
'blank_line_before_return' => false,
'phpdoc_align' => false,
'phpdoc_params' => false,
'phpdoc_scalar' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'method_argument_space' => false,
'ereg_to_preg' => true,
'blank_line_after_opening_tag' => true,
'single_blank_line_before_namespace' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'pre_increment' => true,
'strict_comparison' => true,
'strict_param' => true,
'no_multiline_whitespace_before_semicolons' => true,
))
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->notPath('vendor')
->notPath('runtime')
->notPath('web/assets')
->notPath('tests/unit/UnitTester.php')
)
)
;
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2015-2016, HiQDev (http://hiqdev.com/)
Copyright © 2015-2017, HiQDev (http://hiqdev.com/)
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ to the require section of your composer.json.
This project is released under the terms of the BSD-3-Clause [license](LICENSE).
Read more [here](http://choosealicense.com/licenses/bsd-3-clause).

Copyright © 2015-2016, HiQDev (http://hiqdev.com/)
Copyright © 2015-2017, HiQDev (http://hiqdev.com/)
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
{
"name": "Dmitry Naumenko",
"role": "Lead backend developer",
"email": "silverfire@hiqdev.com",
"email": "d.naumenko.a@gmail.com",
"homepage": "http://silverfire.me/"
},
{
"name": "Andrey Klochok",
"role": "Lead frontend developer",
"email": "tafid@hiqdev.com",
"email": "andreyklochok@gmail.com",
"homepage": "http://hiqdev.com/"
},
{
"name": "Yuriy Myronchuk",
"role": "QA Lead",
"email": "bladeroot@hiqdev.com",
"email": "bladeroot@gmail.com",
"homepage": "http://hiqdev.com/"
}
],
Expand All @@ -49,8 +49,8 @@
"seostats/seostats": "dev-master"
},
"require-dev": {
"hiqdev/hidev-php": "<2.0",
"hiqdev/hidev-vendor": "<2.0"
"hiqdev/hidev-php": "<2.0 || dev-master",
"hiqdev/hidev-hiqdev": "<2.0 || dev-master"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 2 additions & 3 deletions src/Module.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain;
Expand Down
10 changes: 9 additions & 1 deletion src/actions/DomainOptionSwitcherAction.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\actions;

Expand Down Expand Up @@ -31,7 +39,7 @@ protected function getDefaultRules()
$message = Yii::$app->session->removeFlash('error');
return [
'success' => false,
'text' => reset($message)['text']
'text' => reset($message)['text'],
];
},
],
Expand Down
5 changes: 2 additions & 3 deletions src/assets/DomainCheckPluginAsset.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\assets;
Expand Down
5 changes: 2 additions & 3 deletions src/assets/NSyncPluginAsset.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\assets;
Expand Down
8 changes: 8 additions & 0 deletions src/assets/WhoisAsset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\assets;

Expand Down
6 changes: 2 additions & 4 deletions src/cart/AbstractDomainProduct.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;

use hipanel\modules\domain\cart\Calculation;
use hipanel\modules\domain\models\Domain;
use hipanel\modules\finance\cart\AbstractCartPosition;
use Yii;
Expand Down
5 changes: 2 additions & 3 deletions src/cart/AbstractDomainPurchase.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;
Expand Down
5 changes: 2 additions & 3 deletions src/cart/Calculation.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;
Expand Down
6 changes: 2 additions & 4 deletions src/cart/DomainRegistrationProduct.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;

use hipanel\modules\domain\cart\DomainRegistrationPurchase;
use Yii;

class DomainRegistrationProduct extends AbstractDomainProduct
Expand Down
5 changes: 2 additions & 3 deletions src/cart/DomainRegistrationPurchase.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;
Expand Down
9 changes: 4 additions & 5 deletions src/cart/DomainRenewalProduct.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;
Expand All @@ -30,7 +29,7 @@ public static function primaryKey()
}

/**
* @var integer[] The limit of days before expiration date for each domain zone, when domain can be renewed.
* @var integer[] the limit of days before expiration date for each domain zone, when domain can be renewed
*/
protected $daysBeforeExpire = [
'ru' => 56,
Expand Down Expand Up @@ -80,7 +79,7 @@ public function getPurchaseModel($options = [])
}

/**
* Checks whether domain reached the limit of days before expiration date and can be renewed
* Checks whether domain reached the limit of days before expiration date and can be renewed.
*
* @param $attribute
* @return bool
Expand Down
5 changes: 2 additions & 3 deletions src/cart/DomainRenewalPurchase.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace hipanel\modules\domain\cart;
Expand Down
Loading

0 comments on commit 3650409

Please sign in to comment.