Skip to content

Commit

Permalink
Really minor formatting fixes, removed unused use.
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Feb 21, 2013
1 parent 08be7b2 commit c195395
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace ZfcUserDoctrineORM;

use Doctrine\ORM\Mapping\Driver\XmlDriver;
use ZfcUser\Module as ZfcUser;

class Module
{
Expand Down Expand Up @@ -33,7 +32,7 @@ public function getAutoloaderConfig()
),
);
}

public function getServiceConfig()
{
return array(
Expand Down
5 changes: 4 additions & 1 deletion src/ZfcUserDoctrineORM/Mapper/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@ public function __construct(EntityManager $em, ModuleOptions $options)
public function findByEmail($email)
{
$er = $this->em->getRepository($this->options->getUserEntityClass());

return $er->findOneBy(array('email' => $email));
}

public function findByUsername($username)
{
$er = $this->em->getRepository($this->options->getUserEntityClass());

return $er->findOneBy(array('username' => $username));
}

public function findById($id)
{
$er = $this->em->getRepository($this->options->getUserEntityClass());

return $er->find($id);
}

Expand All @@ -60,4 +63,4 @@ protected function persist($entity)

return $entity;
}
}
}
1 change: 1 addition & 0 deletions src/ZfcUserDoctrineORM/Options/ModuleOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ModuleOptions extends BaseModuleOptions
public function setEnableDefaultEntities($enableDefaultEntities)
{
$this->enableDefaultEntities = $enableDefaultEntities;

return $this;
}

Expand Down

0 comments on commit c195395

Please sign in to comment.