Commit d819db2a authored by Neil Fraser's avatar Neil Fraser

Lint corrections.

parent d1f6bdb1
......@@ -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) {
......
......@@ -30,7 +30,10 @@
*/
goog.provide('Blockly.Msg');
// Back up original getMsg function.
/**
* Back up original getMsg function.
* @type !Function
*/
goog.getMsgOrig = goog.getMsg;
/**
......
......@@ -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) {
......
......@@ -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];
};
......@@ -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;
};
......
......@@ -97,7 +97,8 @@ 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) {',
' $pos = ' + operator + '($text, $search);',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment