formatting

This commit is contained in:
Aaron Carlino 2017-11-30 10:37:10 +13:00
parent e4f9bb4cc3
commit 59feb76a49

View File

@ -44,15 +44,15 @@ class FTPageTypeCreatorTask extends BuildTask
$count = $request->getVar('count') ?: 20; $count = $request->getVar('count') ?: 20;
$module = ModuleLoader::getModule('silverstripe/frameworktest'); $module = ModuleLoader::getModule('silverstripe/frameworktest');
$testPageDir = $module->getPath() . '/code/test-pages'; $testPageDir = $module->getPath() . '/code/test-pages';
if(!$this->fs->exists($testPageDir)) { if (!$this->fs->exists($testPageDir)) {
throw new RuntimeException("Test page directory $testPageDir does not exist!"); throw new RuntimeException("Test page directory $testPageDir does not exist!");
} }
$pageTypes = $this->getExistingClassNames($testPageDir); $pageTypes = $this->getExistingClassNames($testPageDir);
$created = 0; $created = 0;
while($created < $count) { while ($created < $count) {
$className = null; $className = null;
while( while (
!$className || !$className ||
in_array($className, $pageTypes) || in_array($className, $pageTypes) ||
class_exists(basename($className, 'php')) class_exists(basename($className, 'php'))