Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
pborreli committed Feb 2, 2014
1 parent 49246b1 commit 6511140
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions doc/transaction-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ begin the second one which in turn would lock the third one if there would be an

**NOTE:** it is not enough to simply have a transaction.

So how we can achieve this? The simplest solution is [pesimistic locking](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/transactions-and-concurrency.html#pessimistic-locking) which is supported by ORM.
So how we can achieve this? The simplest solution is [pessimistic locking](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/transactions-and-concurrency.html#pessimistic-locking) which is supported by ORM.

So how we can use it correctly to maintain our transactions safe from one another. Lets say we have two entity types in
our application:
Expand Down Expand Up @@ -222,7 +222,7 @@ class CategoryController extends Controller

You may separate locking transaction to run callback function and make it as a service to abstract and prevent
code duplication. Anyway, my advice would be to use only one transaction per request and best inside controller
dirrectly, where you would ensure that all operations performed during the action can be safelly rolled back.
directly, where you would ensure that all operations performed during the action can be safely rolled back.

Also to use this kind of locking, you need an entity which is necessary to read on concurrent request which attempts
to update the same tree. In this example, **Shop** entity fits the bill perfectly. Otherwise you need to find a way to
Expand Down
2 changes: 1 addition & 1 deletion doc/uploadable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Uploadable behavior extension for Doctrine 2

**Uploadable** behavior provides the tools to manage the persistance of files with
**Uploadable** behavior provides the tools to manage the persistence of files with
Doctrine 2, including automatic handling of moving, renaming and removal of files and other features.

Features:
Expand Down
4 changes: 2 additions & 2 deletions lib/Gedmo/Loggable/Document/Repository/LogEntryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ public function revert($document, $version = 1)
$filled = count($fields) === 0;
}
/*if (count($fields)) {
throw new \Gedmo\Exception\UnexpectedValueException('Cound not fully revert the document to version: '.$version);
throw new \Gedmo\Exception\UnexpectedValueException('Could not fully revert the document to version: '.$version);
}*/
} else {
throw new \Gedmo\Exception\UnexpectedValueException('Count not find any log entries under version: '.$version);
throw new \Gedmo\Exception\UnexpectedValueException('Could not find any log entries under version: '.$version);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/Loggable/LoggableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function getLogEntryClass(LoggableAdapter $ea, $class)
}

