@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public function event_label() |
24 | 24 | { |
25 | - return '' . $this; |
|
25 | + return ''.$this; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public static function today($format = Dato::FORMAT) |
@@ -58,15 +58,15 @@ |
||
58 | 58 | |
59 | 59 | private function trim_request_data() |
60 | 60 | { |
61 | - array_walk_recursive($_GET, function (&$value) { |
|
61 | + array_walk_recursive($_GET, function(&$value) { |
|
62 | 62 | $value = trim($value); |
63 | 63 | }); |
64 | - array_walk_recursive($_REQUEST, function (&$value) { |
|
64 | + array_walk_recursive($_REQUEST, function(&$value) { |
|
65 | 65 | $value = trim($value); |
66 | 66 | }); |
67 | 67 | |
68 | 68 | if ($this->router()->submits()) { |
69 | - array_walk_recursive($_POST, function (&$value) { |
|
69 | + array_walk_recursive($_POST, function(&$value) { |
|
70 | 70 | $value = trim($value); |
71 | 71 | }); |
72 | 72 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | namespace HexMakina\kadro\Controllers; |
14 | 14 | |
15 | 15 | use HexMakina\Crudites\Crudites; |
16 | -use HexMakina\kadro\Auth\{ACL,AccessRefusedException}; |
|
16 | +use HexMakina\kadro\Auth\{ACL, AccessRefusedException}; |
|
17 | 17 | |
18 | 18 | class Operator extends \HexMakina\kadro\Controllers\ORM |
19 | 19 | { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function dashboard() |
57 | 57 | { |
58 | 58 | $real_operator_class = get_class($this->operator()); |
59 | - $this->viewport('users', $real_operator_class::filter([], ['order_by' => [null,'username', 'ASC']])); |
|
59 | + $this->viewport('users', $real_operator_class::filter([], ['order_by' => [null, 'username', 'ASC']])); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | public function destroy() |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | namespace HexMakina\kadro; |
4 | 4 | |
5 | 5 | use HexMakina\BlackBox\ORM\ModelInterface; |
6 | -use HexMakina\Marker\{Form,Element}; |
|
6 | +use HexMakina\Marker\{Form, Element}; |
|
7 | 7 | |
8 | 8 | class TableToForm |
9 | 9 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $form_field = new Element('div', $form_field, ['class' => $group_class]); |
83 | 83 | } |
84 | 84 | } |
85 | - $ret .= PHP_EOL . $form_field; |
|
85 | + $ret .= PHP_EOL.$form_field; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | return $ret; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace HexMakina\kadro\Controllers; |
4 | 4 | |
5 | -use Psr\Container\{ContainerInterface,ContainerExceptionInterface,NotFoundExceptionInterface}; |
|
5 | +use Psr\Container\{ContainerInterface, ContainerExceptionInterface, NotFoundExceptionInterface}; |
|
6 | 6 | use HexMakina\BlackBox\RouterInterface; |
7 | 7 | use HexMakina\BlackBox\Controllers\BaseControllerInterface; |
8 | 8 | use Psr\Log\LoggerInterface; |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | $this->viewport('user_messages', $this->get('HexMakina\BlackBox\StateAgentInterface')->messages()); |
52 | 52 | |
53 | 53 | $this->viewport('web_root', $this->router()->webRoot()); |
54 | - $this->viewport('view_path', $this->router()->filePath() . $this->get('settings.smarty.template_path') . 'app/'); |
|
55 | - $this->viewport('view_url', $this->router()->webRoot() . $this->get('settings.smarty.template_path')); |
|
56 | - $this->viewport('images_url', $this->router()->webRoot() . $this->get('settings.smarty.template_path') . 'images/'); |
|
54 | + $this->viewport('view_path', $this->router()->filePath().$this->get('settings.smarty.template_path').'app/'); |
|
55 | + $this->viewport('view_url', $this->router()->webRoot().$this->get('settings.smarty.template_path')); |
|
56 | + $this->viewport('images_url', $this->router()->webRoot().$this->get('settings.smarty.template_path').'images/'); |
|
57 | 57 | |
58 | 58 | foreach ($this->viewport() as $template_var_name => $value) { |
59 | 59 | $smarty->assign($template_var_name, $value); |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | // 1. check for custom template in the current controller directory |
84 | 84 | $templates ['custom_3'] = sprintf('%s/%s.html', $controller_template_path, $custom_template); |
85 | 85 | // 2. check for custom template formatted as controller/view |
86 | - $templates ['custom_2'] = $custom_template . '.html'; |
|
87 | - $templates ['custom_1'] = '_layouts/' . $custom_template . '.html'; |
|
86 | + $templates ['custom_2'] = $custom_template.'.html'; |
|
87 | + $templates ['custom_1'] = '_layouts/'.$custom_template.'.html'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | if (!empty($this->router()->targetMethod())) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function update_file($lang = 'fra') |
23 | 23 | { |
24 | 24 | try { |
25 | - $locale_path = $this->get('settings.locale.directory_path') . '/' . $this->get('settings.locale.file_name'); |
|
25 | + $locale_path = $this->get('settings.locale.directory_path').'/'.$this->get('settings.locale.file_name'); |
|
26 | 26 | self::create_file($locale_path, $lang); |
27 | 27 | |
28 | 28 | $this->logger()->notice($this->l('KADRO_SYSTEM_FILE_UPDATED')); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | public function __toString() |
30 | 30 | { |
31 | - return $this->iso_name() . ' (' . $this->get(self::ISO_3) . ')'; |
|
31 | + return $this->iso_name().' ('.$this->get(self::ISO_3).')'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function traceable(): bool |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | if (isset($filter['types'])) { |
77 | - $wc = sprintf("AND " . self::ISO_TYPE . " IN ('%s') ", implode('\', \'', array_keys(self::ISO_TYPES))); |
|
77 | + $wc = sprintf("AND ".self::ISO_TYPE." IN ('%s') ", implode('\', \'', array_keys(self::ISO_TYPES))); |
|
78 | 78 | $Query->where($wc); |
79 | 79 | } |
80 | 80 | if (isset($filter['scopes'])) { |
81 | - $wc = sprintf("AND " . self::ISO_SCOPE . " IN ('%s') ", implode('\', \'', array_keys(self::ISO_SCOPES))); |
|
81 | + $wc = sprintf("AND ".self::ISO_SCOPE." IN ('%s') ", implode('\', \'', array_keys(self::ISO_SCOPES))); |
|
82 | 82 | $Query->where($wc); |
83 | 83 | } |
84 | 84 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace HexMakina\kadro\Controllers; |
4 | 4 | |
5 | -use HexMakina\kadro\Auth\{Operator,Permission,ACL}; |
|
5 | +use HexMakina\kadro\Auth\{Operator, Permission, ACL}; |
|
6 | 6 | use HexMakina\kadro\Auth\AccessRefusedException; |
7 | 7 | use HexMakina\BlackBox\Auth\OperatorInterface; |
8 | 8 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | // MVC Cascade |
28 | - $target_controller = $this->get('Controllers\\' . $router->targetController()); |
|
28 | + $target_controller = $this->get('Controllers\\'.$router->targetController()); |
|
29 | 29 | |
30 | 30 | if ($target_controller->requiresOperator()) { |
31 | 31 | if (is_null($operator_id = $this->get('HexMakina\BlackBox\StateAgentInterface')->operatorId())) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->logger()->notice('PAGE_CHECKIN_WELCOME', [$operator->name()]); |
73 | 73 | $this->router()->hop(); |
74 | 74 | } catch (\Exception $e) { |
75 | - $this->logger()->warning('KADRO_operator_' . $e->getMessage()); |
|
75 | + $this->logger()->warning('KADRO_operator_'.$e->getMessage()); |
|
76 | 76 | $this->router()->hop('checkin'); |
77 | 77 | } |
78 | 78 | } |