Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactoring] Updated Code Style #6

Merged
merged 9 commits into from Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Expand Up @@ -12,7 +12,7 @@ build:
tests:
override:
-
command: phpunit --coverage-clover ./clover.xml
command: ./vendor/bin/phpunit --coverage-clover ./clover.xml
coverage:
file: clover.xml
format: clover
38 changes: 16 additions & 22 deletions .travis.yml
@@ -1,11 +1,25 @@
language: php

sudo: false

php:
- 5.6
- 7.0
- 7.1
- 7.2
- hhvm

env:
- SYMFONY_VERSION=2.7.*
- SYMFONY_VERSION=2.8.*
- SYMFONY_VERSION=3.0.*
- SYMFONY_VERSION=3.1.*
- SYMFONY_VERSION=3.2.*
- SYMFONY_VERSION=3.3.*

cache:
directories:
- $HOME/.composer/cache

before_install:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" < "7.1" ]; then phpenv config-rm xdebug.ini; fi
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv rehash; fi;
Expand All @@ -16,24 +30,4 @@ install:
- composer install

script:
- phpunit

matrix:
fast_finish: true
include:
- php: 5.6
env: SYMFONY_VERSION=2.7.*
- php: 5.6
env: SYMFONY_VERSION=2.8.*
- php: 5.6
env: SYMFONY_VERSION=3.0.*
- php: 7.0
env: SYMFONY_VERSION=3.0.*
- php: nightly
env: SYMFONY_VERSION=3.1.*
allow_failures:
- php: hhvm
- php: nightly

notifications:
email: false
- ./vendor/bin/phpunit
5 changes: 0 additions & 5 deletions BundleDependency.php
Expand Up @@ -7,7 +7,6 @@

trait BundleDependency
{

/**
* @var bool
*/
Expand Down Expand Up @@ -35,8 +34,6 @@ public function build(ContainerBuilder $container)
* Register the bundle dependencies.
*
* @param ContainerBuilder $container
*
* @return void
*/
protected function registerBundleDependencies(ContainerBuilder $container)
{
Expand Down Expand Up @@ -87,8 +84,6 @@ protected function createBundles(array $dependencies)

/**
* @param ContainerBuilder $container
*
* @return void
*/
protected function initializeBundles(ContainerBuilder $container)
{
Expand Down
1 change: 0 additions & 1 deletion BundleDependencyInterface.php
Expand Up @@ -4,7 +4,6 @@

interface BundleDependencyInterface
{

/**
* Gets the list of bundle dependencies.
*
Expand Down
4 changes: 0 additions & 4 deletions DependencyInjection/Compiler/ExtensionLoadPass.php
Expand Up @@ -8,7 +8,6 @@

class ExtensionLoadPass implements CompilerPassInterface
{

/**
* @var array
*/
Expand Down Expand Up @@ -37,14 +36,11 @@ public function process(ContainerBuilder $container)
/**
* @param Extension $extension
* @param ContainerBuilder $container
*
* @return void
*/
private function loadExtension(Extension $extension, ContainerBuilder $container)
{
if (!$container->getExtensionConfig($extension->getAlias())) {
$extension->load([], $container);
}
}

}
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Symfony Bundles (Dmitry Khaperets)
Copyright (c) 2016-2017 Symfony Bundles (Dmitry Khaperets)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 0 additions & 3 deletions README.md
Expand Up @@ -31,7 +31,6 @@ use SymfonyBundles\BundleDependency\BundleDependencyInterface;

class MyBundle extends Bundle implements BundleDependencyInterface
{

use BundleDependency;

public function getBundleDependencies()
Expand All @@ -42,7 +41,6 @@ class MyBundle extends Bundle implements BundleDependencyInterface
'SymfonyBundles\RedisBundle\SymfonyBundlesRedisBundle',
];
}

}
```

Expand All @@ -52,7 +50,6 @@ If you want override a method `build`, call the method `registerBundleDependenci
public function build(ContainerBuilder $container)
{
parent::build($container);

// ...

$this->registerBundleDependencies($container);
Expand Down
2 changes: 0 additions & 2 deletions Tests/Bundle/FirstBundle/FirstBundle.php
Expand Up @@ -8,7 +8,6 @@

class FirstBundle extends Bundle implements BundleDependencyInterface
{

use BundleDependency;

public function getBundleDependencies()
Expand All @@ -18,5 +17,4 @@ public function getBundleDependencies()
\SymfonyBundles\BundleDependency\Tests\Bundle\ThirdBundle\ThirdBundle::class,
];
}

}
1 change: 0 additions & 1 deletion Tests/Bundle/FourthBundle/FourthBundle.php
Expand Up @@ -6,5 +6,4 @@

