diff --git a/core/inject.js b/core/inject.js index 3f862bb86..e2e3aa7dd 100644 --- a/core/inject.js +++ b/core/inject.js @@ -71,7 +71,7 @@ Blockly.inject = function(container, opt_options) { /** * Parse the provided toolbox tree into a consistent DOM format. * @param {Node|string} tree DOM tree of blocks, or text representation of same. - * @return {Node} DOM tree of blocks or null. + * @return {Node} DOM tree of blocks, or null. * @private */ Blockly.parseToolboxTree_ = function(tree) { diff --git a/core/msg.js b/core/msg.js index c7e0eb906..f5768c0cf 100644 --- a/core/msg.js +++ b/core/msg.js @@ -30,7 +30,10 @@ */ goog.provide('Blockly.Msg'); -// Back up original getMsg function. +/** + * Back up original getMsg function. + * @type !Function + */ goog.getMsgOrig = goog.getMsg; /** diff --git a/core/toolbox.js b/core/toolbox.js index 964a097a5..0149cb0f4 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -161,7 +161,8 @@ Blockly.Toolbox.prototype.position = function() { var svgPosition = goog.style.getPageOffset(svg); var svgSize = Blockly.svgSize(svg); if (this.workspace_.RTL) { - treeDiv.style.left = (svgPosition.x + svgSize.width - treeDiv.offsetWidth) + 'px'; + treeDiv.style.left = + (svgPosition.x + svgSize.width - treeDiv.offsetWidth) + 'px'; } else { treeDiv.style.left = svgPosition.x + 'px'; } @@ -177,6 +178,7 @@ Blockly.Toolbox.prototype.position = function() { /** * Fill the toolbox with categories and blocks. + * @param {Node} newTree DOM tree of blocks, or null. * @private */ Blockly.Toolbox.prototype.populate_ = function(newTree) { diff --git a/generators/php/lists.js b/generators/php/lists.js index 78d15c71e..02e965e76 100644 --- a/generators/php/lists.js +++ b/generators/php/lists.js @@ -169,7 +169,8 @@ Blockly.PHP['lists_getIndex'] = function(block) { var code = 'array_slice(' + list + ', -' + at + ', 1)[0]'; return [code, Blockly.PHP.ORDER_FUNCTION_CALL]; } else if (mode == 'GET_REMOVE' || mode == 'REMOVE') { - code = 'array_splice(' + list + ', count(' + list + ') - ' + at + ', 1)[0]'; + code = 'array_splice(' + list + + ', count(' + list + ') - ' + at + ', 1)[0]'; if (mode == 'GET_REMOVE') { return [code, Blockly.PHP.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { @@ -366,6 +367,6 @@ Blockly.PHP['lists_split'] = function(block) { } else { throw 'Unknown mode: ' + mode; } - var code = functionName + '('+ value_delim + ', ' + value_input + ')'; + var code = functionName + '(' + value_delim + ', ' + value_input + ')'; return [code, Blockly.PHP.ORDER_FUNCTION_CALL]; }; diff --git a/generators/php/loops.js b/generators/php/loops.js index 84ec10414..07a979b6d 100644 --- a/generators/php/loops.js +++ b/generators/php/loops.js @@ -153,7 +153,8 @@ Blockly.PHP['controls_forEach'] = function(block) { var branch = Blockly.PHP.statementToCode(block, 'DO'); branch = Blockly.PHP.addLoopTrap(branch, block.id); var code = ''; - code += 'foreach (' + argument0 + ' as ' + variable0 + ') {\n' + branch + '}\n'; + code += 'foreach (' + argument0 + ' as ' + variable0 + + ') {\n' + branch + '}\n'; return code; }; diff --git a/generators/php/text.js b/generators/php/text.js index c7d5383db..d8fa96bc2 100644 --- a/generators/php/text.js +++ b/generators/php/text.js @@ -97,9 +97,10 @@ Blockly.PHP['text_indexOf'] = function(block) { var code = operator + '(' + argument1 + ', ' + argument0 + ') + 1'; var functionName = Blockly.PHP.provideFunction_( - block.getFieldValue('END') == 'FIRST'?'text_indexOf':'text_lastIndexOf', + block.getFieldValue('END') == 'FIRST' ? + 'text_indexOf' : 'text_lastIndexOf', [ 'function ' + Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_ + - '($text, $search) {', + '($text, $search) {', ' $pos = ' + operator + '($text, $search);', ' return $pos === false ? 0 : $pos + 1;', '}']);