@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $configs, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
30 | 30 | |
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
@@ -391,7 +391,7 @@ |
||
391 | 391 | |
392 | 392 | $mpath = ModUtil::getModuleRelativePath($modinfo['name']); |
393 | 393 | if ($mpath) { |
394 | - $path = $mpath.'/Resources/public/css'; |
|
394 | + $path = $mpath . '/Resources/public/css'; |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | if ((isset($path) && is_dir($dir = $path)) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $configs, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
30 | 30 | |
31 | 31 | $loader->load('services.yml'); |
32 | 32 | } |
@@ -351,7 +351,7 @@ |
||
351 | 351 | |
352 | 352 | $linkCollection = $this->get('zikula.link_container_collector')->getLinks($adminModule['name'], 'admin'); |
353 | 353 | $links = (false == $linkCollection) |
354 | - ? (array) ModUtil::apiFunc($adminModule['name'], 'admin', 'getLinks') |
|
354 | + ? (array)ModUtil::apiFunc($adminModule['name'], 'admin', 'getLinks') |
|
355 | 355 | : $linkCollection |
356 | 356 | ; |
357 | 357 |
@@ -184,9 +184,9 @@ |
||
184 | 184 | $ldir = dirname(__FILE__); |
185 | 185 | $p = strpos($ldir, DIRECTORY_SEPARATOR . 'system'); // we are in system/AdminModule |
186 | 186 | $b = substr($ldir, 0, $p); |
187 | - $filePath = $b.'/'.$appDir.'/.htaccess'; |
|
187 | + $filePath = $b . '/' . $appDir . '/.htaccess'; |
|
188 | 188 | } else { |
189 | - $filePath = $appDir.'/.htaccess'; |
|
189 | + $filePath = $appDir . '/.htaccess'; |
|
190 | 190 | } |
191 | 191 | $app_htaccess = file_exists($filePath); |
192 | 192 | } |
@@ -49,40 +49,40 @@ |
||
49 | 49 | |
50 | 50 | function get_load_files_code() { |
51 | 51 | $code = ( '<link rel="stylesheet" type="text/css" media="all" href="' . |
52 | - $this->calendar_lib_path . $this->calendar_theme_file . |
|
53 | - '" />' . NEWLINE ); |
|
52 | + $this->calendar_lib_path . $this->calendar_theme_file . |
|
53 | + '" />' . NEWLINE ); |
|
54 | 54 | $code .= ( '<script type="text/javascript" src="' . |
55 | - $this->calendar_lib_path . $this->calendar_file . |
|
56 | - '"></script>' . NEWLINE ); |
|
55 | + $this->calendar_lib_path . $this->calendar_file . |
|
56 | + '"></script>' . NEWLINE ); |
|
57 | 57 | $code .= ( '<script type="text/javascript" src="' . |
58 | - $this->calendar_lib_path . $this->calendar_lang_file . |
|
59 | - '"></script>' . NEWLINE ); |
|
58 | + $this->calendar_lib_path . $this->calendar_lang_file . |
|
59 | + '"></script>' . NEWLINE ); |
|
60 | 60 | $code .= ( '<script type="text/javascript" src="' . |
61 | - $this->calendar_lib_path . $this->calendar_setup_file . |
|
62 | - '"></script>' ); |
|
61 | + $this->calendar_lib_path . $this->calendar_setup_file . |
|
62 | + '"></script>' ); |
|
63 | 63 | return $code; |
64 | 64 | } |
65 | 65 | |
66 | 66 | function _make_calendar($other_options = array()) { |
67 | 67 | $js_options = $this->_make_js_hash(array_merge($this->calendar_options, $other_options)); |
68 | 68 | $code = ( '<script type="text/javascript">Calendar.setup({' . |
69 | - $js_options . |
|
70 | - '});</script>' ); |
|
69 | + $js_options . |
|
70 | + '});</script>' ); |
|
71 | 71 | return $code; |
72 | 72 | } |
73 | 73 | |
74 | 74 | function make_input_field($cal_options = array(), $field_attributes = array()) { |
75 | 75 | $id = $this->_gen_id(); |
76 | 76 | $attrstr = $this->_make_html_attr(array_merge($field_attributes, |
77 | - array('id' => $this->_field_id($id), |
|
77 | + array('id' => $this->_field_id($id), |
|
78 | 78 | 'type' => 'text'))); |
79 | 79 | echo '<input ' . $attrstr .'/>'; |
80 | 80 | echo '<a href="#" id="'. $this->_trigger_id($id) . '">' . |
81 | 81 | '<img align="middle" border="0" src="' . $this->calendar_lib_path . 'img.gif" alt="" /></a>'; |
82 | 82 | |
83 | 83 | $options = array_merge($cal_options, |
84 | - array('inputField' => $this->_field_id($id), |
|
85 | - 'button' => $this->_trigger_id($id))); |
|
84 | + array('inputField' => $this->_field_id($id), |
|
85 | + 'button' => $this->_trigger_id($id))); |
|
86 | 86 | echo $this->_make_calendar($options); |
87 | 87 | } |
88 | 88 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->calendar_setup_file = 'calendar-setup.js'; |
34 | 34 | } |
35 | 35 | $this->calendar_lang_file = 'lang/calendar-' . $lang . '.js'; |
36 | - $this->calendar_theme_file = $theme.'.css'; |
|
36 | + $this->calendar_theme_file = $theme . '.css'; |
|
37 | 37 | $this->calendar_lib_path = preg_replace('/\/+$/', '/', $calendar_lib_path); |
38 | 38 | $this->calendar_options = array('ifFormat' => '%Y/%m/%d', |
39 | 39 | 'daFormat' => '%Y/%m/%d'); |
@@ -48,26 +48,26 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | function get_load_files_code() { |
51 | - $code = ( '<link rel="stylesheet" type="text/css" media="all" href="' . |
|
51 | + $code = ('<link rel="stylesheet" type="text/css" media="all" href="' . |
|
52 | 52 | $this->calendar_lib_path . $this->calendar_theme_file . |
53 | - '" />' . NEWLINE ); |
|
54 | - $code .= ( '<script type="text/javascript" src="' . |
|
53 | + '" />' . NEWLINE); |
|
54 | + $code .= ('<script type="text/javascript" src="' . |
|
55 | 55 | $this->calendar_lib_path . $this->calendar_file . |
56 | - '"></script>' . NEWLINE ); |
|
57 | - $code .= ( '<script type="text/javascript" src="' . |
|
56 | + '"></script>' . NEWLINE); |
|
57 | + $code .= ('<script type="text/javascript" src="' . |
|
58 | 58 | $this->calendar_lib_path . $this->calendar_lang_file . |
59 | - '"></script>' . NEWLINE ); |
|
60 | - $code .= ( '<script type="text/javascript" src="' . |
|
59 | + '"></script>' . NEWLINE); |
|
60 | + $code .= ('<script type="text/javascript" src="' . |
|
61 | 61 | $this->calendar_lib_path . $this->calendar_setup_file . |
62 | - '"></script>' ); |
|
62 | + '"></script>'); |
|
63 | 63 | return $code; |
64 | 64 | } |
65 | 65 | |
66 | 66 | function _make_calendar($other_options = array()) { |
67 | 67 | $js_options = $this->_make_js_hash(array_merge($this->calendar_options, $other_options)); |
68 | - $code = ( '<script type="text/javascript">Calendar.setup({' . |
|
68 | + $code = ('<script type="text/javascript">Calendar.setup({' . |
|
69 | 69 | $js_options . |
70 | - '});</script>' ); |
|
70 | + '});</script>'); |
|
71 | 71 | return $code; |
72 | 72 | } |
73 | 73 | |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | $attrstr = $this->_make_html_attr(array_merge($field_attributes, |
77 | 77 | array('id' => $this->_field_id($id), |
78 | 78 | 'type' => 'text'))); |
79 | - echo '<input ' . $attrstr .'/>'; |
|
80 | - echo '<a href="#" id="'. $this->_trigger_id($id) . '">' . |
|
79 | + echo '<input ' . $attrstr . '/>'; |
|
80 | + echo '<a href="#" id="' . $this->_trigger_id($id) . '">' . |
|
81 | 81 | '<img align="middle" border="0" src="' . $this->calendar_lib_path . 'img.gif" alt="" /></a>'; |
82 | 82 | |
83 | 83 | $options = array_merge($cal_options, |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if (is_bool($val)) |
100 | 100 | $val = $val ? 'true' : 'false'; |
101 | 101 | else if (!is_numeric($val)) |
102 | - $val = '"'.$val.'"'; |
|
102 | + $val = '"' . $val . '"'; |
|
103 | 103 | if ($jstr) $jstr .= ','; |
104 | 104 | $jstr .= '"' . $key . '":' . $val; |
105 | 105 | } |
@@ -96,11 +96,14 @@ |
||
96 | 96 | $jstr = ''; |
97 | 97 | reset($array); |
98 | 98 | while (list($key, $val) = each($array)) { |
99 | - if (is_bool($val)) |
|
100 | - $val = $val ? 'true' : 'false'; |
|
101 | - else if (!is_numeric($val)) |
|
102 | - $val = '"'.$val.'"'; |
|
103 | - if ($jstr) $jstr .= ','; |
|
99 | + if (is_bool($val)) { |
|
100 | + $val = $val ? 'true' : 'false'; |
|
101 | + } else if (!is_numeric($val)) { |
|
102 | + $val = '"'.$val.'"'; |
|
103 | + } |
|
104 | + if ($jstr) { |
|
105 | + $jstr .= ','; |
|
106 | + } |
|
104 | 107 | $jstr .= '"' . $key . '":' . $val; |
105 | 108 | } |
106 | 109 | return $jstr; |