mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-24 09:19:50 +01:00
Fix coding standards
This commit is contained in:
parent
29f203c407
commit
31d0d5d7f8
@ -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));
|
||||
|
@ -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()) {
|
||||
|
@ -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());
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
namespace Faker\Provider\en_AU;
|
||||
|
||||
use Faker\Generator;
|
||||
|
||||
class PhoneNumber extends \Faker\Provider\PhoneNumber
|
||||
{
|
||||
protected static $formats = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user