Source code should not contain TODO comments 9

  • Minor
  • Architecture

More information: https://insight.sensiolabs.com/what-we-analyse/task_todo_comment

  1. *
  2. * @return \Illuminate\Http\Response
  3. */
  4. public function index()
  5. {
  6. // TODO: add filtering

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  7. $issues = \App\Issue::all();
  8. return view('issues.browse')
  9. ->with('issues', $issues)
  10. ->with('issuePriorities', \App\IssuePriority::all())
  11. ->with('issueStatuses', \App\IssueStatus::all())
in public/js/app.js, line 21533
  1. // Document context
  2. if ( nodeType === 9 ) {
  3. if ( (elem = context.getElementById( m )) ) {
  4. // Support: IE, Opera, Webkit
  5. // TODO: identify versions

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  6. // getElementById can match elements by name instead of ID
  7. if ( elem.id === m ) {
  8. results.push( elem );
  9. return results;
  10. }
in public/js/app.js, line 21547
  1. // Element context
  2. } else {
  3. // Support: IE, Opera, Webkit
  4. // TODO: identify versions

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  5. // getElementById can match elements by name instead of ID
  6. if ( newContext && (elem = newContext.getElementById( m )) &&
  7. contains( context, elem ) &&
  8. elem.id === m ) {
in public/js/app.js, line 25000
  1. removeData: function( elem, name ) {
  2. dataUser.remove( elem, name );
  3. },
  4. // TODO: Now that all calls to _data and _removeData have been replaced

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  5. // with direct calls to dataPriv methods, these can be deprecated.
  6. _data: function( elem, name, data ) {
  7. return dataPriv.access( elem, name, data );
  8. },
in public/js/app.js, line 31160
  1. } else if (callback) {
  2. callback();
  3. }
  4. }; // ----------------------------------------------------------------------
  5. // the following methods are used to handle overflowing modals
  6. // todo (fat): these should probably be refactored out of modal.js

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  7. // ----------------------------------------------------------------------
  8. _proto._adjustDialog = function _adjustDialog() {
  9. var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
in public/js/app.js, line 32312
  1. if (target) {
  2. var targetBCR = target.getBoundingClientRect();
  3. if (targetBCR.width || targetBCR.height) {
  4. // todo (fat): remove sketch reliance on jQuery position/offset

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  5. return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector];
  6. }
  7. }
  8. return null;
in public/js/app.js, line 33598
  1. // Document context
  2. if ( nodeType === 9 ) {
  3. if ( (elem = context.getElementById( m )) ) {
  4. // Support: IE, Opera, Webkit
  5. // TODO: identify versions

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  6. // getElementById can match elements by name instead of ID
  7. if ( elem.id === m ) {
  8. results.push( elem );
  9. return results;
  10. }
in public/js/app.js, line 33612
  1. // Element context
  2. } else {
  3. // Support: IE, Opera, Webkit
  4. // TODO: identify versions

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  5. // getElementById can match elements by name instead of ID
  6. if ( newContext && (elem = newContext.getElementById( m )) &&
  7. contains( context, elem ) &&
  8. elem.id === m ) {
in public/js/app.js, line 37065
  1. removeData: function( elem, name ) {
  2. dataUser.remove( elem, name );
  3. },
  4. // TODO: Now that all calls to _data and _removeData have been replaced

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Alan Hardman
  5. // with direct calls to dataPriv methods, these can be deprecated.
  6. _data: function( elem, name, data ) {
  7. return dataPriv.access( elem, name, data );
  8. },

Object parameters should be type hinted

  • Minor
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/php.object_parameter_not_type_hinted

in routes/channels.php, line 14
  1. | application supports. The given channel authorization callbacks are
  2. | used to check if an authenticated user can listen to the channel.
  3. |
  4. */
  5. Broadcast::channel('App.User.{id}', function ($user, $id) {

    The parameter user, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Alan Hardman
  6. return (int) $user->id === (int) $id;
  7. });

.htaccess should be avoided

  • Info
  • Performance

More information: https://insight.sensiolabs.com/what-we-analyse/web.apache_config

A .htaccess file has been spotted. You should consider moving it to the server configuration to improve global performances.

Time to fix: about 1 hour
Open Issue Permalink
Last edited by Alan Hardman