@@ -13,8 +13,8 @@ |
||
13 | 13 | */ |
14 | 14 | interface PageInterface { |
15 | 15 | |
16 | - public function setTwig(Twig_Environment $twig); |
|
16 | + public function setTwig(Twig_Environment $twig); |
|
17 | 17 | |
18 | - public function setDebugbar(StandardDebugBar $debugbar); |
|
18 | + public function setDebugbar(StandardDebugBar $debugbar); |
|
19 | 19 | |
20 | 20 | } |
@@ -9,17 +9,17 @@ |
||
9 | 9 | */ |
10 | 10 | class ValidationException extends \Exception { |
11 | 11 | |
12 | - private $failures; |
|
12 | + private $failures; |
|
13 | 13 | |
14 | - public function __construct($failures, $message = "", $code = 0, $previous = null) { |
|
14 | + public function __construct($failures, $message = "", $code = 0, $previous = null) { |
|
15 | 15 | |
16 | - parent::__construct($message, $code, $previous); |
|
16 | + parent::__construct($message, $code, $previous); |
|
17 | 17 | |
18 | - $this->failures = $failures; |
|
19 | - } |
|
18 | + $this->failures = $failures; |
|
19 | + } |
|
20 | 20 | |
21 | - function getFailures() { |
|
22 | - return $this->failures; |
|
23 | - } |
|
21 | + function getFailures() { |
|
22 | + return $this->failures; |
|
23 | + } |
|
24 | 24 | |
25 | 25 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Core\Modules\UserList; |
3 | 3 | |
4 | -use Frameworkless\Controllers; |
|
5 | -use Donquixote\Cellbrush\Table\Table; |
|
4 | +use Frameworkless\Controllers; |
|
5 | +use Donquixote\Cellbrush\Table\Table; |
|
6 | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | 7 | |
8 | 8 | /** |
@@ -13,82 +13,82 @@ |
||
13 | 13 | class UserList extends Controllers\ModuleController |
14 | 14 | { |
15 | 15 | |
16 | - /** |
|
17 | - * UserRepository |
|
18 | - * @var \Core\Models\User\UserRepository |
|
19 | - */ |
|
20 | - protected $userRepository; |
|
21 | - |
|
22 | - /** |
|
23 | - * Request |
|
24 | - * @var Symfony\Component\HttpFoundation\Request |
|
25 | - */ |
|
26 | - protected $request; |
|
27 | - |
|
28 | - protected $limit = 5; |
|
29 | - |
|
30 | - function __construct(\Core\Models\User\UserRepository $userRepository, Request $request) |
|
31 | - { |
|
32 | - $this->userRepository = $userRepository; |
|
33 | - $this->request = $request; |
|
34 | - } |
|
35 | - |
|
36 | - public function process() |
|
37 | - { |
|
38 | - |
|
39 | - if ($this->request->query->get('fn') == 'add') { |
|
40 | - $this->add(); |
|
41 | - } |
|
42 | - |
|
43 | - $Users = $this->userRepository->findMany([],$this->limit); |
|
44 | - |
|
45 | - $table = Table::create(); |
|
46 | - $table->addColNames([0, 1, 2]); |
|
47 | - $table->addClass('table table-striped'); |
|
48 | - $table->thead() |
|
49 | - ->addRowName('head row') |
|
50 | - ->th('head row', 0, 'Id') |
|
51 | - ->th('head row', 1, 'Имя') |
|
52 | - ->th('head row', 2, 'Email'); |
|
53 | - $i = 0; |
|
54 | - foreach ($Users as $User) { |
|
55 | - $table->addRow($i)->tdMultiple([ |
|
56 | - $User->getId(), |
|
57 | - $User->getName(), |
|
58 | - $User->getEmail()]); |
|
59 | - $i++; |
|
60 | - } |
|
61 | - |
|
62 | - return $this->render('default', [ |
|
63 | - 'table' => $table->render() |
|
64 | - ]); |
|
65 | - } |
|
66 | - |
|
67 | - protected function add() |
|
68 | - { |
|
69 | - |
|
70 | - try { |
|
71 | - |
|
72 | - $User = $this->userRepository->build(); |
|
73 | - $User->setEmail('[email protected]'); |
|
74 | - |
|
75 | - if (!$this->userRepository->save($User)) { |
|
76 | - throw new Exception('User not save'); |
|
77 | - } else { |
|
78 | - $this->logger->info("Пользователь успешно сохранен!"); |
|
79 | - } |
|
80 | - } catch(\Frameworkless\Exceptions\ValidationException $ex) { |
|
81 | - |
|
82 | - foreach ($ex->getFailures() as $failure) { |
|
83 | - $this->logger->error("Property " . $failure->getPropertyPath() . ": " . $failure->getMessage() . "\n"); |
|
84 | - } |
|
85 | - |
|
86 | - $this->logger->info("Произошла ошибка при сохранении пользователя"); |
|
87 | - } catch(\Exception $ex) { |
|
88 | - |
|
89 | - $this->logger->error("system error:" . $ex->getMessage()); |
|
90 | - |
|
91 | - $this->logger->info("Произошла ошибка при сохранении пользователя"); |
|
92 | - } |
|
93 | - } |
|
16 | + /** |
|
17 | + * UserRepository |
|
18 | + * @var \Core\Models\User\UserRepository |
|
19 | + */ |
|
20 | + protected $userRepository; |
|
21 | + |
|
22 | + /** |
|
23 | + * Request |
|
24 | + * @var Symfony\Component\HttpFoundation\Request |
|
25 | + */ |
|
26 | + protected $request; |
|
27 | + |
|
28 | + protected $limit = 5; |
|
29 | + |
|
30 | + function __construct(\Core\Models\User\UserRepository $userRepository, Request $request) |
|
31 | + { |
|
32 | + $this->userRepository = $userRepository; |
|
33 | + $this->request = $request; |
|
34 | + } |
|
35 | + |
|
36 | + public function process() |
|
37 | + { |
|
38 | + |
|
39 | + if ($this->request->query->get('fn') == 'add') { |
|
40 | + $this->add(); |
|
41 | + } |
|
42 | + |
|
43 | + $Users = $this->userRepository->findMany([],$this->limit); |
|
44 | + |
|
45 | + $table = Table::create(); |
|
46 | + $table->addColNames([0, 1, 2]); |
|
47 | + $table->addClass('table table-striped'); |
|
48 | + $table->thead() |
|
49 | + ->addRowName('head row') |
|
50 | + ->th('head row', 0, 'Id') |
|
51 | + ->th('head row', 1, 'Имя') |
|
52 | + ->th('head row', 2, 'Email'); |
|
53 | + $i = 0; |
|
54 | + foreach ($Users as $User) { |
|
55 | + $table->addRow($i)->tdMultiple([ |
|
56 | + $User->getId(), |
|
57 | + $User->getName(), |
|
58 | + $User->getEmail()]); |
|
59 | + $i++; |
|
60 | + } |
|
61 | + |
|
62 | + return $this->render('default', [ |
|
63 | + 'table' => $table->render() |
|
64 | + ]); |
|
65 | + } |
|
66 | + |
|
67 | + protected function add() |
|
68 | + { |
|
69 | + |
|
70 | + try { |
|
71 | + |
|
72 | + $User = $this->userRepository->build(); |
|
73 | + $User->setEmail('[email protected]'); |
|
74 | + |
|
75 | + if (!$this->userRepository->save($User)) { |
|
76 | + throw new Exception('User not save'); |
|
77 | + } else { |
|
78 | + $this->logger->info("Пользователь успешно сохранен!"); |
|
79 | + } |
|
80 | + } catch(\Frameworkless\Exceptions\ValidationException $ex) { |
|
81 | + |
|
82 | + foreach ($ex->getFailures() as $failure) { |
|
83 | + $this->logger->error("Property " . $failure->getPropertyPath() . ": " . $failure->getMessage() . "\n"); |
|
84 | + } |
|
85 | + |
|
86 | + $this->logger->info("Произошла ошибка при сохранении пользователя"); |
|
87 | + } catch(\Exception $ex) { |
|
88 | + |
|
89 | + $this->logger->error("system error:" . $ex->getMessage()); |
|
90 | + |
|
91 | + $this->logger->info("Произошла ошибка при сохранении пользователя"); |
|
92 | + } |
|
93 | + } |
|
94 | 94 | } |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | |
30 | 30 | function __construct(\Core\Models\User\UserRepository $userRepository, Request $request) |
31 | 31 | { |
32 | - $this->userRepository = $userRepository; |
|
33 | - $this->request = $request; |
|
32 | + $this->userRepository = $userRepository; |
|
33 | + $this->request = $request; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function process() |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | $this->add(); |
41 | 41 | } |
42 | 42 | |
43 | - $Users = $this->userRepository->findMany([],$this->limit); |
|
43 | + $Users = $this->userRepository->findMany([], $this->limit); |
|
44 | 44 | |
45 | - $table = Table::create(); |
|
45 | + $table = Table::create(); |
|
46 | 46 | $table->addColNames([0, 1, 2]); |
47 | 47 | $table->addClass('table table-striped'); |
48 | 48 | $table->thead() |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | ->th('head row', 0, 'Id') |
51 | 51 | ->th('head row', 1, 'Имя') |
52 | 52 | ->th('head row', 2, 'Email'); |
53 | - $i = 0; |
|
53 | + $i = 0; |
|
54 | 54 | foreach ($Users as $User) { |
55 | 55 | $table->addRow($i)->tdMultiple([ |
56 | 56 | $User->getId(), |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | } else { |
78 | 78 | $this->logger->info("Пользователь успешно сохранен!"); |
79 | 79 | } |
80 | - } catch(\Frameworkless\Exceptions\ValidationException $ex) { |
|
80 | + } catch (\Frameworkless\Exceptions\ValidationException $ex) { |
|
81 | 81 | |
82 | 82 | foreach ($ex->getFailures() as $failure) { |
83 | 83 | $this->logger->error("Property " . $failure->getPropertyPath() . ": " . $failure->getMessage() . "\n"); |
84 | 84 | } |
85 | 85 | |
86 | 86 | $this->logger->info("Произошла ошибка при сохранении пользователя"); |
87 | - } catch(\Exception $ex) { |
|
87 | + } catch (\Exception $ex) { |
|
88 | 88 | |
89 | 89 | $this->logger->error("system error:" . $ex->getMessage()); |
90 | 90 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function findById($id) |
29 | 29 | { |
30 | 30 | if (!$User = UserQuery::create()->findPk($id)) { |
31 | - throw new \InvalidArgumentException(sprintf('User with ID %d does not exist',$id)); |
|
31 | + throw new \InvalidArgumentException(sprintf('User with ID %d does not exist', $id)); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | return $User; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return \Core\Models\User\User $User |
61 | 61 | */ |
62 | - public function build(){ |
|
62 | + public function build() { |
|
63 | 63 | return new User; |
64 | 64 | } |
65 | 65 |
@@ -36,11 +36,11 @@ |
||
36 | 36 | |
37 | 37 | public function findMany(array $conditions = [], $limit = false) |
38 | 38 | { |
39 | - $Users = UserQuery::create() |
|
40 | - ->_if($limit) |
|
41 | - ->limit($limit) |
|
42 | - ->_endif() |
|
43 | - ->findByArray($conditions); |
|
39 | + $Users = UserQuery::create() |
|
40 | + ->_if($limit) |
|
41 | + ->limit($limit) |
|
42 | + ->_endif() |
|
43 | + ->findByArray($conditions); |
|
44 | 44 | return $Users; |
45 | 45 | } |
46 | 46 |
@@ -16,6 +16,6 @@ |
||
16 | 16 | class User extends BaseUser |
17 | 17 | { |
18 | 18 | |
19 | - use \Frameworkless\ValidatorTrait; |
|
19 | + use \Frameworkless\ValidatorTrait; |
|
20 | 20 | |
21 | 21 | } |
@@ -15,26 +15,26 @@ |
||
15 | 15 | */ |
16 | 16 | trait ValidatorTrait |
17 | 17 | { |
18 | - /** |
|
19 | - * Symfony\Component\Validator\Validator\RecursiveValidator |
|
20 | - * @var type |
|
21 | - */ |
|
22 | - protected $validator; |
|
18 | + /** |
|
19 | + * Symfony\Component\Validator\Validator\RecursiveValidator |
|
20 | + * @var type |
|
21 | + */ |
|
22 | + protected $validator; |
|
23 | 23 | |
24 | 24 | function __construct() |
25 | - { |
|
26 | - $this->validator = new RecursiveValidator( |
|
25 | + { |
|
26 | + $this->validator = new RecursiveValidator( |
|
27 | 27 | new ExecutionContextFactory(new IdentityTranslator()), |
28 | 28 | new LazyLoadingMetadataFactory(new StaticMethodLoader()), |
29 | 29 | new ConstraintValidatorFactory() |
30 | 30 | ); |
31 | - } |
|
31 | + } |
|
32 | 32 | |
33 | - public function preSave(\Propel\Runtime\Connection\ConnectionInterface $con = null) |
|
34 | - { |
|
33 | + public function preSave(\Propel\Runtime\Connection\ConnectionInterface $con = null) |
|
34 | + { |
|
35 | 35 | if (!$result = $this->validate($this->validator)) { |
36 | 36 | throw new ValidationException($this->getValidationFailures(),"Validation error"); |
37 | 37 | } |
38 | - return $result; |
|
39 | - } |
|
38 | + return $result; |
|
39 | + } |
|
40 | 40 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public function preSave(\Propel\Runtime\Connection\ConnectionInterface $con = null) |
34 | 34 | { |
35 | 35 | if (!$result = $this->validate($this->validator)) { |
36 | - throw new ValidationException($this->getValidationFailures(),"Validation error"); |
|
36 | + throw new ValidationException($this->getValidationFailures(), "Validation error"); |
|
37 | 37 | } |
38 | 38 | return $result; |
39 | 39 | } |
@@ -25,36 +25,36 @@ discard block |
||
25 | 25 | * set Monolog |
26 | 26 | */ |
27 | 27 | $container->share(Monolog\Logger::class) |
28 | - ->withArgument('myLogger') |
|
29 | - ; |
|
28 | + ->withArgument('myLogger') |
|
29 | + ; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * set Propel2 Logger |
33 | 33 | */ |
34 | 34 | Propel\Runtime\Propel::getServiceContainer()->setLogger('defaultLogger', |
35 | - (new Monolog\Logger('defaultLogger')) |
|
36 | - ->pushHandler(new Monolog\Handler\StreamHandler('php://stderr')) |
|
37 | - ); |
|
35 | + (new Monolog\Logger('defaultLogger')) |
|
36 | + ->pushHandler(new Monolog\Handler\StreamHandler('php://stderr')) |
|
37 | + ); |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * set Debug bar |
41 | 41 | */ |
42 | 42 | $container->share(DebugBar\StandardDebugBar::class) |
43 | - ->withMethodCall("addCollector",[ |
|
44 | - new DebugBar\Bridge\Twig\TwigCollector( |
|
45 | - new DebugBar\Bridge\Twig\TraceableTwigEnvironment( |
|
46 | - $container->get(Twig_Environment::class), |
|
47 | - new DebugBar\DataCollector\TimeDataCollector |
|
48 | - ) |
|
49 | - ) |
|
50 | - ]) |
|
51 | - ->withMethodCall("addCollector",[ |
|
52 | - new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
|
53 | - ]) |
|
54 | - ->withMethodCall("addCollector",[ |
|
55 | - new \DebugBar\Bridge\MonologCollector($container->get(Monolog\Logger::class)) |
|
56 | - ]) |
|
57 | - ; |
|
43 | + ->withMethodCall("addCollector",[ |
|
44 | + new DebugBar\Bridge\Twig\TwigCollector( |
|
45 | + new DebugBar\Bridge\Twig\TraceableTwigEnvironment( |
|
46 | + $container->get(Twig_Environment::class), |
|
47 | + new DebugBar\DataCollector\TimeDataCollector |
|
48 | + ) |
|
49 | + ) |
|
50 | + ]) |
|
51 | + ->withMethodCall("addCollector",[ |
|
52 | + new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
|
53 | + ]) |
|
54 | + ->withMethodCall("addCollector",[ |
|
55 | + new \DebugBar\Bridge\MonologCollector($container->get(Monolog\Logger::class)) |
|
56 | + ]) |
|
57 | + ; |
|
58 | 58 | ; |
59 | 59 | |
60 | 60 | |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | */ |
64 | 64 | |
65 | 65 | $container->inflector(Psr\Log\LoggerAwareInterface::class) |
66 | - ->invokeMethod('setLogger', [$container->get(Monolog\Logger::class)]); |
|
66 | + ->invokeMethod('setLogger', [$container->get(Monolog\Logger::class)]); |
|
67 | 67 | |
68 | 68 | $container->inflector(Frameworkless\Controllers\PageInterface::class) |
69 | - ->invokeMethod('setTwig', [$container->get(Twig_Environment::class)]) |
|
70 | - ->invokeMethod('setDebugbar', [$container->get(DebugBar\StandardDebugBar::class)]) |
|
71 | - ; |
|
69 | + ->invokeMethod('setTwig', [$container->get(Twig_Environment::class)]) |
|
70 | + ->invokeMethod('setDebugbar', [$container->get(DebugBar\StandardDebugBar::class)]) |
|
71 | + ; |
|
72 | 72 | |
73 | 73 | |
74 | 74 | App::getInstance()->import("DI", $container); |
75 | 75 | \ No newline at end of file |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | /** |
14 | 14 | * set Request |
15 | 15 | */ |
16 | -$container->add(Request::class,Request::createFromGlobals()); |
|
16 | +$container->add(Request::class, Request::createFromGlobals()); |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * set Twig |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * set Debug bar |
41 | 41 | */ |
42 | 42 | $container->share(DebugBar\StandardDebugBar::class) |
43 | - ->withMethodCall("addCollector",[ |
|
43 | + ->withMethodCall("addCollector", [ |
|
44 | 44 | new DebugBar\Bridge\Twig\TwigCollector( |
45 | 45 | new DebugBar\Bridge\Twig\TraceableTwigEnvironment( |
46 | 46 | $container->get(Twig_Environment::class), |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | ) |
49 | 49 | ) |
50 | 50 | ]) |
51 | - ->withMethodCall("addCollector",[ |
|
51 | + ->withMethodCall("addCollector", [ |
|
52 | 52 | new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
53 | 53 | ]) |
54 | - ->withMethodCall("addCollector",[ |
|
54 | + ->withMethodCall("addCollector", [ |
|
55 | 55 | new \DebugBar\Bridge\MonologCollector($container->get(Monolog\Logger::class)) |
56 | 56 | ]) |
57 | 57 | ; |
@@ -3,53 +3,53 @@ |
||
3 | 3 | class App |
4 | 4 | { |
5 | 5 | |
6 | - private $settings = array(); |
|
6 | + private $settings = array(); |
|
7 | 7 | |
8 | - private static $_instance = null; |
|
9 | - |
|
10 | - private function __construct() |
|
11 | - { |
|
12 | - // приватный конструктор ограничивает реализацию getInstance () |
|
13 | - } |
|
14 | - |
|
15 | - protected function __clone() |
|
16 | - { |
|
17 | - // ограничивает клонирование объекта |
|
18 | - } |
|
19 | - |
|
20 | - /** |
|
21 | - * Вызов модуля |
|
22 | - * @param type $name |
|
23 | - * @param array $params |
|
24 | - * @return string |
|
25 | - */ |
|
26 | - static function getModule($name, array $params = []) |
|
27 | - { |
|
28 | - $DI = self::getInstance()->load("DI"); |
|
29 | - $debugbar = $DI->get(DebugBar\StandardDebugBar::class); |
|
30 | - $debugbar['messages']->debug(sprintf('App::getModule %s, with params %s' , $name, json_encode($params) )); |
|
31 | - $debugbar['time']->startMeasure($name, 'Load module ' . $name); |
|
32 | - $module = $DI->get($name); |
|
33 | - $result = $module->setParams($params)->process(); |
|
34 | - $debugbar['time']->stopMeasure($name); |
|
35 | - return $result; |
|
36 | - } |
|
37 | - |
|
38 | - static public function getInstance() |
|
39 | - { |
|
40 | - if (is_null(self::$_instance)) { |
|
41 | - self::$_instance = new self(); |
|
42 | - } |
|
43 | - return self::$_instance; |
|
44 | - } |
|
45 | - |
|
46 | - public function import($key,$value) |
|
47 | - { |
|
48 | - $this->settings[$key] = $value; |
|
49 | - } |
|
50 | - |
|
51 | - public function load($key) |
|
52 | - { |
|
53 | - return $this->settings[$key]; |
|
54 | - } |
|
8 | + private static $_instance = null; |
|
9 | + |
|
10 | + private function __construct() |
|
11 | + { |
|
12 | + // приватный конструктор ограничивает реализацию getInstance () |
|
13 | + } |
|
14 | + |
|
15 | + protected function __clone() |
|
16 | + { |
|
17 | + // ограничивает клонирование объекта |
|
18 | + } |
|
19 | + |
|
20 | + /** |
|
21 | + * Вызов модуля |
|
22 | + * @param type $name |
|
23 | + * @param array $params |
|
24 | + * @return string |
|
25 | + */ |
|
26 | + static function getModule($name, array $params = []) |
|
27 | + { |
|
28 | + $DI = self::getInstance()->load("DI"); |
|
29 | + $debugbar = $DI->get(DebugBar\StandardDebugBar::class); |
|
30 | + $debugbar['messages']->debug(sprintf('App::getModule %s, with params %s' , $name, json_encode($params) )); |
|
31 | + $debugbar['time']->startMeasure($name, 'Load module ' . $name); |
|
32 | + $module = $DI->get($name); |
|
33 | + $result = $module->setParams($params)->process(); |
|
34 | + $debugbar['time']->stopMeasure($name); |
|
35 | + return $result; |
|
36 | + } |
|
37 | + |
|
38 | + static public function getInstance() |
|
39 | + { |
|
40 | + if (is_null(self::$_instance)) { |
|
41 | + self::$_instance = new self(); |
|
42 | + } |
|
43 | + return self::$_instance; |
|
44 | + } |
|
45 | + |
|
46 | + public function import($key,$value) |
|
47 | + { |
|
48 | + $this->settings[$key] = $value; |
|
49 | + } |
|
50 | + |
|
51 | + public function load($key) |
|
52 | + { |
|
53 | + return $this->settings[$key]; |
|
54 | + } |
|
55 | 55 | } |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | static function getModule($name, array $params = []) |
27 | 27 | { |
28 | - $DI = self::getInstance()->load("DI"); |
|
29 | - $debugbar = $DI->get(DebugBar\StandardDebugBar::class); |
|
30 | - $debugbar['messages']->debug(sprintf('App::getModule %s, with params %s' , $name, json_encode($params) )); |
|
28 | + $DI = self::getInstance()->load("DI"); |
|
29 | + $debugbar = $DI->get(DebugBar\StandardDebugBar::class); |
|
30 | + $debugbar['messages']->debug(sprintf('App::getModule %s, with params %s', $name, json_encode($params))); |
|
31 | 31 | $debugbar['time']->startMeasure($name, 'Load module ' . $name); |
32 | 32 | $module = $DI->get($name); |
33 | 33 | $result = $module->setParams($params)->process(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | return self::$_instance; |
44 | 44 | } |
45 | 45 | |
46 | - public function import($key,$value) |
|
46 | + public function import($key, $value) |
|
47 | 47 | { |
48 | 48 | $this->settings[$key] = $value; |
49 | 49 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | */ |
9 | 9 | interface ModuleInterface { |
10 | 10 | |
11 | - public function process(); |
|
11 | + public function process(); |
|
12 | 12 | |
13 | - public function setParams(array $params = []); |
|
13 | + public function setParams(array $params = []); |
|
14 | 14 | } |