@@ -34,11 +34,11 @@ |
||
34 | 34 | * @param string $class Class name to be autoloaded |
35 | 35 | */ |
36 | 36 | spl_autoload_register(function($class) { |
37 | - if(strpos($class, "Seufert\\Hamle\\") === 0) { |
|
37 | + if (strpos($class, "Seufert\\Hamle\\") === 0) { |
|
38 | 38 | $s = DIRECTORY_SEPARATOR; |
39 | - $class = str_replace("\\",$s,substr($class,14)); |
|
39 | + $class = str_replace("\\", $s, substr($class, 14)); |
|
40 | 40 | $path = __DIR__.$s."hamle".$s."$class.php"; |
41 | - if(is_file($path)) include_once($path); |
|
41 | + if (is_file($path)) include_once($path); |
|
42 | 42 | } |
43 | -},true,true); |
|
43 | +},true, true); |
|
44 | 44 |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function cachePath($f) { |
42 | 42 | $s = DIRECTORY_SEPARATOR; |
43 | - $dir = implode($s,[__DIR__,"..","..","cache",""]); |
|
44 | - if(!is_dir($dir)) mkdir($dir); |
|
43 | + $dir = implode($s, [__DIR__, "..", "..", "cache", ""]); |
|
44 | + if (!is_dir($dir)) mkdir($dir); |
|
45 | 45 | return $dir.$f; |
46 | 46 | } |
47 | 47 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @throws Exception\RunTime |
68 | 68 | */ |
69 | 69 | public function getModelTypeID($typeId, $sort = [], $limit = 0, $offset = 0) { |
70 | - if(count($typeId) > 1) |
|
70 | + if (count($typeId) > 1) |
|
71 | 71 | throw new Exception\RunTime("Unable to open more than one ID at a time"); |
72 | 72 | return new Model\Zero(); |
73 | 73 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | function __construct($message = "", $code = 0, $previous = NULL) { |
34 | 34 | ///@todo Include Line number & file name within parse error exceptions |
35 | - $message .= ", on line " . Hamle\Hamle::getLineNo() . " in file ?.hamle"; |
|
35 | + $message .= ", on line ".Hamle\Hamle::getLineNo()." in file ?.hamle"; |
|
36 | 36 | parent::__construct($message, $code, $previous); |
37 | 37 | } |
38 | 38 |
@@ -42,6 +42,6 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | function isClicked() { |
45 | - return isset($_REQUEST[$this->form . "_" . $this->name]); |
|
45 | + return isset($_REQUEST[$this->form."_".$this->name]); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | \ No newline at end of file |
@@ -42,8 +42,8 @@ |
||
42 | 42 | |
43 | 43 | function getValue() { |
44 | 44 | if (!is_null($this->setValue)) return $this->setValue; |
45 | - if (isset($_REQUEST[$this->form . "__submit"])) |
|
46 | - return isset($_REQUEST[$this->form . "_" . $this->name]); |
|
45 | + if (isset($_REQUEST[$this->form."__submit"])) |
|
46 | + return isset($_REQUEST[$this->form."_".$this->name]); |
|
47 | 47 | return $this->opt['default']; |
48 | 48 | } |
49 | 49 | } |
50 | 50 | \ No newline at end of file |
@@ -44,13 +44,13 @@ |
||
44 | 44 | $as[$k] = substr($v, $indent); |
45 | 45 | $s = implode("\n", $as); |
46 | 46 | |
47 | - require_once ME_DIR . "/lib/phpsass/SassParser.php"; |
|
47 | + require_once ME_DIR."/lib/phpsass/SassParser.php"; |
|
48 | 48 | $sp = new SassParser(array("cache" => FALSE, |
49 | 49 | "style" => stdConf::get("me.developer") ? SassRenderer::STYLE_EXPANDED : SassRenderer::STYLE_COMPRESSED, |
50 | 50 | "syntax" => SassFile::SASS, 'debug' => TRUE)); |
51 | 51 | $tree = $sp->toTree($s); |
52 | 52 | $out = $tree->render(); |
53 | 53 | $pad = str_pad("", $indent, " "); |
54 | - return $pad . str_replace("\n", "\n$pad", trim($out)); |
|
54 | + return $pad.str_replace("\n", "\n$pad", trim($out)); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -39,8 +39,8 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | static function filterText($s) { |
42 | - return "/*<![CDATA[*/\n" . |
|
42 | + return "/*<![CDATA[*/\n". |
|
43 | 43 | /*preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \1; ?>', $text)*/ |
44 | - $s . "/*]]>*/"; |
|
44 | + $s."/*]]>*/"; |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -42,7 +42,7 @@ |
||
42 | 42 | function renderContent($pad = "", $oneliner = false) { |
43 | 43 | if ($this->commentstyle == "HTML") |
44 | 44 | if (count($this->content) > 1) |
45 | - return $pad . " " . implode("\n$pad", $this->content) . "\n"; |
|
45 | + return $pad." ".implode("\n$pad", $this->content)."\n"; |
|
46 | 46 | else |
47 | 47 | return current($this->content); |
48 | 48 | return ""; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | foreach ($labelTags as $tag) |
62 | 62 | if ($tag instanceOf Html) |
63 | 63 | foreach ($tag->source as $source) { |
64 | - if(isset($fields[$source])) |
|
64 | + if (isset($fields[$source])) |
|
65 | 65 | $fields[$source]->getLabelAttStatic($tag->opt, $tag->type, $tag->content); |
66 | 66 | else |
67 | 67 | $tag->opt['style'] = "display:none;"; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | foreach ($inputTags as $tag) |
71 | 71 | if ($tag instanceOf Html) |
72 | 72 | foreach ($tag->source as $source) { |
73 | - if(isset($fields[$source])) |
|
73 | + if (isset($fields[$source])) |
|
74 | 74 | $fields[$source]->getHintAttStatic($tag->opt, $tag->type, $tag->content); |
75 | 75 | else |
76 | 76 | $tag->opt['style'] = "display:none;"; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | foreach ($inputTags as $tag) |
80 | 80 | if ($tag instanceOf Html) |
81 | 81 | foreach ($tag->source as $source) { |
82 | - if(isset($fields[$source])) { |
|
82 | + if (isset($fields[$source])) { |
|
83 | 83 | $fields[$source]->getInputAttStatic($tag->opt, $tag->type, $tag->content); |
84 | 84 | unset($fields[$source]); |
85 | 85 | } else |
@@ -87,13 +87,13 @@ discard block |
||
87 | 87 | } |
88 | 88 | foreach ($fields as $n => $f) { |
89 | 89 | if (!$f instanceOf Button) { |
90 | - $this->addChild($label = new DynHtml("label", [],[],"",$n)); |
|
90 | + $this->addChild($label = new DynHtml("label", [], [], "", $n)); |
|
91 | 91 | $f->getLabelAttStatic($label->opt, $label->type, $label->content); |
92 | 92 | } |
93 | - $this->addChild($input = new DynHtml("input", [],[],"",$n)); |
|
93 | + $this->addChild($input = new DynHtml("input", [], [], "", $n)); |
|
94 | 94 | $f->getInputAttStatic($input->opt, $input->type, $input->content); |
95 | 95 | } |
96 | - return "<form " . implode(" ", $out) . "><?php \$form = " . $this->var->toPHP() . "; \$form->process(); ?>"; |
|
96 | + return "<form ".implode(" ", $out)."><?php \$form = ".$this->var->toPHP()."; \$form->process(); ?>"; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | function renderEnTag() { |