class FourthBundle extends Bundle
{

}
1 change: 0 additions & 1 deletion Tests/Bundle/SecondBundle/SecondBundle.php
Expand Up @@ -6,5 +6,4 @@

class SecondBundle extends Bundle
{

}
Expand Up @@ -7,10 +7,7 @@

class ThirdExtension extends Extension
{

public function load(array $configs, ContainerBuilder $container)
{
//
}

}
4 changes: 1 addition & 3 deletions Tests/Bundle/ThirdBundle/ThirdBundle.php
Expand Up @@ -4,12 +4,11 @@

use Symfony\Component\HttpKernel\Bundle\Bundle;
use SymfonyBundles\BundleDependency\BundleDependency;
use SymfonyBundles\BundleDependency\BundleDependencyInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use SymfonyBundles\BundleDependency\BundleDependencyInterface;

class ThirdBundle extends Bundle implements BundleDependencyInterface
{

use BundleDependency;

public function build(ContainerBuilder $container)
Expand All @@ -29,5 +28,4 @@ public function getBundleDependencies()
\SymfonyBundles\BundleDependency\Tests\Bundle\FourthBundle\FourthBundle::class,
];
}

}
2 changes: 0 additions & 2 deletions Tests/BundleTest.php
Expand Up @@ -4,7 +4,6 @@

class BundleTest extends TestCase
{

public function testBundleExists()
{
$bundles = $this->container->getParameter('kernel.bundles');
Expand All @@ -14,5 +13,4 @@ public function testBundleExists()
$this->assertArrayHasKey('ThirdBundle', $bundles);
$this->assertArrayHasKey('FourthBundle', $bundles);
}

}
2 changes: 0 additions & 2 deletions Tests/Fixtures/app/AppKernel.php
Expand Up @@ -8,7 +8,6 @@

class AppKernel extends Kernel
{

public function __construct($environment, $debug)
{
parent::__construct($environment, $debug);
Expand Down Expand Up @@ -45,5 +44,4 @@ public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir() . '/config/config_test.yml');
}

}
2 changes: 0 additions & 2 deletions Tests/Kernel.php
Expand Up @@ -4,7 +4,6 @@

class Kernel
{

/**
* @var Fixtures\app\AppKernel
*/
Expand All @@ -23,5 +22,4 @@ public static function make()

return static::$instance;
}

}
2 changes: 0 additions & 2 deletions Tests/TestCase.php
Expand Up @@ -4,7 +4,6 @@

abstract class TestCase extends \PHPUnit_Framework_TestCase
{

/**
* @var \Symfony\Component\DependencyInjection\ContainerInterface
*/
Expand All @@ -14,5 +13,4 @@ public function setUp()
{
$this->container = Kernel::make()->getContainer();
}

}
2 changes: 0 additions & 2 deletions Tests/TraitTest.php
Expand Up @@ -6,7 +6,6 @@

class TraitTest extends TestCase
{

use BundleDependency;

public function testGetBundleDependencies()
Expand All @@ -20,5 +19,4 @@ public function getBundleDependencies()
Bundle\FirstBundle\FirstBundle::class,
];
}

}
8 changes: 1 addition & 7 deletions composer.json
Expand Up @@ -24,16 +24,10 @@
},
"require-dev": {
"phpunit/phpunit": "^5.3",
"phpunit/php-code-coverage": "^3.3.0",
"phpunit/php-code-coverage": "^3.3.0|^4.0",
"symfony/framework-bundle": "~2.7|~3.0",
"doctrine/annotations": "~1.1"
},
"config": {
"platform": {
"php": "5.6"
}
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
Expand Down