| Total Complexity | 6 |
| Complexity/F | 1.2 |
| Lines of Code | 32 |
| Function Count | 5 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | /* |
||
| 11 | API.notifications = { |
||
| 12 | create: function(title, message){ |
||
| 13 | var opt = { |
||
| 14 | type: "basic", |
||
| 15 | title: title, |
||
| 16 | message: message, |
||
| 17 | iconUrl: "icons/icon32.png" |
||
| 18 | }; |
||
| 19 | return API.api.notifications.create('PiCast', opt, function(id) { console.log("Last error:", chrome.runtime.lastError); }); |
||
| 20 | }, |
||
| 21 | update: API.api.notifications.update, |
||
| 22 | clear: API.api.notifications.clear, |
||
| 23 | |||
| 24 | getAll: function () { |
||
| 25 | if (API.promise) { |
||
| 26 | return API.api.notifications.getAll(details); |
||
| 27 | } |
||
| 28 | else { |
||
| 29 | return new C_Promise(function () { |
||
| 30 | API.api.notifications.getAll(details, (function (notifications) { |
||
| 31 | this.call_then(notifications); |
||
| 32 | }).bind(this)); |
||
| 33 | }); |
||
| 34 | } |
||
| 35 | }, |
||
| 36 | /** |
||
| 37 | * Event handlers from now on |
||
| 38 | */ |
||
| 39 | onClosed: API.api.notifications.onClosed, |
||
| 40 | onClicked: API.api.notifications.onClicked, |
||
| 41 | onButtonClicked: API.api.notifications.onButtonClicked |
||
| 42 | }; |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.