small code style improvements, trying to get phpunit with hhvm to work in travis

This commit is contained in:
El RIDO 2016-07-05 17:23:25 +02:00
parent 9267e281f5
commit 8e11f0873c
4 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{ {
"require-dev": { "require-dev": {
"phpunit/phpunit": "5.4.*",
"codacy/coverage": "dev-master" "codacy/coverage": "dev-master"
} }
} }

View File

@ -1 +1 @@
pre .str,code .str{color:#fec243}pre .kwd,code .kwd{color:#8470ff}pre .com,code .com{color:#32cd32;font-style:italic}pre .typ,code .typ{color:#6ecbcc}pre .lit,code .lit{color:#d06}pre .pun,code .pun{color:#8b8970}pre .pln,code .pln{color:#f0f0f0}pre .tag,code .tag{color:#9c9cff}pre .htm,code .htm{color:#dda0dd}pre .xsl,code .xsl{color:#d0a0d0}pre .atn,code .atn{color:#46eeee;font-weight:normal}pre .atv,code .atv{color:#eeb4b4}pre .dec,code .dec{color:#3387cc}a{text-decoration:none}pre.prettyprint,code.prettyprint{font-family:'Droid Sans Mono','CPMono_v07 Bold','Droid Sans';font-weight:bold;font-size:9pt;background-color:#0f0f0f;-moz-border-radius:8px;-webkit-border-radius:8px;-o-border-radius:8px;-ms-border-radius:8px;-khtml-border-radius:8px;border-radius:8px}pre.prettyprint{width:95%;margin:1em auto;padding:1em;white-space:pre-wrap}pre.prettyprint a,code.prettyprint a{text-decoration:none}ol.linenums{margin-top:0;margin-bottom:0;color:#8b8970}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}@media print{pre.prettyprint,code.prettyprint{background-color:#fff}pre .str,code .str{color:#088}pre .kwd,code .kwd{color:#006;font-weight:bold}pre .com,code .com{color:#oc3;font-style:italic}pre .typ,code .typ{color:#404;font-weight:bold}pre .lit,code .lit{color:#044}pre .pun,code .pun{color:#440}pre .pln,code .pln{color:#000}pre .tag,code .tag{color:#b66ff7;font-weight:bold}pre .htm,code .htm{color:#606;font-weight:bold}pre .xsl,code .xsl{color:#606;font-weight:bold}pre .atn,code .atn{color:#c71585;font-weight:normal}pre .atv,code .atv{color:#088;font-weight:normal}} pre .str,code .str{color:#fec243}pre .kwd,code .kwd{color:#8470ff}pre .com,code .com{color:#32cd32;font-style:italic}pre .typ,code .typ{color:#6ecbcc}pre .lit,code .lit{color:#d06}pre .pun,code .pun{color:#8b8970}pre .pln,code .pln{color:#f0f0f0}pre .tag,code .tag{color:#9c9cff}pre .htm,code .htm{color:#dda0dd}pre .xsl,code .xsl{color:#d0a0d0}pre .atn,code .atn{color:#46eeee;font-weight:normal}pre .atv,code .atv{color:#eeb4b4}pre .dec,code .dec{color:#3387cc}a{text-decoration:none}pre.prettyprint,code.prettyprint{font-family:'Droid Sans Mono','CPMono_v07 Bold','Droid Sans';font-weight:bold;font-size:9pt;background-color:#0f0f0f;-moz-border-radius:8px;-webkit-border-radius:8px;-o-border-radius:8px;-ms-border-radius:8px;-khtml-border-radius:8px;border-radius:8px}pre.prettyprint{width:95%;margin:1em auto;padding:1em;white-space:pre-wrap}pre.prettyprint a,code.prettyprint a{text-decoration:none}ol.linenums{margin-top:0;margin-bottom:0;color:#8b8970}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}@media print{pre.prettyprint,code.prettyprint{background-color:#fff}pre .str,code .str{color:#088}pre .kwd,code .kwd{color:#006;font-weight:bold}pre .com,code .com{color:#0c3;font-style:italic}pre .typ,code .typ{color:#404;font-weight:bold}pre .lit,code .lit{color:#044}pre .pun,code .pun{color:#440}pre .pln,code .pln{color:#000}pre .tag,code .tag{color:#b66ff7;font-weight:bold}pre .htm,code .htm{color:#606;font-weight:bold}pre .xsl,code .xsl{color:#606;font-weight:bold}pre .atn,code .atn{color:#c71585;font-weight:normal}pre .atv,code .atv{color:#088;font-weight:normal}}

View File

@ -328,10 +328,10 @@ $(function() {
{ {
messageId = args[0]; messageId = args[0];
} }
if (messageId.length == 0) return messageId; if (messageId.length === 0) return messageId;
if (!this.translations.hasOwnProperty(messageId)) if (!this.translations.hasOwnProperty(messageId))
{ {
if (this.language != 'en') console.debug( if (this.language !== 'en') console.debug(
'Missing translation for: ' + messageId 'Missing translation for: ' + messageId
); );
this.translations[messageId] = args[0]; this.translations[messageId] = args[0];
@ -366,10 +366,10 @@ $(function() {
case 'zh': case 'zh':
return (n > 1 ? 1 : 0); return (n > 1 ? 1 : 0);
case 'pl': case 'pl':
return (n == 1 ? 0 : n%10 >= 2 && n %10 <=4 && (n%100 < 10 || n%100 >= 20) ? 1 : 2); return (n === 1 ? 0 : n%10 >= 2 && n %10 <=4 && (n%100 < 10 || n%100 >= 20) ? 1 : 2);
// en, de // en, de
default: default:
return (n != 1 ? 1 : 0); return (n !== 1 ? 1 : 0);
} }
}, },

View File

@ -145,7 +145,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
file_put_contents(CONF, ''); file_put_contents(CONF, '');
ob_start(); ob_start();
new zerobin; new zerobin;
$content = ob_get_contents(); ob_get_contents();
} }
/** /**
@ -944,4 +944,4 @@ class zerobinTest extends PHPUnit_Framework_TestCase
); );
$this->assertFalse($this->_model->exists(helper::getPasteId()), 'paste successfully deleted'); $this->assertFalse($this->_model->exists(helper::getPasteId()), 'paste successfully deleted');
} }
} }