Skip to content

Commit

Permalink
fix minor code styles
Browse files Browse the repository at this point in the history
  • Loading branch information
havvg committed Feb 23, 2012
1 parent 563a368 commit 264708a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DataFixtures/Loader/AbstractDataLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ protected function loadDataFromArray($data = null)

foreach ($data as $name => $value) {
try {
if (is_array($value) && 's' == substr($name, -1)) {
if (is_array($value) && 's' === substr($name, -1)) {
// many to many relationship
$this->loadManyToMany($obj, substr($name, 0, -1), $value);
continue;
}
} catch (\PropelException $e) {
// Check whether this is actually an array stored in the object.
if ('Cannot fetch TableMap for undefined table: '.substr($name, 0, -1) === $e->getMessage()) {
if ($tableMap->getColumn($name)->getType() !== 'ARRAY') {
if ('ARRAY' !== $tableMap->getColumn($name)->getType()) {
throw $e;
}
}
Expand Down

0 comments on commit 264708a

Please sign in to comment.