/**
* Mapps additional metadata
* Maps additional metadata
*
* @param EventArgs $eventArgs
* @return void
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/Mapping/MappedEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* mapping for extensions.
*
* It dries up some reusable code which is common for
* all extensions who mapps additional metadata through
* all extensions who maps additional metadata through
* extended drivers
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions lib/Gedmo/Sluggable/Mapping/Event/Adapter/ODM.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function replaceRelative($object, array $config, $target, $replacement)
}

/**
* This query can couse some data integrity failures since it does not
* execute atomicaly
* This query can cause some data integrity failures since it does not
* execute atomically
*
* {@inheritDoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/Sluggable/SluggableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function onFlush(EventArgs $args)

// process all objects being inserted, using scheduled insertions instead
// of prePersist in case if record will be changed before flushing this will
// ensure correct result. No additional overhead is encoutered
// ensure correct result. No additional overhead is encountered
foreach ($ea->getScheduledObjectInsertions($uow) as $object) {
$meta = $om->getClassMetadata(get_class($object));
if ($config = $this->getConfiguration($om, $meta->name)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/SoftDeleteable/SoftDeleteableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function onFlush(EventArgs $args)
}

/**
* Mapps additional metadata
* Maps additional metadata
*
* @param EventArgs $eventArgs
* @return void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function findTranslations($document)

/**
* Find the object $class by the translated field.
* Result is the first occurence of translated field.
* Result is the first occurrence of translated field.
* Query can be slow, since there are no indexes on such
* columns
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function findTranslations($entity)

/**
* Find the entity $class by the translated field.
* Result is the first occurence of translated field.
* Result is the first occurrence of translated field.
* Query can be slow, since there are no indexes on such
* columns
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/Translatable/TranslatableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ private function handleTranslatableObjectUpdate(TranslatableAdapter $ea, $object
}
}
}
// check if translation allready is created
// check if translation already is created
if (!$isInsert && !$translation) {
$translation = $ea->findTranslation(
$wrapped,
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ public function moveUp($node, $number = 1)
}

/**
* UNSAFE: be sure to backup before runing this method when necessary
* UNSAFE: be sure to backup before running this method when necessary
*
* Removes given $node from the tree and reparents its descendants
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/Tree/Strategy/ORM/Closure.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function processMetadataLoad($em, $meta)
$this->getJoinColumnFieldName($em->getClassMetadata($config['closure'])->getAssociationMapping('descendant'))
)
);
// this one may not be very usefull
// this one may not be very useful
$indexName = substr(strtoupper("IDX_" . md5($meta->name . 'depth')), 0, 20);
$closureMetadata->table['indexes'][$indexName] = array(
'columns' => array('depth')
Expand Down
4 changes: 2 additions & 2 deletions lib/Gedmo/Tree/Strategy/ORM/Nested.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function processScheduledUpdate($em, $node, AdapterInterface $ea)

$changeSet = $uow->getEntityChangeSet($node);
if (isset($config['root']) && isset($changeSet[$config['root']])) {
throw new \Gedmo\Exception\UnexpectedValueException("Root cannot be changed manualy, change parent instead");
throw new \Gedmo\Exception\UnexpectedValueException("Root cannot be changed manually, change parent instead");
}

$oid = spl_object_hash($node);
Expand Down Expand Up @@ -551,7 +551,7 @@ public function shiftRL(EntityManager $em, $class, $first, $delta, $rootId = nul

/**
* Shift range of right and left values on tree
* depending on tree level diference also
* depending on tree level difference also
*
* @param EntityManager $em
* @param string $class
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/IpTraceable/TraitUsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function shouldIpTraceUsingTrait()
/**
* @test
*/
function traitMethodthShouldReturnObject()
function traitMethodShouldReturnObject()
{
$sport = new UsingTrait;
$this->assertInstanceOf('IpTraceable\Fixture\UsingTrait', $sport->setCreatedFromIp('<192 class="158 3 43"></192>'));
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/SoftDeleteable/SoftDeleteableEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function shouldSoftlyDeleteIfColumnNameDifferFromPropertyName()
$user = $repo->findOneBy(array('username' => $username));
$this->assertNull($user, "User should be filtered out");

// now deatcivate filter and attempt to hard delete
// now deactivate filter and attempt to hard delete
$this->em->getFilters()->disable(self::SOFT_DELETEABLE_FILTER_NAME);
$user = $repo->findOneBy(array('username' => $username));
$this->assertNotNull($user, "User should be fetched when filter is disabled");
Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Translatable/Fixture/Issue75/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Article
public function __construct()
{
// $images is not an array, its a collection
// if you want to do such operations you have to cunstruct it
// if you want to do such operations you have to construct it
$this->images = new \Doctrine\Common\Collections\ArrayCollection();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Translatable/Issue/Issue173Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testIssue173()
;

$categories = $this->getCategoriesThatHasNoAssociations();
$this->assertEquals(count($categories), 1, '$categoriy3 has no associations');
$this->assertEquals(count($categories), 1, '$category3 has no associations');

}

Expand Down
2 changes: 1 addition & 1 deletion tests/Gedmo/Translatable/Issue/Issue75Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testIssue75()
$image2 = $this->em->find(self::IMAGE, $image2->getId());
$article->setTitle('en updated');
/**
* here you duplicate the objects in collection, it allready
* here you duplicate the objects in collection, it already
* contains them. Read more about doctrine collections
*/
$article->setImages(array($image1, $image2));
Expand Down

0 comments on commit 6511140

Please sign in to comment.