Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove aligned '=>' and '=' #12293

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove aligned '=>' and '='
  • Loading branch information
polc committed Oct 22, 2014
commit b8bea92fc82d90c23a96c3d899ca1d46564a9d09
2 changes: 1 addition & 1 deletion UPGRADE-2.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@

```php
$view->vars = array_replace($view->vars, array(
'help' => 'A text longer than six characters',
'help' => 'A text longer than six characters',
'error_class' => 'max_length_error',
));
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public function collect(Request $request, Response $response, \Exception $except
}

$this->data = array(
'queries' => $queries,
'queries' => $queries,
'connections' => $this->connections,
'managers' => $this->managers,
'managers' => $this->managers,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function loadMappingInformation(array $objectManager, ContainerBuilder
foreach (array_keys($container->getParameter('kernel.bundles')) as $bundle) {
if (!isset($objectManager['mappings'][$bundle])) {
$objectManager['mappings'][$bundle] = array(
'mapping' => true,
'mapping' => true,
'is_bundle' => true,
);
}
Expand All @@ -65,8 +65,8 @@ protected function loadMappingInformation(array $objectManager, ContainerBuilder
}

$mappingConfig = array_replace(array(
'dir' => false,
'type' => false,
'dir' => false,
'type' => false,
'prefix' => false,
), (array) $mappingConfig);

Expand Down
14 changes: 7 additions & 7 deletions src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
};

$resolver->setDefaults(array(
'em' => null,
'property' => null,
'query_builder' => null,
'loader' => $loader,
'choices' => null,
'choice_list' => $choiceList,
'group_by' => null,
'em' => null,
'property' => null,
'query_builder' => null,
'loader' => $loader,
'choices' => null,
'choice_list' => $choiceList,
'group_by' => null,
));

$resolver->setRequired(array('class'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function loadTokenBySeries($series)
$sql = 'SELECT class, username, value, lastUsed'
.' FROM rememberme_token WHERE series=:series';
$paramValues = array('series' => $series);
$paramTypes = array('series' => \PDO::PARAM_STR);
$paramTypes = array('series' => \PDO::PARAM_STR);
$stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes);
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
if ($row) {
Expand All @@ -85,7 +85,7 @@ public function deleteTokenBySeries($series)
{
$sql = 'DELETE FROM rememberme_token WHERE series=:series';
$paramValues = array('series' => $series);
$paramTypes = array('series' => \PDO::PARAM_STR);
$paramTypes = array('series' => \PDO::PARAM_STR);
$this->conn->executeUpdate($sql, $paramValues, $paramTypes);
}

Expand All @@ -96,12 +96,12 @@ public function updateToken($series, $tokenValue, \DateTime $lastUsed)
{
$sql = 'UPDATE rememberme_token SET value=:value, lastUsed=:lastUsed'
.' WHERE series=:series';
$paramValues = array('value' => $tokenValue,
$paramValues = array('value' => $tokenValue,
'lastUsed' => $lastUsed,
'series' => $series,);
$paramTypes = array('value' => \PDO::PARAM_STR,
'series' => $series,);
$paramTypes = array('value' => \PDO::PARAM_STR,
'lastUsed' => DoctrineType::DATETIME,
'series' => \PDO::PARAM_STR,);
'series' => \PDO::PARAM_STR,);
$updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
if ($updated < 1) {
throw new TokenNotFoundException('No token found.');
Expand All @@ -116,15 +116,15 @@ public function createNewToken(PersistentTokenInterface $token)
$sql = 'INSERT INTO rememberme_token'
.' (class, username, series, value, lastUsed)'
.' VALUES (:class, :username, :series, :value, :lastUsed)';
$paramValues = array('class' => $token->getClass(),
$paramValues = array('class' => $token->getClass(),
'username' => $token->getUsername(),
'series' => $token->getSeries(),
'value' => $token->getTokenValue(),
'series' => $token->getSeries(),
'value' => $token->getTokenValue(),
'lastUsed' => $token->getLastUsed(),);
$paramTypes = array('class' => \PDO::PARAM_STR,
$paramTypes = array('class' => \PDO::PARAM_STR,
'username' => \PDO::PARAM_STR,
'series' => \PDO::PARAM_STR,
'value' => \PDO::PARAM_STR,
'series' => \PDO::PARAM_STR,
'value' => \PDO::PARAM_STR,
'lastUsed' => DoctrineType::DATETIME,);
$this->conn->executeUpdate($sql, $paramValues, $paramTypes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ protected function setUp()
public function testShouldSetContainerOnContainerAwareFixture()
{
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$loader = new ContainerAwareLoader($container);
$fixture = new ContainerAwareFixture();
$loader = new ContainerAwareLoader($container);
$fixture = new ContainerAwareFixture();

$loader->addFixture($fixture);

Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testLogNonUtf8()
;

$dbalLogger->startQuery('SQL', array(
'utf8' => 'foo',
'utf8' => 'foo',
'nonutf8' => "\x7F\xFF",
));
}
Expand Down Expand Up @@ -97,7 +97,7 @@ public function testLogLongString()

$dbalLogger->startQuery('SQL', array(
'short' => $shortString,
'long' => $longString,
'long' => $longString,
));
}

Expand Down Expand Up @@ -135,7 +135,7 @@ public function testLogUTF8LongString()

$dbalLogger->startQuery('SQL', array(
'short' => $shortString,
'long' => $longString,
'long' => $longString,
));
}
}
8 changes: 4 additions & 4 deletions src/Symfony/Bridge/Monolog/Handler/DebugHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public function getLogs()
$records = array();
foreach ($this->records as $record) {
$records[] = array(
'timestamp' => $record['datetime']->getTimestamp(),
'message' => $record['message'],
'priority' => $record['level'],
'timestamp' => $record['datetime']->getTimestamp(),
'message' => $record['message'],
'priority' => $record['level'],
'priorityName' => $record['level_name'],
'context' => $record['context'],
'context' => $record['context'],
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ protected function setUp()
public function testUsesRequestServerData()
{
$server = array(
'REQUEST_URI' => 'A',
'REMOTE_ADDR' => 'B',
'REQUEST_URI' => 'A',
'REMOTE_ADDR' => 'B',
'REQUEST_METHOD' => 'C',
'SERVER_NAME' => 'D',
'HTTP_REFERER' => 'E',
'SERVER_NAME' => 'D',
'HTTP_REFERER' => 'E',
);

$request = new Request();
Expand Down
20 changes: 10 additions & 10 deletions src/Symfony/Bridge/Propel1/DataCollector/PropelDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public function __construct(PropelLogger $logger, \PropelConfiguration $propelCo
public function collect(Request $request, Response $response, \Exception $exception = null)
{
$this->data = array(
'queries' => $this->buildQueries(),
'querycount' => $this->countQueries(),
'queries' => $this->buildQueries(),
'querycount' => $this->countQueries(),
);
}

Expand Down Expand Up @@ -118,16 +118,16 @@ private function buildQueries()
$innerGlue = $this->propelConfiguration->getParameter('debugpdo.logging.innerglue', ': ');

foreach ($this->logger->getQueries() as $q) {
$parts = explode($outerGlue, $q, 4);
$parts = explode($outerGlue, $q, 4);

$times = explode($innerGlue, $parts[0]);
$con = explode($innerGlue, $parts[2]);
$memories = explode($innerGlue, $parts[1]);
$times = explode($innerGlue, $parts[0]);
$con = explode($innerGlue, $parts[2]);
$memories = explode($innerGlue, $parts[1]);

$sql = trim($parts[3]);
$con = trim($con[1]);
$time = trim($times[1]);
$memory = trim($memories[1]);
$sql = trim($parts[3]);
$con = trim($con[1]);
$time = trim($times[1]);
$memory = trim($memories[1]);

$queries[] = array('connection' => $con, 'sql' => $sql, 'time' => $time, 'memory' => $memory);
}
Expand Down
12 changes: 6 additions & 6 deletions src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ class ModelChoiceList extends ObjectChoiceList
*/
public function __construct($class, $labelPath = null, $choices = null, $queryObject = null, $groupPath = null, $preferred = array(), PropertyAccessorInterface $propertyAccessor = null)
{
$this->class = $class;
$this->class = $class;

$queryClass = $this->class.'Query';
$queryClass = $this->class.'Query';
if (!class_exists($queryClass)) {
if (empty($this->class)) {
throw new MissingOptionsException('The "class" parameter is empty, you should provide the model class');
}
throw new InvalidOptionsException(sprintf('The query class "%s" is not found, you should provide the FQCN of the model class', $queryClass));
}

$query = new $queryClass();
$query = new $queryClass();

$this->query = $queryObject ?: $query;
$this->identifier = $this->query->getTableMap()->getPrimaryKeys();
$this->loaded = is_array($choices) || $choices instanceof \Traversable;
$this->query = $queryObject ?: $query;
$this->identifier = $this->query->getTableMap()->getPrimaryKeys();
$this->loaded = is_array($choices) || $choices instanceof \Traversable;

if ($preferred instanceof ModelCriteria) {
$this->preferredQuery = $preferred->mergeWith($this->query);
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ public function guessType($class, $property)
if ($relation->getType() === \RelationMap::MANY_TO_ONE) {
if (strtolower($property) === strtolower($relation->getName())) {
return new TypeGuess('model', array(
'class' => $relation->getForeignTable()->getClassName(),
'class' => $relation->getForeignTable()->getClassName(),
'multiple' => false,
), Guess::HIGH_CONFIDENCE);
}
} elseif ($relation->getType() === \RelationMap::ONE_TO_MANY) {
if (strtolower($property) === strtolower($relation->getPluralName())) {
return new TypeGuess('model', array(
'class' => $relation->getForeignTable()->getClassName(),
'class' => $relation->getForeignTable()->getClassName(),
'multiple' => true,
), Guess::HIGH_CONFIDENCE);
}
} elseif ($relation->getType() === \RelationMap::MANY_TO_MANY) {
if (strtolower($property) == strtolower($relation->getPluralName())) {
return new TypeGuess('model', array(
'class' => $relation->getLocalTable()->getClassName(),
'multiple' => true,
'class' => $relation->getLocalTable()->getClassName(),
'multiple' => true,
), Guess::HIGH_CONFIDENCE);
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/Symfony/Bridge/Propel1/Form/Type/ModelType.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
};

$resolver->setDefaults(array(
'template' => 'choice',
'multiple' => false,
'expanded' => false,
'class' => null,
'property' => null,
'query' => null,
'choices' => null,
'choice_list' => $choiceList,
'group_by' => null,
'by_reference' => false,
'template' => 'choice',
'multiple' => false,
'expanded' => false,
'class' => null,
'property' => null,
'query' => null,
'choices' => null,
'choice_list' => $choiceList,
'group_by' => null,
'by_reference' => false,
));
}

Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Propel1/Logger/PropelLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class PropelLogger
*/
public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null)
{
$this->logger = $logger;
$this->queries = array();
$this->logger = $logger;
$this->queries = array();
$this->stopwatch = $stopwatch;
$this->isPrepared = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($class, $property = null)
public function loadUserByUsername($username)
{
$queryClass = $this->queryClass;
$query = $queryClass::create();
$query = $queryClass::create();

if (null !== $this->property) {
$filter = 'filterBy'.ucfirst($this->property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public function testCollectWithData()

$this->assertEquals(array(
array(
'sql' => "SET NAMES 'utf8'",
'time' => '0.000 sec',
'sql' => "SET NAMES 'utf8'",
'time' => '0.000 sec',
'connection' => 'default',
'memory' => '1.4 MB',
'memory' => '1.4 MB',
),
), $c->getQueries());
$this->assertEquals(1, $c->getQueryCount());
Expand All @@ -67,22 +67,22 @@ public function testCollectWithMultipleData()

$this->assertEquals(array(
array(
'sql' => "SET NAMES 'utf8'",
'time' => '0.000 sec',
'sql' => "SET NAMES 'utf8'",
'time' => '0.000 sec',
'connection' => 'default',
'memory' => '1.4 MB',
'memory' => '1.4 MB',
),
array(
'sql' => "SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12",
'time' => '0.012 sec',
'sql' => "SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12",
'time' => '0.012 sec',
'connection' => 'default',
'memory' => '2.4 MB',
'memory' => '2.4 MB',
),
array(
'sql' => "INSERT INTO `table` (`some_array`) VALUES ('| 1 | 2 | 3 |')",
'time' => '0.012 sec',
'sql' => "INSERT INTO `table` (`some_array`) VALUES ('| 1 | 2 | 3 |')",
'time' => '0.012 sec',
'connection' => 'default',
'memory' => '2.4 MB',
'memory' => '2.4 MB',
),
), $c->getQueries());
$this->assertEquals(3, $c->getQueryCount());
Expand Down
12 changes: 6 additions & 6 deletions src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
class ItemQuery
{
private $map = array(
'id' => \PropelColumnTypes::INTEGER,
'value' => \PropelColumnTypes::VARCHAR,
'price' => \PropelColumnTypes::FLOAT,
'is_active' => \PropelColumnTypes::BOOLEAN,
'enabled' => \PropelColumnTypes::BOOLEAN_EMU,
'updated_at' => \PropelColumnTypes::TIMESTAMP,
'id' => \PropelColumnTypes::INTEGER,
'value' => \PropelColumnTypes::VARCHAR,
'price' => \PropelColumnTypes::FLOAT,
'is_active' => \PropelColumnTypes::BOOLEAN,
'enabled' => \PropelColumnTypes::BOOLEAN_EMU,
'updated_at' => \PropelColumnTypes::TIMESTAMP,
);

public static $result = array();
Expand Down
Loading