fixed CS
This commit is contained in:
parent
3c010db2cb
commit
fdb11be242
@ -89,6 +89,7 @@ EOF
|
||||
}
|
||||
|
||||
$this->outputTags($output, $input->getOption('show-private'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -146,8 +147,8 @@ EOF
|
||||
|
||||
if (null !== $showTagAttributes) {
|
||||
$tags = $definition->getTag($showTagAttributes);
|
||||
foreach($tags as $tag) {
|
||||
foreach($tag as $key => $value) {
|
||||
foreach ($tags as $tag) {
|
||||
foreach ($tag as $key => $value) {
|
||||
if (!isset($maxTags[$key])) {
|
||||
$maxTags[$key] = strlen($key);
|
||||
}
|
||||
@ -173,7 +174,7 @@ EOF
|
||||
$format1 .= '%-'.($maxScope + 19).'s %s';
|
||||
|
||||
$tags = array();
|
||||
foreach($maxTags as $tagName => $length) {
|
||||
foreach ($maxTags as $tagName => $length) {
|
||||
$tags[] = '<comment>'.$tagName.'</comment>';
|
||||
}
|
||||
$output->writeln(vsprintf($format1, $this->buildArgumentsArray('<comment>Service Id</comment>', '<comment>Scope</comment>', '<comment>Class Name</comment>', $tags)));
|
||||
@ -184,9 +185,9 @@ EOF
|
||||
if ($definition instanceof Definition) {
|
||||
$lines = array();
|
||||
if (null !== $showTagAttributes) {
|
||||
foreach($definition->getTag($showTagAttributes) as $key => $tag) {
|
||||
foreach ($definition->getTag($showTagAttributes) as $key => $tag) {
|
||||
$tagValues = array();
|
||||
foreach(array_keys($maxTags) as $tagName) {
|
||||
foreach (array_keys($maxTags) as $tagName) {
|
||||
$tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : "";
|
||||
}
|
||||
if (0 === $key) {
|
||||
@ -199,7 +200,7 @@ EOF
|
||||
$lines[] = $this->buildArgumentsArray($serviceId, $definition->getScope(), $definition->getClass());
|
||||
}
|
||||
|
||||
foreach($lines as $arguments) {
|
||||
foreach ($lines as $arguments) {
|
||||
$output->writeln(vsprintf($format, $arguments));
|
||||
}
|
||||
} elseif ($definition instanceof Alias) {
|
||||
@ -216,7 +217,7 @@ EOF
|
||||
protected function buildArgumentsArray($serviceId, $scope, $className, array $tagAttributes = array())
|
||||
{
|
||||
$arguments = array($serviceId);
|
||||
foreach($tagAttributes as $tagAttribute) {
|
||||
foreach ($tagAttributes as $tagAttribute) {
|
||||
$arguments[] = $tagAttribute;
|
||||
}
|
||||
$arguments[] = $scope;
|
||||
|
@ -59,19 +59,8 @@
|
||||
<label for="priority">Priority</label>
|
||||
<select id="priority" name="priority" onchange="document.getElementById('priority-form').submit(); ">
|
||||
{# values < 0 are custom levels #}
|
||||
{% for value, text in {
|
||||
100: 'DEBUG',
|
||||
200: 'INFO',
|
||||
250: 'NOTICE',
|
||||
300: 'WARNING',
|
||||
400: 'ERROR',
|
||||
500: 'CRITICAL',
|
||||
550: 'ALERT',
|
||||
600: 'EMERGENCY',
|
||||
'-100': 'DEPRECATION only'
|
||||
}
|
||||
%}
|
||||
<option value="{{ value }}"{{ value == priority ? ' selected' : '' }}>{{ text }}</option>
|
||||
{% for value, text in { 100: 'DEBUG', 200: 'INFO', 250: 'NOTICE', 300: 'WARNING', 400: 'ERROR', 500: 'CRITICAL', 550: 'ALERT', 600: 'EMERGENCY', '-100': 'DEPRECATION only' } %}
|
||||
<option value="{{ value }}"{{ value == priority ? ' selected' : '' }}>{{ text }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<noscript>
|
||||
@ -122,11 +111,7 @@
|
||||
{% set from = '-' %}
|
||||
{% endif %}
|
||||
|
||||
<li>Called from {{ call.file is defined and call.line is defined
|
||||
? call.file|format_file(call.line, from)
|
||||
: from|raw
|
||||
}}
|
||||
</li>
|
||||
<li>Called from {{ call.file is defined and call.line is defined ? call.file|format_file(call.line, from) : from|raw }}</li>
|
||||
|
||||
{{ index == log.context.stack|length - 1 ? '</ul>' : '' }}
|
||||
{% endfor %}
|
||||
|
@ -316,6 +316,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
||||
switch ($sort) {
|
||||
case SortableIterator::SORT_BY_NAME:
|
||||
$command->ins('sort')->add('| sort');
|
||||
|
||||
return;
|
||||
case SortableIterator::SORT_BY_TYPE:
|
||||
$format = '%y';
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Finder\Adapter;
|
||||
|
||||
use Symfony\Component\Finder\Iterator;
|
||||
use Symfony\Component\Finder\Shell\Shell;
|
||||
use Symfony\Component\Finder\Shell\Command;
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Finder\Adapter;
|
||||
|
||||
use Symfony\Component\Finder\Iterator;
|
||||
use Symfony\Component\Finder\Shell\Shell;
|
||||
use Symfony\Component\Finder\Shell\Command;
|
||||
|
||||
|
@ -10,5 +10,5 @@ interface ExceptionInterface
|
||||
/**
|
||||
* @return \Symfony\Component\Finder\Adapter\AdapterInterface
|
||||
*/
|
||||
function getAdapter();
|
||||
public function getAdapter();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class Expression implements ValueInterface
|
||||
{
|
||||
try {
|
||||
$this->value = Regex::create($expr);
|
||||
} catch(\InvalidArgumentException $e) {
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->value = new Glob($expr);
|
||||
}
|
||||
}
|
||||
|
@ -21,28 +21,28 @@ interface ValueInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function render();
|
||||
public function render();
|
||||
|
||||
/**
|
||||
* Renders string representation of pattern.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function renderPattern();
|
||||
public function renderPattern();
|
||||
|
||||
/**
|
||||
* Returns value case sensitivity.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isCaseSensitive();
|
||||
public function isCaseSensitive();
|
||||
|
||||
/**
|
||||
* Returns expression type.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function getType();
|
||||
public function getType();
|
||||
|
||||
/**
|
||||
* @param string $expr
|
||||
|
@ -723,7 +723,7 @@ class Finder implements \IteratorAggregate, \Countable
|
||||
return $this
|
||||
->buildAdapter($adapter['adapter'])
|
||||
->searchInDirectory($dir);
|
||||
} catch(ExceptionInterface $e) {}
|
||||
} catch (ExceptionInterface $e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,6 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
||||
|
||||
$finder = $finder->append($finder1);
|
||||
|
||||
|
||||
$this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator());
|
||||
}
|
||||
|
||||
|
@ -83,4 +83,3 @@ class PathFilterIteratorTest extends IteratorTestCase
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -482,6 +482,7 @@ class FormTypeTest extends TypeTestCase
|
||||
$builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer(
|
||||
function () {},
|
||||
function ($value) { // reverseTransform
|
||||
|
||||
return 'foobar';
|
||||
}
|
||||
));
|
||||
@ -507,6 +508,7 @@ class FormTypeTest extends TypeTestCase
|
||||
$builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer(
|
||||
function () {},
|
||||
function ($value) use ($ref2) { // reverseTransform
|
||||
|
||||
return $ref2;
|
||||
}
|
||||
));
|
||||
|
@ -12,13 +12,11 @@
|
||||
namespace Symfony\Component\Form\Tests\Extension\Validator\Constraints;
|
||||
|
||||
use Symfony\Component\Form\FormBuilder;
|
||||
use Symfony\Component\Validator\ConstraintViolation;
|
||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\Extension\Validator\Constraints\Form;
|
||||
use Symfony\Component\Form\Extension\Validator\Constraints\FormValidator;
|
||||
use Symfony\Component\Form\Util\PropertyPath;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\Constraints\NotNull;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
@ -102,7 +102,6 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('gif', $file->getClientOriginalExtension());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @expectedException Symfony\Component\HttpFoundation\File\Exception\FileException
|
||||
*/
|
||||
|
@ -179,7 +179,7 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$collection->expects($this->once())
|
||||
->method('remove')
|
||||
->will($this->returnCallback(function($criteria) use($that) {
|
||||
->will($this->returnCallback(function($criteria) use ($that) {
|
||||
$that->assertInstanceOf('MongoDate', $criteria[$that->options['time_field']]['$lt']);
|
||||
$that->assertGreaterThanOrEqual(time() - -1, $criteria[$that->options['time_field']]['$lt']->sec);
|
||||
}));
|
||||
|
@ -84,6 +84,7 @@ class Store implements StoreInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return !file_exists($path) ?: $path;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
class EventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
static public function getSubscribedEvents()
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array('foo' => 'call');
|
||||
}
|
||||
|
@ -521,6 +521,7 @@ class OptionsTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->options->setNormalizer('foo', function (Options $options, $previousValue) use ($test) {
|
||||
$test->assertNull($previousValue);
|
||||
|
||||
return '';
|
||||
});
|
||||
$this->assertEquals(array('foo' => ''), $this->options->all());
|
||||
|
@ -115,7 +115,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGetErrorOutput()
|
||||
{
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('ini_set(\'display_errors\',\'on\');$n=0;while($n<3){echo $a;$n++;}')));
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('ini_set(\'display_errors\',\'on\'); $n = 0; while ($n < 3) { echo $a; $n++; }')));
|
||||
|
||||
$p->run();
|
||||
$this->assertEquals(3, preg_match_all('/PHP Notice/', $p->getErrorOutput(), $matches));
|
||||
@ -123,7 +123,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGetIncrementalErrorOutput()
|
||||
{
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('ini_set(\'display_errors\',\'on\');usleep(50000);$n=0;while($n<3){echo $a;$n++;}')));
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('ini_set(\'display_errors\',\'on\'); usleep(50000); $n = 0; while ($n < 3) { echo $a; $n++; }')));
|
||||
|
||||
$p->start();
|
||||
while ($p->isRunning()) {
|
||||
@ -134,7 +134,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGetOutput()
|
||||
{
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while($n<3){echo \' foo \';$n++;}')));
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while ($n<3) {echo \' foo \';$n++;}')));
|
||||
|
||||
$p->run();
|
||||
$this->assertEquals(3, preg_match_all('/foo/', $p->getOutput(), $matches));
|
||||
@ -142,7 +142,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGetIncrementalOutput()
|
||||
{
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while($n<3){echo \' foo \';usleep(50000);$n++;}')));
|
||||
$p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while ($n<3) { echo \' foo \'; usleep(50000); $n++; }')));
|
||||
|
||||
$p->start();
|
||||
while ($p->isRunning()) {
|
||||
|
@ -83,6 +83,7 @@ class ApacheUrlMatcher extends UrlMatcher
|
||||
|
||||
if (null !== $route) {
|
||||
$parameters['_route'] = $route;
|
||||
|
||||
return $this->mergeDefaults($parameters, $defaults);
|
||||
} elseif (0 < count($allow)) {
|
||||
throw new MethodNotAllowedException($allow);
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Security\Core\Util;
|
||||
|
||||
|
||||
/**
|
||||
* Interface that needs to be implemented by all secure random number generators.
|
||||
*
|
||||
|
@ -279,4 +279,3 @@ class Section
|
||||
return $this->events;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user