Skip to content

Commit 9c6a4a7

Browse files
authored
Merge pull request #205 from symfony-cmf/styleci
fix styleci configuration
2 parents e7f7bac + 178727d commit 9c6a4a7

File tree

8 files changed

+10
-14
lines changed

8 files changed

+10
-14
lines changed

.styleci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515

1616

1717
preset: symfony
18+
risky: true
1819

1920
enabled:
2021
- combine_consecutive_unsets
21-
- short_array_syntax
22-
- newline_after_open_tag
23-
- no_php4_constructor
2422
- no_useless_else
2523
- ordered_use
2624
- strict

src/DependencyInjection/Compiler/TestContainerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(array $services = [])
3434
public function process(ContainerBuilder $container)
3535
{
3636
foreach ($container->getDefinitions() as $id => $definition) {
37-
if (in_array($id, $this->services, true)) {
37+
if (\in_array($id, $this->services, true)) {
3838
$definition->setPublic(true);
3939
}
4040
}

src/Functional/BaseTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getFrameworkBundleClient()
6060
{
6161
if (null === $this->client) {
6262
// property does not exist in all symfony versions
63-
if (\property_exists(self::class, 'booted') && self::$booted) {
63+
if (property_exists(self::class, 'booted') && self::$booted) {
6464
self::ensureKernelShutdown();
6565
}
6666
$this->client = self::createClient($this->getKernelConfiguration());

src/Functional/DbManager/ORM.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ class ORM
4747

4848
/**
4949
* Constructor.
50-
*
51-
* @param ContainerInterface $container
5250
*/
5351
public function __construct(ContainerInterface $container)
5452
{

src/HttpKernel/TestKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function getProjectDir()
166166
{
167167
$refl = new \ReflectionClass($this);
168168
$fname = $refl->getFileName();
169-
$kernelDir = dirname($fname);
169+
$kernelDir = \dirname($fname);
170170

171171
return $kernelDir;
172172
}
@@ -217,7 +217,7 @@ protected function registerConfiguredBundles()
217217
protected function build(ContainerBuilder $container)
218218
{
219219
parent::build($container);
220-
if (in_array($this->getEnvironment(), ['test', 'phpcr']) && file_exists($this->getKernelDir().'/config/public_services.php')) {
220+
if (\in_array($this->getEnvironment(), ['test', 'phpcr']) && file_exists($this->getKernelDir().'/config/public_services.php')) {
221221
$services = require $this->getKernelDir().'/config/public_services.php';
222222
$container->addCompilerPass(new TestContainerPass($services), PassConfig::TYPE_OPTIMIZE);
223223
}

src/Unit/Constraint/SchemaAcceptsXml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function matches($schemaFile): bool
5252

5353
public function count(): int
5454
{
55-
return count($this->xml);
55+
return \count($this->xml);
5656
}
5757

5858
public function toString(): string

src/Unit/XmlSchemaTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ public static function assertSchemaRefusesXml($xmlDoms, $schemaPath, $message =
3232

3333
private static function getSchemaAcceptsXmlConstraint($xmlDoms)
3434
{
35-
if (!is_array($xmlDoms)) {
35+
if (!\is_array($xmlDoms)) {
3636
$xmlDoms = [$xmlDoms];
3737
}
3838

3939
$xmlDoms = array_map(function ($dom) {
40-
if (is_string($dom)) {
40+
if (\is_string($dom)) {
4141
$xml = $dom;
4242
$dom = new \DOMDocument();
4343
$dom->load($xml);
@@ -46,7 +46,7 @@ private static function getSchemaAcceptsXmlConstraint($xmlDoms)
4646
}
4747

4848
if (!$dom instanceof \DOMDocument) {
49-
throw new \InvalidArgumentException(sprintf('The first argument of assertSchemaAcceptsXml should be instances of \DOMDocument, "%s" given', get_class($dom)));
49+
throw new \InvalidArgumentException(sprintf('The first argument of assertSchemaAcceptsXml should be instances of \DOMDocument, "%s" given', \get_class($dom)));
5050
}
5151

5252
return $dom;

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
if (!$loader = include $vendorDir.'/autoload.php') {
1515
$nl = PHP_SAPI === 'cli' ? PHP_EOL : '<br />';
1616
echo "$nl$nl";
17-
die('You must set up the project dependencies.'.$nl.
17+
exit('You must set up the project dependencies.'.$nl.
1818
'Run the following commands in '.dirname(__DIR__).':'.$nl.$nl.
1919
'curl -s http://getcomposer.org/installer | php'.$nl.
2020
'php composer.phar install'.$nl);

0 commit comments

Comments
 (0)