diff --git a/src/Forms/TreeDropdownField.php b/src/Forms/TreeDropdownField.php index b27dae2e5..a6f21ec14 100644 --- a/src/Forms/TreeDropdownField.php +++ b/src/Forms/TreeDropdownField.php @@ -501,7 +501,7 @@ class TreeDropdownField extends FormField // Begin marking $markingSet->markPartialTree(); - // Explicitely mark our search results if necessary + // Explicitly mark our search results if necessary foreach ($this->searchIds as $id => $marked) { if ($marked) { $object = $this->objectForKey($id); diff --git a/src/ORM/Hierarchy/Hierarchy.php b/src/ORM/Hierarchy/Hierarchy.php index b482bc025..6f6d2e84c 100644 --- a/src/ORM/Hierarchy/Hierarchy.php +++ b/src/ORM/Hierarchy/Hierarchy.php @@ -30,7 +30,7 @@ class Hierarchy extends DataExtension { /** * The lower bounds for the amount of nodes to mark. If set, the logic will expand nodes until it reaches at least - * this number, and then stops. Root nodes will always show regardless of this settting. Further nodes can be + * this number, and then stops. Root nodes will always show regardless of this setting. Further nodes can be * lazy-loaded via ajax. This isn't a hard limit. Example: On a value of 10, with 20 root nodes, each having 30 * children, the actual node count will be 50 (all root nodes plus first expanded child). * @@ -286,7 +286,7 @@ class Hierarchy extends DataExtension /** * Return the number of direct children. By default, values are cached after the first invocation. Can be - * augumented by {@link augmentNumChildrenCountQuery()}. + * augmented by {@link augmentNumChildrenCountQuery()}. * * @param bool $cache Whether to retrieve values from cache * @return int @@ -322,7 +322,7 @@ class Hierarchy extends DataExtension /** * Pre-populate any appropriate caches prior to rendering a tree. * This is used to allow for the efficient rendering of tree views, notably in the CMS. - * In the cace of Hierarchy, it caches numChildren values. Other extensions can provide an + * In the case of Hierarchy, it caches numChildren values. Other extensions can provide an * onPrepopulateTreeDataCache(DataList $recordList = null, array $options) methods to hook * into this event as well. * diff --git a/tests/php/Forms/TreeDropdownFieldTest.php b/tests/php/Forms/TreeDropdownFieldTest.php index 17de5c8d3..3d78c7ab3 100644 --- a/tests/php/Forms/TreeDropdownFieldTest.php +++ b/tests/php/Forms/TreeDropdownFieldTest.php @@ -56,7 +56,7 @@ class TreeDropdownFieldTest extends SapphireTest { $field = new TreeDropdownField('TestTree', 'Test tree', Folder::class); - // case insensitive search against keyword 'sub' for folders + // case-insensitive search against keyword 'sub' for folders $request = new HTTPRequest('GET', 'url', ['search'=>'sub', 'format' => 'json']); $request->setSession(new Session([])); $response = $field->tree($request); @@ -87,7 +87,7 @@ class TreeDropdownFieldTest extends SapphireTest { $field = new TreeDropdownField('TestTree', 'Test tree', Folder::class); - // case insensitive search against keyword 'sub' for folders + // case-insensitive search against keyword 'sub' for folders $request = new HTTPRequest('GET', 'url', ['search'=>'sub', 'format' => 'json', 'flatList' => '1']); $request->setSession(new Session([])); $response = $field->tree($request); @@ -176,7 +176,7 @@ class TreeDropdownFieldTest extends SapphireTest { $field = new TreeDropdownField('TestTree', 'Test tree', Folder::class); - // case insensitive search against keyword 'sub' for folders + // case-insensitive search against keyword 'sub' for folders $request = new HTTPRequest('GET', 'url', ['search'=>'sub']); $request->setSession(new Session([])); $response = $field->tree($request); @@ -214,7 +214,7 @@ class TreeDropdownFieldTest extends SapphireTest $field = new TreeDropdownField('TestTree', 'Test tree', File::class); - // case insensitive search against keyword 'sub' for files + // case-insensitive search against keyword 'sub' for files $request = new HTTPRequest('GET', 'url', ['search'=>'sub']); $request->setSession(new Session([])); $response = $field->tree($request); @@ -340,7 +340,7 @@ class TreeDropdownFieldTest extends SapphireTest $treeBaseID = $this->idFromFixture(Folder::class, 'folder1'); $field = new TreeDropdownField('TestTree', 'Test tree', Folder::class); - // getSchemaDataDefaults needs the field to be attach to a form + // getSchemaDataDefaults needs the field to be attached to a form new Form( null, 'mock', diff --git a/tests/php/ORM/HierarchyCachingTest.php b/tests/php/ORM/HierarchyCachingTest.php index 7f101fb50..2d3de8dfb 100644 --- a/tests/php/ORM/HierarchyCachingTest.php +++ b/tests/php/ORM/HierarchyCachingTest.php @@ -48,10 +48,10 @@ class HierachyCacheTest extends SapphireTest [TestObject::class, 'obj2', true, 2, 'Root object numChildren should count direct children when cache'], [TestObject::class, 'obj3a', false, 2, 'Sub object numChildren should count direct children'], [TestObject::class, 'obj3a', true, 2, 'Sub object numChildren should count direct children when cache'], - [TestObject::class, 'obj3d', false, 0, 'Childess Sub object numChildren should be 0'], - [TestObject::class, 'obj3d', true, 0, 'Childess Sub object numChildren should be 0 when cache'], + [TestObject::class, 'obj3d', false, 0, 'Childless Sub object numChildren should be 0'], + [TestObject::class, 'obj3d', true, 0, 'Childless Sub object numChildren should be 0 when cache'], [HideTestObject::class, 'obj4', false, 1, 'Hidden object should not be included in count'], - [HideTestObject::class, 'obj4', true, 1, 'Hidden object should not be included in couunt when cache'] + [HideTestObject::class, 'obj4', true, 1, 'Hidden object should not be included in count when cache'] ]; } @@ -68,7 +68,7 @@ class HierachyCacheTest extends SapphireTest $this->assertEquals($expected, $actual, $message); if ($cache) { - // When caching is eanbled, try re-accessing the numChildren value to make sure it doesn't change. + // When caching is enabled, try re-accessing the numChildren value to make sure it doesn't change. $actual = $node->numChildren($cache); $this->assertEquals($expected, $actual, $message); } diff --git a/tests/php/ORM/HierarchyTest.php b/tests/php/ORM/HierarchyTest.php index f22a313ad..6d4676377 100644 --- a/tests/php/ORM/HierarchyTest.php +++ b/tests/php/ORM/HierarchyTest.php @@ -258,7 +258,7 @@ class HierarchyTest extends SapphireTest $this->assertEquals('Obj 2 » Obj 2a » Obj 2aa', $obj2aa->getBreadcrumbs()); } - public function testNoHideFromHeirarchy() + public function testNoHideFromHierarchy() { /** @var HierarchyTest\HideTestObject $obj4 */ $obj4 = $this->objFromFixture(HierarchyTest\HideTestObject::class, 'obj4'); @@ -271,7 +271,7 @@ class HierarchyTest extends SapphireTest $this->assertEquals($obj4->liveChildren()->Count(), 2); } - public function testHideFromHeirarchy() + public function testHideFromHierarchy() { HierarchyTest\HideTestObject::config()->update( 'hide_from_hierarchy',