| @@ -15,14 +15,14 @@ discard block | ||
| 15 | 15 | public static function bootstrap() | 
| 16 | 16 |  	{ | 
| 17 | 17 | self::getAimeos(); | 
| 18 | - \Aimeos\MShop\Factory::setCache( false ); | |
| 18 | + \Aimeos\MShop\Factory::setCache(false); | |
| 19 | 19 | } | 
| 20 | 20 | |
| 21 | 21 | |
| 22 | - public static function getContext( $site = 'unittest' ) | |
| 22 | + public static function getContext($site = 'unittest') | |
| 23 | 23 |  	{ | 
| 24 | -		if( !isset( self::$context[$site] ) ) { | |
| 25 | - self::$context[$site] = self::createContext( $site ); | |
| 24 | +		if (!isset(self::$context[$site])) { | |
| 25 | + self::$context[$site] = self::createContext($site); | |
| 26 | 26 | } | 
| 27 | 27 | |
| 28 | 28 | return clone self::$context[$site]; | 
| @@ -31,13 +31,13 @@ discard block | ||
| 31 | 31 | |
| 32 | 32 | public static function getAimeos() | 
| 33 | 33 |  	{ | 
| 34 | - if( !isset( self::$aimeos ) ) | |
| 34 | + if (!isset(self::$aimeos)) | |
| 35 | 35 |  		{ | 
| 36 | 36 | require_once 'Bootstrap.php'; | 
| 37 | - spl_autoload_register( 'Aimeos\\Bootstrap::autoload' ); | |
| 37 | +			spl_autoload_register('Aimeos\\Bootstrap::autoload'); | |
| 38 | 38 | |
| 39 | - $extdir = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ); | |
| 40 | - self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), true ); | |
| 39 | + $extdir = dirname(dirname(dirname(dirname(dirname(__FILE__))))); | |
| 40 | + self::$aimeos = new \Aimeos\Bootstrap(array($extdir), true); | |
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | 43 | return self::$aimeos; | 
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 | /** | 
| 48 | 48 | * @param string $site | 
| 49 | 49 | */ | 
| 50 | - private static function createContext( $site ) | |
| 50 | + private static function createContext($site) | |
| 51 | 51 |  	{ | 
| 52 | 52 | $ctx = new \Aimeos\MShop\Context\Item\Standard(); | 
| 53 | 53 | $aimeos = self::getAimeos(); | 
| @@ -57,30 +57,30 @@ discard block | ||
| 57 | 57 | $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; | 
| 58 | 58 | $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; | 
| 59 | 59 | |
| 60 | - $conf = new \Aimeos\MW\Config\PHPArray( [], $paths ); | |
| 61 | - $conf = new \Aimeos\MW\Config\Decorator\Memory( $conf ); | |
| 62 | - $conf = new \Aimeos\MW\Config\Decorator\Documentor( $conf, $file ); | |
| 63 | - $ctx->setConfig( $conf ); | |
| 60 | + $conf = new \Aimeos\MW\Config\PHPArray([], $paths); | |
| 61 | + $conf = new \Aimeos\MW\Config\Decorator\Memory($conf); | |
| 62 | + $conf = new \Aimeos\MW\Config\Decorator\Documentor($conf, $file); | |
| 63 | + $ctx->setConfig($conf); | |
| 64 | 64 | |
| 65 | 65 | |
| 66 | - $dbm = new \Aimeos\MW\DB\Manager\PDO( $conf ); | |
| 67 | - $ctx->setDatabaseManager( $dbm ); | |
| 66 | + $dbm = new \Aimeos\MW\DB\Manager\PDO($conf); | |
| 67 | + $ctx->setDatabaseManager($dbm); | |
| 68 | 68 | |
| 69 | 69 | |
| 70 | - $logger = new \Aimeos\MW\Logger\File( 'unittest.log', \Aimeos\MW\Logger\Base::DEBUG ); | |
| 71 | - $ctx->setLogger( $logger ); | |
| 70 | +		$logger = new \Aimeos\MW\Logger\File('unittest.log', \Aimeos\MW\Logger\Base::DEBUG); | |
| 71 | + $ctx->setLogger($logger); | |
| 72 | 72 | |
| 73 | 73 | |
| 74 | 74 | $session = new \Aimeos\MW\Session\None(); | 
| 75 | - $ctx->setSession( $session ); | |
| 75 | + $ctx->setSession($session); | |
| 76 | 76 | |
| 77 | 77 | |
| 78 | - $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $ctx ); | |
| 79 | - $locale = $localeManager->bootstrap( $site, '', '', false ); | |
| 80 | - $ctx->setLocale( $locale ); | |
| 78 | + $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx); | |
| 79 | + $locale = $localeManager->bootstrap($site, '', '', false); | |
| 80 | + $ctx->setLocale($locale); | |
| 81 | 81 | |
| 82 | 82 | |
| 83 | - $ctx->setEditor( 'core:controller/common' ); | |
| 83 | +		$ctx->setEditor('core:controller/common'); | |
| 84 | 84 | |
| 85 | 85 | return $ctx; | 
| 86 | 86 | } |