Issues

ZF-7316: Cleaning all the code

Issue Type: Coding Standards Violation Created: 2009-07-20T02:53:32.000+0000 Last Updated: 2010-12-08T23:43:00.000+0000 Status: Resolved Fix version(s): Reporter: Mickael Perraud (mikaelkael) Assignee: Thomas Weidner (thomas) Tags: - Zend_Acl

  • Zend_Amf
  • Zend_Application
  • Zend_Auth
  • Zend_Cache
  • Zend_Captcha
  • Zend_CodeGenerator
  • Zend_Config
  • Zend_Config_Writer
  • Zend_Controller
  • Zend_Db
  • Zend_Db_Adapter_Db2
  • Zend_Db_Adapter_Mysqli
  • Zend_Db_Adapter_Oracle
  • Zend_Db_Profiler
  • Zend_Db_Select
  • Zend_Db_Table
  • Zend_Dojo
  • Zend_Feed
  • Zend_Feed_Reader
  • Zend_File_Transfer
  • Zend_Filter
  • Zend_Filter_Inflector
  • Zend_Filter_Input
  • Zend_Form
  • Zend_Gdata
  • Zend_InfoCard
  • Zend_Json
  • Zend_Json_Server
  • Zend_Layout
  • Zend_Ldap
  • Zend_Loader
  • Zend_Log
  • Zend_Mail
  • Zend_Mail_Storage
  • Zend_Paginator
  • Zend_Pdf
  • Zend_ProgressBar
  • Zend_Reflection
  • Zend_Search_Lucene
  • Zend_Server_Reflection
  • Zend_Service_Akismet
  • Zend_Service_Amazon
  • Zend_Service_Amazon_Ec2
  • Zend_Service_Audioscrobbler
  • Zend_Service_Delicious
  • Zend_Service_Flickr
  • Zend_Service_Nirvanix
  • Zend_Service_Simpy
  • Zend_Service_Technorati
  • Zend_Service_Twitter
  • Zend_Service_Yahoo
  • Zend_Session
  • Zend_Soap_Client
  • Zend_Soap_Server
  • Zend_Soap_Wsdl
  • Zend_Tag
  • Zend_Text_Figlet
  • Zend_Text_Table
  • Zend_Tool
  • Zend_Uri
  • Zend_Validate
  • Zend_View
  • Zend_Wildfire
  • Zend_XmlRpc_Server
  • ZendX_Console_Process_Unix
  • ZendX_JQuery

Related issues: - ZF-10798

Attachments: - ZF7316.ods

Description

Some files contain CRLF:

<pre class="highlight">
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/\r\n/\n/g'

Some files contain TABS:

<pre class="highlight">
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/\t/    /g'

Some files contain endline spaces:

<pre class="highlight">
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/[ ]*$//g'

By running this 3 commands on the top of standard directory. It could be applied to library and tests.

After that, a pre-commit hook could be added to test all of them (but it's another history ;) )

Comments

Posted by julien PAULI (doctorrock83) on 2009-07-20T09:59:25.000+0000

I agree : As time goes, ZF code gets worse and worse written. Hang on : I'm actually not shouting at ZF or ZF contributors ;-), but that is just a point of view after having reviewed thousands of lines of codes for years now.

We can see sometimes public members in classes but they shouldn't be public, or protected ones but that don't start with an underscore. Lot of code is not PHPDocumented as well...

As some problems could break BC and should wait for 2.0 , the "tabs, spaces, and CRLF" problem can be patched safely ;-)

Posted by Satoru Yoshida (satoruyoshida) on 2009-08-06T05:47:22.000+0000

I make simple cross referrence by Open Office 3.1

Posted by Satoru Yoshida (satoruyoshida) on 2009-08-07T03:45:37.000+0000

Update cross reference.

Posted by Satoru Yoshida (satoruyoshida) on 2009-08-07T21:01:59.000+0000

I have created children issues that class has CRLFs in their line ends.

Posted by Thomas Weidner (thomas) on 2009-08-20T06:37:07.000+0000

Fixed all files in core: CRLF -> LF TAB -> 4 Spaces No ending spaces

Posted by Alexander Veremyev (alexander) on 2009-11-12T03:53:39.000+0000

Corresponding commits should be merged into release branch. I've just done it for Zend_Search_lucene (ZF-7530 subtask).

Posted by Thomas Weidner (thomas) on 2009-11-12T05:35:28.000+0000

For me it is impossible to know if a given change is allowed to be branched or not because trunk contains code for the next minor release.

Therefor this change was not branched.

Posted by Matthew Weier O'Phinney (matthew) on 2009-11-12T05:35:49.000+0000

Many of the changes made for this issue may conflict with changes previously merged to the release branch. As this is simply a minor correction and does not impact functionality, I'd prefer we not merge to the release branch and instead wait until the next minor release.

Closing.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts