Permalink
Browse files

php-cs-fixer

  • Loading branch information...
1 parent aab98a8 commit 0679e14b7521cabf702d13ebfb4228c84d1d79fd @michelerota michelerota committed Mar 10, 2016
Showing with 5,565 additions and 5,968 deletions.
  1. +14 −0 .php_cs
  2. +23 −25 src/Attributes/AggregatedColumn.php
  3. +234 −233 src/Attributes/Attribute.php
  4. +30 −34 src/Attributes/BoolAttribute.php
  5. +77 −73 src/Attributes/BootstrapDateTimeAttribute.php
  6. +10 −12 src/Attributes/CalculatorAttribute.php
  7. +12 −10 src/Attributes/CkAttribute.php
  8. +11 −17 src/Attributes/ColorPickerAttribute.php
  9. +27 −25 src/Attributes/CountryAttribute.php
  10. +2 −6 src/Attributes/CreateStampAttribute.php
  11. +1 −4 src/Attributes/CreatedByAttribute.php
  12. +10 −14 src/Attributes/CurrencyAttribute.php
  13. +162 −184 src/Attributes/DateAttribute.php
  14. +55 −48 src/Attributes/DateTimeAttribute.php
  15. +11 −15 src/Attributes/DummyAttribute.php
  16. +27 −26 src/Attributes/DurationAttribute.php
  17. +13 −15 src/Attributes/EmailAttribute.php
  18. +17 −15 src/Attributes/ExpressionAttribute.php
  19. +7 −10 src/Attributes/FieldSet.php
  20. +112 −107 src/Attributes/FileAttribute.php
  21. +11 −12 src/Attributes/FileWriterAttribute.php
  22. +19 −15 src/Attributes/FlagAttribute.php
  23. +27 −25 src/Attributes/FormatAttribute.php
  24. +38 −46 src/Attributes/FuzzySearchAttribute.php
  25. +2 −3 src/Attributes/HiddenAttribute.php
  26. +3 −6 src/Attributes/HtmlAttribute.php
  27. +10 −13 src/Attributes/IpAttribute.php
  28. +80 −84 src/Attributes/ListAttribute.php
  29. +6 −9 src/Attributes/LiveTextPreviewAttribute.php
  30. +23 −30 src/Attributes/MultiSelectAttribute.php
  31. +32 −29 src/Attributes/MultipleFileAttribute.php
  32. +52 −56 src/Attributes/NumberAttribute.php
  33. +8 −11 src/Attributes/ParserAttribute.php
  34. +49 −76 src/Attributes/PasswordAttribute.php
  35. +75 −100 src/Attributes/ProfileAttribute.php
  36. +22 −27 src/Attributes/RadioAttribute.php
  37. +12 −14 src/Attributes/RadioDetailsAttribute.php
  38. +3 −4 src/Attributes/RowCounterAttribute.php
  39. +14 −14 src/Attributes/StateAttribute.php
  40. +13 −16 src/Attributes/SwitchAttribute.php
  41. +29 −34 src/Attributes/TabbedPane.php
  42. +78 −75 src/Attributes/TagAttribute.php
  43. +20 −22 src/Attributes/TextAttribute.php
  44. +61 −62 src/Attributes/TimeAttribute.php
  45. +4 −7 src/Attributes/TimeZoneAttribute.php
  46. +7 −8 src/Attributes/UpdateStampAttribute.php
  47. +6 −6 src/Attributes/UpdatedByAttribute.php
  48. +20 −32 src/Attributes/UrlAttribute.php
  49. +11 −17 src/Attributes/WeekdayAttribute.php
  50. +4 −3 src/Cache/ApcCache.php
  51. +10 −13 src/Cache/Cache.php
  52. +14 −14 src/Cache/FileCache.php
  53. +7 −7 src/Cache/MemcacheCache.php
  54. +4 −2 src/Cache/VarCache.php
  55. +8 −9 src/Console/ConsoleController.php
  56. +20 −12 src/Core/Atk.php
  57. +20 −15 src/Core/Config.php
  58. +9 −12 src/Core/DataNode.php
  59. +52 −48 src/Core/FileEditor.php
  60. +30 −28 src/Core/Language.php
  61. +18 −20 src/Core/Menu.php
  62. +10 −6 src/Core/Module.php
  63. +362 −374 src/Core/Node.php
  64. +24 −34 src/Core/NodeValidator.php
  65. +108 −87 src/Core/Tools.php
  66. +85 −103 src/Core/TreeNode.php
  67. +6 −7 src/Core/TreeToolsNode.php
  68. +8 −10 src/Core/TreeToolsTree.php
  69. +61 −73 src/Core/adodb-time.php
  70. +22 −34 src/DataGrid/DataGrid.php
  71. +1 −1 src/DataGrid/DataGridComponent.php
  72. +5 −7 src/DataGrid/DataGridEditControl.php
  73. +0 −2 src/DataGrid/DataGridEvent.php
  74. +2 −3 src/DataGrid/DataGridIndex.php
  75. +4 −7 src/DataGrid/DataGridLimit.php
  76. +87 −135 src/DataGrid/DataGridList.php
  77. +0 −1 src/DataGrid/DataGridListener.php
  78. +0 −3 src/DataGrid/DataGridNoRecordsFound.php
  79. +1 −2 src/DataGrid/DataGridPaginator.php
  80. +4 −10 src/DataGrid/DataGridRenderer.php
  81. +2 −4 src/DataGrid/DataGridSummary.php
  82. +124 −122 src/Db/Db.php
  83. +74 −60 src/Db/Ddl.php
  84. +79 −64 src/Db/MySqliDb.php
  85. +25 −25 src/Db/MySqliDdl.php
  86. +20 −25 src/Db/MySqliQuery.php
  87. +45 −46 src/Db/PgSqlDb.php
  88. +15 −17 src/Db/PgSqlDdl.php
  89. +7 −10 src/Db/PgSqlQuery.php
  90. +125 −115 src/Db/Query.php
  91. +7 −11 src/Db/Statement/CompatStatement.php
  92. +8 −12 src/Db/Statement/MySqliStatement.php
  93. +12 −17 src/Db/Statement/Statement.php
  94. +0 −1 src/Db/Statement/StatementException.php
  95. +0 −1 src/Db/Statement/StatementIterator.php
  96. +1 −3 src/Db/Statement/StatementParser.php
  97. +3 −2 src/Errors/ErrorHandlerBase.php
  98. +27 −44 src/Errors/MailErrorHandler.php
  99. +4 −2 src/Errors/ZendPlatformErrorHandler.php
  100. +2 −5 src/Filters/DistinctFilter.php
  101. +2 −6 src/Filters/Filter.php
  102. +3 −5 src/Filters/GroupByFilter.php
  103. +30 −34 src/Handlers/AbstractSearchHandler.php
  104. +45 −41 src/Handlers/ActionHandler.php
  105. +33 −28 src/Handlers/AddHandler.php
  106. +36 −35 src/Handlers/AdminHandler.php
  107. +4 −7 src/Handlers/CopyHandler.php
  108. +14 −12 src/Handlers/DeleteHandler.php
  109. +5 −5 src/Handlers/EditCopyHandler.php
  110. +46 −55 src/Handlers/EditHandler.php
  111. +87 −102 src/Handlers/ExportHandler.php
  112. +8 −12 src/Handlers/FeedbackHandler.php
  113. +150 −163 src/Handlers/ImportHandler.php
  114. +13 −17 src/Handlers/MultiSelectHandler.php
  115. +2 −3 src/Handlers/MultiUpdateHandler.php
  116. +29 −28 src/Handlers/SaveHandler.php
  117. +26 −28 src/Handlers/SearchHandler.php
  118. +5 −4 src/Handlers/SelectHandler.php
  119. +53 −60 src/Handlers/SmartSearchHandler.php
  120. +22 −19 src/Handlers/UpdateHandler.php
  121. +22 −21 src/Handlers/ViewEditBase.php
  122. +23 −28 src/Handlers/ViewHandler.php
  123. +8 −12 src/Handlers/XmlHandler.php
  124. +2 −4 src/Listeners/RecycleBin.php
  125. +59 −58 src/RecordList/ColumnConfig.php
  126. +20 −22 src/RecordList/CsvRecordList.php
  127. +14 −19 src/RecordList/CustomRecordList.php
  128. +6 −9 src/RecordList/ExcelCsvRecordList.php
  129. +5 −8 src/RecordList/HtmlRecordList.php
  130. +16 −15 src/RecordList/RecordList.php
  131. +32 −37 src/RecordList/RecordListCache.php
  132. +8 −8 src/RecordList/Totalizer.php
  133. +32 −32 src/Relations/ExtendableShuttleRelation.php
  134. +20 −35 src/Relations/ManyBoolRelation.php
  135. +4 −7 src/Relations/ManyToManyListRelation.php
  136. +73 −86 src/Relations/ManyToManyRelation.php
  137. +36 −40 src/Relations/ManyToManySelectRelation.php
  138. +247 −292 src/Relations/ManyToOneRelation.php
  139. +21 −23 src/Relations/ManyToOneTreeRelation.php
  140. +98 −99 src/Relations/OneToManyRelation.php
  141. +2 −2 src/Relations/OneToManyRelationSessionGridHandler.php
  142. +98 −108 src/Relations/OneToOneRelation.php
  143. +9 −10 src/Relations/PolymorphicOneToOneRelation.php
  144. +41 −36 src/Relations/Relation.php
  145. +2 −4 src/Relations/ShuttleControl.php
  146. +5 −6 src/Relations/ShuttleFilter.php
  147. +35 −32 src/Relations/ShuttleRelation.php
  148. +9 −9 src/Resources/config/atk.php
  149. +1 −1 src/Resources/languages/bp.php
  150. +1 −2 src/Resources/languages/uk.php
  151. +5 −2 src/Resources/public/lib/ckeditor/samples/old/assets/posteddata.php
  152. +1 −1 src/Resources/public/lib/ckeditor/samples/old/sample_posteddata.php
  153. +13 −17 src/Security/Auth/AuthInterface.php
  154. +11 −12 src/Security/Auth/ConfigAuth.php
  155. +38 −40 src/Security/Auth/DbAuth.php
  156. +6 −8 src/Security/Auth/ImapAuth.php
  157. +11 −16 src/Security/Auth/LdapAuth.php
  158. +2 −4 src/Security/Auth/NoneAuth.php
  159. +2 −6 src/Security/Auth/ServerAuth.php
  160. +14 −16 src/Security/Auth/SspiAuth.php
  161. +6 −7 src/Security/MockSecurityManager.php
  162. +1 −3 src/Security/SecurityListener.php
  163. +77 −87 src/Security/SecurityManager.php
  164. +2 −4 src/Security/SqlWhereclauseBlacklistChecker.php
  165. +11 −14 src/Security/encryption/Encryption.php
  166. +23 −20 src/Security/encryption/OpenSSLEncryption.php
  167. +4 −7 src/Security/encryption/class.atkbajusencryption.php
  168. +4 −7 src/Security/encryption/class.atkbase64encryption.php
  169. +49 −53 src/Session/SessionManager.php
  170. +45 −24 src/Session/SessionStore.php
  171. +0 −2 src/Session/State.php
  172. +9 −4 src/Ui/ActionBoxBuilder.php
  173. +41 −48 src/Ui/IndexPage.php
  174. +19 −21 src/Ui/Output.php
  175. +67 −64 src/Ui/Page.php
  176. +9 −6 src/Ui/PageBuilder.php
  177. +2 −1 src/Ui/SmartyProvider.php
  178. +28 −27 src/Ui/Ui.php
  179. +4 −5 src/Ui/plugins/function.atkdatefield.php
  180. +2 −0 src/Ui/plugins/function.atkmessages.php
  181. +4 −4 src/Ui/plugins/function.atktext.php
  182. +2 −0 src/Ui/plugins/function.stacktrace.php
  183. +1 −1 src/Ui/plugins/modifier.atkvardump.php
  184. +2 −0 src/Ui/plugins/resource.string.php
  185. +10 −15 src/Utils/ActionListener.php
  186. +33 −45 src/Utils/BrowserInfo.php
  187. +22 −23 src/Utils/DataHolder.php
  188. +62 −52 src/Utils/Debugger.php
  189. +30 −27 src/Utils/DirectoryTraverser.php
  190. +6 −8 src/Utils/EditFormModifier.php
  191. +18 −19 src/Utils/EventLog.php
  192. +5 −8 src/Utils/FileExport.php
  193. +8 −4 src/Utils/IpUtils.php
  194. +2 −3 src/Utils/Json.php
  195. +15 −11 src/Utils/MessageQueue.php
  196. +28 −24 src/Utils/Selector.php
  197. +0 −2 src/Utils/SelectorIterator.php
  198. +16 −16 src/Utils/StringParser.php
  199. +21 −8 src/Utils/TmpFile.php
  200. +22 −23 src/Utils/TriggerListener.php
  201. +34 −26 src/Utils/Zip.php
