Advertisement
Guest User

Untitled

a guest
Mar 9th, 2019
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 210.69 KB | None | 0 0
  1. AccountController:
  2. Rating: A
  3. Churn: 0
  4. Complexity: 5.95
  5. Duplication: 0
  6. Smells: 2
  7. * (InstanceVariableAssumption) AccountController assumes too much for instance variable '@title'
  8. - app/controllers/account_controller.rb:1
  9. * (IrresponsibleModule) AccountController has no descriptive comment
  10. - app/controllers/account_controller.rb:1
  11.  
  12. ActiveModel::OneTimePassword::ClassMethods:
  13. Rating: A
  14. Churn: 0
  15. Complexity: 28.71
  16. Duplication: 0
  17. Smells: 4
  18. * (HighComplexity) ActiveModel::OneTimePassword::ClassMethods#has_one_time_password has a flog score of 25
  19. - lib/modules/active_model_otp.rb:3
  20. * (IrresponsibleModule) ActiveModel::OneTimePassword::ClassMethods has no descriptive comment
  21. - lib/modules/active_model_otp.rb:2
  22. * (ManualDispatch) ActiveModel::OneTimePassword::ClassMethods#has_one_time_password manually dispatches method call
  23. - lib/modules/active_model_otp.rb:22
  24. * (TooManyStatements) ActiveModel::OneTimePassword::ClassMethods#has_one_time_password has approx 11 statements
  25. - lib/modules/active_model_otp.rb:3
  26.  
  27. AddAddons:
  28. Rating: A
  29. Churn: 0
  30. Complexity: 6.68
  31. Duplication: 0
  32. Smells: 3
  33. * (IrresponsibleModule) AddAddons has no descriptive comment
  34. - db/migrate/20170918132352_add_addons.rb:1
  35. * (TooManyStatements) AddAddons#change has approx 6 statements
  36. - db/migrate/20170918132352_add_addons.rb:2
  37. * (UncommunicativeVariableName) AddAddons#change has the variable name 't'
  38. - db/migrate/20170918132352_add_addons.rb:10
  39.  
  40. AddAdminToUsers:
  41. Rating: A
  42. Churn: 0
  43. Complexity: 1.0
  44. Duplication: 0
  45. Smells: 1
  46. * (IrresponsibleModule) AddAdminToUsers has no descriptive comment
  47. - db/migrate/20180205181042_add_admin_to_users.rb:1
  48.  
  49. AddBrandAndCurrencyToUser:
  50. Rating: A
  51. Churn: 0
  52. Complexity: 2.0
  53. Duplication: 0
  54. Smells: 1
  55. * (IrresponsibleModule) AddBrandAndCurrencyToUser has no descriptive comment
  56. - db/migrate/20161122224539_add_brand_and_currency_to_user.rb:1
  57.  
  58. AddBrandIdToProducts:
  59. Rating: A
  60. Churn: 0
  61. Complexity: 1.0
  62. Duplication: 0
  63. Smells: 1
  64. * (IrresponsibleModule) AddBrandIdToProducts has no descriptive comment
  65. - db/migrate/20160630205805_add_brand_id_to_products.rb:1
  66.  
  67. AddColumnsToUser:
  68. Rating: A
  69. Churn: 0
  70. Complexity: 10.0
  71. Duplication: 0
  72. Smells: 2
  73. * (IrresponsibleModule) AddColumnsToUser has no descriptive comment
  74. - db/migrate/20161127225505_add_columns_to_user.rb:1
  75. * (TooManyStatements) AddColumnsToUser#change has approx 10 statements
  76. - db/migrate/20161127225505_add_columns_to_user.rb:2
  77.  
  78. AddCompanyPaymentMethod:
  79. Rating: A
  80. Churn: 0
  81. Complexity: 1.0
  82. Duplication: 0
  83. Smells: 1
  84. * (IrresponsibleModule) AddCompanyPaymentMethod has no descriptive comment
  85. - db/migrate/20170419100623_add_company_payment_method.rb:1
  86.  
  87. AddContactsToUser:
  88. Rating: A
  89. Churn: 0
  90. Complexity: 1.0
  91. Duplication: 0
  92. Smells: 1
  93. * (IrresponsibleModule) AddContactsToUser has no descriptive comment
  94. - db/migrate/20161127230454_add_contacts_to_user.rb:1
  95.  
  96. AddDescriptionsToUpgradeItems:
  97. Rating: A
  98. Churn: 0
  99. Complexity: 1.0
  100. Duplication: 0
  101. Smells: 1
  102. * (IrresponsibleModule) AddDescriptionsToUpgradeItems has no descriptive comment
  103. - db/migrate/20180514114555_add_descriptions_to_upgrade_items.rb:1
  104.  
  105. AddFirstNameToUsers:
  106. Rating: A
  107. Churn: 0
  108. Complexity: 1.0
  109. Duplication: 0
  110. Smells: 1
  111. * (IrresponsibleModule) AddFirstNameToUsers has no descriptive comment
  112. - db/migrate/20161127221330_add_first_name_to_users.rb:1
  113.  
  114. AddInfoToUpgrades:
  115. Rating: A
  116. Churn: 0
  117. Complexity: 2.0
  118. Duplication: 0
  119. Smells: 1
  120. * (IrresponsibleModule) AddInfoToUpgrades has no descriptive comment
  121. - db/migrate/20180228164334_add_info_to_upgrades.rb:1
  122.  
  123. AddInvoiceIdToChartMogulDeadLetter:
  124. Rating: A
  125. Churn: 0
  126. Complexity: 1.0
  127. Duplication: 0
  128. Smells: 1
  129. * (IrresponsibleModule) AddInvoiceIdToChartMogulDeadLetter has no descriptive comment
  130. - db/migrate/20180809192525_add_invoice_id_to_chart_mogul_dead_letter.rb:1
  131.  
  132. AddLangToUsers:
  133. Rating: A
  134. Churn: 0
  135. Complexity: 1.0
  136. Duplication: 0
  137. Smells: 1
  138. * (IrresponsibleModule) AddLangToUsers has no descriptive comment
  139. - db/migrate/20161224143312_add_lang_to_users.rb:1
  140.  
  141. AddMetadataToOrderItem:
  142. Rating: A
  143. Churn: 0
  144. Complexity: 1.0
  145. Duplication: 0
  146. Smells: 1
  147. * (IrresponsibleModule) AddMetadataToOrderItem has no descriptive comment
  148. - db/migrate/20170731150623_add_metadata_to_order_item.rb:1
  149.  
  150. AddOrderCoupon:
  151. Rating: A
  152. Churn: 0
  153. Complexity: 1.0
  154. Duplication: 0
  155. Smells: 1
  156. * (IrresponsibleModule) AddOrderCoupon has no descriptive comment
  157. - db/migrate/20170119212945_add_order_coupon.rb:1
  158.  
  159. AddOrderItemDiscountValue:
  160. Rating: A
  161. Churn: 0
  162. Complexity: 1.6
  163. Duplication: 0
  164. Smells: 1
  165. * (IrresponsibleModule) AddOrderItemDiscountValue has no descriptive comment
  166. - db/migrate/20170126223119_add_order_item_discount_value.rb:1
  167.  
  168. AddOtpSecretKeyToUsers:
  169. Rating: A
  170. Churn: 0
  171. Complexity: 2.0
  172. Duplication: 0
  173. Smells: 1
  174. * (IrresponsibleModule) AddOtpSecretKeyToUsers has no descriptive comment
  175. - db/migrate/20170817024114_add_otp_secret_key_to_users.rb:1
  176.  
  177. AddSetupToProduct:
  178. Rating: A
  179. Churn: 0
  180. Complexity: 1.6
  181. Duplication: 0
  182. Smells: 1
  183. * (IrresponsibleModule) AddSetupToProduct has no descriptive comment
  184. - db/migrate/20171009153119_add_setup_to_product.rb:1
  185.  
  186. AddSignupStepToCompanies:
  187. Rating: A
  188. Churn: 0
  189. Complexity: 1.0
  190. Duplication: 0
  191. Smells: 1
  192. * (IrresponsibleModule) AddSignupStepToCompanies has no descriptive comment
  193. - db/migrate/20181029131555_add_signup_step_to_companies.rb:1
  194.  
  195. AddUpgradeItemGroupsNames:
  196. Rating: A
  197. Churn: 0
  198. Complexity: 1.0
  199. Duplication: 0
  200. Smells: 1
  201. * (IrresponsibleModule) AddUpgradeItemGroupsNames has no descriptive comment
  202. - db/migrate/20160802204436_add_upgrade_item_groups_names.rb:1
  203.  
  204. AddUpgradeItemOrder:
  205. Rating: A
  206. Churn: 0
  207. Complexity: 1.0
  208. Duplication: 0
  209. Smells: 1
  210. * (IrresponsibleModule) AddUpgradeItemOrder has no descriptive comment
  211. - db/migrate/20170320145811_add_upgrade_item_order.rb:1
  212.  
  213. AddUpgradeItemPrices:
  214. Rating: A
  215. Churn: 0
  216. Complexity: 1.0
  217. Duplication: 0
  218. Smells: 1
  219. * (IrresponsibleModule) AddUpgradeItemPrices has no descriptive comment
  220. - db/migrate/20160711215135_add_upgrade_item_prices.rb:1
  221.  
  222. AddUpgradeItemsNames:
  223. Rating: A
  224. Churn: 0
  225. Complexity: 1.0
  226. Duplication: 0
  227. Smells: 1
  228. * (IrresponsibleModule) AddUpgradeItemsNames has no descriptive comment
  229. - db/migrate/20160802193255_add_upgrade_items_names.rb:1
  230.  
  231. AddUpgradeItemsToOrderItems:
  232. Rating: A
  233. Churn: 0
  234. Complexity: 1.0
  235. Duplication: 0
  236. Smells: 1
  237. * (IrresponsibleModule) AddUpgradeItemsToOrderItems has no descriptive comment
  238. - db/migrate/20160615201311_add_upgrade_items_to_order_items.rb:1
  239.  
  240. AddUpgradeNames:
  241. Rating: A
  242. Churn: 0
  243. Complexity: 1.0
  244. Duplication: 0
  245. Smells: 1
  246. * (IrresponsibleModule) AddUpgradeNames has no descriptive comment
  247. - db/migrate/20160728200611_add_upgrade_names.rb:1
  248.  
  249. AddUpgradePugNames:
  250. Rating: A
  251. Churn: 0
  252. Complexity: 1.0
  253. Duplication: 0
  254. Smells: 1
  255. * (IrresponsibleModule) AddUpgradePugNames has no descriptive comment
  256. - db/migrate/20160817223016_add_upgrade_pug_names.rb:1
  257.  
  258. AddUpgradesToProducts:
  259. Rating: A
  260. Churn: 0
  261. Complexity: 1.0
  262. Duplication: 0
  263. Smells: 1
  264. * (IrresponsibleModule) AddUpgradesToProducts has no descriptive comment
  265. - db/migrate/20160605215905_add_upgrades_to_products.rb:1
  266.  
  267. AddUserClientId:
  268. Rating: A
  269. Churn: 0
  270. Complexity: 2.0
  271. Duplication: 0
  272. Smells: 1
  273. * (IrresponsibleModule) AddUserClientId has no descriptive comment
  274. - db/migrate/20161116172008_add_user_client_id.rb:1
  275.  
  276. AlertComponent:
  277. Rating: A
  278. Churn: 0
  279. Complexity: 3.4
  280. Duplication: 0
  281. Smells: 1
  282. * (IrresponsibleModule) AlertComponent has no descriptive comment
  283. - frontend/components/alert/alert_component.rb:3
  284.  
  285. AnalyticsHelper:
  286. Rating: A
  287. Churn: 0
  288. Complexity: 43.78
  289. Duplication: 0
  290. Smells: 7
  291. * (DuplicateMethodCall) AnalyticsHelper#group_traits calls 'user.company' 7 times
  292. - app/helpers/analytics_helper.rb:40
  293. - app/helpers/analytics_helper.rb:43
  294. - app/helpers/analytics_helper.rb:44
  295. - app/helpers/analytics_helper.rb:45
  296. - app/helpers/analytics_helper.rb:46
  297. - app/helpers/analytics_helper.rb:47
  298. - app/helpers/analytics_helper.rb:48
  299. * (FeatureEnvy) AnalyticsHelper#segment_group refers to 'user' more than self (maybe move it to another class?)
  300. - app/helpers/analytics_helper.rb:11
  301. - app/helpers/analytics_helper.rb:12
  302. * (FeatureEnvy) AnalyticsHelper#segment_identify refers to 'user' more than self (maybe move it to another class?)
  303. - app/helpers/analytics_helper.rb:2
  304. - app/helpers/analytics_helper.rb:4
  305. * (FeatureEnvy) AnalyticsHelper#track_event refers to 'user' more than self (maybe move it to another class?)
  306. - app/helpers/analytics_helper.rb:17
  307. - app/helpers/analytics_helper.rb:19
  308. * (IrresponsibleModule) AnalyticsHelper has no descriptive comment
  309. - app/helpers/analytics_helper.rb:1
  310. * (UtilityFunction) AnalyticsHelper#group_traits doesn't depend on instance state (maybe move it to another class?)
  311. - app/helpers/analytics_helper.rb:38
  312. * (UtilityFunction) AnalyticsHelper#traits doesn't depend on instance state (maybe move it to another class?)
  313. - app/helpers/analytics_helper.rb:27
  314.  
  315. AnalyticsRuby:
  316. Rating: A
  317. Churn: 0
  318. Complexity: 0.0
  319. Duplication: 0
  320. Smells: 0
  321.  
  322. ApplicationCable::Channel:
  323. Rating: A
  324. Churn: 0
  325. Complexity: 0.0
  326. Duplication: 0
  327. Smells: 1
  328. * (IrresponsibleModule) ApplicationCable::Channel has no descriptive comment
  329. - app/channels/application_cable/channel.rb:2
  330.  
  331. ApplicationCable::Connection:
  332. Rating: A
  333. Churn: 0
  334. Complexity: 0.0
  335. Duplication: 0
  336. Smells: 1
  337. * (IrresponsibleModule) ApplicationCable::Connection has no descriptive comment
  338. - app/channels/application_cable/connection.rb:2
  339.  
  340. ApplicationJob:
  341. Rating: A
  342. Churn: 0
  343. Complexity: 0.0
  344. Duplication: 0
  345. Smells: 1
  346. * (IrresponsibleModule) ApplicationJob has no descriptive comment
  347. - app/jobs/application_job.rb:1
  348.  
  349. ApplicationMailer:
  350. Rating: A
  351. Churn: 0
  352. Complexity: 0.0
  353. Duplication: 0
  354. Smells: 1
  355. * (IrresponsibleModule) ApplicationMailer has no descriptive comment
  356. - app/mailers/application_mailer.rb:1
  357.  
  358. ApplicationRecord:
  359. Rating: A
  360. Churn: 0
  361. Complexity: 0.0
  362. Duplication: 0
  363. Smells: 1
  364. * (IrresponsibleModule) ApplicationRecord has no descriptive comment
  365. - app/models/application_record.rb:1
  366.  
  367. Assets:
  368. Rating: A
  369. Churn: 0
  370. Complexity: 0.0
  371. Duplication: 0
  372. Smells: 0
  373.  
  374. Asyncs::BaseController:
  375. Rating: A
  376. Churn: 0
  377. Complexity: 3.6
  378. Duplication: 0
  379. Smells: 2
  380. * (IrresponsibleModule) Asyncs::BaseController has no descriptive comment
  381. - app/controllers/asyncs/base_controller.rb:1
  382. * (UnusedParameters) Asyncs::BaseController#default_render has unused parameter 'args'
  383. - app/controllers/asyncs/base_controller.rb:5
  384.  
  385. Auth0:
  386. Rating: A
  387. Churn: 0
  388. Complexity: 0.0
  389. Duplication: 0
  390. Smells: 0
  391.  
  392. Auth0Controller:
  393. Rating: A
  394. Churn: 0
  395. Complexity: 26.2
  396. Duplication: 0
  397. Smells: 1
  398. * (IrresponsibleModule) Auth0Controller has no descriptive comment
  399. - app/controllers/auth0_controller.rb:1
  400.  
  401. Auth0ControllerSpec:
  402. Rating: A
  403. Churn: 0
  404. Complexity: 0.0
  405. Duplication: 0
  406. Smells: 0
  407.  
  408. AvatarComponent:
  409. Rating: A
  410. Churn: 0
  411. Complexity: 13.05
  412. Duplication: 0
  413. Smells: 3
  414. * (IrresponsibleModule) AvatarComponent has no descriptive comment
  415. - frontend/components/avatar/avatar_component.rb:3
  416. * (TooManyStatements) AvatarComponent#colorize has approx 12 statements
  417. - frontend/components/avatar/avatar_component.rb:11
  418. * (UtilityFunction) AvatarComponent#colorize doesn't depend on instance state (maybe move it to another class?)
  419. - frontend/components/avatar/avatar_component.rb:11
  420.  
  421. BadgeComponent:
  422. Rating: A
  423. Churn: 0
  424. Complexity: 3.4
  425. Duplication: 0
  426. Smells: 1
  427. * (IrresponsibleModule) BadgeComponent has no descriptive comment
  428. - frontend/components/badge/badge_component.rb:3
  429.  
  430. BillingOrdersHelper:
  431. Rating: A
  432. Churn: 0
  433. Complexity: 13.23
  434. Duplication: 0
  435. Smells: 2
  436. * (IrresponsibleModule) BillingOrdersHelper has no descriptive comment
  437. - app/helpers/billing_orders_helper.rb:1
  438. * (UtilityFunction) BillingOrdersHelper#formatted_ordered_servers doesn't depend on instance state (maybe move it to another class?)
  439. - app/helpers/billing_orders_helper.rb:2
  440.  
  441. BillingRoutingSpec:
  442. Rating: A
  443. Churn: 0
  444. Complexity: 0.0
  445. Duplication: 0
  446. Smells: 0
  447.  
  448. BlankStateComponent:
  449. Rating: A
  450. Churn: 0
  451. Complexity: 0.0
  452. Duplication: 0
  453. Smells: 1
  454. * (IrresponsibleModule) BlankStateComponent has no descriptive comment
  455. - frontend/components/blank_state/blank_state_component.rb:3
  456.  
  457. Boot:
  458. Rating: A
  459. Churn: 0
  460. Complexity: 0.0
  461. Duplication: 0
  462. Smells: 0
  463.  
  464. BoxComponent:
  465. Rating: A
  466. Churn: 0
  467. Complexity: 5.81
  468. Duplication: 0
  469. Smells: 2
  470. * (IrresponsibleModule) BoxComponent has no descriptive comment
  471. - frontend/components/box/box_component.rb:3
  472. * (UtilityFunction) BoxComponent#attached? doesn't depend on instance state (maybe move it to another class?)
  473. - frontend/components/box/box_component.rb:36
  474.  
  475. Bugsnag:
  476. Rating: A
  477. Churn: 0
  478. Complexity: 0.0
  479. Duplication: 0
  480. Smells: 0
  481.  
  482. ButtonComponent:
  483. Rating: A
  484. Churn: 0
  485. Complexity: 3.4
  486. Duplication: 0
  487. Smells: 1
  488. * (IrresponsibleModule) ButtonComponent has no descriptive comment
  489. - frontend/components/button/button_component.rb:3
  490.  
  491. ChangeContactsColumnType:
  492. Rating: A
  493. Churn: 0
  494. Complexity: 1.0
  495. Duplication: 0
  496. Smells: 1
  497. * (IrresponsibleModule) ChangeContactsColumnType has no descriptive comment
  498. - db/migrate/20161227043853_change_contacts_column_type.rb:1
  499.  
  500. ChartMogul::Client:
  501. Rating: A
  502. Churn: 0
  503. Complexity: 34.76
  504. Duplication: 0
  505. Smells: 3
  506. * (DuplicateMethodCall) ChartMogul::Client#parse_response calls 'req.body' 2 times
  507. - app/adapters/chart_mogul/client.rb:52
  508. - app/adapters/chart_mogul/client.rb:54
  509. * (IrresponsibleModule) ChartMogul::Client has no descriptive comment
  510. - app/adapters/chart_mogul/client.rb:2
  511. * (TooManyStatements) ChartMogul::Client#build_api_request has approx 6 statements
  512. - app/adapters/chart_mogul/client.rb:39
  513.  
  514. ChartMogul::DeadLetter::MaxRetriesError:
  515. Rating: A
  516. Churn: 0
  517. Complexity: 35.07
  518. Duplication: 0
  519. Smells: 2
  520. * (IrresponsibleModule) ChartMogul::DeadLetter has no descriptive comment
  521. - app/adapters/chart_mogul/dead_letter.rb:2
  522. * (IrresponsibleModule) ChartMogul::DeadLetter::MaxRetriesError has no descriptive comment
  523. - app/adapters/chart_mogul/dead_letter.rb:5
  524.  
  525. ChartMogul::Errors:
  526. Rating: A
  527. Churn: 0
  528. Complexity: 0.0
  529. Duplication: 0
  530. Smells: 4
  531. * (IrresponsibleModule) ChartMogul::Errors::BaseError has no descriptive comment
  532. - app/adapters/chart_mogul/errors.rb:3
  533. * (IrresponsibleModule) ChartMogul::Errors::MogulRequestError has no descriptive comment
  534. - app/adapters/chart_mogul/errors.rb:5
  535. * (IrresponsibleModule) ChartMogul::Errors::ParameterError has no descriptive comment
  536. - app/adapters/chart_mogul/errors.rb:7
  537. * (IrresponsibleModule) ChartMogul::Errors::SmithRequestError has no descriptive comment
  538. - app/adapters/chart_mogul/errors.rb:6
  539.  
  540. ChartMogul::Logging::Methods:
  541. Rating: A
  542. Churn: 0
  543. Complexity: 8.1
  544. Duplication: 0
  545. Smells: 3
  546. * (IrresponsibleModule) ChartMogul::Logging has no descriptive comment
  547. - app/adapters/chart_mogul/logging.rb:2
  548. * (IrresponsibleModule) ChartMogul::Logging::Methods has no descriptive comment
  549. - app/adapters/chart_mogul/logging.rb:10
  550. * (UtilityFunction) ChartMogul::Logging::Methods#logger doesn't depend on instance state (maybe move it to another class?)
  551. - app/adapters/chart_mogul/logging.rb:26
  552.  
  553. ChartMogul::Models::CustomerInvoice:
  554. Rating: A
  555. Churn: 0
  556. Complexity: 31.92
  557. Duplication: 0
  558. Smells: 4
  559. * (HighComplexity) ChartMogul::Models::CustomerInvoice::create has a flog score of 28
  560. - app/adapters/chart_mogul/models/customer_invoice.rb:13
  561. * (IrresponsibleModule) ChartMogul::Models::CustomerInvoice has no descriptive comment
  562. - app/adapters/chart_mogul/models/customer_invoice.rb:3
  563. * (TooManyStatements) ChartMogul::Models::CustomerInvoice#create has approx 10 statements
  564. - app/adapters/chart_mogul/models/customer_invoice.rb:13
  565. * (UncommunicativeVariableName) ChartMogul::Models::CustomerInvoice#create has the variable name 'i'
  566. - app/adapters/chart_mogul/models/customer_invoice.rb:21
  567.  
  568. ChartMogul::ResponseValidator:
  569. Rating: A
  570. Churn: 0
  571. Complexity: 12.76
  572. Duplication: 0
  573. Smells: 2
  574. * (IrresponsibleModule) ChartMogul::ResponseValidator has no descriptive comment
  575. - app/adapters/chart_mogul/response_validator.rb:2
  576. * (MissingSafeMethod) ChartMogul::ResponseValidator has missing safe method 'validate!'
  577. - app/adapters/chart_mogul/response_validator.rb:16
  578.  
  579. ChartMogulDeadLetter:
  580. Rating: A
  581. Churn: 0
  582. Complexity: 0.0
  583. Duplication: 0
  584. Smells: 1
  585. * (IrresponsibleModule) ChartMogulDeadLetter has no descriptive comment
  586. - app/models/chart_mogul_dead_letter.rb:1
  587.  
  588. ChartMogulDeadLetterSpec:
  589. Rating: A
  590. Churn: 0
  591. Complexity: 0.0
  592. Duplication: 0
  593. Smells: 0
  594.  
  595. ChartMogulDeadLetters:
  596. Rating: A
  597. Churn: 0
  598. Complexity: 4.52
  599. Duplication: 0
  600. Smells: 0
  601.  
  602. Companies:
  603. Rating: A
  604. Churn: 0
  605. Complexity: 4.52
  606. Duplication: 0
  607. Smells: 0
  608.  
  609. CompaniesController:
  610. Rating: A
  611. Churn: 0
  612. Complexity: 18.67
  613. Duplication: 0
  614. Smells: 1
  615. * (IrresponsibleModule) CompaniesController has no descriptive comment
  616. - app/controllers/companies_controller.rb:1
  617.  
  618. Company:
  619. Rating: A
  620. Churn: 0
  621. Complexity: 0.0
  622. Duplication: 0
  623. Smells: 1
  624. * (IrresponsibleModule) Company has no descriptive comment
  625. - app/models/company.rb:1
  626.  
  627. ComponentGenerator:
  628. Rating: A
  629. Churn: 0
  630. Complexity: 12.41
  631. Duplication: 0
  632. Smells: 1
  633. * (IrresponsibleModule) ComponentGenerator has no descriptive comment
  634. - lib/generators/component_generator.rb:1
  635.  
  636. ComponentsHelper:
  637. Rating: A
  638. Churn: 0
  639. Complexity: 15.9
  640. Duplication: 0
  641. Smells: 2
  642. * (IrresponsibleModule) ComponentsHelper has no descriptive comment
  643. - app/helpers/components_helper.rb:1
  644. * (UtilityFunction) ComponentsHelper#parse_component_classes doesn't depend on instance state (maybe move it to another class?)
  645. - app/helpers/components_helper.rb:3
  646.  
  647. ContactsRoutingSpec:
  648. Rating: A
  649. Churn: 0
  650. Complexity: 0.0
  651. Duplication: 0
  652. Smells: 0
  653.  
  654. Control::Application:
  655. Rating: A
  656. Churn: 0
  657. Complexity: 0.0
  658. Duplication: 0
  659. Smells: 1
  660. * (IrresponsibleModule) Control::Application has no descriptive comment
  661. - config/application.rb:20
  662.  
  663. ControllerMacros:
  664. Rating: A
  665. Churn: 0
  666. Complexity: 8.96
  667. Duplication: 0
  668. Smells: 1
  669. * (IrresponsibleModule) ControllerMacros has no descriptive comment
  670. - spec/auth0_custom_helper.rb:1
  671.  
  672. CookiesSerializer:
  673. Rating: A
  674. Churn: 0
  675. Complexity: 0.0
  676. Duplication: 0
  677. Smells: 0
  678.  
  679. CreateChartMogulDeadLetters:
  680. Rating: A
  681. Churn: 0
  682. Complexity: 5.89
  683. Duplication: 0
  684. Smells: 3
  685. * (FeatureEnvy) CreateChartMogulDeadLetters#change refers to 't' more than self (maybe move it to another class?)
  686. - db/migrate/20180808205954_create_chart_mogul_dead_letters.rb:4
  687. - db/migrate/20180808205954_create_chart_mogul_dead_letters.rb:5
  688. - db/migrate/20180808205954_create_chart_mogul_dead_letters.rb:6
  689. - db/migrate/20180808205954_create_chart_mogul_dead_letters.rb:8
  690. * (IrresponsibleModule) CreateChartMogulDeadLetters has no descriptive comment
  691. - db/migrate/20180808205954_create_chart_mogul_dead_letters.rb:1
  692. * (UncommunicativeVariableName) CreateChartMogulDeadLetters#change has the variable name 't'
  693. - db/migrate/20180808205954_create_chart_mogul_dead_letters.rb:3
  694.  
  695. CreateCompanies:
  696. Rating: A
  697. Churn: 0
  698. Complexity: 17.83
  699. Duplication: 0
  700. Smells: 4
  701. * (FeatureEnvy) CreateCompanies#change refers to 't' more than self (maybe move it to another class?)
  702. - db/migrate/20161227025614_create_companies.rb:4
  703. - db/migrate/20161227025614_create_companies.rb:5
  704. - db/migrate/20161227025614_create_companies.rb:6
  705. - db/migrate/20161227025614_create_companies.rb:7
  706. - db/migrate/20161227025614_create_companies.rb:8
  707. - db/migrate/20161227025614_create_companies.rb:9
  708. - db/migrate/20161227025614_create_companies.rb:10
  709. - db/migrate/20161227025614_create_companies.rb:11
  710. - db/migrate/20161227025614_create_companies.rb:12
  711. - db/migrate/20161227025614_create_companies.rb:13
  712. - db/migrate/20161227025614_create_companies.rb:14
  713. - db/migrate/20161227025614_create_companies.rb:15
  714. - db/migrate/20161227025614_create_companies.rb:16
  715. - db/migrate/20161227025614_create_companies.rb:18
  716. * (IrresponsibleModule) CreateCompanies has no descriptive comment
  717. - db/migrate/20161227025614_create_companies.rb:1
  718. * (TooManyStatements) CreateCompanies#change has approx 15 statements
  719. - db/migrate/20161227025614_create_companies.rb:2
  720. * (UncommunicativeVariableName) CreateCompanies#change has the variable name 't'
  721. - db/migrate/20161227025614_create_companies.rb:3
  722.  
  723. CreateDelayedJobs:
  724. Rating: A
  725. Churn: 0
  726. Complexity: 15.04
  727. Duplication: 0
  728. Smells: 2
  729. * (IrresponsibleModule) CreateDelayedJobs has no descriptive comment
  730. - db/migrate/20161127220958_create_delayed_jobs.rb:1
  731. * (TooManyStatements) CreateDelayedJobs#self.up has approx 12 statements
  732. - db/migrate/20161127220958_create_delayed_jobs.rb:2
  733.  
  734. CreateDeviceComponents:
  735. Rating: A
  736. Churn: 0
  737. Complexity: 3.54
  738. Duplication: 0
  739. Smells: 3
  740. * (FeatureEnvy) CreateDeviceComponents#change refers to 't' more than self (maybe move it to another class?)
  741. - db/migrate/20170710160511_create_device_components.rb:4
  742. - db/migrate/20170710160511_create_device_components.rb:5
  743. * (IrresponsibleModule) CreateDeviceComponents has no descriptive comment
  744. - db/migrate/20170710160511_create_device_components.rb:1
  745. * (UncommunicativeVariableName) CreateDeviceComponents#change has the variable name 't'
  746. - db/migrate/20170710160511_create_device_components.rb:3
  747.  
  748. CreateInvoiceVia:
  749. Rating: A
  750. Churn: 0
  751. Complexity: 5.89
  752. Duplication: 0
  753. Smells: 3
  754. * (FeatureEnvy) CreateInvoiceVia#change refers to 't' more than self (maybe move it to another class?)
  755. - db/migrate/20161216211536_create_invoice_via.rb:4
  756. - db/migrate/20161216211536_create_invoice_via.rb:5
  757. - db/migrate/20161216211536_create_invoice_via.rb:6
  758. - db/migrate/20161216211536_create_invoice_via.rb:7
  759. * (IrresponsibleModule) CreateInvoiceVia has no descriptive comment
  760. - db/migrate/20161216211536_create_invoice_via.rb:1
  761. * (UncommunicativeVariableName) CreateInvoiceVia#change has the variable name 't'
  762. - db/migrate/20161216211536_create_invoice_via.rb:3
  763.  
  764. CreateOrderItems:
  765. Rating: A
  766. Churn: 0
  767. Complexity: 9.65
  768. Duplication: 0
  769. Smells: 4
  770. * (FeatureEnvy) CreateOrderItems#change refers to 't' more than self (maybe move it to another class?)
  771. - db/migrate/20160604191955_create_order_items.rb:4
  772. - db/migrate/20160604191955_create_order_items.rb:5
  773. - db/migrate/20160604191955_create_order_items.rb:6
  774. - db/migrate/20160604191955_create_order_items.rb:7
  775. - db/migrate/20160604191955_create_order_items.rb:8
  776. - db/migrate/20160604191955_create_order_items.rb:10
  777. * (IrresponsibleModule) CreateOrderItems has no descriptive comment
  778. - db/migrate/20160604191955_create_order_items.rb:1
  779. * (TooManyStatements) CreateOrderItems#change has approx 7 statements
  780. - db/migrate/20160604191955_create_order_items.rb:2
  781. * (UncommunicativeVariableName) CreateOrderItems#change has the variable name 't'
  782. - db/migrate/20160604191955_create_order_items.rb:3
  783.  
  784. CreateOrderStatuses:
  785. Rating: A
  786. Churn: 0
  787. Complexity: 3.54
  788. Duplication: 0
  789. Smells: 3
  790. * (FeatureEnvy) CreateOrderStatuses#change refers to 't' more than self (maybe move it to another class?)
  791. - db/migrate/20160604191816_create_order_statuses.rb:4
  792. - db/migrate/20160604191816_create_order_statuses.rb:6
  793. * (IrresponsibleModule) CreateOrderStatuses has no descriptive comment
  794. - db/migrate/20160604191816_create_order_statuses.rb:1
  795. * (UncommunicativeVariableName) CreateOrderStatuses#change has the variable name 't'
  796. - db/migrate/20160604191816_create_order_statuses.rb:3
  797.  
  798. CreateOrders:
  799. Rating: A
  800. Churn: 0
  801. Complexity: 9.15
  802. Duplication: 0
  803. Smells: 4
  804. * (FeatureEnvy) CreateOrders#change refers to 't' more than self (maybe move it to another class?)
  805. - db/migrate/20160604191917_create_orders.rb:4
  806. - db/migrate/20160604191917_create_orders.rb:5
  807. - db/migrate/20160604191917_create_orders.rb:6
  808. - db/migrate/20160604191917_create_orders.rb:7
  809. - db/migrate/20160604191917_create_orders.rb:9
  810. * (IrresponsibleModule) CreateOrders has no descriptive comment
  811. - db/migrate/20160604191917_create_orders.rb:1
  812. * (TooManyStatements) CreateOrders#change has approx 6 statements
  813. - db/migrate/20160604191917_create_orders.rb:2
  814. * (UncommunicativeVariableName) CreateOrders#change has the variable name 't'
  815. - db/migrate/20160604191917_create_orders.rb:3
  816.  
  817. CreateProductUpgradeItems:
  818. Rating: A
  819. Churn: 0
  820. Complexity: 7.07
  821. Duplication: 0
  822. Smells: 4
  823. * (FeatureEnvy) CreateProductUpgradeItems#change refers to 't' more than self (maybe move it to another class?)
  824. - db/migrate/20160701203211_create_product_upgrade_items.rb:4
  825. - db/migrate/20160701203211_create_product_upgrade_items.rb:5
  826. - db/migrate/20160701203211_create_product_upgrade_items.rb:6
  827. - db/migrate/20160701203211_create_product_upgrade_items.rb:7
  828. - db/migrate/20160701203211_create_product_upgrade_items.rb:8
  829. * (IrresponsibleModule) CreateProductUpgradeItems has no descriptive comment
  830. - db/migrate/20160701203211_create_product_upgrade_items.rb:1
  831. * (TooManyStatements) CreateProductUpgradeItems#change has approx 6 statements
  832. - db/migrate/20160701203211_create_product_upgrade_items.rb:2
  833. * (UncommunicativeVariableName) CreateProductUpgradeItems#change has the variable name 't'
  834. - db/migrate/20160701203211_create_product_upgrade_items.rb:3
  835.  
  836. CreateProducts:
  837. Rating: A
  838. Churn: 0
  839. Complexity: 8.96
  840. Duplication: 0
  841. Smells: 4
  842. * (FeatureEnvy) CreateProducts#change refers to 't' more than self (maybe move it to another class?)
  843. - db/migrate/20160604191631_create_products.rb:4
  844. - db/migrate/20160604191631_create_products.rb:5
  845. - db/migrate/20160604191631_create_products.rb:6
  846. - db/migrate/20160604191631_create_products.rb:7
  847. - db/migrate/20160604191631_create_products.rb:8
  848. - db/migrate/20160604191631_create_products.rb:10
  849. * (IrresponsibleModule) CreateProducts has no descriptive comment
  850. - db/migrate/20160604191631_create_products.rb:1
  851. * (TooManyStatements) CreateProducts#change has approx 7 statements
  852. - db/migrate/20160604191631_create_products.rb:2
  853. * (UncommunicativeVariableName) CreateProducts#change has the variable name 't'
  854. - db/migrate/20160604191631_create_products.rb:3
  855.  
  856. CreateTaskQueues:
  857. Rating: A
  858. Churn: 0
  859. Complexity: 4.71
  860. Duplication: 0
  861. Smells: 3
  862. * (FeatureEnvy) CreateTaskQueues#change refers to 't' more than self (maybe move it to another class?)
  863. - db/migrate/20180718123333_create_task_queues.rb:4
  864. - db/migrate/20180718123333_create_task_queues.rb:5
  865. - db/migrate/20180718123333_create_task_queues.rb:6
  866. * (IrresponsibleModule) CreateTaskQueues has no descriptive comment
  867. - db/migrate/20180718123333_create_task_queues.rb:1
  868. * (UncommunicativeVariableName) CreateTaskQueues#change has the variable name 't'
  869. - db/migrate/20180718123333_create_task_queues.rb:3
  870.  
  871. CreateTokens:
  872. Rating: A
  873. Churn: 0
  874. Complexity: 4.71
  875. Duplication: 0
  876. Smells: 3
  877. * (FeatureEnvy) CreateTokens#change refers to 't' more than self (maybe move it to another class?)
  878. - db/migrate/20180613193346_create_tokens.rb:4
  879. - db/migrate/20180613193346_create_tokens.rb:5
  880. - db/migrate/20180613193346_create_tokens.rb:7
  881. * (IrresponsibleModule) CreateTokens has no descriptive comment
  882. - db/migrate/20180613193346_create_tokens.rb:1
  883. * (UncommunicativeVariableName) CreateTokens#change has the variable name 't'
  884. - db/migrate/20180613193346_create_tokens.rb:3
  885.  
  886. CreateUpgradeItem:
  887. Rating: A
  888. Churn: 0
  889. Complexity: 18.23
  890. Duplication: 0
  891. Smells: 4
  892. * (FeatureEnvy) CreateUpgradeItem#change refers to 't' more than self (maybe move it to another class?)
  893. - db/migrate/20160613223316_create_upgrade_item.rb:4
  894. - db/migrate/20160613223316_create_upgrade_item.rb:5
  895. - db/migrate/20160613223316_create_upgrade_item.rb:6
  896. - db/migrate/20160613223316_create_upgrade_item.rb:7
  897. - db/migrate/20160613223316_create_upgrade_item.rb:8
  898. - db/migrate/20160613223316_create_upgrade_item.rb:9
  899. - db/migrate/20160613223316_create_upgrade_item.rb:10
  900. - db/migrate/20160613223316_create_upgrade_item.rb:11
  901. - db/migrate/20160613223316_create_upgrade_item.rb:12
  902. - db/migrate/20160613223316_create_upgrade_item.rb:13
  903. - db/migrate/20160613223316_create_upgrade_item.rb:14
  904. - db/migrate/20160613223316_create_upgrade_item.rb:15
  905. * (IrresponsibleModule) CreateUpgradeItem has no descriptive comment
  906. - db/migrate/20160613223316_create_upgrade_item.rb:1
  907. * (TooManyStatements) CreateUpgradeItem#change has approx 13 statements
  908. - db/migrate/20160613223316_create_upgrade_item.rb:2
  909. * (UncommunicativeVariableName) CreateUpgradeItem#change has the variable name 't'
  910. - db/migrate/20160613223316_create_upgrade_item.rb:3
  911.  
  912. CreateUpgradeItemGroups:
  913. Rating: A
  914. Churn: 0
  915. Complexity: 7.07
  916. Duplication: 0
  917. Smells: 4
  918. * (FeatureEnvy) CreateUpgradeItemGroups#change refers to 't' more than self (maybe move it to another class?)
  919. - db/migrate/20160629211522_create_upgrade_item_groups.rb:4
  920. - db/migrate/20160629211522_create_upgrade_item_groups.rb:5
  921. - db/migrate/20160629211522_create_upgrade_item_groups.rb:6
  922. - db/migrate/20160629211522_create_upgrade_item_groups.rb:7
  923. - db/migrate/20160629211522_create_upgrade_item_groups.rb:8
  924. * (IrresponsibleModule) CreateUpgradeItemGroups has no descriptive comment
  925. - db/migrate/20160629211522_create_upgrade_item_groups.rb:1
  926. * (TooManyStatements) CreateUpgradeItemGroups#change has approx 6 statements
  927. - db/migrate/20160629211522_create_upgrade_item_groups.rb:2
  928. * (UncommunicativeVariableName) CreateUpgradeItemGroups#change has the variable name 't'
  929. - db/migrate/20160629211522_create_upgrade_item_groups.rb:3
  930.  
  931. CreateUpgrades:
  932. Rating: A
  933. Churn: 0
  934. Complexity: 11.84
  935. Duplication: 0
  936. Smells: 4
  937. * (FeatureEnvy) CreateUpgrades#change refers to 't' more than self (maybe move it to another class?)
  938. - db/migrate/20160605205616_create_upgrades.rb:4
  939. - db/migrate/20160605205616_create_upgrades.rb:5
  940. - db/migrate/20160605205616_create_upgrades.rb:6
  941. - db/migrate/20160605205616_create_upgrades.rb:7
  942. - db/migrate/20160605205616_create_upgrades.rb:8
  943. - db/migrate/20160605205616_create_upgrades.rb:9
  944. - db/migrate/20160605205616_create_upgrades.rb:10
  945. - db/migrate/20160605205616_create_upgrades.rb:11
  946. - db/migrate/20160605205616_create_upgrades.rb:13
  947. * (IrresponsibleModule) CreateUpgrades has no descriptive comment
  948. - db/migrate/20160605205616_create_upgrades.rb:1
  949. * (TooManyStatements) CreateUpgrades#change has approx 10 statements
  950. - db/migrate/20160605205616_create_upgrades.rb:2
  951. * (UncommunicativeVariableName) CreateUpgrades#change has the variable name 't'
  952. - db/migrate/20160605205616_create_upgrades.rb:3
  953.  
  954. CreditInvoiceUbersmithService:
  955. Rating: A
  956. Churn: 0
  957. Complexity: 19.93
  958. Duplication: 0
  959. Smells: 3
  960. * (IrresponsibleModule) CreditInvoiceUbersmithService has no descriptive comment
  961. - app/services/credit_invoice_ubersmith_service.rb:1
  962. * (UncommunicativeVariableName) CreditInvoiceUbersmithService#call has the variable name 'e'
  963. - app/services/credit_invoice_ubersmith_service.rb:9
  964. * (UtilityFunction) CreditInvoiceUbersmithService#filters doesn't depend on instance state (maybe move it to another class?)
  965. - app/services/credit_invoice_ubersmith_service.rb:17
  966.  
  967. CurrentUser::Token:
  968. Rating: A
  969. Churn: 0
  970. Complexity: 2.49
  971. Duplication: 0
  972. Smells: 2
  973. * (ControlParameter) CurrentUser::Token#initialize is controlled by argument 'created_at'
  974. - app/adapters/current_user/token.rb:7
  975. * (IrresponsibleModule) CurrentUser::Token has no descriptive comment
  976. - app/adapters/current_user/token.rb:2
  977.  
  978. Development:
  979. Rating: A
  980. Churn: 0
  981. Complexity: 0.0
  982. Duplication: 0
  983. Smells: 0
  984.  
  985. DevelopmentMailer:
  986. Rating: A
  987. Churn: 0
  988. Complexity: 2.2
  989. Duplication: 0
  990. Smells: 3
  991. * (IrresponsibleModule) DevelopmentMailer has no descriptive comment
  992. - app/mailers/development_mailer.rb:1
  993. * (LongParameterList) DevelopmentMailer#send_welcome_email has 4 parameters
  994. - app/mailers/development_mailer.rb:2
  995. * (UnusedParameters) DevelopmentMailer#send_welcome_email has unused parameter 'brand_id'
  996. - app/mailers/development_mailer.rb:2
  997.  
  998. DeviseCreateUsers:
  999. Rating: A
  1000. Churn: 0
  1001. Complexity: 16.23
  1002. Duplication: 0
  1003. Smells: 4
  1004. * (FeatureEnvy) DeviseCreateUsers#change refers to 't' more than self (maybe move it to another class?)
  1005. - db/migrate/20161026133150_devise_create_users.rb:5
  1006. - db/migrate/20161026133150_devise_create_users.rb:6
  1007. - db/migrate/20161026133150_devise_create_users.rb:9
  1008. - db/migrate/20161026133150_devise_create_users.rb:10
  1009. - db/migrate/20161026133150_devise_create_users.rb:13
  1010. - db/migrate/20161026133150_devise_create_users.rb:16
  1011. - db/migrate/20161026133150_devise_create_users.rb:17
  1012. - db/migrate/20161026133150_devise_create_users.rb:18
  1013. - db/migrate/20161026133150_devise_create_users.rb:19
  1014. - db/migrate/20161026133150_devise_create_users.rb:20
  1015. - db/migrate/20161026133150_devise_create_users.rb:34
  1016. * (IrresponsibleModule) DeviseCreateUsers has no descriptive comment
  1017. - db/migrate/20161026133150_devise_create_users.rb:1
  1018. * (TooManyStatements) DeviseCreateUsers#change has approx 14 statements
  1019. - db/migrate/20161026133150_devise_create_users.rb:2
  1020. * (UncommunicativeVariableName) DeviseCreateUsers#change has the variable name 't'
  1021. - db/migrate/20161026133150_devise_create_users.rb:3
  1022.  
  1023. DeviseUpdateUsers:
  1024. Rating: A
  1025. Churn: 0
  1026. Complexity: 1.0
  1027. Duplication: 0
  1028. Smells: 1
  1029. * (IrresponsibleModule) DeviseUpdateUsers has no descriptive comment
  1030. - db/migrate/20161110220433_devise_update_users.rb:1
  1031.  
  1032. Edit.html.erbSpec:
  1033. Rating: A
  1034. Churn: 0
  1035. Complexity: 17.98
  1036. Duplication: 0
  1037. Smells: 0
  1038.  
  1039. Edit.html.erbSpec:
  1040. Rating: A
  1041. Churn: 0
  1042. Complexity: 1.9
  1043. Duplication: 0
  1044. Smells: 0
  1045.  
  1046. Edit.html.erbSpec:
  1047. Rating: A
  1048. Churn: 0
  1049. Complexity: 23.9
  1050. Duplication: 0
  1051. Smells: 0
  1052.  
  1053. EmailHelper:
  1054. Rating: A
  1055. Churn: 0
  1056. Complexity: 16.15
  1057. Duplication: 0
  1058. Smells: 5
  1059. * (DuplicateMethodCall) EmailHelper#send_welcome_email calls 'Rails.env' 2 times
  1060. - app/helpers/email_helper.rb:3
  1061. * (DuplicateMethodCall) EmailHelper#send_welcome_email calls 'email.downcase' 2 times
  1062. - app/helpers/email_helper.rb:10
  1063. - app/helpers/email_helper.rb:14
  1064. * (IrresponsibleModule) EmailHelper has no descriptive comment
  1065. - app/helpers/email_helper.rb:1
  1066. * (LongParameterList) EmailHelper#send_welcome_email has 4 parameters
  1067. - app/helpers/email_helper.rb:2
  1068. * (UtilityFunction) EmailHelper#send_welcome_email doesn't depend on instance state (maybe move it to another class?)
  1069. - app/helpers/email_helper.rb:2
  1070.  
  1071. Environment:
  1072. Rating: A
  1073. Churn: 0
  1074. Complexity: 0.0
  1075. Duplication: 0
  1076. Smells: 0
  1077.  
  1078. ErrorHelper:
  1079. Rating: A
  1080. Churn: 0
  1081. Complexity: 28.77
  1082. Duplication: 0
  1083. Smells: 2
  1084. * (IrresponsibleModule) ErrorHelper has no descriptive comment
  1085. - app/helpers/error_helper.rb:1
  1086. * (TooManyStatements) ErrorHelper#process_error has approx 6 statements
  1087. - app/helpers/error_helper.rb:3
  1088.  
  1089. Errors:
  1090. Rating: A
  1091. Churn: 0
  1092. Complexity: 0.0
  1093. Duplication: 0
  1094. Smells: 0
  1095.  
  1096. ErrorsController:
  1097. Rating: A
  1098. Churn: 0
  1099. Complexity: 10.35
  1100. Duplication: 0
  1101. Smells: 1
  1102. * (IrresponsibleModule) ErrorsController has no descriptive comment
  1103. - app/controllers/errors_controller.rb:1
  1104.  
  1105. Extconf:
  1106. Rating: A
  1107. Churn: 0
  1108. Complexity: 0.0
  1109. Duplication: 0
  1110. Smells: 0
  1111.  
  1112. FastGettext:
  1113. Rating: A
  1114. Churn: 0
  1115. Complexity: 0.0
  1116. Duplication: 0
  1117. Smells: 0
  1118.  
  1119. FeedbackWidgetController:
  1120. Rating: A
  1121. Churn: 0
  1122. Complexity: 30.53
  1123. Duplication: 0
  1124. Smells: 3
  1125. * (DuplicateMethodCall) FeedbackWidgetController#email_body calls 'current_user.email' 2 times
  1126. - app/controllers/feedback_widget_controller.rb:26
  1127. - app/controllers/feedback_widget_controller.rb:27
  1128. * (DuplicateMethodCall) FeedbackWidgetController#email_body calls 'params[:page_feedback]' 2 times
  1129. - app/controllers/feedback_widget_controller.rb:28
  1130. - app/controllers/feedback_widget_controller.rb:29
  1131. * (IrresponsibleModule) FeedbackWidgetController has no descriptive comment
  1132. - app/controllers/feedback_widget_controller.rb:3
  1133.  
  1134. FilterParameterLogging:
  1135. Rating: A
  1136. Churn: 0
  1137. Complexity: 0.0
  1138. Duplication: 0
  1139. Smells: 0
  1140.  
  1141. FlashesHelper:
  1142. Rating: A
  1143. Churn: 0
  1144. Complexity: 3.6
  1145. Duplication: 0
  1146. Smells: 1
  1147. * (IrresponsibleModule) FlashesHelper has no descriptive comment
  1148. - app/helpers/flashes_helper.rb:1
  1149.  
  1150. FormFieldComponent:
  1151. Rating: A
  1152. Churn: 0
  1153. Complexity: 0.0
  1154. Duplication: 0
  1155. Smells: 1
  1156. * (IrresponsibleModule) FormFieldComponent has no descriptive comment
  1157. - frontend/components/form/field/form_field_component.rb:3
  1158.  
  1159. GridComponent:
  1160. Rating: A
  1161. Churn: 0
  1162. Complexity: 3.4
  1163. Duplication: 0
  1164. Smells: 1
  1165. * (IrresponsibleModule) GridComponent has no descriptive comment
  1166. - frontend/components/grid/grid_component.rb:3
  1167.  
  1168. GridItemComponent:
  1169. Rating: A
  1170. Churn: 0
  1171. Complexity: 3.4
  1172. Duplication: 0
  1173. Smells: 1
  1174. * (IrresponsibleModule) GridItemComponent has no descriptive comment
  1175. - frontend/components/grid/item/grid_item_component.rb:3
  1176.  
  1177. HelpController:
  1178. Rating: A
  1179. Churn: 0
  1180. Complexity: 2.24
  1181. Duplication: 0
  1182. Smells: 2
  1183. * (InstanceVariableAssumption) HelpController assumes too much for instance variable '@title'
  1184. - app/controllers/help_controller.rb:1
  1185. * (IrresponsibleModule) HelpController has no descriptive comment
  1186. - app/controllers/help_controller.rb:1
  1187.  
  1188. HelpControllerSpec:
  1189. Rating: A
  1190. Churn: 0
  1191. Complexity: 0.0
  1192. Duplication: 0
  1193. Smells: 0
  1194.  
  1195. I18n::Config:
  1196. Rating: A
  1197. Churn: 0
  1198. Complexity: 4.99
  1199. Duplication: 0
  1200. Smells: 3
  1201. * (IrresponsibleModule) I18n::Base has no descriptive comment
  1202. - lib/modules/i18n.rb:9
  1203. * (IrresponsibleModule) I18n::Config has no descriptive comment
  1204. - lib/modules/i18n.rb:3
  1205. * (UtilityFunction) I18n::Config#locale doesn't depend on instance state (maybe move it to another class?)
  1206. - lib/modules/i18n.rb:4
  1207.  
  1208. I18nHelper:
  1209. Rating: A
  1210. Churn: 0
  1211. Complexity: 3.35
  1212. Duplication: 0
  1213. Smells: 2
  1214. * (IrresponsibleModule) I18nHelper has no descriptive comment
  1215. - app/helpers/i18n_helper.rb:1
  1216. * (UtilityFunction) I18nHelper#error doesn't depend on instance state (maybe move it to another class?)
  1217. - app/helpers/i18n_helper.rb:2
  1218.  
  1219. IconComponent:
  1220. Rating: A
  1221. Churn: 0
  1222. Complexity: 6.94
  1223. Duplication: 0
  1224. Smells: 1
  1225. * (IrresponsibleModule) IconComponent has no descriptive comment
  1226. - frontend/components/icon/icon_component.rb:3
  1227.  
  1228. IncidentPresenter:
  1229. Rating: A
  1230. Churn: 0
  1231. Complexity: 25.73
  1232. Duplication: 0
  1233. Smells: 4
  1234. * (IrresponsibleModule) IncidentPresenter has no descriptive comment
  1235. - app/presenters/incident_presenter.rb:1
  1236. * (TooManyStatements) IncidentPresenter#self.retrieve_incidents has approx 8 statements
  1237. - app/presenters/incident_presenter.rb:6
  1238. * (UncommunicativeVariableName) IncidentPresenter#self.last_incident has the variable name 'k'
  1239. - app/presenters/incident_presenter.rb:26
  1240. * (UncommunicativeVariableName) IncidentPresenter#self.last_incident has the variable name 'v'
  1241. - app/presenters/incident_presenter.rb:26
  1242.  
  1243. Index.html.erbSpec:
  1244. Rating: A
  1245. Churn: 0
  1246. Complexity: 7.4
  1247. Duplication: 0
  1248. Smells: 0
  1249.  
  1250. Inflections:
  1251. Rating: A
  1252. Churn: 0
  1253. Complexity: 0.0
  1254. Duplication: 0
  1255. Smells: 0
  1256.  
  1257. InvoicePresenter:
  1258. Rating: A
  1259. Churn: 0
  1260. Complexity: 49.92
  1261. Duplication: 0
  1262. Smells: 3
  1263. * (HighComplexity) InvoicePresenter#label has a flog score of 36
  1264. - app/presenters/invoice_presenter.rb:10
  1265. * (DuplicateMethodCall) InvoicePresenter#label calls 'invoice['amount_unpaid']' 2 times
  1266. - app/presenters/invoice_presenter.rb:13
  1267. - app/presenters/invoice_presenter.rb:16
  1268. * (IrresponsibleModule) InvoicePresenter has no descriptive comment
  1269. - app/presenters/invoice_presenter.rb:1
  1270.  
  1271. InvoicesRoutingSpec:
  1272. Rating: A
  1273. Churn: 0
  1274. Complexity: 0.0
  1275. Duplication: 0
  1276. Smells: 0
  1277.  
  1278. IpsController:
  1279. Rating: A
  1280. Churn: 0
  1281. Complexity: 2.24
  1282. Duplication: 0
  1283. Smells: 2
  1284. * (InstanceVariableAssumption) IpsController assumes too much for instance variable '@title'
  1285. - app/controllers/ips_controller.rb:1
  1286. * (IrresponsibleModule) IpsController has no descriptive comment
  1287. - app/controllers/ips_controller.rb:1
  1288.  
  1289. JsonEncoding:
  1290. Rating: A
  1291. Churn: 0
  1292. Complexity: 0.0
  1293. Duplication: 0
  1294. Smells: 0
  1295.  
  1296. JsonResponseHelper:
  1297. Rating: A
  1298. Churn: 0
  1299. Complexity: 1.0
  1300. Duplication: 0
  1301. Smells: 1
  1302. * (IrresponsibleModule) JsonResponseHelper has no descriptive comment
  1303. - app/helpers/json_response_helper.rb:1
  1304.  
  1305. Komponent:
  1306. Rating: A
  1307. Churn: 0
  1308. Complexity: 0.0
  1309. Duplication: 0
  1310. Smells: 0
  1311.  
  1312. ListHorizontalComponent:
  1313. Rating: A
  1314. Churn: 0
  1315. Complexity: 3.4
  1316. Duplication: 0
  1317. Smells: 1
  1318. * (IrresponsibleModule) ListHorizontalComponent has no descriptive comment
  1319. - frontend/components/list/horizontal/list_horizontal_component.rb:3
  1320.  
  1321. ListPropertiesComponent:
  1322. Rating: A
  1323. Churn: 0
  1324. Complexity: 0.0
  1325. Duplication: 0
  1326. Smells: 1
  1327. * (IrresponsibleModule) ListPropertiesComponent has no descriptive comment
  1328. - frontend/components/list/properties/list_properties_component.rb:3
  1329.  
  1330. ListVerticalComponent:
  1331. Rating: A
  1332. Churn: 0
  1333. Complexity: 3.4
  1334. Duplication: 0
  1335. Smells: 1
  1336. * (IrresponsibleModule) ListVerticalComponent has no descriptive comment
  1337. - frontend/components/list/vertical/list_vertical_component.rb:3
  1338.  
  1339. MaasProvisionJob:
  1340. Rating: A
  1341. Churn: 0
  1342. Complexity: 1.0
  1343. Duplication: 0
  1344. Smells: 2
  1345. * (IrresponsibleModule) MaasProvisionJob has no descriptive comment
  1346. - app/jobs/maas_provision_job.rb:1
  1347. * (UtilityFunction) MaasProvisionJob#perform doesn't depend on instance state (maybe move it to another class?)
  1348. - app/jobs/maas_provision_job.rb:4
  1349.  
  1350. MaxihostApi::Account:
  1351. Rating: A
  1352. Churn: 0
  1353. Complexity: 0.0
  1354. Duplication: 0
  1355. Smells: 1
  1356. * (IrresponsibleModule) MaxihostApi::Account has no descriptive comment
  1357. - app/models/maxihost_api/account.rb:2
  1358.  
  1359. MaxihostApi::Account::Key:
  1360. Rating: A
  1361. Churn: 0
  1362. Complexity: 0.0
  1363. Duplication: 0
  1364. Smells: 1
  1365. * (IrresponsibleModule) MaxihostApi::Account::Key has no descriptive comment
  1366. - app/models/maxihost_api/account/key.rb:3
  1367.  
  1368. MaxihostApi::Auth::Token:
  1369. Rating: A
  1370. Churn: 0
  1371. Complexity: 16.44
  1372. Duplication: 0
  1373. Smells: 4
  1374. * (InstanceVariableAssumption) MaxihostApi::Auth::Token assumes too much for instance variable '@login'
  1375. - app/models/maxihost_api/auth/token.rb:3
  1376. * (IrresponsibleModule) MaxihostApi::Auth::Token has no descriptive comment
  1377. - app/models/maxihost_api/auth/token.rb:3
  1378. * (MissingSafeMethod) MaxihostApi::Auth::Token has missing safe method 'retrieve!'
  1379. - app/models/maxihost_api/auth/token.rb:15
  1380. * (MissingSafeMethod) MaxihostApi::Auth::Token has missing safe method 'retrieve_for!'
  1381. - app/models/maxihost_api/auth/token.rb:9
  1382.  
  1383. MaxihostApi::Authorised:
  1384. Rating: A
  1385. Churn: 0
  1386. Complexity: 0.0
  1387. Duplication: 0
  1388. Smells: 1
  1389. * (IrresponsibleModule) MaxihostApi::Authorised has no descriptive comment
  1390. - app/models/maxihost_api/authorised.rb:2
  1391.  
  1392. MaxihostApi::Base:
  1393. Rating: A
  1394. Churn: 0
  1395. Complexity: 6.71
  1396. Duplication: 0
  1397. Smells: 1
  1398. * (IrresponsibleModule) MaxihostApi::Base has no descriptive comment
  1399. - app/models/maxihost_api/base.rb:2
  1400.  
  1401. MaxihostApi::Contacts:
  1402. Rating: A
  1403. Churn: 0
  1404. Complexity: 0.0
  1405. Duplication: 0
  1406. Smells: 1
  1407. * (IrresponsibleModule) MaxihostApi::Contacts has no descriptive comment
  1408. - app/models/maxihost_api/contacts.rb:2
  1409.  
  1410. MaxihostApi::Device:
  1411. Rating: A
  1412. Churn: 0
  1413. Complexity: 0.0
  1414. Duplication: 0
  1415. Smells: 1
  1416. * (IrresponsibleModule) MaxihostApi::Device has no descriptive comment
  1417. - app/models/maxihost_api/device.rb:4
  1418.  
  1419. MaxihostApi::Login:
  1420. Rating: A
  1421. Churn: 0
  1422. Complexity: 0.0
  1423. Duplication: 0
  1424. Smells: 1
  1425. * (IrresponsibleModule) MaxihostApi::Login has no descriptive comment
  1426. - app/models/maxihost_api/login.rb:2
  1427.  
  1428. MaxihostApi::OperatingSystem:
  1429. Rating: A
  1430. Churn: 0
  1431. Complexity: 0.0
  1432. Duplication: 0
  1433. Smells: 1
  1434. * (IrresponsibleModule) MaxihostApi::OperatingSystem has no descriptive comment
  1435. - app/models/maxihost_api/operating_system.rb:2
  1436.  
  1437. MaxihostApi::Plan:
  1438. Rating: A
  1439. Churn: 0
  1440. Complexity: 0.0
  1441. Duplication: 0
  1442. Smells: 1
  1443. * (IrresponsibleModule) MaxihostApi::Plan has no descriptive comment
  1444. - app/models/maxihost_api/plan.rb:2
  1445.  
  1446. New.html.erbSpec:
  1447. Rating: A
  1448. Churn: 0
  1449. Complexity: 20.9
  1450. Duplication: 0
  1451. Smells: 0
  1452.  
  1453. PaginationComponent:
  1454. Rating: A
  1455. Churn: 0
  1456. Complexity: 32.4
  1457. Duplication: 0
  1458. Smells: 1
  1459. * (IrresponsibleModule) PaginationComponent has no descriptive comment
  1460. - frontend/components/pagination/pagination_component.rb:3
  1461.  
  1462. ParseAirtableDataService:
  1463. Rating: A
  1464. Churn: 0
  1465. Complexity: 19.18
  1466. Duplication: 0
  1467. Smells: 3
  1468. * (DuplicateMethodCall) ParseAirtableDataService#call calls 'data['fields']' 2 times
  1469. - app/services/parse_airtable_data_service.rb:12
  1470. * (FeatureEnvy) ParseAirtableDataService#call refers to 'data' more than self (maybe move it to another class?)
  1471. - app/services/parse_airtable_data_service.rb:12
  1472. * (IrresponsibleModule) ParseAirtableDataService has no descriptive comment
  1473. - app/services/parse_airtable_data_service.rb:1
  1474.  
  1475. ParseAirtableDataServiceSpec:
  1476. Rating: A
  1477. Churn: 0
  1478. Complexity: 25.65
  1479. Duplication: 0
  1480. Smells: 0
  1481.  
  1482. Puma:
  1483. Rating: A
  1484. Churn: 0
  1485. Complexity: 0.0
  1486. Duplication: 0
  1487. Smells: 0
  1488.  
  1489. RackMiniProfiler:
  1490. Rating: A
  1491. Churn: 0
  1492. Complexity: 0.0
  1493. Duplication: 0
  1494. Smells: 0
  1495.  
  1496. RailsHelper:
  1497. Rating: A
  1498. Churn: 0
  1499. Complexity: 0.0
  1500. Duplication: 0
  1501. Smells: 0
  1502.  
  1503. RedisAdapter:
  1504. Rating: A
  1505. Churn: 0
  1506. Complexity: 1.41
  1507. Duplication: 0
  1508. Smells: 1
  1509. * (IrresponsibleModule) RedisAdapter has no descriptive comment
  1510. - app/adapters/redis_adapter.rb:1
  1511.  
  1512. RegistrationsRoutingSpec:
  1513. Rating: A
  1514. Churn: 0
  1515. Complexity: 0.0
  1516. Duplication: 0
  1517. Smells: 0
  1518.  
  1519. RemoveColumnsFromUsers:
  1520. Rating: A
  1521. Churn: 0
  1522. Complexity: 12.0
  1523. Duplication: 0
  1524. Smells: 2
  1525. * (IrresponsibleModule) RemoveColumnsFromUsers has no descriptive comment
  1526. - db/migrate/20161227031922_remove_columns_from_users.rb:1
  1527. * (TooManyStatements) RemoveColumnsFromUsers#change has approx 12 statements
  1528. - db/migrate/20161227031922_remove_columns_from_users.rb:2
  1529.  
  1530. RemoveDeviceComponents:
  1531. Rating: A
  1532. Churn: 0
  1533. Complexity: 1.0
  1534. Duplication: 0
  1535. Smells: 1
  1536. * (IrresponsibleModule) RemoveDeviceComponents has no descriptive comment
  1537. - db/migrate/20181105161625_remove_device_components.rb:1
  1538.  
  1539. RemovePaymentMethodFromCompanies:
  1540. Rating: A
  1541. Churn: 0
  1542. Complexity: 1.0
  1543. Duplication: 0
  1544. Smells: 1
  1545. * (IrresponsibleModule) RemovePaymentMethodFromCompanies has no descriptive comment
  1546. - db/migrate/20180919175533_remove_payment_method_from_companies.rb:1
  1547.  
  1548. RenameAndRemoveCompanyColumns:
  1549. Rating: A
  1550. Churn: 0
  1551. Complexity: 2.0
  1552. Duplication: 0
  1553. Smells: 1
  1554. * (IrresponsibleModule) RenameAndRemoveCompanyColumns has no descriptive comment
  1555. - db/migrate/20161227035959_rename_and_remove_company_columns.rb:1
  1556.  
  1557. RenameClientIdToCompanyId:
  1558. Rating: A
  1559. Churn: 0
  1560. Complexity: 1.0
  1561. Duplication: 0
  1562. Smells: 1
  1563. * (IrresponsibleModule) RenameClientIdToCompanyId has no descriptive comment
  1564. - db/migrate/20161227035017_rename_client_id_to_company_id.rb:1
  1565.  
  1566. RenameUserRealId:
  1567. Rating: A
  1568. Churn: 0
  1569. Complexity: 1.0
  1570. Duplication: 0
  1571. Smells: 1
  1572. * (IrresponsibleModule) RenameUserRealId has no descriptive comment
  1573. - db/migrate/20161113222051_rename_user_real_id.rb:1
  1574.  
  1575. RootCardComponent:
  1576. Rating: A
  1577. Churn: 0
  1578. Complexity: 3.4
  1579. Duplication: 0
  1580. Smells: 1
  1581. * (IrresponsibleModule) RootCardComponent has no descriptive comment
  1582. - frontend/components/root/card/root_card_component.rb:3
  1583.  
  1584. RootLoaderComponent:
  1585. Rating: A
  1586. Churn: 0
  1587. Complexity: 0.0
  1588. Duplication: 0
  1589. Smells: 1
  1590. * (IrresponsibleModule) RootLoaderComponent has no descriptive comment
  1591. - frontend/components/root/loader/root_loader_component.rb:3
  1592.  
  1593. Routes:
  1594. Rating: A
  1595. Churn: 0
  1596. Complexity: 2.4
  1597. Duplication: 0
  1598. Smells: 0
  1599.  
  1600. SectionContentComponent:
  1601. Rating: A
  1602. Churn: 0
  1603. Complexity: 0.0
  1604. Duplication: 0
  1605. Smells: 1
  1606. * (IrresponsibleModule) SectionContentComponent has no descriptive comment
  1607. - frontend/components/section/content/section_content_component.rb:3
  1608.  
  1609. SectionFooterComponent:
  1610. Rating: A
  1611. Churn: 0
  1612. Complexity: 0.0
  1613. Duplication: 0
  1614. Smells: 1
  1615. * (IrresponsibleModule) SectionFooterComponent has no descriptive comment
  1616. - frontend/components/section/footer/section_footer_component.rb:3
  1617.  
  1618. SectionHeaderComponent:
  1619. Rating: A
  1620. Churn: 0
  1621. Complexity: 3.4
  1622. Duplication: 0
  1623. Smells: 1
  1624. * (IrresponsibleModule) SectionHeaderComponent has no descriptive comment
  1625. - frontend/components/section/header/section_header_component.rb:3
  1626.  
  1627. Seeds:
  1628. Rating: A
  1629. Churn: 0
  1630. Complexity: 0.0
  1631. Duplication: 0
  1632. Smells: 0
  1633.  
  1634. ServersAccessPresenter:
  1635. Rating: A
  1636. Churn: 0
  1637. Complexity: 18.25
  1638. Duplication: 0
  1639. Smells: 3
  1640. * (DuplicateMethodCall) ServersAccessPresenter#self.parse_message calls 'access_values[0]' 2 times
  1641. - app/presenters/servers_access_presenter.rb:17
  1642. - app/presenters/servers_access_presenter.rb:20
  1643. * (IrresponsibleModule) ServersAccessPresenter has no descriptive comment
  1644. - app/presenters/servers_access_presenter.rb:1
  1645. * (TooManyStatements) ServersAccessPresenter#self.parse_message has approx 6 statements
  1646. - app/presenters/servers_access_presenter.rb:16
  1647.  
  1648. ServersAccessPresenterSpec:
  1649. Rating: A
  1650. Churn: 0
  1651. Complexity: 49.8
  1652. Duplication: 0
  1653. Smells: 0
  1654.  
  1655. ServersControllerSpec:
  1656. Rating: A
  1657. Churn: 0
  1658. Complexity: 0.0
  1659. Duplication: 0
  1660. Smells: 0
  1661.  
  1662. ServiceHelper:
  1663. Rating: A
  1664. Churn: 0
  1665. Complexity: 35.36
  1666. Duplication: 0
  1667. Smells: 5
  1668. * (ControlParameter) ServiceHelper#get_status is controlled by argument 'service_status'
  1669. - app/helpers/service_helper.rb:20
  1670. * (DuplicateMethodCall) ServiceHelper#service_discount calls '@service['discount']' 2 times
  1671. - app/helpers/service_helper.rb:39
  1672. - app/helpers/service_helper.rb:41
  1673. * (DuplicateMethodCall) ServiceHelper#service_discount calls '@service['discount_type']' 2 times
  1674. - app/helpers/service_helper.rb:38
  1675. - app/helpers/service_helper.rb:40
  1676. * (IrresponsibleModule) ServiceHelper has no descriptive comment
  1677. - app/helpers/service_helper.rb:1
  1678. * (TooManyStatements) ServiceHelper#get_status has approx 6 statements
  1679. - app/helpers/service_helper.rb:19
  1680.  
  1681. SessionsController:
  1682. Rating: A
  1683. Churn: 0
  1684. Complexity: 1.0
  1685. Duplication: 0
  1686. Smells: 1
  1687. * (IrresponsibleModule) SessionsController has no descriptive comment
  1688. - app/controllers/sessions_controller.rb:1
  1689.  
  1690. ShouldaMatchersHelper:
  1691. Rating: A
  1692. Churn: 0
  1693. Complexity: 0.0
  1694. Duplication: 0
  1695. Smells: 0
  1696.  
  1697. Show.html.erbSpec:
  1698. Rating: A
  1699. Churn: 0
  1700. Complexity: 0.0
  1701. Duplication: 0
  1702. Smells: 0
  1703.  
  1704. SidenavComponent:
  1705. Rating: A
  1706. Churn: 0
  1707. Complexity: 0.0
  1708. Duplication: 0
  1709. Smells: 1
  1710. * (IrresponsibleModule) SidenavComponent has no descriptive comment
  1711. - frontend/components/sidenav/sidenav_component.rb:3
  1712.  
  1713. SidenavNavigationComponent:
  1714. Rating: A
  1715. Churn: 0
  1716. Complexity: 27.47
  1717. Duplication: 0
  1718. Smells: 3
  1719. * (ControlParameter) SidenavNavigationComponent#primary_current_class? is controlled by argument 'path'
  1720. - frontend/components/sidenav/navigation/sidenav_navigation_component.rb:32
  1721. * (ControlParameter) SidenavNavigationComponent#secondary_current_class? is controlled by argument 'path'
  1722. - frontend/components/sidenav/navigation/sidenav_navigation_component.rb:36
  1723. * (IrresponsibleModule) SidenavNavigationComponent has no descriptive comment
  1724. - frontend/components/sidenav/navigation/sidenav_navigation_component.rb:3
  1725.  
  1726. SidenavThumbComponent:
  1727. Rating: A
  1728. Churn: 0
  1729. Complexity: 0.0
  1730. Duplication: 0
  1731. Smells: 1
  1732. * (IrresponsibleModule) SidenavThumbComponent has no descriptive comment
  1733. - frontend/components/sidenav/thumb/sidenav_thumb_component.rb:3
  1734.  
  1735. SimpleForm:
  1736. Rating: A
  1737. Churn: 0
  1738. Complexity: 0.0
  1739. Duplication: 0
  1740. Smells: 0
  1741.  
  1742. Smtp:
  1743. Rating: A
  1744. Churn: 0
  1745. Complexity: 0.0
  1746. Duplication: 0
  1747. Smells: 0
  1748.  
  1749. SpecHelper:
  1750. Rating: A
  1751. Churn: 0
  1752. Complexity: 0.0
  1753. Duplication: 0
  1754. Smells: 0
  1755.  
  1756. Spring:
  1757. Rating: A
  1758. Churn: 0
  1759. Complexity: 0.0
  1760. Duplication: 0
  1761. Smells: 0
  1762.  
  1763. Status::Incident:
  1764. Rating: A
  1765. Churn: 0
  1766. Complexity: 1.0
  1767. Duplication: 0
  1768. Smells: 2
  1769. * (IrresponsibleModule) Status::Incident has no descriptive comment
  1770. - app/models/status/incident.rb:2
  1771. * (UnusedParameters) Status::Incident#self.default_message has unused parameter 'args'
  1772. - app/models/status/incident.rb:7
  1773.  
  1774. Status::ScheduledMaintenance:
  1775. Rating: A
  1776. Churn: 0
  1777. Complexity: 13.74
  1778. Duplication: 0
  1779. Smells: 2
  1780. * (IrresponsibleModule) Status::ScheduledMaintenance has no descriptive comment
  1781. - app/models/status/scheduled_maintenance.rb:2
  1782. * (TooManyStatements) Status::ScheduledMaintenance#self.default_message has approx 8 statements
  1783. - app/models/status/scheduled_maintenance.rb:7
  1784.  
  1785. StatusCode:
  1786. Rating: A
  1787. Churn: 0
  1788. Complexity: 0.0
  1789. Duplication: 0
  1790. Smells: 1
  1791. * (TooManyConstants) StatusCode has 10 constants
  1792. - lib/modules/status_code.rb:1
  1793.  
  1794. TableBodyComponent:
  1795. Rating: A
  1796. Churn: 0
  1797. Complexity: 0.0
  1798. Duplication: 0
  1799. Smells: 1
  1800. * (IrresponsibleModule) TableBodyComponent has no descriptive comment
  1801. - frontend/components/table/body/table_body_component.rb:3
  1802.  
  1803. TableCellComponent:
  1804. Rating: A
  1805. Churn: 0
  1806. Complexity: 0.0
  1807. Duplication: 0
  1808. Smells: 1
  1809. * (IrresponsibleModule) TableCellComponent has no descriptive comment
  1810. - frontend/components/table/cell/table_cell_component.rb:3
  1811.  
  1812. TableComponent:
  1813. Rating: A
  1814. Churn: 0
  1815. Complexity: 0.0
  1816. Duplication: 0
  1817. Smells: 1
  1818. * (IrresponsibleModule) TableComponent has no descriptive comment
  1819. - frontend/components/table/table_component.rb:3
  1820.  
  1821. TableHeadComponent:
  1822. Rating: A
  1823. Churn: 0
  1824. Complexity: 0.0
  1825. Duplication: 0
  1826. Smells: 1
  1827. * (IrresponsibleModule) TableHeadComponent has no descriptive comment
  1828. - frontend/components/table/head/table_head_component.rb:3
  1829.  
  1830. TableRowComponent:
  1831. Rating: A
  1832. Churn: 0
  1833. Complexity: 0.0
  1834. Duplication: 0
  1835. Smells: 1
  1836. * (IrresponsibleModule) TableRowComponent has no descriptive comment
  1837. - frontend/components/table/row/table_row_component.rb:3
  1838.  
  1839. TableTextCellComponent:
  1840. Rating: A
  1841. Churn: 0
  1842. Complexity: 0.0
  1843. Duplication: 0
  1844. Smells: 1
  1845. * (IrresponsibleModule) TableTextCellComponent has no descriptive comment
  1846. - frontend/components/table/text_cell/table_text_cell_component.rb:3
  1847.  
  1848. TableTextHeaderCellComponent:
  1849. Rating: A
  1850. Churn: 0
  1851. Complexity: 0.0
  1852. Duplication: 0
  1853. Smells: 1
  1854. * (IrresponsibleModule) TableTextHeaderCellComponent has no descriptive comment
  1855. - frontend/components/table/text_header_cell/table_text_header_cell_component.rb:3
  1856.  
  1857. TableTextSubCellComponent:
  1858. Rating: A
  1859. Churn: 0
  1860. Complexity: 0.0
  1861. Duplication: 0
  1862. Smells: 1
  1863. * (IrresponsibleModule) TableTextSubCellComponent has no descriptive comment
  1864. - frontend/components/table/text_sub_cell/table_text_sub_cell_component.rb:3
  1865.  
  1866. TabsComponent:
  1867. Rating: A
  1868. Churn: 0
  1869. Complexity: 0.0
  1870. Duplication: 0
  1871. Smells: 1
  1872. * (IrresponsibleModule) TabsComponent has no descriptive comment
  1873. - frontend/components/tabs/tabs_component.rb:3
  1874.  
  1875. TabsTabComponent:
  1876. Rating: A
  1877. Churn: 0
  1878. Complexity: 5.0
  1879. Duplication: 0
  1880. Smells: 1
  1881. * (IrresponsibleModule) TabsTabComponent has no descriptive comment
  1882. - frontend/components/tabs/tab/tabs_tab_component.rb:3
  1883.  
  1884. TaskMailer:
  1885. Rating: A
  1886. Churn: 0
  1887. Complexity: 35.41
  1888. Duplication: 0
  1889. Smells: 6
  1890. * (HighComplexity) TaskMailer::send has a flog score of 31
  1891. - lib/task_helpers/mailer.rb:17
  1892. * (DuplicateMethodCall) TaskMailer#self.send calls 'Rails.env' 2 times
  1893. - lib/task_helpers/mailer.rb:18
  1894. * (DuplicateMethodCall) TaskMailer#self.send calls 'params.has_key?(:body)' 2 times
  1895. - lib/task_helpers/mailer.rb:20
  1896. - lib/task_helpers/mailer.rb:25
  1897. * (IrresponsibleModule) TaskMailer has no descriptive comment
  1898. - lib/task_helpers/mailer.rb:1
  1899. * (LongParameterList) TaskMailer#self.send_generic_email has 4 parameters
  1900. - lib/task_helpers/mailer.rb:4
  1901. * (TooManyStatements) TaskMailer#self.send has approx 9 statements
  1902. - lib/task_helpers/mailer.rb:17
  1903.  
  1904. TaskQueue:
  1905. Rating: A
  1906. Churn: 0
  1907. Complexity: 22.0
  1908. Duplication: 0
  1909. Smells: 4
  1910. * (IrresponsibleModule) TaskQueue has no descriptive comment
  1911. - app/models/task_queue.rb:1
  1912. * (NestedIterators) TaskQueue#self.validate contains iterators nested 2 deep
  1913. - app/models/task_queue.rb:43
  1914. * (NilCheck) TaskQueue#self.validate performs a nil-check
  1915. - app/models/task_queue.rb:43
  1916. * (TooManyStatements) TaskQueue#self.add_to_maas_reinstall has approx 6 statements
  1917. - app/models/task_queue.rb:22
  1918.  
  1919. TechnicalVisit:
  1920. Rating: A
  1921. Churn: 0
  1922. Complexity: 0.0
  1923. Duplication: 0
  1924. Smells: 1
  1925. * (IrresponsibleModule) TechnicalVisit has no descriptive comment
  1926. - app/models/technical_visit.rb:1
  1927.  
  1928. Test:
  1929. Rating: A
  1930. Churn: 0
  1931. Complexity: 0.0
  1932. Duplication: 0
  1933. Smells: 0
  1934.  
  1935. TextClickToCopyComponent:
  1936. Rating: A
  1937. Churn: 0
  1938. Complexity: 0.0
  1939. Duplication: 0
  1940. Smells: 1
  1941. * (IrresponsibleModule) TextClickToCopyComponent has no descriptive comment
  1942. - frontend/components/text/click_to_copy/text_click_to_copy_component.rb:3
  1943.  
  1944. TextSpanComponent:
  1945. Rating: A
  1946. Churn: 0
  1947. Complexity: 3.4
  1948. Duplication: 0
  1949. Smells: 1
  1950. * (IrresponsibleModule) TextSpanComponent has no descriptive comment
  1951. - frontend/components/text/span/text_span_component.rb:3
  1952.  
  1953. Token:
  1954. Rating: A
  1955. Churn: 0
  1956. Complexity: 0.0
  1957. Duplication: 0
  1958. Smells: 1
  1959. * (IrresponsibleModule) Token has no descriptive comment
  1960. - app/models/token.rb:1
  1961.  
  1962. TokenController:
  1963. Rating: A
  1964. Churn: 0
  1965. Complexity: 11.39
  1966. Duplication: 0
  1967. Smells: 2
  1968. * (InstanceVariableAssumption) TokenController assumes too much for instance variable '@title'
  1969. - app/controllers/token_controller.rb:1
  1970. * (IrresponsibleModule) TokenController has no descriptive comment
  1971. - app/controllers/token_controller.rb:1
  1972.  
  1973. Tokens:
  1974. Rating: A
  1975. Churn: 0
  1976. Complexity: 8.62
  1977. Duplication: 0
  1978. Smells: 0
  1979.  
  1980. TopcontentComponent:
  1981. Rating: A
  1982. Churn: 0
  1983. Complexity: 0.0
  1984. Duplication: 0
  1985. Smells: 1
  1986. * (IrresponsibleModule) TopcontentComponent has no descriptive comment
  1987. - frontend/components/topcontent/topcontent_component.rb:3
  1988.  
  1989. UpdateCompanyDataJob:
  1990. Rating: A
  1991. Churn: 0
  1992. Complexity: 19.74
  1993. Duplication: 0
  1994. Smells: 7
  1995. * (DuplicateMethodCall) UpdateCompanyDataJob#perform calls 'api.client' 2 times
  1996. - app/jobs/update_company_data_job.rb:6
  1997. - app/jobs/update_company_data_job.rb:20
  1998. * (FeatureEnvy) UpdateCompanyDataJob#perform refers to 'active_client' more than self (maybe move it to another class?)
  1999. - app/jobs/update_company_data_job.rb:7
  2000. * (FeatureEnvy) UpdateCompanyDataJob#perform refers to 'api' more than self (maybe move it to another class?)
  2001. - app/jobs/update_company_data_job.rb:6
  2002. - app/jobs/update_company_data_job.rb:20
  2003. * (FeatureEnvy) UpdateCompanyDataJob#perform refers to 'update_result' more than self (maybe move it to another class?)
  2004. - app/jobs/update_company_data_job.rb:22
  2005. - app/jobs/update_company_data_job.rb:23
  2006. * (IrresponsibleModule) UpdateCompanyDataJob has no descriptive comment
  2007. - app/jobs/update_company_data_job.rb:1
  2008. * (LongParameterList) UpdateCompanyDataJob#perform has 9 parameters
  2009. - app/jobs/update_company_data_job.rb:4
  2010. * (TooManyStatements) UpdateCompanyDataJob#perform has approx 6 statements
  2011. - app/jobs/update_company_data_job.rb:4
  2012.  
  2013. UpdateStatusService:
  2014. Rating: A
  2015. Churn: 0
  2016. Complexity: 45.77
  2017. Duplication: 0
  2018. Smells: 3
  2019. * (FeatureEnvy) UpdateStatusService#body refers to 'payload' more than self (maybe move it to another class?)
  2020. - app/services/update_status_service.rb:27
  2021. - app/services/update_status_service.rb:30
  2022. - app/services/update_status_service.rb:31
  2023. - app/services/update_status_service.rb:32
  2024. - app/services/update_status_service.rb:33
  2025. * (IrresponsibleModule) UpdateStatusService has no descriptive comment
  2026. - app/services/update_status_service.rb:1
  2027. * (UtilityFunction) UpdateStatusService#last_update doesn't depend on instance state (maybe move it to another class?)
  2028. - app/services/update_status_service.rb:37
  2029.  
  2030. UpdateUserDataJob:
  2031. Rating: A
  2032. Churn: 0
  2033. Complexity: 12.31
  2034. Duplication: 0
  2035. Smells: 5
  2036. * (ControlParameter) UpdateUserDataJob#perform is controlled by argument 'lang'
  2037. - app/jobs/update_user_data_job.rb:7
  2038. * (DuplicateMethodCall) UpdateUserDataJob#perform calls 'api.client' 2 times
  2039. - app/jobs/update_user_data_job.rb:12
  2040. - app/jobs/update_user_data_job.rb:22
  2041. * (IrresponsibleModule) UpdateUserDataJob has no descriptive comment
  2042. - app/jobs/update_user_data_job.rb:1
  2043. * (LongParameterList) UpdateUserDataJob#perform has 5 parameters
  2044. - app/jobs/update_user_data_job.rb:4
  2045. * (UtilityFunction) UpdateUserDataJob#perform doesn't depend on instance state (maybe move it to another class?)
  2046. - app/jobs/update_user_data_job.rb:4
  2047.  
  2048. User:
  2049. Rating: A
  2050. Churn: 0
  2051. Complexity: 0.0
  2052. Duplication: 0
  2053. Smells: 1
  2054. * (IrresponsibleModule) User has no descriptive comment
  2055. - app/models/user.rb:1
  2056.  
  2057. Users:
  2058. Rating: A
  2059. Churn: 0
  2060. Complexity: 8.51
  2061. Duplication: 0
  2062. Smells: 0
  2063.  
  2064. WebhooksController:
  2065. Rating: A
  2066. Churn: 0
  2067. Complexity: 45.09
  2068. Duplication: 0
  2069. Smells: 5
  2070. * (HighComplexity) WebhooksController#order_automation has a flog score of 45
  2071. - app/controllers/webhooks_controller.rb:5
  2072. * (DuplicateMethodCall) WebhooksController#order_automation calls 'params[:order_action_id]' 2 times
  2073. - app/controllers/webhooks_controller.rb:8
  2074. * (DuplicateMethodCall) WebhooksController#order_automation calls 'params[:order_id]' 2 times
  2075. - app/controllers/webhooks_controller.rb:6
  2076. - app/controllers/webhooks_controller.rb:10
  2077. * (IrresponsibleModule) WebhooksController has no descriptive comment
  2078. - app/controllers/webhooks_controller.rb:1
  2079. * (TooManyStatements) WebhooksController#order_automation has approx 7 statements
  2080. - app/controllers/webhooks_controller.rb:5
  2081.  
  2082. WebhooksRoutingSpec:
  2083. Rating: A
  2084. Churn: 0
  2085. Complexity: 0.0
  2086. Duplication: 0
  2087. Smells: 0
  2088.  
  2089. WhatsNewController:
  2090. Rating: A
  2091. Churn: 0
  2092. Complexity: 31.72
  2093. Duplication: 0
  2094. Smells: 3
  2095. * (IrresponsibleModule) WhatsNewController has no descriptive comment
  2096. - app/controllers/whats_new_controller.rb:1
  2097. * (TooManyStatements) WhatsNewController#index has approx 6 statements
  2098. - app/controllers/whats_new_controller.rb:8
  2099. * (UtilityFunction) WhatsNewController#redis doesn't depend on instance state (maybe move it to another class?)
  2100. - app/controllers/whats_new_controller.rb:34
  2101.  
  2102. WrapParameters:
  2103. Rating: A
  2104. Churn: 0
  2105. Complexity: 0.0
  2106. Duplication: 0
  2107. Smells: 0
  2108.  
  2109. ZendeskSsoController:
  2110. Rating: A
  2111. Churn: 0
  2112. Complexity: 39.37
  2113. Duplication: 0
  2114. Smells: 3
  2115. * (DuplicateMethodCall) ZendeskSsoController#zendesk_sso_url calls 'params["return_to"]' 2 times
  2116. - app/controllers/zendesk_sso_controller.rb:49
  2117. * (IrresponsibleModule) ZendeskSsoController has no descriptive comment
  2118. - app/controllers/zendesk_sso_controller.rb:7
  2119. * (UnusedParameters) ZendeskSsoController#sign_into_zendesk has unused parameter 'user'
  2120. - app/controllers/zendesk_sso_controller.rb:31
  2121.  
  2122. ZendeskSsoControllerSpec:
  2123. Rating: A
  2124. Churn: 0
  2125. Complexity: 0.0
  2126. Duplication: 0
  2127. Smells: 0
  2128.  
  2129. Account::BillingOrdersController:
  2130. Rating: B
  2131. Churn: 0
  2132. Complexity: 60.53
  2133. Duplication: 0
  2134. Smells: 7
  2135. * (VeryHighComplexity) Account::BillingOrdersController#index has a flog score of 61
  2136. - app/controllers/account/billing_orders_controller.rb:5
  2137. * (DuplicateMethodCall) Account::BillingOrdersController#index calls 'api.order' 2 times
  2138. - app/controllers/account/billing_orders_controller.rb:10
  2139. - app/controllers/account/billing_orders_controller.rb:16
  2140. * (DuplicateMethodCall) Account::BillingOrdersController#index calls 'current_user.company_id' 2 times
  2141. - app/controllers/account/billing_orders_controller.rb:11
  2142. - app/controllers/account/billing_orders_controller.rb:17
  2143. * (DuplicateMethodCall) Account::BillingOrdersController#index calls 'params[:locale]' 2 times
  2144. - app/controllers/account/billing_orders_controller.rb:8
  2145. - app/controllers/account/billing_orders_controller.rb:32
  2146. * (InstanceVariableAssumption) Account::BillingOrdersController assumes too much for instance variable '@orders'
  2147. - app/controllers/account/billing_orders_controller.rb:1
  2148. * (IrresponsibleModule) Account::BillingOrdersController has no descriptive comment
  2149. - app/controllers/account/billing_orders_controller.rb:1
  2150. * (TooManyStatements) Account::BillingOrdersController#index has approx 20 statements
  2151. - app/controllers/account/billing_orders_controller.rb:5
  2152.  
  2153. Account::SecurityController:
  2154. Rating: B
  2155. Churn: 0
  2156. Complexity: 74.69
  2157. Duplication: 0
  2158. Smells: 9
  2159. * (HighComplexity) Account::SecurityController#update_otp has a flog score of 25
  2160. - app/controllers/account/security_controller.rb:12
  2161. * (DuplicateMethodCall) Account::SecurityController#update_otp calls 'current_user.id' 2 times
  2162. - app/controllers/account/security_controller.rb:19
  2163. - app/controllers/account/security_controller.rb:26
  2164. * (DuplicateMethodCall) Account::SecurityController#update_otp calls 'redirect_to account_security_index_path' 2 times
  2165. - app/controllers/account/security_controller.rb:31
  2166. - app/controllers/account/security_controller.rb:34
  2167. * (IrresponsibleModule) Account::SecurityController has no descriptive comment
  2168. - app/controllers/account/security_controller.rb:1
  2169. * (MissingSafeMethod) Account::SecurityController has missing safe method 'disable_two_factor!'
  2170. - app/controllers/account/security_controller.rb:74
  2171. * (MissingSafeMethod) Account::SecurityController has missing safe method 'enable_two_factor!'
  2172. - app/controllers/account/security_controller.rb:69
  2173. * (MissingSafeMethod) Account::SecurityController has missing safe method 'ensure_otp_code_exists!'
  2174. - app/controllers/account/security_controller.rb:62
  2175. * (TooManyStatements) Account::SecurityController#update_otp has approx 9 statements
  2176. - app/controllers/account/security_controller.rb:12
  2177. * (UncommunicativeVariableName) Account::SecurityController#update_otp has the variable name 'e'
  2178. - app/controllers/account/security_controller.rb:32
  2179.  
  2180. Asyncs::BillingController:
  2181. Rating: B
  2182. Churn: 0
  2183. Complexity: 65.32
  2184. Duplication: 0
  2185. Smells: 13
  2186. * (HighComplexity) Asyncs::BillingController#payment_method_list has a flog score of 39
  2187. - app/controllers/asyncs/billing_controller.rb:5
  2188. * (HighComplexity) Asyncs::BillingController#unpaid_invoices_list has a flog score of 27
  2189. - app/controllers/asyncs/billing_controller.rb:22
  2190. * (DuplicateMethodCall) Asyncs::BillingController#payment_method_list calls '@payment_method_list.select' 2 times
  2191. - app/controllers/asyncs/billing_controller.rb:12
  2192. - app/controllers/asyncs/billing_controller.rb:13
  2193. * (DuplicateMethodCall) Asyncs::BillingController#payment_method_list calls 'params[:locale]' 2 times
  2194. - app/controllers/asyncs/billing_controller.rb:16
  2195. - app/controllers/asyncs/billing_controller.rb:17
  2196. * (DuplicateMethodCall) Asyncs::BillingController#unpaid_invoices_list calls 'params[:locale]' 2 times
  2197. - app/controllers/asyncs/billing_controller.rb:25
  2198. - app/controllers/asyncs/billing_controller.rb:26
  2199. * (InstanceVariableAssumption) Asyncs::BillingController assumes too much for instance variable '@client_id'
  2200. - app/controllers/asyncs/billing_controller.rb:1
  2201. * (InstanceVariableAssumption) Asyncs::BillingController assumes too much for instance variable '@payment_method_list'
  2202. - app/controllers/asyncs/billing_controller.rb:1
  2203. * (IrresponsibleModule) Asyncs::BillingController has no descriptive comment
  2204. - app/controllers/asyncs/billing_controller.rb:1
  2205. * (NilCheck) Asyncs::BillingController#unpaid_invoices_list performs a nil-check
  2206. - app/controllers/asyncs/billing_controller.rb:33
  2207. * (TooManyInstanceVariables) Asyncs::BillingController has at least 7 instance variables
  2208. - app/controllers/asyncs/billing_controller.rb:1
  2209. * (TooManyStatements) Asyncs::BillingController#payment_method_list has approx 13 statements
  2210. - app/controllers/asyncs/billing_controller.rb:5
  2211. * (TooManyStatements) Asyncs::BillingController#unpaid_invoices_list has approx 11 statements
  2212. - app/controllers/asyncs/billing_controller.rb:22
  2213. * (UncommunicativeVariableName) Asyncs::BillingController#unpaid_invoices_list has the variable name 'v'
  2214. - app/controllers/asyncs/billing_controller.rb:30
  2215.  
  2216. AuthenticationHelper:
  2217. Rating: B
  2218. Churn: 0
  2219. Complexity: 78.03
  2220. Duplication: 0
  2221. Smells: 15
  2222. * (HighComplexity) AuthenticationHelper#remote_registration has a flog score of 36
  2223. - app/helpers/authentication_helper.rb:3
  2224. * (HighComplexity) AuthenticationHelper#create_user has a flog score of 25
  2225. - app/helpers/authentication_helper.rb:35
  2226. * (DuplicateMethodCall) AuthenticationHelper#authenticate calls 'response['credentials']' 3 times
  2227. - app/helpers/authentication_helper.rb:78
  2228. - app/helpers/authentication_helper.rb:84
  2229. * (DuplicateMethodCall) AuthenticationHelper#authenticate calls 'response['credentials']['error_description']' 2 times
  2230. - app/helpers/authentication_helper.rb:78
  2231. * (DuplicateMethodCall) AuthenticationHelper#create_user calls 'params[:email]' 2 times
  2232. - app/helpers/authentication_helper.rb:40
  2233. - app/helpers/authentication_helper.rb:48
  2234. * (DuplicateMethodCall) AuthenticationHelper#remote_registration calls 'fields[:password]' 2 times
  2235. - app/helpers/authentication_helper.rb:6
  2236. - app/helpers/authentication_helper.rb:21
  2237. * (DuplicateMethodCall) AuthenticationHelper#remote_registration calls 'result.error?' 3 times
  2238. - app/helpers/authentication_helper.rb:10
  2239. - app/helpers/authentication_helper.rb:11
  2240. - app/helpers/authentication_helper.rb:12
  2241. * (FeatureEnvy) AuthenticationHelper#authenticate refers to 'response' more than self (maybe move it to another class?)
  2242. - app/helpers/authentication_helper.rb:78
  2243. - app/helpers/authentication_helper.rb:80
  2244. - app/helpers/authentication_helper.rb:84
  2245. * (IrresponsibleModule) AuthenticationHelper has no descriptive comment
  2246. - app/helpers/authentication_helper.rb:1
  2247. * (NilCheck) AuthenticationHelper#remote_registration performs a nil-check
  2248. - app/helpers/authentication_helper.rb:10
  2249. - app/helpers/authentication_helper.rb:17
  2250. * (TooManyStatements) AuthenticationHelper#authenticate has approx 6 statements
  2251. - app/helpers/authentication_helper.rb:76
  2252. * (TooManyStatements) AuthenticationHelper#create_user has approx 7 statements
  2253. - app/helpers/authentication_helper.rb:35
  2254. * (TooManyStatements) AuthenticationHelper#remote_registration has approx 13 statements
  2255. - app/helpers/authentication_helper.rb:3
  2256. * (UncommunicativeVariableName) AuthenticationHelper#create_user has the variable name 'p'
  2257. - app/helpers/authentication_helper.rb:36
  2258. * (UtilityFunction) AuthenticationHelper#create_user doesn't depend on instance state (maybe move it to another class?)
  2259. - app/helpers/authentication_helper.rb:35
  2260.  
  2261. BillingHelper:
  2262. Rating: B
  2263. Churn: 0
  2264. Complexity: 86.02
  2265. Duplication: 0
  2266. Smells: 19
  2267. * (HighComplexity) BillingHelper#get_credit_card_data has a flog score of 26
  2268. - app/helpers/billing_helper.rb:4
  2269. * (DuplicateMethodCall) BillingHelper#find_payment_method calls 'payment['payment_type']' 2 times
  2270. - app/helpers/billing_helper.rb:48
  2271. * (DuplicateMethodCall) BillingHelper#format_card_values calls 'params['cc_num']' 2 times
  2272. - app/helpers/billing_helper.rb:66
  2273. * (DuplicateMethodCall) BillingHelper#get_credit_card_data calls 'card_result.data' 3 times
  2274. - app/helpers/billing_helper.rb:9
  2275. - app/helpers/billing_helper.rb:12
  2276. - app/helpers/billing_helper.rb:14
  2277. * (DuplicateMethodCall) BillingHelper#get_credit_card_data calls 'card_result.data.empty?' 2 times
  2278. - app/helpers/billing_helper.rb:9
  2279. - app/helpers/billing_helper.rb:14
  2280. * (DuplicateMethodCall) BillingHelper#get_credit_card_data calls 'card_result.error?' 2 times
  2281. - app/helpers/billing_helper.rb:9
  2282. - app/helpers/billing_helper.rb:14
  2283. * (DuplicateMethodCall) BillingHelper#get_new_card_data calls 'user.company' 5 times
  2284. - app/helpers/billing_helper.rb:27
  2285. - app/helpers/billing_helper.rb:28
  2286. - app/helpers/billing_helper.rb:29
  2287. - app/helpers/billing_helper.rb:30
  2288. - app/helpers/billing_helper.rb:31
  2289. * (FeatureEnvy) BillingHelper#default_payment_method refers to 'list' more than self (maybe move it to another class?)
  2290. - app/helpers/billing_helper.rb:37
  2291. - app/helpers/billing_helper.rb:43
  2292. * (FeatureEnvy) BillingHelper#default_payment_method refers to 'list_result' more than self (maybe move it to another class?)
  2293. - app/helpers/billing_helper.rb:40
  2294. * (FeatureEnvy) BillingHelper#get_credit_card_data refers to 'card_result' more than self (maybe move it to another class?)
  2295. - app/helpers/billing_helper.rb:9
  2296. - app/helpers/billing_helper.rb:12
  2297. - app/helpers/billing_helper.rb:14
  2298. * (IrresponsibleModule) BillingHelper has no descriptive comment
  2299. - app/helpers/billing_helper.rb:1
  2300. * (NilCheck) BillingHelper#default_payment_method performs a nil-check
  2301. - app/helpers/billing_helper.rb:37
  2302. * (NilCheck) BillingHelper#get_credit_card_data performs a nil-check
  2303. - app/helpers/billing_helper.rb:6
  2304. * (TooManyStatements) BillingHelper#credit_balance has approx 6 statements
  2305. - app/helpers/billing_helper.rb:53
  2306. * (TooManyStatements) BillingHelper#default_payment_method has approx 7 statements
  2307. - app/helpers/billing_helper.rb:36
  2308. * (TooManyStatements) BillingHelper#get_credit_card_data has approx 7 statements
  2309. - app/helpers/billing_helper.rb:4
  2310. * (UtilityFunction) BillingHelper#find_payment_method doesn't depend on instance state (maybe move it to another class?)
  2311. - app/helpers/billing_helper.rb:47
  2312. * (UtilityFunction) BillingHelper#format_card_values doesn't depend on instance state (maybe move it to another class?)
  2313. - app/helpers/billing_helper.rb:65
  2314. * (UtilityFunction) BillingHelper#get_new_card_data doesn't depend on instance state (maybe move it to another class?)
  2315. - app/helpers/billing_helper.rb:20
  2316.  
  2317. CartHelper::CheckoutError:
  2318. Rating: B
  2319. Churn: 0
  2320. Complexity: 90.05
  2321. Duplication: 0
  2322. Smells: 14
  2323. * (VeryHighComplexity) CartHelper#run_checkout has a flog score of 90
  2324. - app/helpers/cart_helper.rb:4
  2325. * (DuplicateMethodCall) CartHelper#run_checkout calls 'Bugsnag.notify(CartHelper::CheckoutError.new(order.error_message))' 2 times
  2326. - app/helpers/cart_helper.rb:15
  2327. - app/helpers/cart_helper.rb:21
  2328. * (DuplicateMethodCall) CartHelper#run_checkout calls 'Environment::Maas.order_queue(brand_id)' 2 times
  2329. - app/helpers/cart_helper.rb:9
  2330. - app/helpers/cart_helper.rb:40
  2331. * (DuplicateMethodCall) CartHelper#run_checkout calls 'api.order' 4 times
  2332. - app/helpers/cart_helper.rb:12
  2333. - app/helpers/cart_helper.rb:18
  2334. - app/helpers/cart_helper.rb:47
  2335. - app/helpers/cart_helper.rb:56
  2336. * (DuplicateMethodCall) CartHelper#run_checkout calls 'button[0]' 2 times
  2337. - app/helpers/cart_helper.rb:30
  2338. - app/helpers/cart_helper.rb:31
  2339. * (DuplicateMethodCall) CartHelper#run_checkout calls 'order.error_message' 4 times
  2340. - app/helpers/cart_helper.rb:14
  2341. - app/helpers/cart_helper.rb:15
  2342. - app/helpers/cart_helper.rb:20
  2343. - app/helpers/cart_helper.rb:21
  2344. * (DuplicateMethodCall) CartHelper#run_checkout calls 'order['order_id']' 3 times
  2345. - app/helpers/cart_helper.rb:18
  2346. - app/helpers/cart_helper.rb:47
  2347. - app/helpers/cart_helper.rb:56
  2348. * (DuplicateMethodCall) CartHelper#run_checkout calls 'process.error?' 2 times
  2349. - app/helpers/cart_helper.rb:19
  2350. - app/helpers/cart_helper.rb:49
  2351. * (DuplicateMethodCall) CartHelper#run_checkout calls 'process.error_message' 2 times
  2352. - app/helpers/cart_helper.rb:50
  2353. - app/helpers/cart_helper.rb:51
  2354. * (DuplicateMethodCall) CartHelper#run_checkout calls 'result[:error] = order.error_message' 2 times
  2355. - app/helpers/cart_helper.rb:14
  2356. - app/helpers/cart_helper.rb:20
  2357. * (FeatureEnvy) CartHelper#run_checkout refers to 'order' more than self (maybe move it to another class?)
  2358. - app/helpers/cart_helper.rb:13
  2359. - app/helpers/cart_helper.rb:14
  2360. - app/helpers/cart_helper.rb:15
  2361. - app/helpers/cart_helper.rb:18
  2362. - app/helpers/cart_helper.rb:20
  2363. - app/helpers/cart_helper.rb:21
  2364. - app/helpers/cart_helper.rb:47
  2365. - app/helpers/cart_helper.rb:56
  2366. * (IrresponsibleModule) CartHelper has no descriptive comment
  2367. - app/helpers/cart_helper.rb:1
  2368. * (NilCheck) CartHelper#run_checkout performs a nil-check
  2369. - app/helpers/cart_helper.rb:46
  2370. * (TooManyStatements) CartHelper#run_checkout has approx 30 statements
  2371. - app/helpers/cart_helper.rb:4
  2372.  
  2373. ChartMogul::Models::Customer:
  2374. Rating: B
  2375. Churn: 0
  2376. Complexity: 65.83
  2377. Duplication: 16
  2378. Smells: 9
  2379. * (DuplicateCode) Similar code found in 2 nodes
  2380. - app/adapters/chart_mogul/models/customer.rb:51
  2381. - app/adapters/chart_mogul/models/plan.rb:85
  2382. * (DuplicateMethodCall) ChartMogul::Models::Customer#body calls 'resp_body.entries' 2 times
  2383. - app/adapters/chart_mogul/models/customer.rb:34
  2384. * (DuplicateMethodCall) ChartMogul::Models::Customer#create_with_validation calls '@resp.body' 2 times
  2385. - app/adapters/chart_mogul/models/customer.rb:40
  2386. - app/adapters/chart_mogul/models/customer.rb:44
  2387. * (DuplicateMethodCall) ChartMogul::Models::Customer#create_with_validation calls '@resp.body.entries' 2 times
  2388. - app/adapters/chart_mogul/models/customer.rb:40
  2389. - app/adapters/chart_mogul/models/customer.rb:44
  2390. * (FeatureEnvy) ChartMogul::Models::Customer#body refers to 'resp_body' more than self (maybe move it to another class?)
  2391. - app/adapters/chart_mogul/models/customer.rb:34
  2392. * (InstanceVariableAssumption) ChartMogul::Models::Customer assumes too much for instance variable '@resp'
  2393. - app/adapters/chart_mogul/models/customer.rb:5
  2394. * (IrresponsibleModule) ChartMogul::Models::Customer has no descriptive comment
  2395. - app/adapters/chart_mogul/models/customer.rb:5
  2396. * (UtilityFunction) ChartMogul::Models::Customer#data_source_uuid doesn't depend on instance state (maybe move it to another class?)
  2397. - app/adapters/chart_mogul/models/customer.rb:76
  2398. * (UtilityFunction) ChartMogul::Models::Customer#to_iso_date doesn't depend on instance state (maybe move it to another class?)
  2399. - app/adapters/chart_mogul/models/customer.rb:71
  2400.  
  2401. ChartMogul::Models::Plan:
  2402. Rating: B
  2403. Churn: 0
  2404. Complexity: 61.75
  2405. Duplication: 16
  2406. Smells: 6
  2407. * (DuplicateCode) Similar code found in 2 nodes
  2408. - app/adapters/chart_mogul/models/customer.rb:51
  2409. - app/adapters/chart_mogul/models/plan.rb:85
  2410. * (DuplicateMethodCall) ChartMogul::Models::Plan#response_body calls 'body.plans' 2 times
  2411. - app/adapters/chart_mogul/models/plan.rb:41
  2412. * (FeatureEnvy) ChartMogul::Models::Plan#response_body refers to 'body' more than self (maybe move it to another class?)
  2413. - app/adapters/chart_mogul/models/plan.rb:41
  2414. * (InstanceVariableAssumption) ChartMogul::Models::Plan assumes too much for instance variable '@resp'
  2415. - app/adapters/chart_mogul/models/plan.rb:5
  2416. * (IrresponsibleModule) ChartMogul::Models::Plan has no descriptive comment
  2417. - app/adapters/chart_mogul/models/plan.rb:5
  2418. * (TooManyInstanceVariables) ChartMogul::Models::Plan has at least 5 instance variables
  2419. - app/adapters/chart_mogul/models/plan.rb:5
  2420.  
  2421. CurrentUser::Company:
  2422. Rating: B
  2423. Churn: 0
  2424. Complexity: 54.14
  2425. Duplication: 0
  2426. Smells: 5
  2427. * (InstanceVariableAssumption) CurrentUser::Company assumes too much for instance variable '@primary_user'
  2428. - app/adapters/current_user/company.rb:2
  2429. * (IrresponsibleModule) CurrentUser::Company has no descriptive comment
  2430. - app/adapters/current_user/company.rb:2
  2431. * (NilCheck) CurrentUser::Company#primary_user performs a nil-check
  2432. - app/adapters/current_user/company.rb:60
  2433. - app/adapters/current_user/company.rb:63
  2434. * (TooManyInstanceVariables) CurrentUser::Company has at least 11 instance variables
  2435. - app/adapters/current_user/company.rb:2
  2436. * (TooManyStatements) CurrentUser::Company#primary_user has approx 6 statements
  2437. - app/adapters/current_user/company.rb:59
  2438.  
  2439. DeviceGraphGenerator:
  2440. Rating: B
  2441. Churn: 0
  2442. Complexity: 50.29
  2443. Duplication: 0
  2444. Smells: 12
  2445. * (DuplicateMethodCall) DeviceGraphGenerator#load_bandwidth_graph calls '@device.id' 2 times
  2446. - app/services/device_graph_generator.rb:45
  2447. - app/services/device_graph_generator.rb:47
  2448. * (InstanceVariableAssumption) DeviceGraphGenerator assumes too much for instance variable '@end_time'
  2449. - app/services/device_graph_generator.rb:3
  2450. * (InstanceVariableAssumption) DeviceGraphGenerator assumes too much for instance variable '@period'
  2451. - app/services/device_graph_generator.rb:3
  2452. * (InstanceVariableAssumption) DeviceGraphGenerator assumes too much for instance variable '@start_time'
  2453. - app/services/device_graph_generator.rb:3
  2454. * (IrresponsibleModule) DeviceGraphGenerator has no descriptive comment
  2455. - app/services/device_graph_generator.rb:3
  2456. * (NilCheck) DeviceGraphGenerator#call performs a nil-check
  2457. - app/services/device_graph_generator.rb:22
  2458. * (RepeatedConditional) DeviceGraphGenerator tests 'custom_period?' at least 3 times
  2459. - app/services/device_graph_generator.rb:35
  2460. - app/services/device_graph_generator.rb:60
  2461. - app/services/device_graph_generator.rb:61
  2462. * (TooManyInstanceVariables) DeviceGraphGenerator has at least 8 instance variables
  2463. - app/services/device_graph_generator.rb:3
  2464. * (TooManyStatements) DeviceGraphGenerator#load_bandwidth_graph has approx 7 statements
  2465. - app/services/device_graph_generator.rb:44
  2466. * (UncommunicativeVariableName) DeviceGraphGenerator#bandwidth_period_params has the variable name 'h'
  2467. - app/services/device_graph_generator.rb:58
  2468. * (UncommunicativeVariableName) DeviceGraphGenerator#load_bandwidth_graph has the variable name 'e'
  2469. - app/services/device_graph_generator.rb:52
  2470. * (UtilityFunction) DeviceGraphGenerator#date_to_year doesn't depend on instance state (maybe move it to another class?)
  2471. - app/services/device_graph_generator.rb:40
  2472.  
  2473. FetchAuth0MetadataService:
  2474. Rating: B
  2475. Churn: 0
  2476. Complexity: 68.39
  2477. Duplication: 0
  2478. Smells: 13
  2479. * (HighComplexity) FetchAuth0MetadataService#fetch_client has a flog score of 31
  2480. - app/services/fetch_auth0_metadata_service.rb:58
  2481. * (DuplicateMethodCall) FetchAuth0MetadataService#fetch_client calls '@data['created']' 2 times
  2482. - app/services/fetch_auth0_metadata_service.rb:60
  2483. - app/services/fetch_auth0_metadata_service.rb:61
  2484. * (DuplicateMethodCall) FetchAuth0MetadataService#fetch_client calls '@result[:app_metadata]' 2 times
  2485. - app/services/fetch_auth0_metadata_service.rb:60
  2486. - app/services/fetch_auth0_metadata_service.rb:61
  2487. * (DuplicateMethodCall) FetchAuth0MetadataService#fetch_client calls '@result[:user_metadata]' 8 times
  2488. - app/services/fetch_auth0_metadata_service.rb:62
  2489. - app/services/fetch_auth0_metadata_service.rb:63
  2490. - app/services/fetch_auth0_metadata_service.rb:64
  2491. - app/services/fetch_auth0_metadata_service.rb:65
  2492. - app/services/fetch_auth0_metadata_service.rb:66
  2493. - app/services/fetch_auth0_metadata_service.rb:67
  2494. - app/services/fetch_auth0_metadata_service.rb:70
  2495. - app/services/fetch_auth0_metadata_service.rb:71
  2496. * (DuplicateMethodCall) FetchAuth0MetadataService#request! calls '@api.client' 2 times
  2497. - app/services/fetch_auth0_metadata_service.rb:29
  2498. - app/services/fetch_auth0_metadata_service.rb:31
  2499. * (InstanceVariableAssumption) FetchAuth0MetadataService assumes too much for instance variable '@client_id'
  2500. - app/services/fetch_auth0_metadata_service.rb:3
  2501. * (InstanceVariableAssumption) FetchAuth0MetadataService assumes too much for instance variable '@contact_id'
  2502. - app/services/fetch_auth0_metadata_service.rb:3
  2503. * (InstanceVariableAssumption) FetchAuth0MetadataService assumes too much for instance variable '@data'
  2504. - app/services/fetch_auth0_metadata_service.rb:3
  2505. * (InstanceVariableAssumption) FetchAuth0MetadataService assumes too much for instance variable '@result'
  2506. - app/services/fetch_auth0_metadata_service.rb:3
  2507. * (IrresponsibleModule) FetchAuth0MetadataService has no descriptive comment
  2508. - app/services/fetch_auth0_metadata_service.rb:3
  2509. * (MissingSafeMethod) FetchAuth0MetadataService has missing safe method 'request!'
  2510. - app/services/fetch_auth0_metadata_service.rb:25
  2511. * (TooManyInstanceVariables) FetchAuth0MetadataService has at least 7 instance variables
  2512. - app/services/fetch_auth0_metadata_service.rb:3
  2513. * (TooManyStatements) FetchAuth0MetadataService#fetch_client has approx 11 statements
  2514. - app/services/fetch_auth0_metadata_service.rb:58
  2515.  
  2516. Index.html.erbSpec:
  2517. Rating: B
  2518. Churn: 0
  2519. Complexity: 5.2
  2520. Duplication: 23
  2521. Smells: 1
  2522. * (DuplicateCode) Identical code found in 2 nodes
  2523. - spec/views/invoices/index.html.erb_spec.rb:7
  2524. - spec/views/invoices/show.html.erb_spec.rb:8
  2525.  
  2526. Production:
  2527. Rating: B
  2528. Churn: 0
  2529. Complexity: 0.0
  2530. Duplication: 21
  2531. Smells: 1
  2532. * (DuplicateCode) Identical code found in 2 nodes
  2533. - config/environments/production.rb:93
  2534. - config/environments/staging.rb:90
  2535.  
  2536. Schema:
  2537. Rating: B
  2538. Churn: 0
  2539. Complexity: 90.4
  2540. Duplication: 0
  2541. Smells: 1
  2542. * (HighComplexity) create_table#users has a flog score of 30
  2543. - db/schema.rb:75
  2544.  
  2545. SecuredHelper:
  2546. Rating: B
  2547. Churn: 0
  2548. Complexity: 57.62
  2549. Duplication: 0
  2550. Smells: 8
  2551. * (IrresponsibleModule) SecuredHelper has no descriptive comment
  2552. - app/helpers/secured_helper.rb:1
  2553. * (NilCheck) SecuredHelper#logout_url performs a nil-check
  2554. - app/helpers/secured_helper.rb:54
  2555. * (TooManyStatements) SecuredHelper#logout_url has approx 6 statements
  2556. - app/helpers/secured_helper.rb:46
  2557. * (UncommunicativeVariableName) SecuredHelper#logout_url has the variable name 'k'
  2558. - app/helpers/secured_helper.rb:54
  2559. * (UncommunicativeVariableName) SecuredHelper#logout_url has the variable name 'v'
  2560. - app/helpers/secured_helper.rb:54
  2561. * (UncommunicativeVariableName) SecuredHelper#raw_user has the variable name 'k'
  2562. - app/helpers/secured_helper.rb:60
  2563. * (UncommunicativeVariableName) SecuredHelper#raw_user has the variable name 'v'
  2564. - app/helpers/secured_helper.rb:60
  2565. * (UtilityFunction) SecuredHelper#raw_user doesn't depend on instance state (maybe move it to another class?)
  2566. - app/helpers/secured_helper.rb:58
  2567.  
  2568. Servers::SshController:
  2569. Rating: B
  2570. Churn: 0
  2571. Complexity: 53.74
  2572. Duplication: 0
  2573. Smells: 2
  2574. * (DuplicateMethodCall) Servers::SshController#validate_target calls 'params[:render_action]' 2 times
  2575. - app/controllers/servers/ssh_controller.rb:59
  2576. - app/controllers/servers/ssh_controller.rb:62
  2577. * (IrresponsibleModule) Servers::SshController has no descriptive comment
  2578. - app/controllers/servers/ssh_controller.rb:1
  2579.  
  2580. Show.html.erbSpec:
  2581. Rating: B
  2582. Churn: 0
  2583. Complexity: 5.2
  2584. Duplication: 23
  2585. Smells: 2
  2586. * (DuplicateCode) Identical code found in 2 nodes
  2587. - spec/views/invoices/index.html.erb_spec.rb:7
  2588. - spec/views/invoices/show.html.erb_spec.rb:8
  2589. * (UnusedParameters) find_device has unused parameter 'service_id'
  2590. - spec/views/invoices/show.html.erb_spec.rb:15
  2591.  
  2592. Staging:
  2593. Rating: B
  2594. Churn: 0
  2595. Complexity: 0.0
  2596. Duplication: 21
  2597. Smells: 1
  2598. * (DuplicateCode) Identical code found in 2 nodes
  2599. - config/environments/production.rb:93
  2600. - config/environments/staging.rb:90
  2601.  
  2602. TokenControllerSpec:
  2603. Rating: B
  2604. Churn: 0
  2605. Complexity: 75.67
  2606. Duplication: 0
  2607. Smells: 0
  2608.  
  2609. Ubersmith:
  2610. Rating: B
  2611. Churn: 0
  2612. Complexity: 91.7
  2613. Duplication: 0
  2614. Smells: 17
  2615. * (HighComplexity) main#call has a flog score of 55
  2616. - lib/modules/ubersmith.rb:41
  2617. * (ControlParameter) call_with_cache is controlled by argument 'is_retry'
  2618. - lib/modules/ubersmith.rb:25
  2619. * (DuplicateMethodCall) call calls '!page.content.nil?' 2 times
  2620. - lib/modules/ubersmith.rb:53
  2621. - lib/modules/ubersmith.rb:55
  2622. * (DuplicateMethodCall) call calls '!page.nil?' 2 times
  2623. - lib/modules/ubersmith.rb:53
  2624. - lib/modules/ubersmith.rb:55
  2625. * (DuplicateMethodCall) call calls 'page.content' 7 times
  2626. - lib/modules/ubersmith.rb:51
  2627. - lib/modules/ubersmith.rb:53
  2628. - lib/modules/ubersmith.rb:54
  2629. - lib/modules/ubersmith.rb:55
  2630. - lib/modules/ubersmith.rb:56
  2631. * (DuplicateMethodCall) call calls 'page.content.nil?' 2 times
  2632. - lib/modules/ubersmith.rb:53
  2633. - lib/modules/ubersmith.rb:55
  2634. * (DuplicateMethodCall) call calls 'page.nil?' 2 times
  2635. - lib/modules/ubersmith.rb:53
  2636. - lib/modules/ubersmith.rb:55
  2637. * (DuplicateMethodCall) use_as_cache calls 'args[0]' 3 times
  2638. - lib/modules/ubersmith.rb:38
  2639. * (FeatureEnvy) call refers to 'page' more than self (maybe move it to another class?)
  2640. - lib/modules/ubersmith.rb:51
  2641. - lib/modules/ubersmith.rb:53
  2642. - lib/modules/ubersmith.rb:54
  2643. - lib/modules/ubersmith.rb:55
  2644. - lib/modules/ubersmith.rb:56
  2645. * (NilCheck) call performs a nil-check
  2646. - lib/modules/ubersmith.rb:49
  2647. - lib/modules/ubersmith.rb:53
  2648. - lib/modules/ubersmith.rb:55
  2649. * (NilCheck) use_as_cache performs a nil-check
  2650. - lib/modules/ubersmith.rb:38
  2651. * (TooManyStatements) call has approx 14 statements
  2652. - lib/modules/ubersmith.rb:41
  2653. * (TooManyStatements) call_with_cache has approx 8 statements
  2654. - lib/modules/ubersmith.rb:17
  2655. * (UncommunicativeVariableName) call has the variable name 'a'
  2656. - lib/modules/ubersmith.rb:47
  2657. * (UncommunicativeVariableName) call has the variable name 'e'
  2658. - lib/modules/ubersmith.rb:52
  2659. * (UncommunicativeVariableName) call_with_cache has the variable name 'e'
  2660. - lib/modules/ubersmith.rb:24
  2661. * (UtilityFunction) use_as_cache doesn't depend on instance state (maybe move it to another class?)
  2662. - lib/modules/ubersmith.rb:37
  2663.  
  2664. Account::ContactsController:
  2665. Rating: C
  2666. Churn: 0
  2667. Complexity: 140.16
  2668. Duplication: 0
  2669. Smells: 16
  2670. * (VeryHighComplexity) Account::ContactsController#create has a flog score of 63
  2671. - app/controllers/account/contacts_controller.rb:14
  2672. * (HighComplexity) Account::ContactsController#edit has a flog score of 32
  2673. - app/controllers/account/contacts_controller.rb:49
  2674. * (DuplicateMethodCall) Account::ContactsController#create calls 'contact_result.error?' 2 times
  2675. - app/controllers/account/contacts_controller.rb:32
  2676. - app/controllers/account/contacts_controller.rb:33
  2677. * (DuplicateMethodCall) Account::ContactsController#create calls 'contact_result.error_message' 2 times
  2678. - app/controllers/account/contacts_controller.rb:35
  2679. - app/controllers/account/contacts_controller.rb:36
  2680. * (DuplicateMethodCall) Account::ContactsController#create calls 'params[:email]' 3 times
  2681. - app/controllers/account/contacts_controller.rb:24
  2682. - app/controllers/account/contacts_controller.rb:26
  2683. - app/controllers/account/contacts_controller.rb:44
  2684. * (DuplicateMethodCall) Account::ContactsController#create calls 'params[:real_name]' 2 times
  2685. - app/controllers/account/contacts_controller.rb:23
  2686. - app/controllers/account/contacts_controller.rb:44
  2687. * (DuplicateMethodCall) Account::ContactsController#create calls 'redirect_to account_contacts_path' 2 times
  2688. - app/controllers/account/contacts_controller.rb:37
  2689. - app/controllers/account/contacts_controller.rb:45
  2690. * (InstanceVariableAssumption) Account::ContactsController assumes too much for instance variable '@contact'
  2691. - app/controllers/account/contacts_controller.rb:1
  2692. * (InstanceVariableAssumption) Account::ContactsController assumes too much for instance variable '@title'
  2693. - app/controllers/account/contacts_controller.rb:1
  2694. * (InstanceVariableAssumption) Account::ContactsController assumes too much for instance variable '@user'
  2695. - app/controllers/account/contacts_controller.rb:1
  2696. * (IrresponsibleModule) Account::ContactsController has no descriptive comment
  2697. - app/controllers/account/contacts_controller.rb:1
  2698. * (NilCheck) Account::ContactsController#edit performs a nil-check
  2699. - app/controllers/account/contacts_controller.rb:52
  2700. * (TooManyStatements) Account::ContactsController#create has approx 16 statements
  2701. - app/controllers/account/contacts_controller.rb:14
  2702. * (TooManyStatements) Account::ContactsController#edit has approx 8 statements
  2703. - app/controllers/account/contacts_controller.rb:49
  2704. * (UncommunicativeVariableName) Account::ContactsController#assign_changed_contact_values has the variable name 'k'
  2705. - app/controllers/account/contacts_controller.rb:78
  2706. * (UncommunicativeVariableName) Account::ContactsController#assign_changed_contact_values has the variable name 'v'
  2707. - app/controllers/account/contacts_controller.rb:78
  2708.  
  2709. ApplicationController:
  2710. Rating: C
  2711. Churn: 0
  2712. Complexity: 116.11
  2713. Duplication: 0
  2714. Smells: 8
  2715. * (HighComplexity) ApplicationController#validate_user_status has a flog score of 27
  2716. - app/controllers/application_controller.rb:79
  2717. * (DuplicateMethodCall) ApplicationController#set_locale calls 'I18n.default_locale' 2 times
  2718. - app/controllers/application_controller.rb:68
  2719. - app/controllers/application_controller.rb:73
  2720. * (DuplicateMethodCall) ApplicationController#set_locale calls 'params[:locale]' 4 times
  2721. - app/controllers/application_controller.rb:70
  2722. - app/controllers/application_controller.rb:71
  2723. * (DuplicateMethodCall) ApplicationController#validate_user_status calls 'current_user.company' 3 times
  2724. - app/controllers/application_controller.rb:80
  2725. - app/controllers/application_controller.rb:85
  2726. - app/controllers/application_controller.rb:87
  2727. * (DuplicateMethodCall) ApplicationController#validate_user_status calls 'current_user.company.signup_step' 3 times
  2728. - app/controllers/application_controller.rb:80
  2729. - app/controllers/application_controller.rb:85
  2730. - app/controllers/application_controller.rb:87
  2731. * (IrresponsibleModule) ApplicationController has no descriptive comment
  2732. - app/controllers/application_controller.rb:1
  2733. * (NilCheck) ApplicationController#check_user_data performs a nil-check
  2734. - app/controllers/application_controller.rb:47
  2735. * (UtilityFunction) ApplicationController#client doesn't depend on instance state (maybe move it to another class?)
  2736. - app/controllers/application_controller.rb:126
  2737.  
  2738. ApplicationHelper:
  2739. Rating: C
  2740. Churn: 0
  2741. Complexity: 172.18
  2742. Duplication: 0
  2743. Smells: 24
  2744. * (HighComplexity) ApplicationHelper#show_avatar has a flog score of 45
  2745. - app/helpers/application_helper.rb:125
  2746. * (HighComplexity) ApplicationHelper#format_pagination has a flog score of 39
  2747. - app/helpers/application_helper.rb:84
  2748. * (ControlParameter) ApplicationHelper#get_url_by_brand is controlled by argument 'brand'
  2749. - app/helpers/application_helper.rb:45
  2750. * (ControlParameter) ApplicationHelper#search_page is controlled by argument 'results_by_page'
  2751. - app/helpers/application_helper.rb:115
  2752. * (ControlParameter) ApplicationHelper#search_page is controlled by argument 'value'
  2753. - app/helpers/application_helper.rb:113
  2754. * (DuplicateMethodCall) ApplicationHelper#format_pagination calls '@current_page*by_page' 2 times
  2755. - app/helpers/application_helper.rb:95
  2756. - app/helpers/application_helper.rb:96
  2757. * (DuplicateMethodCall) ApplicationHelper#format_pagination calls 'value.nil?' 2 times
  2758. - app/helpers/application_helper.rb:85
  2759. - app/helpers/application_helper.rb:87
  2760. * (DuplicateMethodCall) ApplicationHelper#show_avatar calls 'user["real_name"]' 3 times
  2761. - app/helpers/application_helper.rb:129
  2762. - app/helpers/application_helper.rb:130
  2763. * (DuplicateMethodCall) ApplicationHelper#show_avatar calls 'user["real_name"].split(" ")' 2 times
  2764. - app/helpers/application_helper.rb:130
  2765. * (IrresponsibleModule) ApplicationHelper has no descriptive comment
  2766. - app/helpers/application_helper.rb:1
  2767. * (LongParameterList) ApplicationHelper#format_pagination has 4 parameters
  2768. - app/helpers/application_helper.rb:84
  2769. * (LongParameterList) ApplicationHelper#search_page has 4 parameters
  2770. - app/helpers/application_helper.rb:108
  2771. * (NilCheck) ApplicationHelper#format_pagination performs a nil-check
  2772. - app/helpers/application_helper.rb:85
  2773. - app/helpers/application_helper.rb:87
  2774. * (TooManyStatements) ApplicationHelper#format_pagination has approx 15 statements
  2775. - app/helpers/application_helper.rb:84
  2776. * (TooManyStatements) ApplicationHelper#get_currency_by_brand has approx 8 statements
  2777. - app/helpers/application_helper.rb:62
  2778. * (TooManyStatements) ApplicationHelper#search_page has approx 9 statements
  2779. - app/helpers/application_helper.rb:108
  2780. * (TooManyStatements) ApplicationHelper#show_avatar has approx 8 statements
  2781. - app/helpers/application_helper.rb:125
  2782. * (UncommunicativeVariableName) ApplicationHelper#format_pagination has the variable name 't'
  2783. - app/helpers/application_helper.rb:99
  2784. * (UncommunicativeVariableName) ApplicationHelper#search_page has the variable name 't'
  2785. - app/helpers/application_helper.rb:111
  2786. * (UtilityFunction) ApplicationHelper#convert_locale doesn't depend on instance state (maybe move it to another class?)
  2787. - app/helpers/application_helper.rb:35
  2788. * (UtilityFunction) ApplicationHelper#format_date doesn't depend on instance state (maybe move it to another class?)
  2789. - app/helpers/application_helper.rb:142
  2790. * (UtilityFunction) ApplicationHelper#get_currency_by_brand_id doesn't depend on instance state (maybe move it to another class?)
  2791. - app/helpers/application_helper.rb:50
  2792. * (UtilityFunction) ApplicationHelper#get_currency_value_by doesn't depend on instance state (maybe move it to another class?)
  2793. - app/helpers/application_helper.rb:54
  2794. * (UtilityFunction) ApplicationHelper#get_lang_by_brand doesn't depend on instance state (maybe move it to another class?)
  2795. - app/helpers/application_helper.rb:79
  2796.  
  2797. Asyncs::IpsController:
  2798. Rating: C
  2799. Churn: 0
  2800. Complexity: 131.56
  2801. Duplication: 0
  2802. Smells: 25
  2803. * (VeryHighComplexity) Asyncs::IpsController#addon_checkout has a flog score of 75
  2804. - app/controllers/asyncs/ips_controller.rb:16
  2805. * (HighComplexity) Asyncs::IpsController#list has a flog score of 28
  2806. - app/controllers/asyncs/ips_controller.rb:5
  2807. * (HighComplexity) Asyncs::IpsController#group_ips_by_device has a flog score of 25
  2808. - app/controllers/asyncs/ips_controller.rb:58
  2809. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'addon[:desserv]' 2 times
  2810. - app/controllers/asyncs/ips_controller.rb:32
  2811. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'addon[:did]' 4 times
  2812. - app/controllers/asyncs/ips_controller.rb:34
  2813. - app/controllers/asyncs/ips_controller.rb:37
  2814. - app/controllers/asyncs/ips_controller.rb:38
  2815. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'addon[:paymentmethod]' 2 times
  2816. - app/controllers/asyncs/ips_controller.rb:30
  2817. - app/controllers/asyncs/ips_controller.rb:44
  2818. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'addon[:reason]' 2 times
  2819. - app/controllers/asyncs/ips_controller.rb:33
  2820. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'addon[:return_to]' 2 times
  2821. - app/controllers/asyncs/ips_controller.rb:51
  2822. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'device.service_id' 2 times
  2823. - app/controllers/asyncs/ips_controller.rb:39
  2824. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'params[:addon]' 2 times
  2825. - app/controllers/asyncs/ips_controller.rb:18
  2826. - app/controllers/asyncs/ips_controller.rb:20
  2827. * (DuplicateMethodCall) Asyncs::IpsController#addon_checkout calls 'result[:error]' 3 times
  2828. - app/controllers/asyncs/ips_controller.rb:46
  2829. - app/controllers/asyncs/ips_controller.rb:49
  2830. * (DuplicateMethodCall) Asyncs::IpsController#group_ips_by_device calls 'ip['device_id']' 4 times
  2831. - app/controllers/asyncs/ips_controller.rb:62
  2832. - app/controllers/asyncs/ips_controller.rb:65
  2833. - app/controllers/asyncs/ips_controller.rb:66
  2834. * (DuplicateMethodCall) Asyncs::IpsController#group_ips_by_device calls 'ip['device_id'].to_i' 3 times
  2835. - app/controllers/asyncs/ips_controller.rb:62
  2836. - app/controllers/asyncs/ips_controller.rb:65
  2837. - app/controllers/asyncs/ips_controller.rb:66
  2838. * (DuplicateMethodCall) Asyncs::IpsController#list calls 'current_user.company_id' 2 times
  2839. - app/controllers/asyncs/ips_controller.rb:6
  2840. - app/controllers/asyncs/ips_controller.rb:10
  2841. * (DuplicateMethodCall) Asyncs::IpsController#list calls 'ips_result.data' 2 times
  2842. - app/controllers/asyncs/ips_controller.rb:7
  2843. * (DuplicateMethodCall) Asyncs::IpsController#list calls 'ips_result.error?' 2 times
  2844. - app/controllers/asyncs/ips_controller.rb:7
  2845. - app/controllers/asyncs/ips_controller.rb:8
  2846. * (FeatureEnvy) Asyncs::IpsController#addon_checkout refers to 'addon' more than self (maybe move it to another class?)
  2847. - app/controllers/asyncs/ips_controller.rb:22
  2848. - app/controllers/asyncs/ips_controller.rb:23
  2849. - app/controllers/asyncs/ips_controller.rb:30
  2850. - app/controllers/asyncs/ips_controller.rb:32
  2851. - app/controllers/asyncs/ips_controller.rb:33
  2852. - app/controllers/asyncs/ips_controller.rb:34
  2853. - app/controllers/asyncs/ips_controller.rb:36
  2854. - app/controllers/asyncs/ips_controller.rb:37
  2855. - app/controllers/asyncs/ips_controller.rb:38
  2856. - app/controllers/asyncs/ips_controller.rb:44
  2857. - app/controllers/asyncs/ips_controller.rb:51
  2858. * (IrresponsibleModule) Asyncs::IpsController has no descriptive comment
  2859. - app/controllers/asyncs/ips_controller.rb:1
  2860. * (NilCheck) Asyncs::IpsController#addon_checkout performs a nil-check
  2861. - app/controllers/asyncs/ips_controller.rb:18
  2862. - app/controllers/asyncs/ips_controller.rb:32
  2863. - app/controllers/asyncs/ips_controller.rb:33
  2864. - app/controllers/asyncs/ips_controller.rb:34
  2865. - app/controllers/asyncs/ips_controller.rb:41
  2866. - app/controllers/asyncs/ips_controller.rb:46
  2867. * (TooManyInstanceVariables) Asyncs::IpsController has at least 5 instance variables
  2868. - app/controllers/asyncs/ips_controller.rb:1
  2869. * (TooManyStatements) Asyncs::IpsController#addon_checkout has approx 18 statements
  2870. - app/controllers/asyncs/ips_controller.rb:16
  2871. * (TooManyStatements) Asyncs::IpsController#group_ips_by_device has approx 10 statements
  2872. - app/controllers/asyncs/ips_controller.rb:58
  2873. * (TooManyStatements) Asyncs::IpsController#list has approx 8 statements
  2874. - app/controllers/asyncs/ips_controller.rb:5
  2875. * (UncommunicativeVariableName) Asyncs::IpsController#group_ips_by_device has the variable name 'v'
  2876. - app/controllers/asyncs/ips_controller.rb:70
  2877. * (UtilityFunction) Asyncs::IpsController#group_ips_by_device doesn't depend on instance state (maybe move it to another class?)
  2878. - app/controllers/asyncs/ips_controller.rb:58
  2879.  
  2880. Asyncs::ServersController:
  2881. Rating: C
  2882. Churn: 0
  2883. Complexity: 107.64
  2884. Duplication: 0
  2885. Smells: 17
  2886. * (HighComplexity) Asyncs::ServersController#reinstall has a flog score of 56
  2887. - app/controllers/asyncs/servers_controller.rb:37
  2888. * (DuplicateMethodCall) Asyncs::ServersController#overview calls '@device.service_id' 2 times
  2889. - app/controllers/asyncs/servers_controller.rb:18
  2890. - app/controllers/asyncs/servers_controller.rb:19
  2891. * (DuplicateMethodCall) Asyncs::ServersController#overview calls '@service['modules']' 3 times
  2892. - app/controllers/asyncs/servers_controller.rb:23
  2893. - app/controllers/asyncs/servers_controller.rb:25
  2894. * (DuplicateMethodCall) Asyncs::ServersController#reinstall calls 'task.data' 2 times
  2895. - app/controllers/asyncs/servers_controller.rb:60
  2896. * (DuplicateMethodCall) Asyncs::ServersController#reinstall calls 'task.data['last_status']' 2 times
  2897. - app/controllers/asyncs/servers_controller.rb:60
  2898. * (InstanceVariableAssumption) Asyncs::ServersController assumes too much for instance variable '@device'
  2899. - app/controllers/asyncs/servers_controller.rb:1
  2900. * (InstanceVariableAssumption) Asyncs::ServersController assumes too much for instance variable '@distro_label_maps'
  2901. - app/controllers/asyncs/servers_controller.rb:1
  2902. * (InstanceVariableAssumption) Asyncs::ServersController assumes too much for instance variable '@graph'
  2903. - app/controllers/asyncs/servers_controller.rb:1
  2904. * (InstanceVariableAssumption) Asyncs::ServersController assumes too much for instance variable '@service'
  2905. - app/controllers/asyncs/servers_controller.rb:1
  2906. * (InstanceVariableAssumption) Asyncs::ServersController assumes too much for instance variable '@system_id'
  2907. - app/controllers/asyncs/servers_controller.rb:1
  2908. * (IrresponsibleModule) Asyncs::ServersController has no descriptive comment
  2909. - app/controllers/asyncs/servers_controller.rb:1
  2910. * (MissingSafeMethod) Asyncs::ServersController has missing safe method 'ensure_graph_present!'
  2911. - app/controllers/asyncs/servers_controller.rb:79
  2912. * (NilCheck) Asyncs::ServersController#ensure_graph_present! performs a nil-check
  2913. - app/controllers/asyncs/servers_controller.rb:80
  2914. * (NilCheck) Asyncs::ServersController#reinstall performs a nil-check
  2915. - app/controllers/asyncs/servers_controller.rb:42
  2916. - app/controllers/asyncs/servers_controller.rb:45
  2917. - app/controllers/asyncs/servers_controller.rb:60
  2918. * (NilCheck) Asyncs::ServersController#set_main_ip performs a nil-check
  2919. - app/controllers/asyncs/servers_controller.rb:93
  2920. * (TooManyInstanceVariables) Asyncs::ServersController has at least 11 instance variables
  2921. - app/controllers/asyncs/servers_controller.rb:1
  2922. * (TooManyStatements) Asyncs::ServersController#reinstall has approx 20 statements
  2923. - app/controllers/asyncs/servers_controller.rb:37
  2924.  
  2925. ChartMogul::Models::InvoicePlan:
  2926. Rating: C
  2927. Churn: 0
  2928. Complexity: 153.65
  2929. Duplication: 0
  2930. Smells: 27
  2931. * (HighComplexity) ChartMogul::Models::InvoicePlan#ensure_plan_exists has a flog score of 31
  2932. - app/adapters/chart_mogul/models/invoice_plan.rb:78
  2933. * (DuplicateMethodCall) ChartMogul::Models::InvoicePlan#as_iso_date calls 'epoch.to_i' 2 times
  2934. - app/adapters/chart_mogul/models/invoice_plan.rb:152
  2935. - app/adapters/chart_mogul/models/invoice_plan.rb:153
  2936. * (DuplicateMethodCall) ChartMogul::Models::InvoicePlan#ensure_plan_exists calls 'payment.has_key?(:refund_id)' 4 times
  2937. - app/adapters/chart_mogul/models/invoice_plan.rb:80
  2938. - app/adapters/chart_mogul/models/invoice_plan.rb:85
  2939. - app/adapters/chart_mogul/models/invoice_plan.rb:88
  2940. - app/adapters/chart_mogul/models/invoice_plan.rb:95
  2941. * (DuplicateMethodCall) ChartMogul::Models::InvoicePlan#line_item_payload calls 'plan.package' 2 times
  2942. - app/adapters/chart_mogul/models/invoice_plan.rb:115
  2943. - app/adapters/chart_mogul/models/invoice_plan.rb:117
  2944. * (DuplicateMethodCall) ChartMogul::Models::InvoicePlan#line_item_payload calls 'plan.recurrent?' 2 times
  2945. - app/adapters/chart_mogul/models/invoice_plan.rb:113
  2946. - app/adapters/chart_mogul/models/invoice_plan.rb:117
  2947. * (DuplicateMethodCall) ChartMogul::Models::InvoicePlan#line_item_recurrent_plan_payload calls 'plan.pack_id' 2 times
  2948. - app/adapters/chart_mogul/models/invoice_plan.rb:124
  2949. - app/adapters/chart_mogul/models/invoice_plan.rb:126
  2950. * (FeatureEnvy) ChartMogul::Models::InvoicePlan#line_item_payload refers to 'h' more than self (maybe move it to another class?)
  2951. - app/adapters/chart_mogul/models/invoice_plan.rb:113
  2952. - app/adapters/chart_mogul/models/invoice_plan.rb:114
  2953. - app/adapters/chart_mogul/models/invoice_plan.rb:115
  2954. - app/adapters/chart_mogul/models/invoice_plan.rb:116
  2955. - app/adapters/chart_mogul/models/invoice_plan.rb:117
  2956. * (FeatureEnvy) ChartMogul::Models::InvoicePlan#line_item_recurrent_plan_payload refers to 'plan' more than self (maybe move it to another class?)
  2957. - app/adapters/chart_mogul/models/invoice_plan.rb:123
  2958. - app/adapters/chart_mogul/models/invoice_plan.rb:124
  2959. - app/adapters/chart_mogul/models/invoice_plan.rb:126
  2960. - app/adapters/chart_mogul/models/invoice_plan.rb:127
  2961. * (InstanceVariableAssumption) ChartMogul::Models::InvoicePlan assumes too much for instance variable '@external_id'
  2962. - app/adapters/chart_mogul/models/invoice_plan.rb:5
  2963. * (InstanceVariableAssumption) ChartMogul::Models::InvoicePlan assumes too much for instance variable '@line_items'
  2964. - app/adapters/chart_mogul/models/invoice_plan.rb:5
  2965. * (IrresponsibleModule) ChartMogul::Models::InvoicePlan has no descriptive comment
  2966. - app/adapters/chart_mogul/models/invoice_plan.rb:5
  2967. * (NilCheck) ChartMogul::Models::InvoicePlan#billing_period_for performs a nil-check
  2968. - app/adapters/chart_mogul/models/invoice_plan.rb:136
  2969. * (NilCheck) ChartMogul::Models::InvoicePlan#ensure_plan_exists performs a nil-check
  2970. - app/adapters/chart_mogul/models/invoice_plan.rb:89
  2971. * (NilCheck) ChartMogul::Models::InvoicePlan#exists? performs a nil-check
  2972. - app/adapters/chart_mogul/models/invoice_plan.rb:157
  2973. * (NilCheck) ChartMogul::Models::InvoicePlan#line_item_payload performs a nil-check
  2974. - app/adapters/chart_mogul/models/invoice_plan.rb:115
  2975. * (NilCheck) ChartMogul::Models::InvoicePlan#push_to_line_items performs a nil-check
  2976. - app/adapters/chart_mogul/models/invoice_plan.rb:103
  2977. * (RepeatedConditional) ChartMogul::Models::InvoicePlan tests 'payment.has_key?(:refund_id)' at least 3 times
  2978. - app/adapters/chart_mogul/models/invoice_plan.rb:85
  2979. - app/adapters/chart_mogul/models/invoice_plan.rb:88
  2980. - app/adapters/chart_mogul/models/invoice_plan.rb:95
  2981. * (RepeatedConditional) ChartMogul::Models::InvoicePlan tests 'plan.recurrent?' at least 3 times
  2982. - app/adapters/chart_mogul/models/invoice_plan.rb:113
  2983. - app/adapters/chart_mogul/models/invoice_plan.rb:117
  2984. - app/adapters/chart_mogul/models/invoice_plan.rb:123
  2985. * (TooManyInstanceVariables) ChartMogul::Models::InvoicePlan has at least 6 instance variables
  2986. - app/adapters/chart_mogul/models/invoice_plan.rb:5
  2987. * (TooManyStatements) ChartMogul::Models::InvoicePlan#billing_period_for has approx 8 statements
  2988. - app/adapters/chart_mogul/models/invoice_plan.rb:133
  2989. * (TooManyStatements) ChartMogul::Models::InvoicePlan#ensure_plan_exists has approx 11 statements
  2990. - app/adapters/chart_mogul/models/invoice_plan.rb:78
  2991. * (TooManyStatements) ChartMogul::Models::InvoicePlan#invoice_payload has approx 6 statements
  2992. - app/adapters/chart_mogul/models/invoice_plan.rb:23
  2993. * (TooManyStatements) ChartMogul::Models::InvoicePlan#line_item_payload has approx 8 statements
  2994. - app/adapters/chart_mogul/models/invoice_plan.rb:111
  2995. * (UncommunicativeVariableName) ChartMogul::Models::InvoicePlan#billing_period_for has the variable name 'h'
  2996. - app/adapters/chart_mogul/models/invoice_plan.rb:134
  2997. * (UncommunicativeVariableName) ChartMogul::Models::InvoicePlan#line_item_payload has the variable name 'h'
  2998. - app/adapters/chart_mogul/models/invoice_plan.rb:112
  2999. * (UtilityFunction) ChartMogul::Models::InvoicePlan#as_iso_date doesn't depend on instance state (maybe move it to another class?)
  3000. - app/adapters/chart_mogul/models/invoice_plan.rb:150
  3001. * (UtilityFunction) ChartMogul::Models::InvoicePlan#exists? doesn't depend on instance state (maybe move it to another class?)
  3002. - app/adapters/chart_mogul/models/invoice_plan.rb:156
  3003.  
  3004. ChartMogul::Smith::BadRequest:
  3005. Rating: C
  3006. Churn: 0
  3007. Complexity: 93.44
  3008. Duplication: 17
  3009. Smells: 7
  3010. * (DuplicateCode) Identical code found in 2 nodes
  3011. - app/adapters/chart_mogul/smith.rb:35
  3012. - app/adapters/current_user/smith.rb:4
  3013. * (HighComplexity) ChartMogul::Smith::parse_invoice has a flog score of 57
  3014. - app/adapters/chart_mogul/smith.rb:14
  3015. * (DuplicateMethodCall) ChartMogul::Smith#parse_invoice calls 'invoices[payment['invid']]' 3 times
  3016. - app/adapters/chart_mogul/smith.rb:28
  3017. - app/adapters/chart_mogul/smith.rb:29
  3018. * (DuplicateMethodCall) ChartMogul::Smith#parse_invoice calls 'payment['invid']' 7 times
  3019. - app/adapters/chart_mogul/smith.rb:17
  3020. - app/adapters/chart_mogul/smith.rb:19
  3021. - app/adapters/chart_mogul/smith.rb:20
  3022. - app/adapters/chart_mogul/smith.rb:24
  3023. - app/adapters/chart_mogul/smith.rb:28
  3024. - app/adapters/chart_mogul/smith.rb:29
  3025. * (IrresponsibleModule) ChartMogul::Smith has no descriptive comment
  3026. - app/adapters/chart_mogul/smith.rb:4
  3027. * (IrresponsibleModule) ChartMogul::Smith::BadRequest has no descriptive comment
  3028. - app/adapters/chart_mogul/smith.rb:59
  3029. * (TooManyStatements) ChartMogul::Smith#parse_invoice has approx 8 statements
  3030. - app/adapters/chart_mogul/smith.rb:14
  3031.  
  3032. CreditInvoiceUbersmithServiceSpec:
  3033. Rating: C
  3034. Churn: 0
  3035. Complexity: 100.89
  3036. Duplication: 62
  3037. Smells: 4
  3038. * (DuplicateCode) Similar code found in 2 nodes
  3039. - spec/services/credit_invoice_ubersmith_service_spec.rb:9
  3040. - spec/services/credit_invoice_ubersmith_service_spec.rb:18
  3041. * (HighComplexity) describe(#call)::context#when had paid by credit has a flog score of 28
  3042. - spec/services/credit_invoice_ubersmith_service_spec.rb:9
  3043. * (HighComplexity) describe(#call)::context#when had not paid by credit has a flog score of 28
  3044. - spec/services/credit_invoice_ubersmith_service_spec.rb:18
  3045. * (HighComplexity) describe(#call)::context#when had error fetching payments has a flog score of 26
  3046. - spec/services/credit_invoice_ubersmith_service_spec.rb:27
  3047.  
  3048. CurrentUser::Client:
  3049. Rating: C
  3050. Churn: 0
  3051. Complexity: 121.0
  3052. Duplication: 0
  3053. Smells: 24
  3054. * (ControlParameter) CurrentUser::Client#method_missing is controlled by argument 'method'
  3055. - app/adapters/current_user/client.rb:100
  3056. * (DuplicateMethodCall) CurrentUser::Client#associate_two_factor calls '@session[:inactive_otp]' 2 times
  3057. - app/adapters/current_user/client.rb:137
  3058. * (DuplicateMethodCall) CurrentUser::Client#token calls '@session[:api_token]' 2 times
  3059. - app/adapters/current_user/client.rb:21
  3060. - app/adapters/current_user/client.rb:22
  3061. * (InstanceVariableAssumption) CurrentUser::Client assumes too much for instance variable '@company_id'
  3062. - app/adapters/current_user/client.rb:2
  3063. * (InstanceVariableAssumption) CurrentUser::Client assumes too much for instance variable '@contact_id'
  3064. - app/adapters/current_user/client.rb:2
  3065. * (IrresponsibleModule) CurrentUser::Client has no descriptive comment
  3066. - app/adapters/current_user/client.rb:2
  3067. * (MissingSafeMethod) CurrentUser::Client has missing safe method 'update!'
  3068. - app/adapters/current_user/client.rb:37
  3069. * (NilCheck) CurrentUser::Client#associate_two_factor performs a nil-check
  3070. - app/adapters/current_user/client.rb:137
  3071. * (NilCheck) CurrentUser::Client#enable_two_factor performs a nil-check
  3072. - app/adapters/current_user/client.rb:69
  3073. * (NilCheck) CurrentUser::Client#provisioning_uri performs a nil-check
  3074. - app/adapters/current_user/client.rb:57
  3075. * (NilCheck) CurrentUser::Client#token performs a nil-check
  3076. - app/adapters/current_user/client.rb:21
  3077. * (RepeatedConditional) CurrentUser::Client tests 'otp_enabled?' at least 3 times
  3078. - app/adapters/current_user/client.rb:54
  3079. - app/adapters/current_user/client.rb:75
  3080. - app/adapters/current_user/client.rb:135
  3081. * (TooManyInstanceVariables) CurrentUser::Client has at least 12 instance variables
  3082. - app/adapters/current_user/client.rb:2
  3083. * (TooManyMethods) CurrentUser::Client has at least 18 methods
  3084. - app/adapters/current_user/client.rb:2
  3085. * (TooManyStatements) CurrentUser::Client#associate_two_factor has approx 6 statements
  3086. - app/adapters/current_user/client.rb:134
  3087. * (TooManyStatements) CurrentUser::Client#disable_two_factor has approx 7 statements
  3088. - app/adapters/current_user/client.rb:74
  3089. * (TooManyStatements) CurrentUser::Client#set_attributes has approx 9 statements
  3090. - app/adapters/current_user/client.rb:105
  3091. * (TooManyStatements) CurrentUser::Client#update! has approx 6 statements
  3092. - app/adapters/current_user/client.rb:37
  3093. * (TooManyStatements) CurrentUser::Client#update_session has approx 6 statements
  3094. - app/adapters/current_user/client.rb:121
  3095. * (UncommunicativeMethodName) CurrentUser::Client#mfa_auth0 has the name 'mfa_auth0'
  3096. - app/adapters/current_user/client.rb:146
  3097. * (UncommunicativeVariableName) CurrentUser::Client has the variable name '@mfa_auth0'
  3098. - app/adapters/current_user/client.rb:147
  3099. * (UncommunicativeVariableName) CurrentUser::Client#update_session has the variable name 'k'
  3100. - app/adapters/current_user/client.rb:122
  3101. * (UtilityFunction) CurrentUser::Client#has_new_password? doesn't depend on instance state (maybe move it to another class?)
  3102. - app/adapters/current_user/client.rb:90
  3103. * (UtilityFunction) CurrentUser::Client#is_new_password_match? doesn't depend on instance state (maybe move it to another class?)
  3104. - app/adapters/current_user/client.rb:94
  3105.  
  3106. CurrentUser::Smith:
  3107. Rating: C
  3108. Churn: 0
  3109. Complexity: 108.54
  3110. Duplication: 17
  3111. Smells: 12
  3112. * (DuplicateCode) Identical code found in 2 nodes
  3113. - app/adapters/chart_mogul/smith.rb:35
  3114. - app/adapters/current_user/smith.rb:4
  3115. * (HighComplexity) CurrentUser::Smith::client_sync has a flog score of 30
  3116. - app/adapters/current_user/smith.rb:42
  3117. * (ControlParameter) CurrentUser::Smith#language is controlled by argument 'text'
  3118. - app/adapters/current_user/smith.rb:95
  3119. * (ControlParameter) CurrentUser::Smith#sync! is controlled by argument 'type'
  3120. - app/adapters/current_user/smith.rb:9
  3121. * (DuplicateMethodCall) CurrentUser::Smith#client_sync calls 'data[:company]' 2 times
  3122. - app/adapters/current_user/smith.rb:56
  3123. - app/adapters/current_user/smith.rb:57
  3124. * (DuplicateMethodCall) CurrentUser::Smith#sync! calls 'client_sync(current_user.company_id, data)' 2 times
  3125. - app/adapters/current_user/smith.rb:11
  3126. - app/adapters/current_user/smith.rb:14
  3127. * (DuplicateMethodCall) CurrentUser::Smith#sync! calls 'current_user.company_id' 2 times
  3128. - app/adapters/current_user/smith.rb:11
  3129. - app/adapters/current_user/smith.rb:14
  3130. * (DuplicateMethodCall) CurrentUser::Smith#sync! calls 'current_user.contact_id' 2 times
  3131. - app/adapters/current_user/smith.rb:13
  3132. - app/adapters/current_user/smith.rb:15
  3133. * (IrresponsibleModule) CurrentUser::Smith has no descriptive comment
  3134. - app/adapters/current_user/smith.rb:2
  3135. * (TooManyStatements) CurrentUser::Smith#client_sync has approx 9 statements
  3136. - app/adapters/current_user/smith.rb:42
  3137. * (TooManyStatements) CurrentUser::Smith#contact_sync has approx 11 statements
  3138. - app/adapters/current_user/smith.rb:64
  3139. * (UncommunicativeVariableName) CurrentUser::Smith#contact_sync has the variable name 'i'
  3140. - app/adapters/current_user/smith.rb:70
  3141.  
  3142. Environment::Ubersmith:
  3143. Rating: C
  3144. Churn: 0
  3145. Complexity: 54.99
  3146. Duplication: 160
  3147. Smells: 9
  3148. * (DuplicateCode) Similar code found in 2 nodes
  3149. - lib/modules/environment.rb:8
  3150. - lib/modules/environment.rb:10
  3151. * (DuplicateCode) Similar code found in 2 nodes
  3152. - lib/modules/environment.rb:18
  3153. - lib/modules/environment.rb:22
  3154. * (DuplicateCode) Similar code found in 6 nodes
  3155. - lib/modules/environment.rb:28
  3156. - lib/modules/environment.rb:32
  3157. - lib/modules/environment.rb:54
  3158. - lib/modules/environment.rb:58
  3159. - lib/modules/environment.rb:62
  3160. - lib/modules/environment.rb:66
  3161. * (DuplicateMethodCall) Environment#self.choice calls 'brand != 0' 2 times
  3162. - lib/modules/environment.rb:9
  3163. - lib/modules/environment.rb:11
  3164. * (DuplicateMethodCall) Environment#self.choice calls 'brand.to_i' 2 times
  3165. - lib/modules/environment.rb:9
  3166. - lib/modules/environment.rb:11
  3167. * (IrresponsibleModule) Environment has no descriptive comment
  3168. - lib/modules/environment.rb:1
  3169. * (IrresponsibleModule) Environment::Addon has no descriptive comment
  3170. - lib/modules/environment.rb:53
  3171. * (IrresponsibleModule) Environment::Maas has no descriptive comment
  3172. - lib/modules/environment.rb:27
  3173. * (IrresponsibleModule) Environment::Ubersmith has no descriptive comment
  3174. - lib/modules/environment.rb:17
  3175.  
  3176. InvoicePresenterSpec:
  3177. Rating: C
  3178. Churn: 0
  3179. Complexity: 121.83
  3180. Duplication: 48
  3181. Smells: 1
  3182. * (DuplicateCode) Similar code found in 3 nodes
  3183. - spec/presenters/invoice_presenter_spec.rb:6
  3184. - spec/presenters/invoice_presenter_spec.rb:16
  3185. - spec/presenters/invoice_presenter_spec.rb:26
  3186.  
  3187. PaypalHelper:
  3188. Rating: C
  3189. Churn: 0
  3190. Complexity: 97.96
  3191. Duplication: 36
  3192. Smells: 17
  3193. * (DuplicateCode) Identical code found in 2 nodes
  3194. - app/helpers/paypal_helper.rb:10
  3195. - app/helpers/paypal_helper.rb:33
  3196. * (HighComplexity) PaypalHelper#call_token has a flog score of 35
  3197. - app/helpers/paypal_helper.rb:3
  3198. * (HighComplexity) PaypalHelper#approve_billing_agreement has a flog score of 32
  3199. - app/helpers/paypal_helper.rb:26
  3200. * (HighComplexity) PaypalHelper#find_paypal_billing_agreements has a flog score of 25
  3201. - app/helpers/paypal_helper.rb:54
  3202. * (DuplicateMethodCall) PaypalHelper#approve_billing_agreement calls 'api.client' 3 times
  3203. - app/helpers/paypal_helper.rb:29
  3204. - app/helpers/paypal_helper.rb:35
  3205. - app/helpers/paypal_helper.rb:36
  3206. * (DuplicateMethodCall) PaypalHelper#approve_billing_agreement calls 'ba['billing_info_id']' 2 times
  3207. - app/helpers/paypal_helper.rb:35
  3208. - app/helpers/paypal_helper.rb:36
  3209. * (DuplicateMethodCall) PaypalHelper#approve_billing_agreement calls 'result.error?' 2 times
  3210. - app/helpers/paypal_helper.rb:30
  3211. - app/helpers/paypal_helper.rb:36
  3212. * (DuplicateMethodCall) PaypalHelper#call_token calls 'api.client' 3 times
  3213. - app/helpers/paypal_helper.rb:9
  3214. - app/helpers/paypal_helper.rb:13
  3215. - app/helpers/paypal_helper.rb:17
  3216. * (DuplicateMethodCall) PaypalHelper#call_token calls 'request.original_url' 2 times
  3217. - app/helpers/paypal_helper.rb:20
  3218. - app/helpers/paypal_helper.rb:21
  3219. * (FeatureEnvy) PaypalHelper#call_token refers to 'api' more than self (maybe move it to another class?)
  3220. - app/helpers/paypal_helper.rb:9
  3221. - app/helpers/paypal_helper.rb:13
  3222. - app/helpers/paypal_helper.rb:17
  3223. * (FeatureEnvy) PaypalHelper#call_token refers to 'ba' more than self (maybe move it to another class?)
  3224. - app/helpers/paypal_helper.rb:10
  3225. - app/helpers/paypal_helper.rb:13
  3226. * (IrresponsibleModule) PaypalHelper has no descriptive comment
  3227. - app/helpers/paypal_helper.rb:1
  3228. * (NilCheck) PaypalHelper#approve_billing_agreement performs a nil-check
  3229. - app/helpers/paypal_helper.rb:34
  3230. * (TooManyStatements) PaypalHelper#approve_billing_agreement has approx 9 statements
  3231. - app/helpers/paypal_helper.rb:26
  3232. * (TooManyStatements) PaypalHelper#call_token has approx 8 statements
  3233. - app/helpers/paypal_helper.rb:3
  3234. * (UtilityFunction) PaypalHelper#approve_billing_agreement doesn't depend on instance state (maybe move it to another class?)
  3235. - app/helpers/paypal_helper.rb:26
  3236. * (UtilityFunction) PaypalHelper#find_paypal_billing_agreements doesn't depend on instance state (maybe move it to another class?)
  3237. - app/helpers/paypal_helper.rb:54
  3238.  
  3239. RegistrationsController:
  3240. Rating: C
  3241. Churn: 0
  3242. Complexity: 188.71
  3243. Duplication: 0
  3244. Smells: 28
  3245. * (HighComplexity) RegistrationsController#create has a flog score of 36
  3246. - app/controllers/registrations_controller.rb:19
  3247. * (HighComplexity) RegistrationsController#run_risk_check has a flog score of 36
  3248. - app/controllers/registrations_controller.rb:87
  3249. * (DuplicateMethodCall) RegistrationsController#create calls 'redirect_to new_user_registration_path' 2 times
  3250. - app/controllers/registrations_controller.rb:33
  3251. - app/controllers/registrations_controller.rb:37
  3252. * (DuplicateMethodCall) RegistrationsController#run_risk_check calls 'current_user.company' 4 times
  3253. - app/controllers/registrations_controller.rb:91
  3254. - app/controllers/registrations_controller.rb:92
  3255. - app/controllers/registrations_controller.rb:97
  3256. - app/controllers/registrations_controller.rb:112
  3257. * (DuplicateMethodCall) RegistrationsController#sign_up_params calls 'user[:company]' 3 times
  3258. - app/controllers/registrations_controller.rb:154
  3259. - app/controllers/registrations_controller.rb:155
  3260. * (DuplicateMethodCall) RegistrationsController#update calls 'redirect_to edit_user_registration_path' 2 times
  3261. - app/controllers/registrations_controller.rb:62
  3262. - app/controllers/registrations_controller.rb:65
  3263. * (FeatureEnvy) RegistrationsController#sign_up_params refers to 'user' more than self (maybe move it to another class?)
  3264. - app/controllers/registrations_controller.rb:153
  3265. - app/controllers/registrations_controller.rb:154
  3266. - app/controllers/registrations_controller.rb:155
  3267. * (InstanceVariableAssumption) RegistrationsController assumes too much for instance variable '@ip_data'
  3268. - app/controllers/registrations_controller.rb:1
  3269. * (IrresponsibleModule) RegistrationsController has no descriptive comment
  3270. - app/controllers/registrations_controller.rb:1
  3271. * (MissingSafeMethod) RegistrationsController has missing safe method 'ensure_has_valid_new_password!'
  3272. - app/controllers/registrations_controller.rb:136
  3273. * (MissingSafeMethod) RegistrationsController has missing safe method 'ensure_has_valid_password!'
  3274. - app/controllers/registrations_controller.rb:131
  3275. * (MissingSafeMethod) RegistrationsController has missing safe method 'update_company!'
  3276. - app/controllers/registrations_controller.rb:80
  3277. * (MissingSafeMethod) RegistrationsController has missing safe method 'validate_signup_data!'
  3278. - app/controllers/registrations_controller.rb:118
  3279. * (NilCheck) RegistrationsController#ip_data performs a nil-check
  3280. - app/controllers/registrations_controller.rb:71
  3281. * (NilCheck) RegistrationsController#validate_signup_data! performs a nil-check
  3282. - app/controllers/registrations_controller.rb:121
  3283. * (TooManyInstanceVariables) RegistrationsController has at least 5 instance variables
  3284. - app/controllers/registrations_controller.rb:1
  3285. * (TooManyMethods) RegistrationsController has at least 17 methods
  3286. - app/controllers/registrations_controller.rb:1
  3287. * (TooManyStatements) RegistrationsController#create has approx 14 statements
  3288. - app/controllers/registrations_controller.rb:19
  3289. * (TooManyStatements) RegistrationsController#ip_data has approx 6 statements
  3290. - app/controllers/registrations_controller.rb:70
  3291. * (TooManyStatements) RegistrationsController#risk_check has approx 7 statements
  3292. - app/controllers/registrations_controller.rb:40
  3293. * (TooManyStatements) RegistrationsController#run_risk_check has approx 6 statements
  3294. - app/controllers/registrations_controller.rb:87
  3295. * (TooManyStatements) RegistrationsController#sign_up_params has approx 6 statements
  3296. - app/controllers/registrations_controller.rb:150
  3297. * (TooManyStatements) RegistrationsController#update has approx 8 statements
  3298. - app/controllers/registrations_controller.rb:55
  3299. * (UncommunicativeVariableName) RegistrationsController#create has the variable name 'e'
  3300. - app/controllers/registrations_controller.rb:35
  3301. * (UncommunicativeVariableName) RegistrationsController#ip_data has the variable name 'e'
  3302. - app/controllers/registrations_controller.rb:76
  3303. * (UncommunicativeVariableName) RegistrationsController#risk_check has the variable name 'e'
  3304. - app/controllers/registrations_controller.rb:46
  3305. * (UncommunicativeVariableName) RegistrationsController#update has the variable name 'e'
  3306. - app/controllers/registrations_controller.rb:63
  3307. * (UtilityFunction) RegistrationsController#error_message doesn't depend on instance state (maybe move it to another class?)
  3308. - app/controllers/registrations_controller.rb:143
  3309.  
  3310. RemoveCart:
  3311. Rating: C
  3312. Churn: 0
  3313. Complexity: 115.63
  3314. Duplication: 0
  3315. Smells: 13
  3316. * (VeryHighComplexity) RemoveCart#change has a flog score of 116
  3317. - db/migrate/20181219175613_remove_cart.rb:2
  3318. * (DuplicateMethodCall) RemoveCart#change calls 't.datetime "created_at", null: false' 8 times
  3319. - db/migrate/20181219175613_remove_cart.rb:9
  3320. - db/migrate/20181219175613_remove_cart.rb:23
  3321. - db/migrate/20181219175613_remove_cart.rb:31
  3322. - db/migrate/20181219175613_remove_cart.rb:41
  3323. - db/migrate/20181219175613_remove_cart.rb:53
  3324. - db/migrate/20181219175613_remove_cart.rb:63
  3325. - db/migrate/20181219175613_remove_cart.rb:78
  3326. - db/migrate/20181219175613_remove_cart.rb:95
  3327. * (DuplicateMethodCall) RemoveCart#change calls 't.datetime "updated_at", null: false' 8 times
  3328. - db/migrate/20181219175613_remove_cart.rb:10
  3329. - db/migrate/20181219175613_remove_cart.rb:24
  3330. - db/migrate/20181219175613_remove_cart.rb:32
  3331. - db/migrate/20181219175613_remove_cart.rb:42
  3332. - db/migrate/20181219175613_remove_cart.rb:54
  3333. - db/migrate/20181219175613_remove_cart.rb:64
  3334. - db/migrate/20181219175613_remove_cart.rb:79
  3335. - db/migrate/20181219175613_remove_cart.rb:96
  3336. * (DuplicateMethodCall) RemoveCart#change calls 't.integer "plan_id"' 3 times
  3337. - db/migrate/20181219175613_remove_cart.rb:21
  3338. - db/migrate/20181219175613_remove_cart.rb:48
  3339. - db/migrate/20181219175613_remove_cart.rb:104
  3340. * (DuplicateMethodCall) RemoveCart#change calls 't.integer "pog_id"' 2 times
  3341. - db/migrate/20181219175613_remove_cart.rb:28
  3342. - db/migrate/20181219175613_remove_cart.rb:75
  3343. * (DuplicateMethodCall) RemoveCart#change calls 't.integer "pu_id"' 4 times
  3344. - db/migrate/20181219175613_remove_cart.rb:20
  3345. - db/migrate/20181219175613_remove_cart.rb:30
  3346. - db/migrate/20181219175613_remove_cart.rb:70
  3347. - db/migrate/20181219175613_remove_cart.rb:87
  3348. * (DuplicateMethodCall) RemoveCart#change calls 't.string "name"' 2 times
  3349. - db/migrate/20181219175613_remove_cart.rb:49
  3350. - db/migrate/20181219175613_remove_cart.rb:62
  3351. * (DuplicateMethodCall) RemoveCart#change calls 't.string "pog_name"' 2 times
  3352. - db/migrate/20181219175613_remove_cart.rb:29
  3353. - db/migrate/20181219175613_remove_cart.rb:76
  3354. * (DuplicateMethodCall) RemoveCart#change calls 't.text "names", default: [], array: true' 3 times
  3355. - db/migrate/20181219175613_remove_cart.rb:33
  3356. - db/migrate/20181219175613_remove_cart.rb:81
  3357. - db/migrate/20181219175613_remove_cart.rb:97
  3358. * (FeatureEnvy) RemoveCart#change refers to 't' more than self (maybe move it to another class?)
  3359. - db/migrate/20181219175613_remove_cart.rb:4
  3360. - db/migrate/20181219175613_remove_cart.rb:5
  3361. - db/migrate/20181219175613_remove_cart.rb:6
  3362. - db/migrate/20181219175613_remove_cart.rb:7
  3363. - db/migrate/20181219175613_remove_cart.rb:8
  3364. - db/migrate/20181219175613_remove_cart.rb:9
  3365. - db/migrate/20181219175613_remove_cart.rb:10
  3366. - db/migrate/20181219175613_remove_cart.rb:11
  3367. - db/migrate/20181219175613_remove_cart.rb:12
  3368. - db/migrate/20181219175613_remove_cart.rb:13
  3369. - db/migrate/20181219175613_remove_cart.rb:14
  3370. - db/migrate/20181219175613_remove_cart.rb:15
  3371. - db/migrate/20181219175613_remove_cart.rb:16
  3372. - db/migrate/20181219175613_remove_cart.rb:20
  3373. - db/migrate/20181219175613_remove_cart.rb:21
  3374. - db/migrate/20181219175613_remove_cart.rb:22
  3375. - db/migrate/20181219175613_remove_cart.rb:23
  3376. - db/migrate/20181219175613_remove_cart.rb:24
  3377. - db/migrate/20181219175613_remove_cart.rb:28
  3378. - db/migrate/20181219175613_remove_cart.rb:29
  3379. - db/migrate/20181219175613_remove_cart.rb:30
  3380. - db/migrate/20181219175613_remove_cart.rb:31
  3381. - db/migrate/20181219175613_remove_cart.rb:32
  3382. - db/migrate/20181219175613_remove_cart.rb:33
  3383. - db/migrate/20181219175613_remove_cart.rb:37
  3384. - db/migrate/20181219175613_remove_cart.rb:38
  3385. - db/migrate/20181219175613_remove_cart.rb:39
  3386. - db/migrate/20181219175613_remove_cart.rb:40
  3387. - db/migrate/20181219175613_remove_cart.rb:41
  3388. - db/migrate/20181219175613_remove_cart.rb:42
  3389. - db/migrate/20181219175613_remove_cart.rb:43
  3390. - db/migrate/20181219175613_remove_cart.rb:44
  3391. - db/migrate/20181219175613_remove_cart.rb:48
  3392. - db/migrate/20181219175613_remove_cart.rb:49
  3393. - db/migrate/20181219175613_remove_cart.rb:50
  3394. - db/migrate/20181219175613_remove_cart.rb:51
  3395. - db/migrate/20181219175613_remove_cart.rb:52
  3396. - db/migrate/20181219175613_remove_cart.rb:53
  3397. - db/migrate/20181219175613_remove_cart.rb:54
  3398. - db/migrate/20181219175613_remove_cart.rb:55
  3399. - db/migrate/20181219175613_remove_cart.rb:56
  3400. - db/migrate/20181219175613_remove_cart.rb:57
  3401. - db/migrate/20181219175613_remove_cart.rb:58
  3402. - db/migrate/20181219175613_remove_cart.rb:62
  3403. - db/migrate/20181219175613_remove_cart.rb:63
  3404. - db/migrate/20181219175613_remove_cart.rb:64
  3405. - db/migrate/20181219175613_remove_cart.rb:68
  3406. - db/migrate/20181219175613_remove_cart.rb:69
  3407. - db/migrate/20181219175613_remove_cart.rb:70
  3408. - db/migrate/20181219175613_remove_cart.rb:71
  3409. - db/migrate/20181219175613_remove_cart.rb:72
  3410. - db/migrate/20181219175613_remove_cart.rb:73
  3411. - db/migrate/20181219175613_remove_cart.rb:74
  3412. - db/migrate/20181219175613_remove_cart.rb:75
  3413. - db/migrate/20181219175613_remove_cart.rb:76
  3414. - db/migrate/20181219175613_remove_cart.rb:77
  3415. - db/migrate/20181219175613_remove_cart.rb:78
  3416. - db/migrate/20181219175613_remove_cart.rb:79
  3417. - db/migrate/20181219175613_remove_cart.rb:80
  3418. - db/migrate/20181219175613_remove_cart.rb:81
  3419. - db/migrate/20181219175613_remove_cart.rb:82
  3420. - db/migrate/20181219175613_remove_cart.rb:83
  3421. - db/migrate/20181219175613_remove_cart.rb:87
  3422. - db/migrate/20181219175613_remove_cart.rb:88
  3423. - db/migrate/20181219175613_remove_cart.rb:89
  3424. - db/migrate/20181219175613_remove_cart.rb:90
  3425. - db/migrate/20181219175613_remove_cart.rb:91
  3426. - db/migrate/20181219175613_remove_cart.rb:92
  3427. - db/migrate/20181219175613_remove_cart.rb:93
  3428. - db/migrate/20181219175613_remove_cart.rb:94
  3429. - db/migrate/20181219175613_remove_cart.rb:95
  3430. - db/migrate/20181219175613_remove_cart.rb:96
  3431. - db/migrate/20181219175613_remove_cart.rb:97
  3432. - db/migrate/20181219175613_remove_cart.rb:98
  3433. - db/migrate/20181219175613_remove_cart.rb:99
  3434. - db/migrate/20181219175613_remove_cart.rb:100
  3435. - db/migrate/20181219175613_remove_cart.rb:104
  3436. - db/migrate/20181219175613_remove_cart.rb:105
  3437. - db/migrate/20181219175613_remove_cart.rb:106
  3438. - db/migrate/20181219175613_remove_cart.rb:110
  3439. - db/migrate/20181219175613_remove_cart.rb:111
  3440. - db/migrate/20181219175613_remove_cart.rb:112
  3441. - db/migrate/20181219175613_remove_cart.rb:113
  3442. * (IrresponsibleModule) RemoveCart has no descriptive comment
  3443. - db/migrate/20181219175613_remove_cart.rb:1
  3444. * (TooManyStatements) RemoveCart#change has approx 93 statements
  3445. - db/migrate/20181219175613_remove_cart.rb:2
  3446. * (UncommunicativeVariableName) RemoveCart#change has the variable name 't'
  3447. - db/migrate/20181219175613_remove_cart.rb:3
  3448. - db/migrate/20181219175613_remove_cart.rb:19
  3449. - db/migrate/20181219175613_remove_cart.rb:27
  3450. - db/migrate/20181219175613_remove_cart.rb:36
  3451. - db/migrate/20181219175613_remove_cart.rb:47
  3452. - db/migrate/20181219175613_remove_cart.rb:61
  3453. - db/migrate/20181219175613_remove_cart.rb:67
  3454. - db/migrate/20181219175613_remove_cart.rb:86
  3455. - db/migrate/20181219175613_remove_cart.rb:103
  3456. - db/migrate/20181219175613_remove_cart.rb:109
  3457.  
  3458. ServerHelper:
  3459. Rating: C
  3460. Churn: 0
  3461. Complexity: 164.01
  3462. Duplication: 0
  3463. Smells: 25
  3464. * (VeryHighComplexity) ServerHelper#format_plans has a flog score of 130
  3465. - app/helpers/server_helper.rb:31
  3466. * (DuplicateMethodCall) ServerHelper#device_specs calls 'device.type_id' 2 times
  3467. - app/helpers/server_helper.rb:17
  3468. - app/helpers/server_helper.rb:19
  3469. * (DuplicateMethodCall) ServerHelper#device_specs calls 'device.type_id.to_i' 2 times
  3470. - app/helpers/server_helper.rb:17
  3471. - app/helpers/server_helper.rb:19
  3472. * (DuplicateMethodCall) ServerHelper#format_plans calls 'Environment::Maas.order_queue(brand_id)' 2 times
  3473. - app/helpers/server_helper.rb:83
  3474. - app/helpers/server_helper.rb:86
  3475. * (DuplicateMethodCall) ServerHelper#format_plans calls '_('minutes')' 2 times
  3476. - app/helpers/server_helper.rb:84
  3477. - app/helpers/server_helper.rb:87
  3478. * (DuplicateMethodCall) ServerHelper#format_plans calls 'brand_id.to_i' 2 times
  3479. - app/helpers/server_helper.rb:39
  3480. - app/helpers/server_helper.rb:52
  3481. * (DuplicateMethodCall) ServerHelper#format_plans calls 'descriptions << text' 3 times
  3482. - app/helpers/server_helper.rb:64
  3483. - app/helpers/server_helper.rb:71
  3484. - app/helpers/server_helper.rb:77
  3485. * (DuplicateMethodCall) ServerHelper#format_plans calls 'drive[:count]' 2 times
  3486. - app/helpers/server_helper.rb:75
  3487. * (DuplicateMethodCall) ServerHelper#format_plans calls 'plan[:deploy_type] == 'automated'' 2 times
  3488. - app/helpers/server_helper.rb:83
  3489. - app/helpers/server_helper.rb:84
  3490. * (DuplicateMethodCall) ServerHelper#format_plans calls 'plan[:deploy_type]' 2 times
  3491. - app/helpers/server_helper.rb:83
  3492. - app/helpers/server_helper.rb:84
  3493. * (DuplicateMethodCall) ServerHelper#format_plans calls 'plan[:in_stock]' 3 times
  3494. - app/helpers/server_helper.rb:86
  3495. - app/helpers/server_helper.rb:87
  3496. - app/helpers/server_helper.rb:99
  3497. * (DuplicateMethodCall) ServerHelper#format_plans calls 'plan[:name]' 2 times
  3498. - app/helpers/server_helper.rb:32
  3499. - app/helpers/server_helper.rb:92
  3500. * (DuplicateMethodCall) ServerHelper#format_plans calls 'plan[:pricing]' 2 times
  3501. - app/helpers/server_helper.rb:53
  3502. * (DuplicateMethodCall) ServerHelper#format_plans calls 'plan[:slug]' 3 times
  3503. - app/helpers/server_helper.rb:45
  3504. - app/helpers/server_helper.rb:91
  3505. * (DuplicateMethodCall) ServerHelper#format_plans calls 'server[:options]' 2 times
  3506. - app/helpers/server_helper.rb:47
  3507. - app/helpers/server_helper.rb:102
  3508. * (DuplicateMethodCall) ServerHelper#format_plans calls 'value['cores']' 2 times
  3509. - app/helpers/server_helper.rb:66
  3510. - app/helpers/server_helper.rb:67
  3511. * (DuplicateMethodCall) ServerHelper#format_plans calls 'value['count']' 3 times
  3512. - app/helpers/server_helper.rb:60
  3513. - app/helpers/server_helper.rb:61
  3514. * (DuplicateMethodCall) ServerHelper#format_plans calls 'value['type']' 2 times
  3515. - app/helpers/server_helper.rb:63
  3516. * (FeatureEnvy) ServerHelper#device_specs refers to 'device' more than self (maybe move it to another class?)
  3517. - app/helpers/server_helper.rb:16
  3518. - app/helpers/server_helper.rb:17
  3519. - app/helpers/server_helper.rb:18
  3520. - app/helpers/server_helper.rb:19
  3521. * (FeatureEnvy) ServerHelper#format_plans refers to 'plan' more than self (maybe move it to another class?)
  3522. - app/helpers/server_helper.rb:32
  3523. - app/helpers/server_helper.rb:45
  3524. - app/helpers/server_helper.rb:53
  3525. - app/helpers/server_helper.rb:56
  3526. - app/helpers/server_helper.rb:83
  3527. - app/helpers/server_helper.rb:84
  3528. - app/helpers/server_helper.rb:86
  3529. - app/helpers/server_helper.rb:87
  3530. - app/helpers/server_helper.rb:91
  3531. - app/helpers/server_helper.rb:92
  3532. - app/helpers/server_helper.rb:99
  3533. * (IrresponsibleModule) ServerHelper has no descriptive comment
  3534. - app/helpers/server_helper.rb:1
  3535. * (NestedIterators) ServerHelper#format_plans contains iterators nested 4 deep
  3536. - app/helpers/server_helper.rb:73
  3537. * (NilCheck) ServerHelper#device_specs performs a nil-check
  3538. - app/helpers/server_helper.rb:20
  3539. * (NilCheck) ServerHelper#format_plans performs a nil-check
  3540. - app/helpers/server_helper.rb:47
  3541. - app/helpers/server_helper.rb:53
  3542. * (TooManyStatements) ServerHelper#format_plans has approx 43 statements
  3543. - app/helpers/server_helper.rb:31
  3544.  
  3545. ServicesController:
  3546. Rating: C
  3547. Churn: 0
  3548. Complexity: 189.2
  3549. Duplication: 0
  3550. Smells: 32
  3551. * (VeryHighComplexity) ServicesController#show has a flog score of 157
  3552. - app/controllers/services_controller.rb:29
  3553. * (HighComplexity) ServicesController#index has a flog score of 33
  3554. - app/controllers/services_controller.rb:5
  3555. * (DuplicateMethodCall) ServicesController#show calls '@children[key]' 7 times
  3556. - app/controllers/services_controller.rb:85
  3557. - app/controllers/services_controller.rb:86
  3558. - app/controllers/services_controller.rb:90
  3559. - app/controllers/services_controller.rb:92
  3560. - app/controllers/services_controller.rb:94
  3561. - app/controllers/services_controller.rb:96
  3562. - app/controllers/services_controller.rb:98
  3563. * (DuplicateMethodCall) ServicesController#show calls '@options[pug_name]' 2 times
  3564. - app/controllers/services_controller.rb:49
  3565. - app/controllers/services_controller.rb:50
  3566. * (DuplicateMethodCall) ServicesController#show calls 'ENV['UBERSMITH_DOMAIN']' 2 times
  3567. - app/controllers/services_controller.rb:30
  3568. - app/controllers/services_controller.rb:72
  3569. * (DuplicateMethodCall) ServicesController#show calls 'ENV['UBERSMITH_PASSWORD']' 2 times
  3570. - app/controllers/services_controller.rb:30
  3571. - app/controllers/services_controller.rb:72
  3572. * (DuplicateMethodCall) ServicesController#show calls 'ENV['UBERSMITH_USERNAME']' 2 times
  3573. - app/controllers/services_controller.rb:30
  3574. - app/controllers/services_controller.rb:72
  3575. * (DuplicateMethodCall) ServicesController#show calls '_("Annually")' 2 times
  3576. - app/controllers/services_controller.rb:68
  3577. - app/controllers/services_controller.rb:98
  3578. * (DuplicateMethodCall) ServicesController#show calls '_("Monthly")' 2 times
  3579. - app/controllers/services_controller.rb:62
  3580. - app/controllers/services_controller.rb:92
  3581. * (DuplicateMethodCall) ServicesController#show calls '_("One Time")' 2 times
  3582. - app/controllers/services_controller.rb:60
  3583. - app/controllers/services_controller.rb:90
  3584. * (DuplicateMethodCall) ServicesController#show calls '_("Quarterly")' 2 times
  3585. - app/controllers/services_controller.rb:64
  3586. - app/controllers/services_controller.rb:94
  3587. * (DuplicateMethodCall) ServicesController#show calls '_("Semi-Annually")' 2 times
  3588. - app/controllers/services_controller.rb:66
  3589. - app/controllers/services_controller.rb:96
  3590. * (DuplicateMethodCall) ServicesController#show calls 'api.client' 2 times
  3591. - app/controllers/services_controller.rb:31
  3592. - app/controllers/services_controller.rb:73
  3593. * (DuplicateMethodCall) ServicesController#show calls 'children.data' 2 times
  3594. - app/controllers/services_controller.rb:78
  3595. - app/controllers/services_controller.rb:82
  3596. * (DuplicateMethodCall) ServicesController#show calls 'children.error?' 2 times
  3597. - app/controllers/services_controller.rb:78
  3598. - app/controllers/services_controller.rb:81
  3599. * (DuplicateMethodCall) ServicesController#show calls 'current_user.company_id' 2 times
  3600. - app/controllers/services_controller.rb:38
  3601. - app/controllers/services_controller.rb:74
  3602. * (DuplicateMethodCall) ServicesController#show calls 'get_currency_by_brand(params[:locale])' 2 times
  3603. - app/controllers/services_controller.rb:35
  3604. - app/controllers/services_controller.rb:79
  3605. * (DuplicateMethodCall) ServicesController#show calls 'option['pu_id']' 2 times
  3606. - app/controllers/services_controller.rb:45
  3607. - app/controllers/services_controller.rb:46
  3608. * (DuplicateMethodCall) ServicesController#show calls 'params[:id]' 2 times
  3609. - app/controllers/services_controller.rb:31
  3610. - app/controllers/services_controller.rb:75
  3611. * (DuplicateMethodCall) ServicesController#show calls 'params[:locale]' 2 times
  3612. - app/controllers/services_controller.rb:35
  3613. - app/controllers/services_controller.rb:79
  3614. * (DuplicateMethodCall) ServicesController#show calls 'service_result.error?' 2 times
  3615. - app/controllers/services_controller.rb:33
  3616. - app/controllers/services_controller.rb:38
  3617. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@children'
  3618. - app/controllers/services_controller.rb:1
  3619. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@client_id'
  3620. - app/controllers/services_controller.rb:1
  3621. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@options'
  3622. - app/controllers/services_controller.rb:1
  3623. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@service'
  3624. - app/controllers/services_controller.rb:1
  3625. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@status_color'
  3626. - app/controllers/services_controller.rb:1
  3627. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@status_name'
  3628. - app/controllers/services_controller.rb:1
  3629. * (InstanceVariableAssumption) ServicesController assumes too much for instance variable '@title'
  3630. - app/controllers/services_controller.rb:1
  3631. * (IrresponsibleModule) ServicesController has no descriptive comment
  3632. - app/controllers/services_controller.rb:1
  3633. * (TooManyInstanceVariables) ServicesController has at least 9 instance variables
  3634. - app/controllers/services_controller.rb:1
  3635. * (TooManyStatements) ServicesController#index has approx 15 statements
  3636. - app/controllers/services_controller.rb:5
  3637. * (TooManyStatements) ServicesController#show has approx 43 statements
  3638. - app/controllers/services_controller.rb:29
  3639.  
  3640. TechnicalVisitsController:
  3641. Rating: C
  3642. Churn: 0
  3643. Complexity: 107.12
  3644. Duplication: 0
  3645. Smells: 20
  3646. * (HighComplexity) TechnicalVisitsController#prepare_to_render_index has a flog score of 57
  3647. - app/controllers/technical_visits_controller.rb:54
  3648. * (DuplicateMethodCall) TechnicalVisitsController#allow_iframe calls 'response.headers' 2 times
  3649. - app/controllers/technical_visits_controller.rb:50
  3650. - app/controllers/technical_visits_controller.rb:51
  3651. * (DuplicateMethodCall) TechnicalVisitsController#create calls 'params[:technical_visit]' 2 times
  3652. - app/controllers/technical_visits_controller.rb:14
  3653. - app/controllers/technical_visits_controller.rb:15
  3654. * (DuplicateMethodCall) TechnicalVisitsController#prepare_to_render_index calls 'current_user.company_id' 2 times
  3655. - app/controllers/technical_visits_controller.rb:63
  3656. - app/controllers/technical_visits_controller.rb:70
  3657. * (DuplicateMethodCall) TechnicalVisitsController#prepare_to_render_index calls 'data['dev_desc']' 2 times
  3658. - app/controllers/technical_visits_controller.rb:74
  3659. * (DuplicateMethodCall) TechnicalVisitsController#prepare_to_render_index calls 'data['location']' 2 times
  3660. - app/controllers/technical_visits_controller.rb:74
  3661. * (DuplicateMethodCall) TechnicalVisitsController#prepare_to_render_index calls 'params.has_key?(:technical_visit)' 2 times
  3662. - app/controllers/technical_visits_controller.rb:55
  3663. - app/controllers/technical_visits_controller.rb:56
  3664. * (InstanceVariableAssumption) TechnicalVisitsController assumes too much for instance variable '@email'
  3665. - app/controllers/technical_visits_controller.rb:1
  3666. * (InstanceVariableAssumption) TechnicalVisitsController assumes too much for instance variable '@id'
  3667. - app/controllers/technical_visits_controller.rb:1
  3668. * (InstanceVariableAssumption) TechnicalVisitsController assumes too much for instance variable '@is_internal'
  3669. - app/controllers/technical_visits_controller.rb:1
  3670. * (IrresponsibleModule) TechnicalVisitsController has no descriptive comment
  3671. - app/controllers/technical_visits_controller.rb:1
  3672. * (TooManyInstanceVariables) TechnicalVisitsController has at least 10 instance variables
  3673. - app/controllers/technical_visits_controller.rb:1
  3674. * (TooManyStatements) TechnicalVisitsController#create has approx 7 statements
  3675. - app/controllers/technical_visits_controller.rb:13
  3676. * (TooManyStatements) TechnicalVisitsController#prepare_to_render_index has approx 23 statements
  3677. - app/controllers/technical_visits_controller.rb:54
  3678. * (TooManyStatements) TechnicalVisitsController#send_params has approx 8 statements
  3679. - app/controllers/technical_visits_controller.rb:30
  3680. * (UncommunicativeVariableName) TechnicalVisitsController has the variable name '@conditionIsChecked'
  3681. - app/controllers/technical_visits_controller.rb:55
  3682. * (UncommunicativeVariableName) TechnicalVisitsController#send_params has the variable name 'c'
  3683. - app/controllers/technical_visits_controller.rb:33
  3684. * (UncommunicativeVariableName) TechnicalVisitsController#send_params has the variable name 'e'
  3685. - app/controllers/technical_visits_controller.rb:38
  3686. * (UncommunicativeVariableName) TechnicalVisitsController#send_params has the variable name 'r'
  3687. - app/controllers/technical_visits_controller.rb:33
  3688. * (UtilityFunction) TechnicalVisitsController#send_params doesn't depend on instance state (maybe move it to another class?)
  3689. - app/controllers/technical_visits_controller.rb:30
  3690.  
  3691. UpdateStatusServiceSpec:
  3692. Rating: C
  3693. Churn: 0
  3694. Complexity: 136.64
  3695. Duplication: 60
  3696. Smells: 2
  3697. * (DuplicateCode) Similar code found in 2 nodes
  3698. - spec/services/update_status_service_spec.rb:6
  3699. - spec/services/update_status_service_spec.rb:25
  3700. * (HighComplexity) describe(#call)::context(when raise an error)::it#log this error has a flog score of 28
  3701. - spec/services/update_status_service_spec.rb:79
  3702.  
  3703. Account::BillingController:
  3704. Rating: D
  3705. Churn: 0
  3706. Complexity: 282.34
  3707. Duplication: 88
  3708. Smells: 41
  3709. * (DuplicateCode) Similar code found in 2 nodes
  3710. - app/controllers/account/billing_controller.rb:42
  3711. - app/controllers/account/billing_controller.rb:45
  3712. * (DuplicateCode) Similar code found in 2 nodes
  3713. - app/controllers/account/billing_controller.rb:154
  3714. - app/controllers/account/billing_controller.rb:181
  3715. * (VeryHighComplexity) Account::BillingController#paypal has a flog score of 62
  3716. - app/controllers/account/billing_controller.rb:62
  3717. * (HighComplexity) Account::BillingController#save has a flog score of 56
  3718. - app/controllers/account/billing_controller.rb:11
  3719. * (HighComplexity) Account::BillingController#remove has a flog score of 47
  3720. - app/controllers/account/billing_controller.rb:35
  3721. * (HighComplexity) Account::BillingController#update has a flog score of 43
  3722. - app/controllers/account/billing_controller.rb:164
  3723. * (HighComplexity) Account::BillingController#edit has a flog score of 34
  3724. - app/controllers/account/billing_controller.rb:125
  3725. * (HighComplexity) Account::BillingController#create has a flog score of 30
  3726. - app/controllers/account/billing_controller.rb:144
  3727. * (DuplicateMethodCall) Account::BillingController#create calls 'params[:billing_index]' 2 times
  3728. - app/controllers/account/billing_controller.rb:145
  3729. - app/controllers/account/billing_controller.rb:147
  3730. * (DuplicateMethodCall) Account::BillingController#edit calls 'card_result.data' 3 times
  3731. - app/controllers/account/billing_controller.rb:129
  3732. - app/controllers/account/billing_controller.rb:133
  3733. - app/controllers/account/billing_controller.rb:136
  3734. * (DuplicateMethodCall) Account::BillingController#edit calls 'card_result.error?' 2 times
  3735. - app/controllers/account/billing_controller.rb:129
  3736. - app/controllers/account/billing_controller.rb:130
  3737. * (DuplicateMethodCall) Account::BillingController#paypal calls 'current_user.company_id' 3 times
  3738. - app/controllers/account/billing_controller.rb:63
  3739. - app/controllers/account/billing_controller.rb:75
  3740. - app/controllers/account/billing_controller.rb:89
  3741. * (DuplicateMethodCall) Account::BillingController#paypal calls 'flash['error'] = response.error_message' 2 times
  3742. - app/controllers/account/billing_controller.rb:80
  3743. - app/controllers/account/billing_controller.rb:91
  3744. * (DuplicateMethodCall) Account::BillingController#paypal calls 'params.has_key?(:token)' 3 times
  3745. - app/controllers/account/billing_controller.rb:73
  3746. - app/controllers/account/billing_controller.rb:102
  3747. - app/controllers/account/billing_controller.rb:110
  3748. * (DuplicateMethodCall) Account::BillingController#paypal calls 'redirect_to return_url' 2 times
  3749. - app/controllers/account/billing_controller.rb:86
  3750. - app/controllers/account/billing_controller.rb:104
  3751. * (DuplicateMethodCall) Account::BillingController#paypal calls 'response.error?' 2 times
  3752. - app/controllers/account/billing_controller.rb:79
  3753. - app/controllers/account/billing_controller.rb:90
  3754. * (DuplicateMethodCall) Account::BillingController#paypal calls 'response.error_message' 3 times
  3755. - app/controllers/account/billing_controller.rb:80
  3756. - app/controllers/account/billing_controller.rb:91
  3757. - app/controllers/account/billing_controller.rb:92
  3758. * (DuplicateMethodCall) Account::BillingController#paypal calls 'service_response[:status] = StatusCode::SUCCESS' 2 times
  3759. - app/controllers/account/billing_controller.rb:82
  3760. - app/controllers/account/billing_controller.rb:94
  3761. * (DuplicateMethodCall) Account::BillingController#remove calls 'api.client' 3 times
  3762. - app/controllers/account/billing_controller.rb:37
  3763. - app/controllers/account/billing_controller.rb:44
  3764. - app/controllers/account/billing_controller.rb:47
  3765. * (DuplicateMethodCall) Account::BillingController#remove calls 'payment.nil?' 2 times
  3766. - app/controllers/account/billing_controller.rb:44
  3767. - app/controllers/account/billing_controller.rb:47
  3768. * (DuplicateMethodCall) Account::BillingController#remove calls 'payment['billing_info_id']' 2 times
  3769. - app/controllers/account/billing_controller.rb:44
  3770. - app/controllers/account/billing_controller.rb:47
  3771. * (DuplicateMethodCall) Account::BillingController#remove calls 'payment_method_list.select' 2 times
  3772. - app/controllers/account/billing_controller.rb:43
  3773. - app/controllers/account/billing_controller.rb:46
  3774. * (DuplicateMethodCall) Account::BillingController#save calls 'api.client' 2 times
  3775. - app/controllers/account/billing_controller.rb:15
  3776. - app/controllers/account/billing_controller.rb:22
  3777. * (DuplicateMethodCall) Account::BillingController#save calls 'current_user.company_id' 2 times
  3778. - app/controllers/account/billing_controller.rb:15
  3779. - app/controllers/account/billing_controller.rb:22
  3780. * (DuplicateMethodCall) Account::BillingController#save calls 'params[:payment_method]' 3 times
  3781. - app/controllers/account/billing_controller.rb:12
  3782. - app/controllers/account/billing_controller.rb:17
  3783. * (DuplicateMethodCall) Account::BillingController#update calls 'params[:account_billing_edit]' 5 times
  3784. - app/controllers/account/billing_controller.rb:167
  3785. - app/controllers/account/billing_controller.rb:168
  3786. - app/controllers/account/billing_controller.rb:170
  3787. - app/controllers/account/billing_controller.rb:171
  3788. - app/controllers/account/billing_controller.rb:173
  3789. * (InstanceVariableAssumption) Account::BillingController assumes too much for instance variable '@credit'
  3790. - app/controllers/account/billing_controller.rb:1
  3791. * (InstanceVariableAssumption) Account::BillingController assumes too much for instance variable '@title'
  3792. - app/controllers/account/billing_controller.rb:1
  3793. * (IrresponsibleModule) Account::BillingController has no descriptive comment
  3794. - app/controllers/account/billing_controller.rb:1
  3795. * (NilCheck) Account::BillingController#paypal performs a nil-check
  3796. - app/controllers/account/billing_controller.rb:77
  3797. * (NilCheck) Account::BillingController#remove performs a nil-check
  3798. - app/controllers/account/billing_controller.rb:44
  3799. - app/controllers/account/billing_controller.rb:47
  3800. - app/controllers/account/billing_controller.rb:52
  3801. * (NilCheck) Account::BillingController#save performs a nil-check
  3802. - app/controllers/account/billing_controller.rb:19
  3803. * (RepeatedConditional) Account::BillingController tests 'card_result.error?' at least 3 times
  3804. - app/controllers/account/billing_controller.rb:130
  3805. - app/controllers/account/billing_controller.rb:150
  3806. - app/controllers/account/billing_controller.rb:176
  3807. * (RepeatedConditional) Account::BillingController tests 'params.has_key?(:token)' at least 3 times
  3808. - app/controllers/account/billing_controller.rb:73
  3809. - app/controllers/account/billing_controller.rb:102
  3810. - app/controllers/account/billing_controller.rb:110
  3811. * (RepeatedConditional) Account::BillingController tests 'payment.nil?' at least 3 times
  3812. - app/controllers/account/billing_controller.rb:19
  3813. - app/controllers/account/billing_controller.rb:44
  3814. - app/controllers/account/billing_controller.rb:47
  3815. * (TooManyStatements) Account::BillingController#create has approx 9 statements
  3816. - app/controllers/account/billing_controller.rb:144
  3817. * (TooManyStatements) Account::BillingController#edit has approx 11 statements
  3818. - app/controllers/account/billing_controller.rb:125
  3819. * (TooManyStatements) Account::BillingController#paypal has approx 23 statements
  3820. - app/controllers/account/billing_controller.rb:62
  3821. * (TooManyStatements) Account::BillingController#remove has approx 15 statements
  3822. - app/controllers/account/billing_controller.rb:35
  3823. * (TooManyStatements) Account::BillingController#save has approx 12 statements
  3824. - app/controllers/account/billing_controller.rb:11
  3825. * (TooManyStatements) Account::BillingController#update has approx 10 statements
  3826. - app/controllers/account/billing_controller.rb:164
  3827.  
  3828. BillingInflectionsSpec:
  3829. Rating: D
  3830. Churn: 0
  3831. Complexity: 0.0
  3832. Duplication: 59
  3833. Smells: 1
  3834. * (DuplicateCode) Similar code found in 5 nodes
  3835. - spec/inflections/billing_inflections_spec.rb:3
  3836. - spec/inflections/company_inflections_spec.rb:3
  3837. - spec/inflections/delayed_job_inflections_spec.rb:3
  3838. - spec/inflections/invoice_via_inflections_spec.rb:3
  3839. - spec/inflections/user_inflections_spec.rb:3
  3840.  
  3841. ChartMogul::Interface:
  3842. Rating: D
  3843. Churn: 0
  3844. Complexity: 190.35
  3845. Duplication: 56
  3846. Smells: 30
  3847. * (DuplicateCode) Similar code found in 2 nodes
  3848. - app/adapters/chart_mogul/interface.rb:127
  3849. - app/adapters/chart_mogul/interface.rb:136
  3850. * (HighComplexity) ChartMogul::Interface::ensure_customers_plans_exist has a flog score of 36
  3851. - app/adapters/chart_mogul/interface.rb:74
  3852. * (HighComplexity) ChartMogul::Interface::update_offset has a flog score of 27
  3853. - app/adapters/chart_mogul/interface.rb:149
  3854. * (DuplicateMethodCall) ChartMogul::Interface#push_to_dead_letter_queue calls 'invoice[:invid]' 2 times
  3855. - app/adapters/chart_mogul/interface.rb:97
  3856. - app/adapters/chart_mogul/interface.rb:99
  3857. * (DuplicateMethodCall) ChartMogul::Interface#update_offset calls 'model.data' 4 times
  3858. - app/adapters/chart_mogul/interface.rb:160
  3859. - app/adapters/chart_mogul/interface.rb:161
  3860. - app/adapters/chart_mogul/interface.rb:163
  3861. - app/adapters/chart_mogul/interface.rb:164
  3862. * (InstanceVariableAssumption) ChartMogul::Interface assumes too much for instance variable '@customer_invoices'
  3863. - app/adapters/chart_mogul/interface.rb:4
  3864. * (InstanceVariableAssumption) ChartMogul::Interface assumes too much for instance variable '@dead_letters'
  3865. - app/adapters/chart_mogul/interface.rb:4
  3866. * (InstanceVariableAssumption) ChartMogul::Interface assumes too much for instance variable '@invoices'
  3867. - app/adapters/chart_mogul/interface.rb:4
  3868. * (InstanceVariableAssumption) ChartMogul::Interface assumes too much for instance variable '@new_payment_offset'
  3869. - app/adapters/chart_mogul/interface.rb:4
  3870. * (InstanceVariableAssumption) ChartMogul::Interface assumes too much for instance variable '@new_refund_offset'
  3871. - app/adapters/chart_mogul/interface.rb:4
  3872. * (InstanceVariableAssumption) ChartMogul::Interface assumes too much for instance variable '@pending_invoices'
  3873. - app/adapters/chart_mogul/interface.rb:4
  3874. * (IrresponsibleModule) ChartMogul::Interface has no descriptive comment
  3875. - app/adapters/chart_mogul/interface.rb:4
  3876. * (MissingSafeMethod) ChartMogul::Interface has missing safe method 'run!'
  3877. - app/adapters/chart_mogul/interface.rb:11
  3878. * (NilCheck) ChartMogul::Interface#ensure_customers_plans_exist performs a nil-check
  3879. - app/adapters/chart_mogul/interface.rb:83
  3880. * (NilCheck) ChartMogul::Interface#push_to_dead_letter_queue performs a nil-check
  3881. - app/adapters/chart_mogul/interface.rb:97
  3882. * (NilCheck) ChartMogul::Interface#recently_paid_invoices performs a nil-check
  3883. - app/adapters/chart_mogul/interface.rb:129
  3884. * (NilCheck) ChartMogul::Interface#recently_refunded_invoices performs a nil-check
  3885. - app/adapters/chart_mogul/interface.rb:138
  3886. * (NilCheck) ChartMogul::Interface#update_offset performs a nil-check
  3887. - app/adapters/chart_mogul/interface.rb:151
  3888. * (RepeatedConditional) ChartMogul::Interface tests 'dead_letters?' at least 3 times
  3889. - app/adapters/chart_mogul/interface.rb:21
  3890. - app/adapters/chart_mogul/interface.rb:29
  3891. - app/adapters/chart_mogul/interface.rb:61
  3892. * (RepeatedConditional) ChartMogul::Interface tests 'model.nil?' at least 3 times
  3893. - app/adapters/chart_mogul/interface.rb:129
  3894. - app/adapters/chart_mogul/interface.rb:138
  3895. - app/adapters/chart_mogul/interface.rb:151
  3896. * (TooManyInstanceVariables) ChartMogul::Interface has at least 6 instance variables
  3897. - app/adapters/chart_mogul/interface.rb:4
  3898. * (TooManyMethods) ChartMogul::Interface has at least 16 methods
  3899. - app/adapters/chart_mogul/interface.rb:4
  3900. * (TooManyStatements) ChartMogul::Interface#ensure_customers_plans_exist has approx 11 statements
  3901. - app/adapters/chart_mogul/interface.rb:74
  3902. * (TooManyStatements) ChartMogul::Interface#fetch_invoices has approx 10 statements
  3903. - app/adapters/chart_mogul/interface.rb:44
  3904. * (TooManyStatements) ChartMogul::Interface#recently_paid_invoices has approx 6 statements
  3905. - app/adapters/chart_mogul/interface.rb:127
  3906. * (TooManyStatements) ChartMogul::Interface#recently_refunded_invoices has approx 6 statements
  3907. - app/adapters/chart_mogul/interface.rb:136
  3908. * (TooManyStatements) ChartMogul::Interface#run_invoices has approx 6 statements
  3909. - app/adapters/chart_mogul/interface.rb:16
  3910. * (UncommunicativeVariableName) ChartMogul::Interface#init_customer_invoices_store has the variable name 'h'
  3911. - app/adapters/chart_mogul/interface.rb:124
  3912. * (UncommunicativeVariableName) ChartMogul::Interface#init_customer_invoices_store has the variable name 'k'
  3913. - app/adapters/chart_mogul/interface.rb:124
  3914. * (UncommunicativeVariableName) ChartMogul::Interface#push_to_dead_letter_queue has the variable name 'i'
  3915. - app/adapters/chart_mogul/interface.rb:97
  3916.  
  3917. CompanyInflectionsSpec:
  3918. Rating: D
  3919. Churn: 0
  3920. Complexity: 0.0
  3921. Duplication: 59
  3922. Smells: 1
  3923. * (DuplicateCode) Similar code found in 5 nodes
  3924. - spec/inflections/billing_inflections_spec.rb:3
  3925. - spec/inflections/company_inflections_spec.rb:3
  3926. - spec/inflections/delayed_job_inflections_spec.rb:3
  3927. - spec/inflections/invoice_via_inflections_spec.rb:3
  3928. - spec/inflections/user_inflections_spec.rb:3
  3929.  
  3930. CurrentUser::Auth0:
  3931. Rating: D
  3932. Churn: 0
  3933. Complexity: 207.59
  3934. Duplication: 0
  3935. Smells: 20
  3936. * (HighComplexity) CurrentUser::Auth0::mfa_request has a flog score of 32
  3937. - app/adapters/current_user/auth0.rb:177
  3938. * (HighComplexity) CurrentUser::Auth0::sync! has a flog score of 27
  3939. - app/adapters/current_user/auth0.rb:6
  3940. * (HighComplexity) CurrentUser::Auth0::mfa_token has a flog score of 25
  3941. - app/adapters/current_user/auth0.rb:139
  3942. * (ControlParameter) CurrentUser::Auth0#mfa_request is controlled by argument 'as'
  3943. - app/adapters/current_user/auth0.rb:182
  3944. * (DuplicateMethodCall) CurrentUser::Auth0#mfa_request calls 'req.body' 3 times
  3945. - app/adapters/current_user/auth0.rb:191
  3946. - app/adapters/current_user/auth0.rb:193
  3947. * (DuplicateMethodCall) CurrentUser::Auth0#mfa_token calls '@mfa_token.nil?' 2 times
  3948. - app/adapters/current_user/auth0.rb:140
  3949. - app/adapters/current_user/auth0.rb:150
  3950. * (DuplicateMethodCall) CurrentUser::Auth0#mfa_token calls 'options[:refresh_token]' 2 times
  3951. - app/adapters/current_user/auth0.rb:146
  3952. - app/adapters/current_user/auth0.rb:151
  3953. * (DuplicateMethodCall) CurrentUser::Auth0#otp_authenticate calls 'response['access_token']' 2 times
  3954. - app/adapters/current_user/auth0.rb:54
  3955. * (DuplicateMethodCall) CurrentUser::Auth0#sync! calls 'data[:password]' 2 times
  3956. - app/adapters/current_user/auth0.rb:16
  3957. * (DuplicateMethodCall) CurrentUser::Auth0#user_authenticate calls 'ENV['AUTH0_ORIGINAL_DOMAIN']' 2 times
  3958. - app/adapters/current_user/auth0.rb:22
  3959. - app/adapters/current_user/auth0.rb:28
  3960. * (DuplicateMethodCall) CurrentUser::Auth0#user_authenticate calls 'credentials['access_token']' 2 times
  3961. - app/adapters/current_user/auth0.rb:35
  3962. - app/adapters/current_user/auth0.rb:36
  3963. * (IrresponsibleModule) CurrentUser::Auth0 has no descriptive comment
  3964. - app/adapters/current_user/auth0.rb:2
  3965. * (NilCheck) CurrentUser::Auth0#basic_token performs a nil-check
  3966. - app/adapters/current_user/auth0.rb:127
  3967. * (NilCheck) CurrentUser::Auth0#mfa_token performs a nil-check
  3968. - app/adapters/current_user/auth0.rb:140
  3969. - app/adapters/current_user/auth0.rb:150
  3970. * (NilCheck) CurrentUser::Auth0#otp_authenticate performs a nil-check
  3971. - app/adapters/current_user/auth0.rb:56
  3972. * (NilCheck) CurrentUser::Auth0#otp_remove performs a nil-check
  3973. - app/adapters/current_user/auth0.rb:80
  3974. * (TooManyStatements) CurrentUser::Auth0#mfa_request has approx 10 statements
  3975. - app/adapters/current_user/auth0.rb:177
  3976. * (TooManyStatements) CurrentUser::Auth0#mfa_token has approx 6 statements
  3977. - app/adapters/current_user/auth0.rb:139
  3978. * (TooManyStatements) CurrentUser::Auth0#sync! has approx 6 statements
  3979. - app/adapters/current_user/auth0.rb:6
  3980. * (UncommunicativeModuleName) CurrentUser::Auth0 has the name 'Auth0'
  3981. - app/adapters/current_user/auth0.rb:2
  3982.  
  3983. DelayedJobInflectionsSpec:
  3984. Rating: D
  3985. Churn: 0
  3986. Complexity: 0.0
  3987. Duplication: 59
  3988. Smells: 1
  3989. * (DuplicateCode) Similar code found in 5 nodes
  3990. - spec/inflections/billing_inflections_spec.rb:3
  3991. - spec/inflections/company_inflections_spec.rb:3
  3992. - spec/inflections/delayed_job_inflections_spec.rb:3
  3993. - spec/inflections/invoice_via_inflections_spec.rb:3
  3994. - spec/inflections/user_inflections_spec.rb:3
  3995.  
  3996. GetUserDataJob:
  3997. Rating: D
  3998. Churn: 0
  3999. Complexity: 224.04
  4000. Duplication: 42
  4001. Smells: 27
  4002. * (DuplicateCode) Similar code found in 2 nodes
  4003. - app/jobs/get_user_data_job.rb:58
  4004. - app/jobs/get_user_data_job.rb:60
  4005. * (VeryHighComplexity) GetUserDataJob#perform has a flog score of 224
  4006. - app/jobs/get_user_data_job.rb:6
  4007. * (DuplicateMethodCall) GetUserDataJob#perform calls '@client["class_id"]' 2 times
  4008. - app/jobs/get_user_data_job.rb:42
  4009. - app/jobs/get_user_data_job.rb:43
  4010. * (DuplicateMethodCall) GetUserDataJob#perform calls '@client["metadata"]' 6 times
  4011. - app/jobs/get_user_data_job.rb:58
  4012. - app/jobs/get_user_data_job.rb:59
  4013. - app/jobs/get_user_data_job.rb:60
  4014. - app/jobs/get_user_data_job.rb:61
  4015. * (DuplicateMethodCall) GetUserDataJob#perform calls '@client["metadata"].is_a?(Hash)' 2 times
  4016. - app/jobs/get_user_data_job.rb:58
  4017. - app/jobs/get_user_data_job.rb:60
  4018. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.company' 21 times
  4019. - app/jobs/get_user_data_job.rb:34
  4020. - app/jobs/get_user_data_job.rb:35
  4021. - app/jobs/get_user_data_job.rb:36
  4022. - app/jobs/get_user_data_job.rb:37
  4023. - app/jobs/get_user_data_job.rb:38
  4024. - app/jobs/get_user_data_job.rb:39
  4025. - app/jobs/get_user_data_job.rb:40
  4026. - app/jobs/get_user_data_job.rb:41
  4027. - app/jobs/get_user_data_job.rb:42
  4028. - app/jobs/get_user_data_job.rb:43
  4029. - app/jobs/get_user_data_job.rb:46
  4030. - app/jobs/get_user_data_job.rb:47
  4031. - app/jobs/get_user_data_job.rb:55
  4032. - app/jobs/get_user_data_job.rb:58
  4033. - app/jobs/get_user_data_job.rb:60
  4034. - app/jobs/get_user_data_job.rb:62
  4035. - app/jobs/get_user_data_job.rb:63
  4036. - app/jobs/get_user_data_job.rb:68
  4037. - app/jobs/get_user_data_job.rb:73
  4038. - app/jobs/get_user_data_job.rb:75
  4039. - app/jobs/get_user_data_job.rb:81
  4040. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.company.brand_id' 2 times
  4041. - app/jobs/get_user_data_job.rb:73
  4042. - app/jobs/get_user_data_job.rb:75
  4043. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.company.contacts' 5 times
  4044. - app/jobs/get_user_data_job.rb:46
  4045. - app/jobs/get_user_data_job.rb:47
  4046. - app/jobs/get_user_data_job.rb:62
  4047. - app/jobs/get_user_data_job.rb:63
  4048. - app/jobs/get_user_data_job.rb:68
  4049. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.company.contacts.has_key?("#{@user.contact_id}")' 2 times
  4050. - app/jobs/get_user_data_job.rb:46
  4051. - app/jobs/get_user_data_job.rb:62
  4052. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.company.contacts["#{@user.contact_id}"]' 2 times
  4053. - app/jobs/get_user_data_job.rb:47
  4054. - app/jobs/get_user_data_job.rb:63
  4055. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.company_id' 4 times
  4056. - app/jobs/get_user_data_job.rb:10
  4057. - app/jobs/get_user_data_job.rb:12
  4058. - app/jobs/get_user_data_job.rb:34
  4059. - app/jobs/get_user_data_job.rb:68
  4060. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.contact_id' 7 times
  4061. - app/jobs/get_user_data_job.rb:46
  4062. - app/jobs/get_user_data_job.rb:47
  4063. - app/jobs/get_user_data_job.rb:51
  4064. - app/jobs/get_user_data_job.rb:62
  4065. - app/jobs/get_user_data_job.rb:63
  4066. - app/jobs/get_user_data_job.rb:68
  4067. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.lang' 2 times
  4068. - app/jobs/get_user_data_job.rb:73
  4069. - app/jobs/get_user_data_job.rb:75
  4070. * (DuplicateMethodCall) GetUserDataJob#perform calls '@user.lang.nil?' 2 times
  4071. - app/jobs/get_user_data_job.rb:73
  4072. - app/jobs/get_user_data_job.rb:75
  4073. * (DuplicateMethodCall) GetUserDataJob#perform calls 'Bugsnag.notify(GetUserDataJobNoUser.new(error))' 2 times
  4074. - app/jobs/get_user_data_job.rb:13
  4075. - app/jobs/get_user_data_job.rb:70
  4076. * (DuplicateMethodCall) GetUserDataJob#perform calls 'api.client' 2 times
  4077. - app/jobs/get_user_data_job.rb:10
  4078. - app/jobs/get_user_data_job.rb:18
  4079. * (DuplicateMethodCall) GetUserDataJob#perform calls 'client_result.error?' 2 times
  4080. - app/jobs/get_user_data_job.rb:11
  4081. - app/jobs/get_user_data_job.rb:16
  4082. * (DuplicateMethodCall) GetUserDataJob#perform calls 'contact_user['real_name']' 2 times
  4083. - app/jobs/get_user_data_job.rb:64
  4084. - app/jobs/get_user_data_job.rb:65
  4085. * (DuplicateMethodCall) GetUserDataJob#perform calls 'contact_user['real_name'].split(' ')' 2 times
  4086. - app/jobs/get_user_data_job.rb:64
  4087. - app/jobs/get_user_data_job.rb:65
  4088. * (InstanceVariableAssumption) GetUserDataJob assumes too much for instance variable '@client'
  4089. - app/jobs/get_user_data_job.rb:1
  4090. * (InstanceVariableAssumption) GetUserDataJob assumes too much for instance variable '@contacts'
  4091. - app/jobs/get_user_data_job.rb:1
  4092. * (InstanceVariableAssumption) GetUserDataJob assumes too much for instance variable '@user'
  4093. - app/jobs/get_user_data_job.rb:1
  4094. * (IrresponsibleModule) GetUserDataJob has no descriptive comment
  4095. - app/jobs/get_user_data_job.rb:1
  4096. * (IrresponsibleModule) GetUserDataJobNoUser has no descriptive comment
  4097. - app/jobs/get_user_data_job.rb:88
  4098. * (NilCheck) GetUserDataJob#perform performs a nil-check
  4099. - app/jobs/get_user_data_job.rb:34
  4100. - app/jobs/get_user_data_job.rb:69
  4101. - app/jobs/get_user_data_job.rb:73
  4102. - app/jobs/get_user_data_job.rb:75
  4103. * (TooManyStatements) GetUserDataJob#perform has approx 47 statements
  4104. - app/jobs/get_user_data_job.rb:6
  4105. * (UncommunicativeVariableName) GetUserDataJob#perform has the variable name 'e'
  4106. - app/jobs/get_user_data_job.rb:83
  4107.  
  4108. InvoiceViaInflectionsSpec:
  4109. Rating: D
  4110. Churn: 0
  4111. Complexity: 0.0
  4112. Duplication: 59
  4113. Smells: 1
  4114. * (DuplicateCode) Similar code found in 5 nodes
  4115. - spec/inflections/billing_inflections_spec.rb:3
  4116. - spec/inflections/company_inflections_spec.rb:3
  4117. - spec/inflections/delayed_job_inflections_spec.rb:3
  4118. - spec/inflections/invoice_via_inflections_spec.rb:3
  4119. - spec/inflections/user_inflections_spec.rb:3
  4120.  
  4121. InvoicesController:
  4122. Rating: D
  4123. Churn: 0
  4124. Complexity: 235.69
  4125. Duplication: 0
  4126. Smells: 34
  4127. * (VeryHighComplexity) InvoicesController#show has a flog score of 146
  4128. - app/controllers/invoices_controller.rb:29
  4129. * (HighComplexity) InvoicesController#execute_charge has a flog score of 58
  4130. - app/controllers/invoices_controller.rb:82
  4131. * (HighComplexity) InvoicesController#index has a flog score of 30
  4132. - app/controllers/invoices_controller.rb:5
  4133. * (DuplicateMethodCall) InvoicesController#execute_charge calls 'api.client' 2 times
  4134. - app/controllers/invoices_controller.rb:97
  4135. - app/controllers/invoices_controller.rb:111
  4136. * (DuplicateMethodCall) InvoicesController#execute_charge calls 'card_result.data' 2 times
  4137. - app/controllers/invoices_controller.rb:100
  4138. - app/controllers/invoices_controller.rb:103
  4139. * (DuplicateMethodCall) InvoicesController#execute_charge calls 'current_user.company_id' 2 times
  4140. - app/controllers/invoices_controller.rb:89
  4141. - app/controllers/invoices_controller.rb:97
  4142. * (DuplicateMethodCall) InvoicesController#execute_charge calls 'params[:id]' 2 times
  4143. - app/controllers/invoices_controller.rb:112
  4144. - app/controllers/invoices_controller.rb:124
  4145. * (DuplicateMethodCall) InvoicesController#execute_charge calls 'params[:payment_method]' 2 times
  4146. - app/controllers/invoices_controller.rb:84
  4147. - app/controllers/invoices_controller.rb:87
  4148. * (DuplicateMethodCall) InvoicesController#index calls '_("Invoices")' 2 times
  4149. - app/controllers/invoices_controller.rb:20
  4150. - app/controllers/invoices_controller.rb:26
  4151. * (DuplicateMethodCall) InvoicesController#index calls 'current_user.company_id' 2 times
  4152. - app/controllers/invoices_controller.rb:7
  4153. - app/controllers/invoices_controller.rb:25
  4154. * (DuplicateMethodCall) InvoicesController#show calls '@invoice['current_packs']' 2 times
  4155. - app/controllers/invoices_controller.rb:66
  4156. * (DuplicateMethodCall) InvoicesController#show calls '@invoice['pre_billed_packs']' 2 times
  4157. - app/controllers/invoices_controller.rb:67
  4158. * (DuplicateMethodCall) InvoicesController#show calls 'api.client' 3 times
  4159. - app/controllers/invoices_controller.rb:38
  4160. - app/controllers/invoices_controller.rb:46
  4161. - app/controllers/invoices_controller.rb:62
  4162. * (DuplicateMethodCall) InvoicesController#show calls 'current_user.company' 2 times
  4163. - app/controllers/invoices_controller.rb:45
  4164. - app/controllers/invoices_controller.rb:56
  4165. * (DuplicateMethodCall) InvoicesController#show calls 'current_user.company.brand_id' 2 times
  4166. - app/controllers/invoices_controller.rb:45
  4167. - app/controllers/invoices_controller.rb:56
  4168. * (DuplicateMethodCall) InvoicesController#show calls 'current_user.company_id' 3 times
  4169. - app/controllers/invoices_controller.rb:41
  4170. - app/controllers/invoices_controller.rb:60
  4171. - app/controllers/invoices_controller.rb:62
  4172. * (DuplicateMethodCall) InvoicesController#show calls 'invoice_result.data' 3 times
  4173. - app/controllers/invoices_controller.rb:39
  4174. - app/controllers/invoices_controller.rb:51
  4175. - app/controllers/invoices_controller.rb:52
  4176. * (DuplicateMethodCall) InvoicesController#show calls 'invoice_result.error?' 3 times
  4177. - app/controllers/invoices_controller.rb:39
  4178. - app/controllers/invoices_controller.rb:41
  4179. - app/controllers/invoices_controller.rb:47
  4180. * (DuplicateMethodCall) InvoicesController#show calls 'params[:format]' 6 times
  4181. - app/controllers/invoices_controller.rb:30
  4182. - app/controllers/invoices_controller.rb:44
  4183. - app/controllers/invoices_controller.rb:46
  4184. - app/controllers/invoices_controller.rb:52
  4185. * (DuplicateMethodCall) InvoicesController#show calls 'params[:format].present?' 2 times
  4186. - app/controllers/invoices_controller.rb:30
  4187. - app/controllers/invoices_controller.rb:44
  4188. * (DuplicateMethodCall) InvoicesController#show calls 'params[:id]' 5 times
  4189. - app/controllers/invoices_controller.rb:33
  4190. - app/controllers/invoices_controller.rb:38
  4191. - app/controllers/invoices_controller.rb:46
  4192. - app/controllers/invoices_controller.rb:52
  4193. - app/controllers/invoices_controller.rb:73
  4194. * (DuplicateMethodCall) InvoicesController#show calls 'redirect_to invoices_path' 2 times
  4195. - app/controllers/invoices_controller.rb:43
  4196. - app/controllers/invoices_controller.rb:49
  4197. * (InstanceVariableAssumption) InvoicesController assumes too much for instance variable '@client_id'
  4198. - app/controllers/invoices_controller.rb:1
  4199. * (InstanceVariableAssumption) InvoicesController assumes too much for instance variable '@invoice'
  4200. - app/controllers/invoices_controller.rb:1
  4201. * (InstanceVariableAssumption) InvoicesController assumes too much for instance variable '@payment_methods'
  4202. - app/controllers/invoices_controller.rb:1
  4203. * (InstanceVariableAssumption) InvoicesController assumes too much for instance variable '@title'
  4204. - app/controllers/invoices_controller.rb:1
  4205. * (IrresponsibleModule) InvoicesController has no descriptive comment
  4206. - app/controllers/invoices_controller.rb:1
  4207. * (NilCheck) InvoicesController#execute_charge performs a nil-check
  4208. - app/controllers/invoices_controller.rb:90
  4209. - app/controllers/invoices_controller.rb:110
  4210. * (TooManyInstanceVariables) InvoicesController has at least 8 instance variables
  4211. - app/controllers/invoices_controller.rb:1
  4212. * (TooManyStatements) InvoicesController#execute_charge has approx 17 statements
  4213. - app/controllers/invoices_controller.rb:82
  4214. * (TooManyStatements) InvoicesController#index has approx 16 statements
  4215. - app/controllers/invoices_controller.rb:5
  4216. * (TooManyStatements) InvoicesController#show has approx 28 statements
  4217. - app/controllers/invoices_controller.rb:29
  4218. * (UncommunicativeVariableName) InvoicesController#index has the variable name 'k'
  4219. - app/controllers/invoices_controller.rb:13
  4220. * (UncommunicativeVariableName) InvoicesController#index has the variable name 'v'
  4221. - app/controllers/invoices_controller.rb:13
  4222.  
  4223. ServersController:
  4224. Rating: D
  4225. Churn: 0
  4226. Complexity: 310.45
  4227. Duplication: 0
  4228. Smells: 35
  4229. * (VeryHighComplexity) ServersController#update has a flog score of 113
  4230. - app/controllers/servers_controller.rb:84
  4231. * (VeryHighComplexity) ServersController#reinstall has a flog score of 73
  4232. - app/controllers/servers_controller.rb:139
  4233. * (HighComplexity) ServersController#new has a flog score of 38
  4234. - app/controllers/servers_controller.rb:12
  4235. * (HighComplexity) ServersController#show has a flog score of 37
  4236. - app/controllers/servers_controller.rb:37
  4237. * (HighComplexity) ServersController#create has a flog score of 35
  4238. - app/controllers/servers_controller.rb:57
  4239. * (DuplicateMethodCall) ServersController#index calls '_('Servers')' 2 times
  4240. - app/controllers/servers_controller.rb:8
  4241. - app/controllers/servers_controller.rb:9
  4242. * (DuplicateMethodCall) ServersController#new calls 'params[:locale]' 2 times
  4243. - app/controllers/servers_controller.rb:13
  4244. - app/controllers/servers_controller.rb:14
  4245. * (DuplicateMethodCall) ServersController#reinstall calls 'metadata[:ssh]' 2 times
  4246. - app/controllers/servers_controller.rb:157
  4247. - app/controllers/servers_controller.rb:158
  4248. * (DuplicateMethodCall) ServersController#reinstall calls 'params[:id]' 3 times
  4249. - app/controllers/servers_controller.rb:148
  4250. - app/controllers/servers_controller.rb:154
  4251. - app/controllers/servers_controller.rb:179
  4252. * (DuplicateMethodCall) ServersController#reinstall calls 'params[:reinstall]' 2 times
  4253. - app/controllers/servers_controller.rb:143
  4254. - app/controllers/servers_controller.rb:153
  4255. * (DuplicateMethodCall) ServersController#reinstall calls 'reinstall[:label]' 3 times
  4256. - app/controllers/servers_controller.rb:146
  4257. - app/controllers/servers_controller.rb:149
  4258. * (DuplicateMethodCall) ServersController#show calls 'params[:server_bandwidth]' 2 times
  4259. - app/controllers/servers_controller.rb:45
  4260. - app/controllers/servers_controller.rb:47
  4261. * (DuplicateMethodCall) ServersController#show calls 'params[:tab]' 2 times
  4262. - app/controllers/servers_controller.rb:41
  4263. * (DuplicateMethodCall) ServersController#update calls 'ENV['UBERSMITH_DOMAIN']' 2 times
  4264. - app/controllers/servers_controller.rb:91
  4265. - app/controllers/servers_controller.rb:108
  4266. * (DuplicateMethodCall) ServersController#update calls 'ENV['UBERSMITH_PASSWORD']' 2 times
  4267. - app/controllers/servers_controller.rb:91
  4268. - app/controllers/servers_controller.rb:108
  4269. * (DuplicateMethodCall) ServersController#update calls 'ENV['UBERSMITH_USERNAME']' 2 times
  4270. - app/controllers/servers_controller.rb:91
  4271. - app/controllers/servers_controller.rb:108
  4272. * (DuplicateMethodCall) ServersController#update calls 'api.device' 2 times
  4273. - app/controllers/servers_controller.rb:92
  4274. - app/controllers/servers_controller.rb:109
  4275. * (DuplicateMethodCall) ServersController#update calls 'params[:bandwidth]' 2 times
  4276. - app/controllers/servers_controller.rb:125
  4277. - app/controllers/servers_controller.rb:126
  4278. * (DuplicateMethodCall) ServersController#update calls 'params[:id]' 6 times
  4279. - app/controllers/servers_controller.rb:92
  4280. - app/controllers/servers_controller.rb:109
  4281. - app/controllers/servers_controller.rb:124
  4282. - app/controllers/servers_controller.rb:129
  4283. - app/controllers/servers_controller.rb:132
  4284. - app/controllers/servers_controller.rb:137
  4285. * (DuplicateMethodCall) ServersController#update calls 'reboot_result.error_message' 2 times
  4286. - app/controllers/servers_controller.rb:111
  4287. - app/controllers/servers_controller.rb:112
  4288. * (InstanceVariableAssumption) ServersController assumes too much for instance variable '@bandwidth_params'
  4289. - app/controllers/servers_controller.rb:1
  4290. * (InstanceVariableAssumption) ServersController assumes too much for instance variable '@brand_id'
  4291. - app/controllers/servers_controller.rb:1
  4292. * (InstanceVariableAssumption) ServersController assumes too much for instance variable '@current_tab'
  4293. - app/controllers/servers_controller.rb:1
  4294. * (InstanceVariableAssumption) ServersController assumes too much for instance variable '@device'
  4295. - app/controllers/servers_controller.rb:1
  4296. * (InstanceVariableAssumption) ServersController assumes too much for instance variable '@title'
  4297. - app/controllers/servers_controller.rb:1
  4298. * (IrresponsibleModule) ServerRebootError has no descriptive comment
  4299. - app/controllers/servers_controller.rb:195
  4300. * (IrresponsibleModule) ServersController has no descriptive comment
  4301. - app/controllers/servers_controller.rb:1
  4302. * (TooManyInstanceVariables) ServersController has at least 10 instance variables
  4303. - app/controllers/servers_controller.rb:1
  4304. * (TooManyStatements) ServersController#create has approx 12 statements
  4305. - app/controllers/servers_controller.rb:57
  4306. * (TooManyStatements) ServersController#new has approx 13 statements
  4307. - app/controllers/servers_controller.rb:12
  4308. * (TooManyStatements) ServersController#reinstall has approx 17 statements
  4309. - app/controllers/servers_controller.rb:141
  4310. * (TooManyStatements) ServersController#show has approx 13 statements
  4311. - app/controllers/servers_controller.rb:37
  4312. * (TooManyStatements) ServersController#update has approx 23 statements
  4313. - app/controllers/servers_controller.rb:84
  4314. * (UncommunicativeVariableName) ServersController#show has the variable name 'k'
  4315. - app/controllers/servers_controller.rb:47
  4316. * (UncommunicativeVariableName) ServersController#show has the variable name 'v'
  4317. - app/controllers/servers_controller.rb:47
  4318.  
  4319. UbersmithOrder:
  4320. Rating: D
  4321. Churn: 0
  4322. Complexity: 244.63
  4323. Duplication: 50
  4324. Smells: 30
  4325. * (DuplicateCode) Similar code found in 2 nodes
  4326. - lib/modules/ubersmith_order.rb:99
  4327. - lib/modules/ubersmith_order.rb:104
  4328. * (VeryHighComplexity) UbersmithOrder::verify_payment has a flog score of 65
  4329. - lib/modules/ubersmith_order.rb:7
  4330. * (VeryHighComplexity) UbersmithOrder::validate_invoice has a flog score of 64
  4331. - lib/modules/ubersmith_order.rb:135
  4332. * (HighComplexity) UbersmithOrder::apply_credit has a flog score of 38
  4333. - lib/modules/ubersmith_order.rb:183
  4334. * (DuplicateMethodCall) UbersmithOrder#self.apply_credit calls 'api.client' 2 times
  4335. - lib/modules/ubersmith_order.rb:185
  4336. - lib/modules/ubersmith_order.rb:200
  4337. * (DuplicateMethodCall) UbersmithOrder#self.apply_credit calls 'invoice['invid']' 2 times
  4338. - lib/modules/ubersmith_order.rb:187
  4339. - lib/modules/ubersmith_order.rb:202
  4340. * (DuplicateMethodCall) UbersmithOrder#self.get_order_list calls 'api.order' 6 times
  4341. - lib/modules/ubersmith_order.rb:96
  4342. - lib/modules/ubersmith_order.rb:97
  4343. - lib/modules/ubersmith_order.rb:98
  4344. - lib/modules/ubersmith_order.rb:101
  4345. - lib/modules/ubersmith_order.rb:102
  4346. - lib/modules/ubersmith_order.rb:103
  4347. * (DuplicateMethodCall) UbersmithOrder#self.parse_paid calls 'services[key]' 2 times
  4348. - lib/modules/ubersmith_order.rb:228
  4349. - lib/modules/ubersmith_order.rb:229
  4350. * (DuplicateMethodCall) UbersmithOrder#self.send_paid_email calls 'order["info"]' 4 times
  4351. - lib/modules/ubersmith_order.rb:70
  4352. - lib/modules/ubersmith_order.rb:71
  4353. - lib/modules/ubersmith_order.rb:72
  4354. * (DuplicateMethodCall) UbersmithOrder#self.validate_invoice calls 'Bugsnag.notify(OrderVerifyPaymentError.new(message))' 2 times
  4355. - lib/modules/ubersmith_order.rb:146
  4356. - lib/modules/ubersmith_order.rb:153
  4357. * (DuplicateMethodCall) UbersmithOrder#self.validate_invoice calls 'api.client' 2 times
  4358. - lib/modules/ubersmith_order.rb:141
  4359. - lib/modules/ubersmith_order.rb:162
  4360. * (DuplicateMethodCall) UbersmithOrder#self.validate_invoice calls 'invoice_result.data' 2 times
  4361. - lib/modules/ubersmith_order.rb:147
  4362. - lib/modules/ubersmith_order.rb:158
  4363. * (DuplicateMethodCall) UbersmithOrder#self.validate_invoice calls 'pp message' 3 times
  4364. - lib/modules/ubersmith_order.rb:145
  4365. - lib/modules/ubersmith_order.rb:152
  4366. - lib/modules/ubersmith_order.rb:175
  4367. * (DuplicateMethodCall) UbersmithOrder#self.verify_payment calls 'action['status']' 2 times
  4368. - lib/modules/ubersmith_order.rb:34
  4369. - lib/modules/ubersmith_order.rb:40
  4370. * (DuplicateMethodCall) UbersmithOrder#self.verify_payment calls 'key.to_i' 4 times
  4371. - lib/modules/ubersmith_order.rb:34
  4372. - lib/modules/ubersmith_order.rb:35
  4373. - lib/modules/ubersmith_order.rb:38
  4374. - lib/modules/ubersmith_order.rb:40
  4375. * (DuplicateMethodCall) UbersmithOrder#self.verify_payment calls 'order_result.error_message' 2 times
  4376. - lib/modules/ubersmith_order.rb:20
  4377. - lib/modules/ubersmith_order.rb:22
  4378. * (DuplicateMethodCall) UbersmithOrder#self.verify_payment calls 'pp message' 2 times
  4379. - lib/modules/ubersmith_order.rb:24
  4380. - lib/modules/ubersmith_order.rb:49
  4381. * (DuplicateMethodCall) UbersmithOrder#self.verify_payment calls 'verify_payment_id == 0' 2 times
  4382. - lib/modules/ubersmith_order.rb:43
  4383. - lib/modules/ubersmith_order.rb:47
  4384. * (IrresponsibleModule) UbersmithOrder has no descriptive comment
  4385. - lib/modules/ubersmith_order.rb:4
  4386. * (NestedIterators) UbersmithOrder#self.parse_paid contains iterators nested 2 deep
  4387. - lib/modules/ubersmith_order.rb:229
  4388. * (NestedIterators) UbersmithOrder#self.verify_payment contains iterators nested 4 deep
  4389. - lib/modules/ubersmith_order.rb:32
  4390. * (TooManyStatements) UbersmithOrder#self.apply_credit has approx 16 statements
  4391. - lib/modules/ubersmith_order.rb:183
  4392. * (TooManyStatements) UbersmithOrder#self.parse_paid has approx 7 statements
  4393. - lib/modules/ubersmith_order.rb:225
  4394. * (TooManyStatements) UbersmithOrder#self.send_paid_email has approx 9 statements
  4395. - lib/modules/ubersmith_order.rb:69
  4396. * (TooManyStatements) UbersmithOrder#self.validate_invoice has approx 21 statements
  4397. - lib/modules/ubersmith_order.rb:135
  4398. * (TooManyStatements) UbersmithOrder#self.verify_payment has approx 23 statements
  4399. - lib/modules/ubersmith_order.rb:7
  4400. * (UncommunicativeVariableName) UbersmithOrder#self.send_paid_email has the variable name 'k'
  4401. - lib/modules/ubersmith_order.rb:70
  4402. * (UncommunicativeVariableName) UbersmithOrder#self.send_paid_email has the variable name 'v'
  4403. - lib/modules/ubersmith_order.rb:70
  4404. * (UnusedParameters) UbersmithOrder#self.on_after_paid has unused parameter 'brand_id'
  4405. - lib/modules/ubersmith_order.rb:61
  4406. * (UnusedParameters) UbersmithOrder#self.on_after_paid has unused parameter 'verify_payment_id'
  4407. - lib/modules/ubersmith_order.rb:61
  4408.  
  4409. UserInflectionsSpec:
  4410. Rating: D
  4411. Churn: 0
  4412. Complexity: 0.0
  4413. Duplication: 59
  4414. Smells: 1
  4415. * (DuplicateCode) Similar code found in 5 nodes
  4416. - spec/inflections/billing_inflections_spec.rb:3
  4417. - spec/inflections/company_inflections_spec.rb:3
  4418. - spec/inflections/delayed_job_inflections_spec.rb:3
  4419. - spec/inflections/invoice_via_inflections_spec.rb:3
  4420. - spec/inflections/user_inflections_spec.rb:3
  4421.  
  4422. WhatsNewControllerSpec:
  4423. Rating: D
  4424. Churn: 0
  4425. Complexity: 227.52
  4426. Duplication: 0
  4427. Smells: 2
  4428. * (HighComplexity) describe(GET #index)::context#when request is done with success has a flog score of 49
  4429. - spec/controllers/whats_new_controller_spec.rb:26
  4430. * (HighComplexity) describe(GET #index)::context(when request is done with success)::it#return status ok with a message has a flog score of 26
  4431. - spec/controllers/whats_new_controller_spec.rb:37
  4432.  
  4433. Maas::ProvisionError:
  4434. Rating: F
  4435. Churn: 0
  4436. Complexity: 1053.21
  4437. Duplication: 240
  4438. Smells: 112
  4439. * (DuplicateCode) Similar code found in 2 nodes
  4440. - lib/modules/maas.rb:91
  4441. - lib/modules/maas.rb:98
  4442. * (DuplicateCode) Similar code found in 3 nodes
  4443. - lib/modules/maas.rb:158
  4444. - lib/modules/maas.rb:169
  4445. - lib/modules/maas.rb:221
  4446. * (DuplicateCode) Similar code found in 2 nodes
  4447. - lib/modules/maas.rb:304
  4448. - lib/modules/maas.rb:616
  4449. * (DuplicateCode) Similar code found in 2 nodes
  4450. - lib/modules/maas.rb:459
  4451. - lib/modules/maas.rb:535
  4452. * (DuplicateCode) Similar code found in 2 nodes
  4453. - lib/modules/maas.rb:676
  4454. - lib/modules/maas.rb:694
  4455. * (VeryHighComplexity) Maas::choice_machine has a flog score of 307
  4456. - lib/modules/maas.rb:120
  4457. * (VeryHighComplexity) Maas::reinstall has a flog score of 143
  4458. - lib/modules/maas.rb:522
  4459. * (VeryHighComplexity) Maas::start_deploy has a flog score of 117
  4460. - lib/modules/maas.rb:342
  4461. * (VeryHighComplexity) Maas::check has a flog score of 95
  4462. - lib/modules/maas.rb:36
  4463. * (VeryHighComplexity) Maas::deploy has a flog score of 87
  4464. - lib/modules/maas.rb:253
  4465. * (VeryHighComplexity) Maas::send_access has a flog score of 65
  4466. - lib/modules/maas.rb:465
  4467. * (HighComplexity) Maas::find_paid_order has a flog score of 53
  4468. - lib/modules/maas.rb:85
  4469. * (HighComplexity) Maas::validate_order has a flog score of 29
  4470. - lib/modules/maas.rb:11
  4471. * (ControlParameter) Maas#self.brand_id_by_queue is controlled by argument 'queue_id'
  4472. - lib/modules/maas.rb:736
  4473. * (DuplicateMethodCall) Maas#self.check calls 'device['label']' 2 times
  4474. - lib/modules/maas.rb:54
  4475. - lib/modules/maas.rb:57
  4476. * (DuplicateMethodCall) Maas#self.check calls 'device['tags']' 2 times
  4477. - lib/modules/maas.rb:51
  4478. * (DuplicateMethodCall) Maas#self.check calls 'devices_result.data' 2 times
  4479. - lib/modules/maas.rb:42
  4480. - lib/modules/maas.rb:50
  4481. * (DuplicateMethodCall) Maas#self.check calls 'message.join("\n")' 2 times
  4482. - lib/modules/maas.rb:69
  4483. - lib/modules/maas.rb:73
  4484. * (DuplicateMethodCall) Maas#self.choice_machine calls 'Bugsnag.notify(Maas::ProvisionError.new(error))' 5 times
  4485. - lib/modules/maas.rb:160
  4486. - lib/modules/maas.rb:171
  4487. - lib/modules/maas.rb:179
  4488. - lib/modules/maas.rb:196
  4489. - lib/modules/maas.rb:223
  4490. * (DuplicateMethodCall) Maas#self.choice_machine calls 'api.client' 2 times
  4491. - lib/modules/maas.rb:200
  4492. - lib/modules/maas.rb:218
  4493. * (DuplicateMethodCall) Maas#self.choice_machine calls 'api.device' 3 times
  4494. - lib/modules/maas.rb:143
  4495. - lib/modules/maas.rb:166
  4496. - lib/modules/maas.rb:191
  4497. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device['dev']' 2 times
  4498. - lib/modules/maas.rb:190
  4499. - lib/modules/maas.rb:226
  4500. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device['label']' 2 times
  4501. - lib/modules/maas.rb:206
  4502. - lib/modules/maas.rb:225
  4503. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device['label'].split(' ')' 2 times
  4504. - lib/modules/maas.rb:206
  4505. - lib/modules/maas.rb:225
  4506. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device['label'].split(' ').first' 2 times
  4507. - lib/modules/maas.rb:206
  4508. - lib/modules/maas.rb:225
  4509. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device_result.data' 3 times
  4510. - lib/modules/maas.rb:161
  4511. - lib/modules/maas.rb:173
  4512. - lib/modules/maas.rb:215
  4513. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device_result.data.values' 2 times
  4514. - lib/modules/maas.rb:173
  4515. - lib/modules/maas.rb:215
  4516. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device_result.error?' 2 times
  4517. - lib/modules/maas.rb:156
  4518. - lib/modules/maas.rb:167
  4519. * (DuplicateMethodCall) Maas#self.choice_machine calls 'device_result.error_message' 2 times
  4520. - lib/modules/maas.rb:158
  4521. - lib/modules/maas.rb:169
  4522. * (DuplicateMethodCall) Maas#self.choice_machine calls 'did.nil?' 3 times
  4523. - lib/modules/maas.rb:141
  4524. - lib/modules/maas.rb:165
  4525. - lib/modules/maas.rb:177
  4526. * (DuplicateMethodCall) Maas#self.choice_machine calls 'key.include?('pack')' 2 times
  4527. - lib/modules/maas.rb:127
  4528. - lib/modules/maas.rb:237
  4529. * (DuplicateMethodCall) Maas#self.choice_machine calls 'order['info']' 3 times
  4530. - lib/modules/maas.rb:125
  4531. - lib/modules/maas.rb:126
  4532. - lib/modules/maas.rb:236
  4533. * (DuplicateMethodCall) Maas#self.choice_machine calls 'order['order_id']' 11 times
  4534. - lib/modules/maas.rb:121
  4535. - lib/modules/maas.rb:158
  4536. - lib/modules/maas.rb:169
  4537. - lib/modules/maas.rb:176
  4538. - lib/modules/maas.rb:184
  4539. - lib/modules/maas.rb:194
  4540. - lib/modules/maas.rb:208
  4541. - lib/modules/maas.rb:221
  4542. - lib/modules/maas.rb:228
  4543. - lib/modules/maas.rb:242
  4544. - lib/modules/maas.rb:243
  4545. * (DuplicateMethodCall) Maas#self.choice_machine calls 'params[:device_id] = device['dev']' 2 times
  4546. - lib/modules/maas.rb:190
  4547. - lib/modules/maas.rb:226
  4548. * (DuplicateMethodCall) Maas#self.choice_machine calls 'params[:order_id] = order['order_id']' 2 times
  4549. - lib/modules/maas.rb:208
  4550. - lib/modules/maas.rb:228
  4551. * (DuplicateMethodCall) Maas#self.choice_machine calls 'pp error' 5 times
  4552. - lib/modules/maas.rb:159
  4553. - lib/modules/maas.rb:170
  4554. - lib/modules/maas.rb:178
  4555. - lib/modules/maas.rb:195
  4556. - lib/modules/maas.rb:222
  4557. * (DuplicateMethodCall) Maas#self.choice_machine calls 'self.deploy(hostname, distro, params)' 2 times
  4558. - lib/modules/maas.rb:209
  4559. - lib/modules/maas.rb:229
  4560. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value.is_a?(Hash)' 2 times
  4561. - lib/modules/maas.rb:127
  4562. - lib/modules/maas.rb:237
  4563. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['hostname']' 2 times
  4564. - lib/modules/maas.rb:152
  4565. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['packid']' 11 times
  4566. - lib/modules/maas.rb:128
  4567. - lib/modules/maas.rb:129
  4568. - lib/modules/maas.rb:143
  4569. - lib/modules/maas.rb:147
  4570. - lib/modules/maas.rb:158
  4571. - lib/modules/maas.rb:169
  4572. - lib/modules/maas.rb:176
  4573. - lib/modules/maas.rb:194
  4574. - lib/modules/maas.rb:201
  4575. - lib/modules/maas.rb:218
  4576. - lib/modules/maas.rb:221
  4577. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['parentpack']' 2 times
  4578. - lib/modules/maas.rb:127
  4579. - lib/modules/maas.rb:237
  4580. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['parentpack'].present? == false' 2 times
  4581. - lib/modules/maas.rb:127
  4582. - lib/modules/maas.rb:237
  4583. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['parentpack'].present?' 2 times
  4584. - lib/modules/maas.rb:127
  4585. - lib/modules/maas.rb:237
  4586. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['ssh']' 2 times
  4587. - lib/modules/maas.rb:153
  4588. * (DuplicateMethodCall) Maas#self.choice_machine calls 'value['ssh_name']' 2 times
  4589. - lib/modules/maas.rb:154
  4590. * (DuplicateMethodCall) Maas#self.deploy calls 'Bugsnag.notify(Maas::ProvisionError.new(error))' 2 times
  4591. - lib/modules/maas.rb:306
  4592. - lib/modules/maas.rb:328
  4593. * (DuplicateMethodCall) Maas#self.deploy calls 'ENV['MAAS_TEST_DEVICE']' 2 times
  4594. - lib/modules/maas.rb:256
  4595. - lib/modules/maas.rb:257
  4596. * (DuplicateMethodCall) Maas#self.deploy calls 'TaskMailer.send_generic_email( ... )' 2 times
  4597. - lib/modules/maas.rb:308
  4598. - lib/modules/maas.rb:330
  4599. * (DuplicateMethodCall) Maas#self.deploy calls 'params.to_json' 2 times
  4600. - lib/modules/maas.rb:286
  4601. - lib/modules/maas.rb:326
  4602. * (DuplicateMethodCall) Maas#self.deploy calls 'pp error' 2 times
  4603. - lib/modules/maas.rb:305
  4604. - lib/modules/maas.rb:327
  4605. * (DuplicateMethodCall) Maas#self.distro_series calls 'option.to_i' 3 times
  4606. - lib/modules/maas.rb:670
  4607. * (DuplicateMethodCall) Maas#self.execute_request calls 'params[:header]' 2 times
  4608. - lib/modules/maas.rb:645
  4609. - lib/modules/maas.rb:648
  4610. * (DuplicateMethodCall) Maas#self.find_machine_by_label calls 'request.body' 2 times
  4611. - lib/modules/maas.rb:779
  4612. - lib/modules/maas.rb:781
  4613. * (DuplicateMethodCall) Maas#self.find_paid_order calls 'api.order' 2 times
  4614. - lib/modules/maas.rb:87
  4615. - lib/modules/maas.rb:88
  4616. * (DuplicateMethodCall) Maas#self.find_paid_order calls 'orders_result_1.data' 2 times
  4617. - lib/modules/maas.rb:93
  4618. - lib/modules/maas.rb:94
  4619. * (DuplicateMethodCall) Maas#self.find_paid_order calls 'orders_result_2.data' 2 times
  4620. - lib/modules/maas.rb:100
  4621. - lib/modules/maas.rb:101
  4622. * (DuplicateMethodCall) Maas#self.reinstall calls 'Bugsnag.notify(Maas::ActionError.new(error))' 2 times
  4623. - lib/modules/maas.rb:563
  4624. - lib/modules/maas.rb:618
  4625. * (DuplicateMethodCall) Maas#self.reinstall calls 'api.client' 2 times
  4626. - lib/modules/maas.rb:559
  4627. - lib/modules/maas.rb:589
  4628. * (DuplicateMethodCall) Maas#self.reinstall calls 'args['ssh']' 2 times
  4629. - lib/modules/maas.rb:608
  4630. * (DuplicateMethodCall) Maas#self.reinstall calls 'args['ssh_name']' 2 times
  4631. - lib/modules/maas.rb:578
  4632. * (DuplicateMethodCall) Maas#self.reinstall calls 'device['dev_desc']' 3 times
  4633. - lib/modules/maas.rb:572
  4634. - lib/modules/maas.rb:602
  4635. * (DuplicateMethodCall) Maas#self.reinstall calls 'device['label']' 3 times
  4636. - lib/modules/maas.rb:539
  4637. - lib/modules/maas.rb:572
  4638. - lib/modules/maas.rb:602
  4639. * (DuplicateMethodCall) Maas#self.reinstall calls 'device['packid']' 2 times
  4640. - lib/modules/maas.rb:559
  4641. - lib/modules/maas.rb:590
  4642. * (DuplicateMethodCall) Maas#self.reinstall calls 'device_result.error_message' 2 times
  4643. - lib/modules/maas.rb:535
  4644. - lib/modules/maas.rb:536
  4645. * (DuplicateMethodCall) Maas#self.reinstall calls 'pp error' 2 times
  4646. - lib/modules/maas.rb:562
  4647. - lib/modules/maas.rb:617
  4648. * (DuplicateMethodCall) Maas#self.reinstall calls 'service_result.error?' 2 times
  4649. - lib/modules/maas.rb:560
  4650. - lib/modules/maas.rb:596
  4651. * (DuplicateMethodCall) Maas#self.send_access calls 'params[:client_id]' 2 times
  4652. - lib/modules/maas.rb:468
  4653. - lib/modules/maas.rb:504
  4654. * (DuplicateMethodCall) Maas#self.send_access calls 'params[:distro]' 2 times
  4655. - lib/modules/maas.rb:484
  4656. - lib/modules/maas.rb:488
  4657. * (DuplicateMethodCall) Maas#self.send_access calls 'params[:ssh_name]' 3 times
  4658. - lib/modules/maas.rb:488
  4659. - lib/modules/maas.rb:489
  4660. * (DuplicateMethodCall) Maas#self.start_deploy calls 'order_item[:dev_desc]' 2 times
  4661. - lib/modules/maas.rb:427
  4662. - lib/modules/maas.rb:430
  4663. * (DuplicateMethodCall) Maas#self.start_deploy calls 'order_item[:mac_address]' 2 times
  4664. - lib/modules/maas.rb:405
  4665. - lib/modules/maas.rb:415
  4666. * (DuplicateMethodCall) Maas#self.start_deploy calls 'order_item[:option]' 2 times
  4667. - lib/modules/maas.rb:377
  4668. - lib/modules/maas.rb:387
  4669. * (DuplicateMethodCall) Maas#self.start_deploy calls 'order_item[:ssh]' 4 times
  4670. - lib/modules/maas.rb:361
  4671. - lib/modules/maas.rb:438
  4672. - lib/modules/maas.rb:440
  4673. * (DuplicateMethodCall) Maas#self.start_deploy calls 'order_item[:ssh].present?' 2 times
  4674. - lib/modules/maas.rb:361
  4675. - lib/modules/maas.rb:438
  4676. * (DuplicateMethodCall) Maas#self.start_deploy calls 'pp response.body' 2 times
  4677. - lib/modules/maas.rb:456
  4678. - lib/modules/maas.rb:459
  4679. * (DuplicateMethodCall) Maas#self.start_deploy calls 'response.body' 3 times
  4680. - lib/modules/maas.rb:456
  4681. - lib/modules/maas.rb:459
  4682. - lib/modules/maas.rb:460
  4683. * (DuplicateMethodCall) Maas#self.start_deploy calls 'user_data_file.include?('windows')' 2 times
  4684. - lib/modules/maas.rb:425
  4685. - lib/modules/maas.rb:438
  4686. * (DuplicateMethodCall) Maas#self.start_deploy calls 'wan_ip.nil?' 2 times
  4687. - lib/modules/maas.rb:400
  4688. - lib/modules/maas.rb:405
  4689. * (DuplicateMethodCall) Maas#self.type calls 'option.to_i' 2 times
  4690. - lib/modules/maas.rb:661
  4691. * (DuplicateMethodCall) Maas#self.validate_order calls 'order_item.metadata' 2 times
  4692. - lib/modules/maas.rb:18
  4693. * (DuplicateMethodCall) Maas#self.validate_order calls 'order_item.upgrade_items' 2 times
  4694. - lib/modules/maas.rb:16
  4695. - lib/modules/maas.rb:17
  4696. * (IrresponsibleModule) Maas has no descriptive comment
  4697. - lib/modules/maas.rb:6
  4698. * (LongParameterList) Maas#self.show_access_on_control has 4 parameters
  4699. - lib/modules/maas.rb:799
  4700. * (LongParameterList) Maas#self.start_deploy has 4 parameters
  4701. - lib/modules/maas.rb:342
  4702. * (LongParameterList) Maas#self.validate_order has 4 parameters
  4703. - lib/modules/maas.rb:11
  4704. * (NestedIterators) Maas#self.check contains iterators nested 2 deep
  4705. - lib/modules/maas.rb:52
  4706. - lib/modules/maas.rb:54
  4707. * (NestedIterators) Maas#self.deploy contains iterators nested 2 deep
  4708. - lib/modules/maas.rb:272
  4709. * (NestedIterators) Maas#self.find_mac_address contains iterators nested 2 deep
  4710. - lib/modules/maas.rb:788
  4711. * (NilCheck) Maas#self.check performs a nil-check
  4712. - lib/modules/maas.rb:53
  4713. - lib/modules/maas.rb:55
  4714. * (NilCheck) Maas#self.choice_machine performs a nil-check
  4715. - lib/modules/maas.rb:141
  4716. - lib/modules/maas.rb:165
  4717. - lib/modules/maas.rb:177
  4718. * (NilCheck) Maas#self.deploy performs a nil-check
  4719. - lib/modules/maas.rb:284
  4720. - lib/modules/maas.rb:302
  4721. * (NilCheck) Maas#self.finish_service_process performs a nil-check
  4722. - lib/modules/maas.rb:511
  4723. * (NilCheck) Maas#self.reinstall performs a nil-check
  4724. - lib/modules/maas.rb:548
  4725. * (NilCheck) Maas#self.start_deploy performs a nil-check
  4726. - lib/modules/maas.rb:400
  4727. - lib/modules/maas.rb:405
  4728. * (NilCheck) Maas#self.validate_order performs a nil-check
  4729. - lib/modules/maas.rb:20
  4730. * (TooManyStatements) Maas#self.check has approx 23 statements
  4731. - lib/modules/maas.rb:36
  4732. * (TooManyStatements) Maas#self.choice_machine has approx 60 statements
  4733. - lib/modules/maas.rb:120
  4734. * (TooManyStatements) Maas#self.deploy has approx 35 statements
  4735. - lib/modules/maas.rb:253
  4736. * (TooManyStatements) Maas#self.execute_request has approx 6 statements
  4737. - lib/modules/maas.rb:635
  4738. * (TooManyStatements) Maas#self.find_device_ip has approx 7 statements
  4739. - lib/modules/maas.rb:761
  4740. * (TooManyStatements) Maas#self.find_mac_address has approx 6 statements
  4741. - lib/modules/maas.rb:785
  4742. * (TooManyStatements) Maas#self.find_paid_order has approx 12 statements
  4743. - lib/modules/maas.rb:85
  4744. * (TooManyStatements) Maas#self.reinstall has approx 41 statements
  4745. - lib/modules/maas.rb:522
  4746. * (TooManyStatements) Maas#self.send_access has approx 21 statements
  4747. - lib/modules/maas.rb:465
  4748. * (TooManyStatements) Maas#self.start_deploy has approx 46 statements
  4749. - lib/modules/maas.rb:342
  4750. * (TooManyStatements) Maas#self.validate_order has approx 9 statements
  4751. - lib/modules/maas.rb:11
  4752. * (UncommunicativeVariableName) Maas#self.check has the variable name 'n'
  4753. - lib/modules/maas.rb:54
  4754. * (UncommunicativeVariableName) Maas#self.check has the variable name 't'
  4755. - lib/modules/maas.rb:52
  4756. * (UncommunicativeVariableName) Maas#self.find_paid_order has the variable name 'orders_result_1'
  4757. - lib/modules/maas.rb:87
  4758. * (UncommunicativeVariableName) Maas#self.find_paid_order has the variable name 'orders_result_2'
  4759. - lib/modules/maas.rb:88
  4760. * (UncommunicativeVariableName) Maas#self.random_password has the variable name 'i'
  4761. - lib/modules/maas.rb:745
  4762. * (UncommunicativeVariableName) Maas#self.start_deploy has the variable name 'f'
  4763. - lib/modules/maas.rb:370
  4764. Score: 90.31
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement