Coding standards and removing whitespace.

This commit is contained in:
Drak 2011-12-24 15:50:47 +05:45
parent b498138471
commit 79793e442a
9 changed files with 20 additions and 20 deletions

View File

@ -132,7 +132,7 @@ class EntityChoiceList extends ArrayChoiceList
if (is_array($this->choices)) {
$entities = $this->choices;
} else if ($entityLoader = $this->entityLoader) {
} elseif ($entityLoader = $this->entityLoader) {
$entities = $entityLoader->getEntities();
} else {
$entities = $this->em->getRepository($this->class)->findAll();

View File

@ -13,14 +13,14 @@ namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
/**
* Custom loader for entities in the choice list.
*
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
interface EntityLoaderInterface
{
{
/**
* Return an array of entities that are valid choices in the corresponding choice list.
*
*
* @return array
*/
function getEntities();

View File

@ -127,7 +127,7 @@
if ('section.child' == event.name) {
context.fillStyle = colors.child_sections;
context.fillRect(x + period.begin * ratio, 0, (period.end - period.begin) * ratio, height);
} else if ('section' == event.category) {
} elseif ('section' == event.category) {
context.beginPath();
context.strokeStyle = "#dfdfdf";
context.moveTo(x + period.begin * ratio, 0);
@ -156,7 +156,7 @@
if (colors[event.name]) {
context.fillStyle = colors[event.name];
context.strokeStyle = colors[event.name];
} else if (colors[event.category]) {
} elseif (colors[event.category]) {
context.fillStyle = colors[event.category];
context.strokeStyle = colors[event.category];
} else {

View File

@ -14,7 +14,7 @@
if (4 === xhr.readyState && 200 === xhr.status && -1 !== xhr.responseText.indexOf('sf-toolbarreset')) {
wdt.innerHTML = xhr.responseText;
wdt.style.display = 'block';
} else if (4 === xhr.readyState && xhr.status != 200) {
} elseif (4 === xhr.readyState && xhr.status != 200) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}');
}
};

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\HttpKernel\CacheClearer;
/**
* CacheClearerInterface.
*
*
* @author Dustin Dobervich <ddobervich@gmail.com>
*/
interface CacheClearerInterface

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\HttpKernel\CacheClearer;
/**
* ChainCacheClearer.
*
*
* @author Dustin Dobervich <ddobervich@gmail.com>
*/
class ChainCacheClearer implements CacheClearerInterface
@ -32,7 +32,7 @@ class ChainCacheClearer implements CacheClearerInterface
{
$this->clearers = $clearers;
}
/**
* {@inheritDoc}
*/
@ -42,11 +42,11 @@ class ChainCacheClearer implements CacheClearerInterface
$clearer->clear($cacheDir);
}
}
/**
* Adds a cache clearer to the aggregate.
*
* @param CacheClearerInterface $clearer
*
* @param CacheClearerInterface $clearer
*/
public function add(CacheClearerInterface $clearer)
{

View File

@ -19,7 +19,7 @@ class SingleIdentEntity
$this->id = $id;
$this->name = $name;
}
public function __toString()
{
return (string)$this->name;

View File

@ -111,7 +111,7 @@ class EntityTypeTest extends TypeTestCase
$this->assertEquals(array(1 => 'Foo', 2 => 'Bar'), $field->createView()->get('choices'));
}
public function testSetDataToUninitializedEntityWithNonRequiredToString()
{
$entity1 = new SingleIdentEntity(1, 'Foo');
@ -127,7 +127,7 @@ class EntityTypeTest extends TypeTestCase
$this->assertEquals(array("1" => 'Foo', "2" => 'Bar'), $field->createView()->get('choices'));
}
public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder()
{
$entity1 = new SingleIdentEntity(1, 'Foo');

View File

@ -34,23 +34,23 @@ class ChainCacheClearerTest extends \PHPUnit_Framework_TestCase
$clearer
->expects($this->once())
->method('clear');
$chainClearer = new ChainCacheClearer(array($clearer));
$chainClearer->clear(self::$cacheDir);
}
public function testInjectClearerUsingAdd()
{
$clearer = $this->getMockClearer();
$clearer
->expects($this->once())
->method('clear');
$chainClearer = new ChainCacheClearer();
$chainClearer->add($clearer);
$chainClearer->clear(self::$cacheDir);
}
protected function getMockClearer()
{
return $this->getMock('Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface');