Skip to content
Permalink
Browse files

[ci skip] Enabling PHP testing of examples and fixing some code gener…

…ation
  • Loading branch information...
ZainabAlShowely committed Jul 4, 2018
1 parent cc3cee6 commit b3346f8bb53bfe28e512d754facfb86c527383be
@@ -4,7 +4,7 @@ class UmpleToPhp {
{
$wasSet = false;
<<# if (customSetPrefixCode != null) { append(realSb, "\n{0}",GeneratorHelper.doIndent(customSetPrefixCode, " ")); } #>>
if ($<<=gen.translate("parameterOne",av)>>.nil?)
if ($<<=gen.translate("parameterOne",av)>> === NULL)
{
<<# if (customSetPostfixCode != null) { append(realSb, "\n{0}",GeneratorHelper.doIndent(customSetPostfixCode, " ")); } #>>
return wasSet;
@@ -16,7 +16,7 @@ class UmpleToPhp {
{
$<<=gen.translate("parameterExisting",av)>>-><<=gen.relatedTranslate("removeMethod",av)>>($this);
}
if !$this-><<=gen.translate("associationOne",av)>>-><<=gen.relatedTranslate("addMethod",av)>>($this)
if (!$this-><<=gen.translate("associationOne",av)>>-><<=gen.relatedTranslate("addMethod",av)>>($this))
{
$this-><<=gen.translate("associationOne",av)>> = $<<=gen.translate("parameterExisting",av)>>;
$wasSet = false;
@@ -27,6 +27,6 @@ class UmpleToPhp {
}
<<# if (customSetPostfixCode != null) { append(realSb, "\n{0}",GeneratorHelper.doIndent(customSetPostfixCode, " ")); } #>>
return $wasSet;
end
}
!>>
}
@@ -95,7 +95,14 @@ class UmpleToPhp {
hasExit = true;
hasThisExit = true;
isFirstExit = false;
exitActions.append("\n " + action.getActionCode());
if(action.getActionCode() == null) //verify why it returns null
{
exitActions.append("\n " + StringFormatter.format("$this->{0}(self::{1});", gen.translate("setMethod",sm), gen.translate("stateNull",sm)));
}
else
{
exitActions.append("\n " + action.getActionCode());
}
}
}

@@ -45,7 +45,7 @@
<try>
<antcall target="doJava" />
<!-- <antcall target="doCpp" />-->
<!--<antcall target="doPhp" />-->
<antcall target="doPhp" />
<!--<antcall target="doRuby" />-->
</try>

0 comments on commit b3346f8

Please sign in to comment.
You can’t perform that action at this time.