Permalink
Browse files

Merge remote-tracking branch 'joomla/master' into manual

  • Loading branch information...
2 parents 1ff8c1a + df40289 commit 89b924c9e7e86ee8110b280874e61db4599c0f8d @mbabker mbabker committed Dec 2, 2011
Showing with 3,443 additions and 3,273 deletions.
  1. +31 −5 build/phpcs/Joomla/Sniffs/WhiteSpace/ConcatenationSpacingSniff.php
  2. +0 −14 docs/coding-standards/book.xml
  3. +8 −0 docs/coding-standards/en-US/Author_Group.xml
  4. +28 −0 docs/coding-standards/en-US/Book_Info.xml
  5. +33 −0 docs/coding-standards/en-US/Chapter.xml
  6. +4 −0 docs/coding-standards/en-US/Coding_Standards.ent
  7. +14 −0 docs/coding-standards/en-US/Coding_Standards.xml
  8. +7 −4 docs/coding-standards/{chapters/preface.xml → en-US/Preface.xml}
  9. +26 −0 docs/coding-standards/en-US/appendices/Revision_History.xml
  10. +7 −9 docs/coding-standards/{ → en-US}/chapters/basic-guidelines.xml
  11. +68 −66 docs/coding-standards/{ → en-US}/chapters/php.xml
  12. +11 −13 docs/coding-standards/{ → en-US}/chapters/source-code-management.xml
  13. +19 −0 docs/coding-standards/en-US/images/icon.svg
  14. +0 −2,676 docs/manual/appendices/changelog.xml
  15. +0 −16 docs/manual/book.xml
  16. +0 −100 docs/manual/chapters/github.xml
  17. +0 −8 docs/manual/chapters/preface.xml
  18. +0 −145 docs/manual/chapters/testing.xml
  19. +9 −0 docs/manual/en-US/Author_Group.xml
  20. +28 −0 docs/manual/en-US/Book_Info.xml
  21. +4 −0 docs/manual/en-US/Developer_Manual.ent
  22. +15 −0 docs/manual/en-US/Developer_Manual.xml
  23. +33 −46 docs/manual/{ → en-US}/appendices/analysis.xml
  24. +2,713 −0 docs/manual/en-US/appendices/changelog.xml
  25. +100 −0 docs/manual/en-US/chapters/github.xml
  26. +12 −0 docs/manual/en-US/chapters/preface.xml
  27. +83 −0 docs/manual/en-US/chapters/testing.xml
  28. +19 −0 docs/manual/en-US/images/icon.svg
  29. +2 −2 libraries/joomla/application/application.php
  30. +2 −2 libraries/joomla/base/adapter.php
  31. +2 −2 libraries/joomla/base/adapterinstance.php
  32. +14 −14 libraries/joomla/database/databasequery.php
  33. +1 −1 libraries/joomla/database/table.php
  34. +1 −1 libraries/joomla/document/document.php
  35. +2 −2 libraries/joomla/document/renderer.php
  36. +1 −1 libraries/joomla/filter/filterinput.php
  37. +1 −1 libraries/joomla/form/fields/editor.php
  38. +1 −1 libraries/joomla/form/form.php
  39. +2 −2 libraries/joomla/form/formfield.php
  40. +7 −7 libraries/joomla/form/rules/email.php
  41. +7 −7 libraries/joomla/form/rules/equals.php
  42. +7 −7 libraries/joomla/form/rules/options.php
  43. +7 −7 libraries/joomla/form/rules/username.php
  44. +1 −1 libraries/joomla/html/html/batch.php
  45. +9 −9 libraries/joomla/html/parameter/element.php
  46. +4 −4 libraries/joomla/html/parameter/element/calendar.php
  47. +4 −4 libraries/joomla/html/parameter/element/category.php
  48. +1 −1 libraries/joomla/html/parameter/element/componentlayouts.php
  49. +1 −1 libraries/joomla/html/parameter/element/contentlanguages.php
  50. +4 −4 libraries/joomla/html/parameter/element/editors.php
  51. +4 −4 libraries/joomla/html/parameter/element/filelist.php
  52. +4 −4 libraries/joomla/html/parameter/element/folderlist.php
  53. +4 −4 libraries/joomla/html/parameter/element/helpsites.php
  54. +9 −9 libraries/joomla/html/parameter/element/hidden.php
  55. +4 −4 libraries/joomla/html/parameter/element/imagelist.php
  56. +4 −4 libraries/joomla/html/parameter/element/languages.php
  57. +5 −5 libraries/joomla/html/parameter/element/list.php
  58. +4 −4 libraries/joomla/html/parameter/element/menu.php
  59. +4 −4 libraries/joomla/html/parameter/element/menuitem.php
  60. +1 −1 libraries/joomla/html/parameter/element/modulelayouts.php
  61. +4 −4 libraries/joomla/html/parameter/element/password.php
  62. +4 −4 libraries/joomla/html/parameter/element/radio.php
  63. +9 −9 libraries/joomla/html/parameter/element/spacer.php
  64. +4 −4 libraries/joomla/html/parameter/element/sql.php
  65. +4 −4 libraries/joomla/html/parameter/element/templatestyle.php
  66. +4 −4 libraries/joomla/html/parameter/element/text.php
  67. +4 −4 libraries/joomla/html/parameter/element/textarea.php
  68. +4 −4 libraries/joomla/html/parameter/element/timezones.php
  69. +4 −4 libraries/joomla/html/parameter/element/usergroup.php
  70. +1 −1 libraries/joomla/html/toolbar/button.php
  71. +1 −1 libraries/joomla/registry/format.php
  72. +3 −3 libraries/joomla/registry/format/xml.php
  73. +1 −1 libraries/joomla/registry/registry.php
