From 31d0d5d7f8dc169593ffcd3c11f71cffec1c1a3f Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Tue, 10 Sep 2013 16:45:36 +0200 Subject: [PATCH] Fix coding standards --- src/Faker/ORM/Doctrine/EntityPopulator.php | 6 +++--- src/Faker/ORM/Propel/ColumnTypeGuesser.php | 3 ++- src/Faker/ORM/Propel/EntityPopulator.php | 3 ++- src/Faker/Provider/en_AU/PhoneNumber.php | 2 -- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Faker/ORM/Doctrine/EntityPopulator.php b/src/Faker/ORM/Doctrine/EntityPopulator.php index df8db6c1..e56a4235 100644 --- a/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -2,6 +2,7 @@ namespace Faker\ORM\Doctrine; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Mapping\ClassMetadata; use Faker\ORM\Doctrine\ColumnTypeGuesser; @@ -74,7 +75,6 @@ class EntityPopulator public function guessColumnFormatters(\Faker\Generator $generator) { $formatters = array(); - $class = $this->class; $nameGuesser = new \Faker\Guesser\Name($generator); $columnTypeGuesser = new ColumnTypeGuesser($generator); foreach ($this->class->getFieldNames() AS $fieldName) { @@ -128,7 +128,7 @@ class EntityPopulator /** * Insert one new record using the Entity class. */ - public function execute($manager, $insertedEntities, $generateId = false) + public function execute(EntityManagerInterface $manager, $insertedEntities, $generateId = false) { $obj = $this->class->newInstance(); @@ -165,7 +165,7 @@ class EntityPopulator } } - private function generateId($obj, $column, $manager) + private function generateId($obj, $column, EntityManagerInterface $manager) { /* @var $repository \Doctrine\ORM\EntityRepository */ $repository = $manager->getRepository(get_class($obj)); diff --git a/src/Faker/ORM/Propel/ColumnTypeGuesser.php b/src/Faker/ORM/Propel/ColumnTypeGuesser.php index a5215aec..e08c0fdc 100644 --- a/src/Faker/ORM/Propel/ColumnTypeGuesser.php +++ b/src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -3,6 +3,7 @@ namespace Faker\ORM\Propel; use \PropelColumnTypes; +use \ColumnMap; class ColumnTypeGuesser { @@ -13,7 +14,7 @@ class ColumnTypeGuesser $this->generator = $generator; } - public function guessFormat($column) + public function guessFormat(ColumnMap $column) { $generator = $this->generator; if ($column->isTemporal()) { diff --git a/src/Faker/ORM/Propel/EntityPopulator.php b/src/Faker/ORM/Propel/EntityPopulator.php index 0a70fbd8..7d73db82 100644 --- a/src/Faker/ORM/Propel/EntityPopulator.php +++ b/src/Faker/ORM/Propel/EntityPopulator.php @@ -3,6 +3,7 @@ namespace Faker\ORM\Propel; use \Faker\Provider\Base; +use \ColumnMap; /** * Service class for populating a table through a Propel ActiveRecord class. @@ -77,7 +78,7 @@ class EntityPopulator return $formatters; } - protected function isColumnBehavior($columnMap) + protected function isColumnBehavior(ColumnMap $columnMap) { foreach ($columnMap->getTable()->getBehaviors() as $name => $params) { $columnName = Base::toLower($columnMap->getName()); diff --git a/src/Faker/Provider/en_AU/PhoneNumber.php b/src/Faker/Provider/en_AU/PhoneNumber.php index 0d13fa8e..f84e6ee0 100644 --- a/src/Faker/Provider/en_AU/PhoneNumber.php +++ b/src/Faker/Provider/en_AU/PhoneNumber.php @@ -2,8 +2,6 @@ namespace Faker\Provider\en_AU; -use Faker\Generator; - class PhoneNumber extends \Faker\Provider\PhoneNumber { protected static $formats = array(