Permalink
Browse files

hell lot of typos

  • Loading branch information...
1 parent 11566e6 commit 9dfa3c907ae39a72b356d33d49ea50d317bdbe16 @juzna committed Dec 28, 2011
@@ -36,7 +36,7 @@ public static function notAllowed()
*/
public static function nonExisting()
{
- return new static("This page does not realy exists.", 404);
+ return new static("This page does not really exist.", 404);
}
}
@@ -48,7 +48,7 @@ public function getUniqueId()
/**
- * Method get's called on construction
+ * Method gets called on construction
*/
protected function configure()
{
@@ -20,7 +20,7 @@
* Class uses methods view<view>([param1 [, param2]]) as alias
* for Latte's {control component:<view>, [param1 [, param2]]}
*
- * Also tryies to find latte file, named as the <view> and use it as template,
+ * Also tries to find latte file, named as the <view> and use it as template,
* if nothing is in method output
*
* @author Filip Procházka <filip.prochazka@kdyby.org>
@@ -60,7 +60,7 @@ public function getView()
/**
- * Get's called before rendering
+ * Gets called before rendering
*/
protected function beforeRender() { }
@@ -83,7 +83,7 @@ protected function beforeRender() { }
$viewMethod = 'view' . ucfirst($this->view);
- // allways call
+ // always call
call_user_func_array(array($this, 'beforeRender'), $this->renderParams);
$dir = dirname($this->reflection->fileName);
@@ -109,7 +109,7 @@ protected function beforeRender() { }
echo $output;
- // allways call
+ // always call
call_user_func_array(array($this, 'afterRender'), $this->renderParams);
$this->view = NULL;
@@ -119,7 +119,7 @@ protected function beforeRender() { }
/**
- * Get's called before rendering
+ * Gets called after rendering
*/
protected function afterRender() { }
@@ -37,8 +37,8 @@ class Dao extends Doctrine\ORM\EntityRepository implements IDao, Kdyby\Persisten
/**
- * @param array $arguments
- * @param array $values
+ * @param array $arguments Arguments for entity's constructor
+ * @param array $values Values to be set via mapper
*
* @return object
*/
@@ -110,72 +110,72 @@ protected function hasField($entity, $field)
/**
* @param object $entity
- * @param string $assocation
+ * @param string $association
* @return bool
*/
- protected function hasAssocation($entity, $assocation)
+ protected function hasAssociation($entity, $association)
{
- return $this->getMetadata($entity)->hasAssociation($assocation);
+ return $this->getMetadata($entity)->hasAssociation($association);
}
/**
* @param object $entity
- * @param string $assocation
+ * @param string $association
* @return \Doctrine\Common\Collections\Collection
*/
- private function getAssocation($entity, $assocation)
+ private function getAssociation($entity, $association)
{
$meta = $this->getMetadata($entity);
- if (!$this->hasAssocation($entity, $assocation)) {
- throw new Kdyby\InvalidArgumentException("Entity '" . get_class($entity) . "' has no association '" . $assocation . "'.");
+ if (!$this->hasAssociation($entity, $association)) {
+ throw new Kdyby\InvalidArgumentException("Entity '" . get_class($entity) . "' has no association '" . $association . "'.");
}
- return $meta->getFieldValue($entity, $assocation);
+ return $meta->getFieldValue($entity, $association);
}
/**
* @param object $entity
- * @param string $assocation
+ * @param string $association
*/
- protected function clearAssociation($entity, $assocation)
+ protected function clearAssociation($entity, $association)
{
- $this->getAssocation($entity, $assocation)->clear();
+ $this->getAssociation($entity, $association)->clear();
}
/**
* @param object $entity
- * @param string $assocation
+ * @param string $association
* @param object $element
*/
- protected function addAssociationElement($entity, $assocation, $element)
+ protected function addAssociationElement($entity, $association, $element)
{
$meta = $this->getMetadata($entity);
- $assocMapping = $meta->getAssociationMapping($assocation);
+ $assocMapping = $meta->getAssociationMapping($association);
if (!$entity instanceof $assocMapping['targetEntity']) {
- $declaringClass = $meta->getReflectionProperty($assocation)->getDeclaringClass();
- throw new Kdyby\InvalidArgumentException("Collection " . $declaringClass->getName() . '::$' . $assocation . " cannot contain entity of type '" . get_class($entity) . "'.");
+ $declaringClass = $meta->getReflectionProperty($association)->getDeclaringClass();
+ throw new Kdyby\InvalidArgumentException("Collection " . $declaringClass->getName() . '::$' . $association . " cannot contain entity of type '" . get_class($entity) . "'.");
}
- $this->getAssocation($entity, $assocation)->add($element);
+ $this->getAssociation($entity, $association)->add($element);
}
/**
* @param object $entity
- * @param string $assocation
+ * @param string $association
* @return array
*/
- protected function getAssociationElements($entity, $assocation)
+ protected function getAssociationElements($entity, $association)
{
- $collection = $this->getMetadata($entity)->getFieldValue($entity, $assocation);
+ $collection = $this->getMetadata($entity)->getFieldValue($entity, $association);
return $collection->toArray();
}
@@ -23,7 +23,8 @@ class EntityValuesMapper extends EntityMetadataMapper
/**
* @param object $entity
- * @return array
+ * @param array $data
+ * @return void
*/
public function load($entity, $data)
{
@@ -33,7 +34,7 @@ public function load($entity, $data)
continue;
}
- if ($this->hasAssocation($entity, $property)) {
+ if ($this->hasAssociation($entity, $property)) {
$this->clearAssociation($entity, $property);
foreach ($value as $element) {
$this->addAssociationElement($entity, $property, $element);
@@ -49,7 +50,7 @@ public function load($entity, $data)
/**
* @param object $entity
- * @return $data
+ * @return array
*/
public function save($entity)
{
@@ -105,7 +105,7 @@ protected function attached($obj)
}
$form = $obj;
- $this->collection = $form->getMapper()->getAssocation($this->parentEntity, $this->name);
+ $this->collection = $form->getMapper()->getAssociation($this->parentEntity, $this->name);
$parentMeta = $form->getMapper()->getEntityMetadata($this->parentEntity);
$assocMapping = $parentMeta->getAssociationMapping($this->name);
@@ -61,7 +61,7 @@ protected function attached($obj)
parent::attached($obj);
if ($obj instanceof Kdyby\Forms\EntityForm) {
- $obj->getMapper()->assing($this->entity, $this);
+ $obj->getMapper()->assign($this->entity, $this);
}
}
@@ -53,7 +53,7 @@ public function __construct($entity, Mapping\EntityFormMapper $mapper)
$this->mapper = $mapper;
$this->entity = $entity;
- $this->getMapper()->assing($entity, $this);
+ $this->getMapper()->assign($entity, $this);
parent::__construct();
}
@@ -162,7 +162,7 @@ public function fireEvents()
*/
public function addOneToOne($name)
{
- $entity = $this->getMapper()->getAssocation($this->getEntity(), $name);
+ $entity = $this->getMapper()->getAssociation($this->getEntity(), $name);
return $this[$name] = new Containers\Doctrine\EntityContainer($entity);
}
@@ -174,7 +174,7 @@ public function addOneToOne($name)
*/
public function addManyToOne($name)
{
- $entity = $this->getMapper()->getAssocation($this->getEntity(), $name);
+ $entity = $this->getMapper()->getAssociation($this->getEntity(), $name);
return $this[$name] = new Containers\Doctrine\EntityContainer($entity);
}
@@ -48,7 +48,7 @@ public function __construct(ObjectManager $workspace, TypeMapper $typeMapper)
* @param IComponent $component
* @return BaseMapper
*/
- public function assing($entity, IComponent $component)
+ public function assign($entity, IComponent $component)
{
$this->assignment->attach($entity, $component);
return $this;
@@ -162,7 +162,7 @@ public static function divisionDoNotExists($division)
*/
public static function divisionDoNotContainPermission(RBAC\Division $division, RBAC\BasePermission $permission)
{
- return new self("Cannot assing division " . $division->getName() . " to a " . $permission->getAsMessage());
+ return new self("Cannot assign division " . $division->getName() . " to a " . $permission->getAsMessage());
}

0 comments on commit 9dfa3c9

Please sign in to comment.