zfdatagrid / grid

A DataGrid library for Zend Framework
BSD 3-Clause "New" or "Revised" License
10 stars 16 forks source link

Coding standards #876

Closed imonteiro closed 11 years ago

imonteiro commented 11 years ago

Original author: solomonj...@gmail.com (March 19, 2010 16:15:14)

I just want to add this in here as a reminder and a reference.

I would like to see the code use all Zend Coding standards http://framework.zend.com/manual/en/coding-standard.html

Especially declaring "public" for publicly accessible methods.

I have tried to create the Doctrine.php source to meet Zend Coding standards, but that might need to be reviewed as well.

Original issue: http://code.google.com/p/zfdatagrid/issues/detail?id=221

imonteiro commented 11 years ago

From vlatko.b...@gmail.com on March 23, 2010 08:07:24 Hi,

this request is not directly linked with ZF coding, but with JS formatting.

This is a part of JS created for the grid:

function _addressbook_zfGridconfirmDel(msg, url) { if(confirm(msg)) { window.location = url;

        }else{
            return false;
        }
    }function _addressbook_zfGridgridChangeFilters(fields,url,Ajax,event)
{
    if(event !=0)
    {
        if(event.keyCode != 13)
        {
            return false;
        }
    }
var Ajax = "1";
var fieldsArray = fields.split(",");
var filtro = new Array;

for (var i = 0; i < fieldsArray.length -1; i++)
  1. New function starts appended directly to the previous one. Can there be inserted some PHP_EOL.
  2. Indentation is not quite clear.

Some beauty would be appreciated. ;-)