View
@@ -0,0 +1,14 @@
+<?php
+
+$finder = Symfony\CS\Finder\DefaultFinder::create()
+ ->exclude(
+ array(
+ 'Resources',
+ )
+ )
+ ->in(__DIR__.'/src');
+
+return Symfony\CS\Config\Config::create()
+ ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
+ ->fixers(array('-phpdoc_params', 'concat_without_spaces', 'duplicate_semicolon'))
+ ->finder($finder);
@@ -1,6 +1,5 @@
<?php namespace Sintattica\Atk\Attributes;
-
use Sintattica\Atk\Utils\StringParser as StringParser;
use Sintattica\Atk\Core\Tools as Tools;
use Sintattica\Atk\Db\Query;
@@ -27,21 +26,21 @@ class AggregatedColumn extends Attribute
* @var String
* @access private
*/
- var $m_template;
+ public $m_template;
/**
* The array with searchs fileds
* @var array
* @access private
*/
- var $m_searchfields = array();
+ public $m_searchfields = array();
/**
* The array with displays fileds
* @var array
* @access private
*/
- var $m_displayfields = array();
+ public $m_displayfields = array();
/**
* Constructor
@@ -51,7 +50,7 @@ class AggregatedColumn extends Attribute
* @param array $searchfields Array with fields, in which search will be perform
* If ommited, fields from $template will be used
*/
- function __construct($name, $template, $flags = 0, $searchfields = array())
+ public function __construct($name, $template, $flags = 0, $searchfields = array())
{
parent::__construct($name, $flags | self::AF_HIDE_EDIT | self::AF_HIDE_ADD | self::AF_HIDE_VIEW); // base class constructor
$this->m_template = $template;
@@ -77,16 +76,16 @@ function __construct($name, $template, $flags = 0, $searchfields = array())
* use additional modes.
* @return string html code to display the value of this attribute
*/
- function display($record, $mode)
+ public function display($record, $mode)
{
$rec = array();
foreach ($this->m_displayfields as $field) {
-
$p_attrib = $this->m_ownerInstance->getAttribute($field);
$rec[$field] = $p_attrib->display($record[$this->fieldName()], $mode);
}
$parser = new StringParser($this->m_template);
+
return $parser->parse($rec);
}
@@ -101,28 +100,28 @@ function display($record, $mode)
* @param string $atkorderby Order by string
* @see Node::listArray
*/
- function addToListArrayHeader($action, &$arr, $fieldprefix, $flags, $atksearch, $atkorderby)
+ public function addToListArrayHeader($action, &$arr, $fieldprefix, $flags, $atksearch, $atkorderby)
{
if (!$this->hasFlag(self::AF_HIDE_LIST) && !($this->hasFlag(self::AF_HIDE_SELECT) && $action == "select")) {
- $arr["heading"][$fieldprefix . $this->fieldName()]["title"] = $this->label();
+ $arr["heading"][$fieldprefix.$this->fieldName()]["title"] = $this->label();
if (!Tools::hasFlag($flags, RecordList::RL_NO_SORT) && !$this->hasFlag(self::AF_NO_SORT)) {
$rec = array();
foreach ($this->m_displayfields as $field) {
- $rec[] = $this->m_ownerInstance->m_table . "." . $field;
+ $rec[] = $this->m_ownerInstance->m_table.".".$field;
}
$order = implode(", ", $rec);
if ($atkorderby == $order) {
$order = implode(" DESC,", $rec);
$order .= " DESC";
}
$sm = SessionManager::getInstance();
- $arr["heading"][$fieldprefix . $this->fieldName()]["url"] = $sm->sessionUrl(Config::getGlobal('dispatcher') . '?atknodeuri=' . $this->m_ownerInstance->atkNodeUri() . '&atkaction=' . $action . '&atkorderby=' . rawurlencode($order));
+ $arr["heading"][$fieldprefix.$this->fieldName()]["url"] = $sm->sessionUrl(Config::getGlobal('dispatcher').'?atknodeuri='.$this->m_ownerInstance->atkNodeUri().'&atkaction='.$action.'&atkorderby='.rawurlencode($order));
}
if (!Tools::hasFlag($flags, RecordList::RL_NO_SEARCH) && $this->hasFlag(self::AF_SEARCHABLE)) {
- $arr["search"][$fieldprefix . $this->fieldName()] = $this->search($atksearch, false, $fieldprefix);
- $arr["search"][$fieldprefix . $this->fieldName()] .= '<input type="hidden" name="atksearchmode[' . $this->fieldName() . ']" value="' . $this->getSearchMode(false) . '">';
+ $arr["search"][$fieldprefix.$this->fieldName()] = $this->search($atksearch, false, $fieldprefix);
+ $arr["search"][$fieldprefix.$this->fieldName()] .= '<input type="hidden" name="atksearchmode['.$this->fieldName().']" value="'.$this->getSearchMode(false).'">';
}
}
}
@@ -132,17 +131,17 @@ function addToListArrayHeader($action, &$arr, $fieldprefix, $flags, $atksearch,
*
* @return boolean to indicate if store went succesfull
*/
- function store()
+ public function store()
{
return true;
}
- function addToQuery($query, $tablename = '', $fieldaliasprefix = '', &$record, $level = 0, $mode = '')
+ public function addToQuery($query, $tablename = '', $fieldaliasprefix = '', &$record, $level = 0, $mode = '')
{
if ($mode !== 'add' && $mode != 'edit') {
$allfields = Tools::atk_array_merge($this->m_displayfields, $this->m_searchfields);
- $alias = $fieldaliasprefix . $this->fieldName() . "_AE_";
+ $alias = $fieldaliasprefix.$this->fieldName()."_AE_";
foreach ($allfields as $field) {
/** @var Attribute $p_attrib */
$p_attrib = $this->m_ownerInstance->m_attribList[$field];
@@ -164,15 +163,15 @@ function addToQuery($query, $tablename = '', $fieldaliasprefix = '', &$record, $
* attribute's getSearchModes() method.
* @param string $fieldaliasprefix optional prefix for the fiedalias in the table
*/
- function searchCondition(&$query, $table, $value, $searchmode, $fieldaliasprefix = '')
+ public function searchCondition(&$query, $table, $value, $searchmode, $fieldaliasprefix = '')
{
$searchcondition = $this->getSearchCondition($query, $table, $value, $searchmode);
if (!empty($searchcondition)) {
$query->addSearchCondition($searchcondition);
}
}
- function getSearchCondition(Query $query, $table, $value, $searchmode, $fieldname = '')
+ public function getSearchCondition(Query $query, $table, $value, $searchmode, $fieldname = '')
{
$searchconditions = array();
// Get search condition for all searchFields
@@ -194,7 +193,7 @@ function getSearchCondition(Query $query, $table, $value, $searchmode, $fieldnam
$data = array();
foreach ($this->m_searchfields as $field) {
if (strpos($field, '.') == false) {
- $data[$field] = $table . "." . $field;
+ $data[$field] = $table.".".$field;
} else {
$data[$field] = $field;
}
@@ -213,19 +212,20 @@ function getSearchCondition(Query $query, $table, $value, $searchmode, $fieldnam
}
$db = $this->getDb();
- $condition = "UPPER(" . $db->func_concat_ws($concatTags, "", true) . ") LIKE UPPER('%" . $value . "%')";
+ $condition = "UPPER(".$db->func_concat_ws($concatTags, "", true).") LIKE UPPER('%".$value."%')";
$searchconditions[] = $condition;
}
- return "(" . implode(" OR ", $searchconditions) . ")";
+
+ return "(".implode(" OR ", $searchconditions).")";
}
/**
* Retrieve the list of searchmodes supported by the attribute.
*
* @return array List of supported searchmodes
*/
- function getSearchModes()
+ public function getSearchModes()
{
return array("exact", "substring", "wildcard", "regexp");
}
@@ -236,10 +236,8 @@ function getSearchModes()
* @return String The 'generic' type of the database field for this
* attribute.
*/
- function dbFieldType()
+ public function dbFieldType()
{
return "";
}
-
}
-
Oops, something went wrong.

0 comments on commit 0679e14

Please sign in to comment.