@@ -55,9 +55,30 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
- if($tokens[($stackPtr - 1)]['code'] != T_WHITESPACE
- || $tokens[($stackPtr + 1)]['code'] != T_WHITESPACE
- )
+ if($tokens[($stackPtr + 1)]['code'] != T_WHITESPACE)
+ {
+ // space after
+ $message = 'Concat operator must be followed by one space';
+ $phpcsFile->addError($message, $stackPtr, 'Missing');
+ }
+ else
+ {
+ $found = strlen($tokens[($stackPtr + 1)]['content']);
+
+ if($found > 1)
+ {
+ $error = sprintf('Expected 1 space after concat operator; %s found', $found);
+ $phpcsFile->addError($error, $stackPtr, 'Too much');
+ }
+ }
+
+ if($tokens[($stackPtr - 1)]['code'] != T_WHITESPACE)
+ {
+ // space before
+ $message = 'Concat operator must be preceeded by one space';
+ $phpcsFile->addError($message, $stackPtr, 'Missing');
+ }
+ else
{
if(strpos($tokens[($stackPtr - 2)]['content'], $phpcsFile->eolChar) !== false
|| strpos($tokens[($stackPtr - 1)]['content'], $phpcsFile->eolChar) !== false)
@@ -66,8 +87,13 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
return;
}
- $message = 'Concat operator must be surrounded by spaces';
- $phpcsFile->addError($message, $stackPtr, 'Missing');
+ $found = strlen($tokens[($stackPtr - 1)]['content']);
+
+ if($found > 1)
+ {
+ $error = sprintf('Expected 1 space before concat operator; %s found', $found);
+ $phpcsFile->addError($error, $stackPtr, 'Too much');
+ }
}
}//function
}//class
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<book version="5.0" xml:lang="en" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:ns4="http://www.w3.org/1998/Math/MathML"
- xmlns:ns3="http://www.w3.org/2000/svg" xmlns:ns2="http://www.w3.org/1999/xlink" xmlns:ns="http://docbook.org/ns/docbook">
- <title>The Joomla! Platform Coding Standards</title>
-
- <xi:include href="chapters/preface.xml" />
-
- <xi:include href="chapters/source-code-management.xml" />
-
- <xi:include href="chapters/basic-guidelines.xml" />
-
- <xi:include href="chapters/php.xml" />
-</book>
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Coding_Standards.ent">
+%BOOK_ENTITIES;
+]>
+<authorgroup>
+ <corpauthor>Joomla! Platform Project</corpauthor>
+</authorgroup>
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Coding_Standards.ent">
+%BOOK_ENTITIES;
+]>
+<bookinfo id="book-Coding_Standards-coding_standards">
+ <title>Coding Standards</title>
+ <subtitle>A Concise Guide</subtitle>
+ <productname>Joomla Platform</productname>
+ <productnumber>11.3</productnumber>
+ <edition>1</edition>
+ <pubsnumber>1</pubsnumber>
+ <abstract>
+ <para>
+ A concise guide to the Joomla! Platform coding standards.
+ </para>
+ </abstract>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="Common_Content/images/title_logo.png" />
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</bookinfo>
+
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Coding_Standards.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="chap-Coding_Standards-Test_Chapter">
+ <title>Test Chapter</title>
+ <para>
+ This is a test paragraph
+ </para>
+ <section id="sect-Coding_Standards-Test_Chapter-Test_Section_1">
+ <title>Test Section 1</title>
+ <para>
+ This is a test paragraph in a section
+ </para>
+ </section>
+
+ <section id="sect-Coding_Standards-Test_Chapter-Test_Section_2">
+ <title>Test Section 2</title>
+ <para>
+ This is a test paragraph in Section 2
+ <orderedlist>
+ <listitem>
+ <para>
+ listitem text
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+</chapter>
+
@@ -0,0 +1,4 @@
+<!ENTITY PRODUCT "Joomla Platform">
+<!ENTITY BOOKID "Coding_Standards">
+<!ENTITY YEAR "2011">
+<!ENTITY HOLDER "| Open Source Matters |">
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Coding_Standards.ent">
+%BOOK_ENTITIES;
+]>
+<book>
+ <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="chapters/source-code-management.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="chapters/basic-guidelines.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="chapters/php.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="appendices/Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <index />
+</book>
@@ -1,7 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<preface version="5.0" xml:id="preface" xmlns="http://docbook.org/ns/docbook" xmlns:ns5="http://www.w3.org/1999/xhtml"
- xmlns:ns4="http://www.w3.org/1998/Math/MathML" xmlns:ns3="http://www.w3.org/2000/svg"
- xmlns:ns2="http://www.w3.org/1999/xlink" xmlns:ns="http://docbook.org/ns/docbook">
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Coding_Standards.ent">
+%BOOK_ENTITIES;
+]>
+<preface id="pref-Coding_Standards-Preface">
<title>Preface</title>
<para>One of the things that sets good software apart from great software is not the features or the actual function the
@@ -20,3 +22,4 @@
<para>The Joomla Coding Standards borrows heavily from the PEAR coding standard for PHP files, augmenting and diverging where it
is deemed sensible to do so</para>
</preface>
+
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "coding-standards.ent">
+%BOOK_ENTITIES;
+]>
+<appendix id="appe-coding-standards-Revision_History">
+ <title>Revision History</title>
+ <simpara>
+ <revhistory>
+ <revision>
+ <revnumber>0-0</revnumber>
+ <date>Thu Dec 1 2011</date>
+ <author>
+ <firstname>Ian</firstname>
+ <surname>MacLennan</surname>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Initial import of book into Publican</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ </revhistory>
+ </simpara>
+</appendix>
+
@@ -1,14 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter version="5.0" xml:id="ch2" xmlns="http://docbook.org/ns/docbook" xmlns:ns5="http://www.w3.org/1999/xhtml"
- xmlns:ns4="http://www.w3.org/1998/Math/MathML" xmlns:ns3="http://www.w3.org/2000/svg"
- xmlns:ns2="http://www.w3.org/1999/xlink" xmlns:ns="http://docbook.org/ns/docbook">
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Coding_Standards.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="chap-Coding_Standards-Basic_Guidelines">
<title>Basic Guidelines</title>
- <section>
- <title></title>
-
- <para>This chapter outlines the basic guidelines that cover and files.</para>
- </section>
+ <para>This chapter outlines the basic guidelines that cover and files.</para>
<section>
<title>File Format</title>
Oops, something went wrong.

0 comments on commit 89b924c

Please sign in to comment.