Skip to content

Commit

Permalink
csfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Dec 14, 2016
1 parent 6e843bf commit 6839aff
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .hidev/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
type: yii2-extension
name: yii2-theme-original
title: Original Theme for hiqdev/yii2-thememanager
title: Yii2 Original Theme for hiqdev/yii2-thememanager
headline: Yii2 Original Theme
keywords: original, theme, extension, yii2
namespace: hiqdev\themes\original
Expand Down
54 changes: 54 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

$header = <<<EOF
Yii2 Original Theme for hiqdev/yii2-thememanager
@link https://github.com/hiqdev/yii2-theme-original
@package yii2-theme-original
@license BSD-3-Clause
@copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
EOF;

return PhpCsFixer\Config::create()
->setUsingCache(true)
->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')
)
;
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Yii2 Original Theme
===================

**Original Theme for hiqdev/yii2-thememanager**
**Yii2 Original Theme for hiqdev/yii2-thememanager**

[![Latest Stable Version](https://poser.pugx.org/hiqdev/yii2-theme-original/v/stable)](https://packagist.org/packages/hiqdev/yii2-theme-original)
[![Total Downloads](https://poser.pugx.org/hiqdev/yii2-theme-original/downloads)](https://packagist.org/packages/hiqdev/yii2-theme-original)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hiqdev/yii2-theme-original",
"type": "yii2-extension",
"description": "Original Theme for hiqdev/yii2-thememanager",
"description": "Yii2 Original Theme for hiqdev/yii2-thememanager",
"keywords": [
"original",
"theme",
Expand Down
13 changes: 13 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" syntaxCheck="false" bootstrap="tests/_bootstrap.php">
<testsuites>
<testsuite name="Unit Test Suite">
<directory>./tests/unit/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>
14 changes: 11 additions & 3 deletions src/Asset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Yii2 Original Theme for hiqdev/yii2-thememanager
*
* @link https://github.com/hiqdev/yii2-theme-original
* @package yii2-theme-original
* @license BSD-3-Clause
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\themes\original;

Expand All @@ -8,12 +16,12 @@
class Asset extends \yii\web\AssetBundle
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public $sourcePath = '@hiqdev/themes/original/assets';

/**
* @inheritdoc
* {@inheritdoc}
*/
public $css = [
'css/original.css',
Expand All @@ -22,7 +30,7 @@ class Asset extends \yii\web\AssetBundle
public $js = [];

/**
* @inheritdoc
* {@inheritdoc}
*/
public $depends = [
\yii\web\YiiAsset::class,
Expand Down
10 changes: 8 additions & 2 deletions src/Theme.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<?php
/**
* Yii2 Original Theme for hiqdev/yii2-thememanager
*
* @link https://github.com/hiqdev/yii2-theme-original
* @package yii2-theme-original
* @license BSD-3-Clause
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\themes\original;

use Yii;

/**
* Theme class.
*/
Expand Down
7 changes: 3 additions & 4 deletions src/config/hisite.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

/*
* Original Theme for hiqdev/yii2-thememanager
/**
* Yii2 Original Theme for hiqdev/yii2-thememanager
*
* @link https://github.com/hiqdev/yii2-theme-original
* @package yii2-theme-original
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
*/

return [
Expand Down
2 changes: 1 addition & 1 deletion src/views/site/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
Expand Down
15 changes: 15 additions & 0 deletions tests/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Yii2 Original Theme for hiqdev/yii2-thememanager
*
* @link https://github.com/hiqdev/yii2-theme-original
* @package yii2-theme-original
* @license BSD-3-Clause
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
*/

error_reporting(E_ALL & ~E_NOTICE);

$bootstrap = __DIR__ . '/../src/_bootstrap.php';

require_once file_exists($bootstrap) ? $bootstrap : __DIR__ . '/../vendor/autoload.php';

0 comments on commit 6839aff

Please sign in to comment.