Permalink
Browse files

Short array syntax

1 parent 88d94b6 commit 242860174a2b5eaf82cfe37dcb7d23a3c78b5eda @mrook mrook committed Jan 16, 2017
Showing with 914 additions and 906 deletions.
  1. +1 −1 bin/phing.php
  2. +13 −8 build/BuildPhingPEARPackageTask.php
  3. +7 −7 classes/phing/IntrospectionHelper.php
  4. +16 −16 classes/phing/Phing.php
  5. +15 −15 classes/phing/Project.php
  6. +2 −2 classes/phing/RuntimeConfigurable.php
  7. +3 −3 classes/phing/Target.php
  8. +1 −1 classes/phing/UnknownElement.php
  9. +2 −2 classes/phing/contrib/DocBlox/Parallel/Manager.php
  10. +2 −2 classes/phing/contrib/DocBlox/Parallel/Worker.php
  11. +4 −4 classes/phing/contrib/DocBlox/Parallel/WorkerPipe.php
  12. +1 −1 classes/phing/filters/BaseParamFilterReader.php
  13. +1 −1 classes/phing/filters/EscapeUnicode.php
  14. +2 −2 classes/phing/filters/LineContains.php
  15. +2 −2 classes/phing/filters/LineContainsRegexp.php
  16. +1 −1 classes/phing/filters/PrefixLines.php
  17. +1 −1 classes/phing/filters/ReplaceRegexp.php
  18. +5 −5 classes/phing/filters/ReplaceTokens.php
  19. +2 −2 classes/phing/filters/ReplaceTokensWithFile.php
  20. +2 −2 classes/phing/filters/StripLineComments.php
  21. +1 −1 classes/phing/filters/SuffixLines.php
  22. +2 −2 classes/phing/filters/TailFilter.php
  23. +2 −2 classes/phing/filters/TidyFilter.php
  24. +3 −3 classes/phing/filters/TranslateGettext.php
  25. +1 −1 classes/phing/filters/XsltFilter.php
  26. +2 −2 classes/phing/filters/util/ChainReaderHelper.php
  27. +1 −1 classes/phing/input/MultipleChoiceInputRequest.php
  28. +2 −2 classes/phing/lib/Capsule.php
  29. +4 −4 classes/phing/listener/HtmlColorLogger.php
  30. +4 −4 classes/phing/listener/JsonLogger.php
  31. +1 −1 classes/phing/listener/MailLogger.php
  32. +3 −3 classes/phing/listener/PearLogListener.php
  33. +1 −1 classes/phing/listener/ProfileLogger.php
  34. +2 −2 classes/phing/listener/XmlLogger.php
  35. +1 −1 classes/phing/mappers/ChainedMapper.php
  36. +1 −1 classes/phing/mappers/CompositeMapper.php
  37. +1 −1 classes/phing/mappers/ContainerMapper.php
  38. +2 −2 classes/phing/mappers/CutDirsMapper.php
  39. +1 −1 classes/phing/mappers/FlattenMapper.php
  40. +1 −1 classes/phing/mappers/GlobMapper.php
  41. +1 −1 classes/phing/mappers/IdentityMapper.php
  42. +1 −1 classes/phing/mappers/MergeMapper.php
  43. +2 −2 classes/phing/mappers/RegexpMapper.php
  44. +2 −2 classes/phing/parser/ExpatParser.php
  45. +2 −2 classes/phing/parser/PhingXMLContext.php
  46. +3 −3 classes/phing/parser/ProjectConfigurator.php
  47. +1 −1 classes/phing/system/io/FileSystem.php
  48. +1 −1 classes/phing/system/io/IniFileParser.php
  49. +2 −2 classes/phing/system/io/UnixFileSystem.php
  50. +3 −3 classes/phing/system/io/Win32FileSystem.php
  51. +1 −1 classes/phing/system/io/YamlFileParser.php
  52. +1 −1 classes/phing/system/util/Properties.php
  53. +2 −2 classes/phing/system/util/Register.php
  54. +1 −1 classes/phing/tasks/ext/CapsuleTask.php
  55. +2 −2 classes/phing/tasks/ext/ExportPropertiesTask.php
  56. +2 −2 classes/phing/tasks/ext/ExtractBaseTask.php
  57. +1 −1 classes/phing/tasks/ext/FileSyncTask.php
  58. +8 −8 classes/phing/tasks/ext/FtpDeployTask.php
  59. +8 −8 classes/phing/tasks/ext/GrowlNotifyTask.php
  60. +2 −2 classes/phing/tasks/ext/HttpGetTask.php
  61. +5 −5 classes/phing/tasks/ext/HttpRequestTask.php
  62. +2 −2 classes/phing/tasks/ext/HttpTask.php
  63. +11 −11 classes/phing/tasks/ext/JsHintTask.php
  64. +8 −8 classes/phing/tasks/ext/JslLintTask.php
  65. +5 −5 classes/phing/tasks/ext/MailTask.php
  66. +4 −4 classes/phing/tasks/ext/ManifestTask.php
  67. +2 −2 classes/phing/tasks/ext/ParallelTask.php
  68. +1 −1 classes/phing/tasks/ext/PatchTask.php
  69. +2 −2 classes/phing/tasks/ext/PearPackage2Task.php
  70. +9 −9 classes/phing/tasks/ext/PearPackageTask.php
  71. +16 −16 classes/phing/tasks/ext/PhpCodeSnifferTask.php
  72. +4 −4 classes/phing/tasks/ext/PhpLintTask.php
  73. +5 −5 classes/phing/tasks/ext/ReplaceRegexpTask.php
  74. +3 −3 classes/phing/tasks/ext/SassTask.php
  75. +1 −1 classes/phing/tasks/ext/Service/Amazon.php
  76. +6 −6 classes/phing/tasks/ext/Service/Amazon/S3/S3PutTask.php
  77. +1 −1 classes/phing/tasks/ext/SmartyTask.php
  78. +4 −4 classes/phing/tasks/ext/SymfonyConsole/SymfonyConsoleTask.php
  79. +3 −3 classes/phing/tasks/ext/SymlinkTask.php
  80. +3 −3 classes/phing/tasks/ext/TarTask.php
  81. +4 −4 classes/phing/tasks/ext/UntarTask.php
  82. +3 −3 classes/phing/tasks/ext/UnzipTask.php
  83. +2 −2 classes/phing/tasks/ext/VersionTask.php
  84. +5 −5 classes/phing/tasks/ext/WikiPublishTask.php
  85. +3 −3 classes/phing/tasks/ext/XmlLintTask.php
  86. +2 −2 classes/phing/tasks/ext/XmlPropertyTask.php
  87. +3 −3 classes/phing/tasks/ext/ZendCodeAnalyzerTask.php
  88. +3 −3 classes/phing/tasks/ext/ZipTask.php
  89. +2 −2 classes/phing/tasks/ext/apigen/ApiGenTask.php
  90. +3 −3 classes/phing/tasks/ext/coverage/CoverageMerger.php
  91. +3 −3 classes/phing/tasks/ext/coverage/CoverageMergerTask.php
  92. +2 −2 classes/phing/tasks/ext/coverage/CoverageReportTask.php
  93. +6 −6 classes/phing/tasks/ext/coverage/CoverageSetupTask.php
  94. +1 −1 classes/phing/tasks/ext/coverage/CoverageThresholdTask.php
  95. +4 −4 classes/phing/tasks/ext/creole/CreoleSQLExecTask.php
  96. +1 −1 classes/phing/tasks/ext/creole/CreoleTask.php
  97. +3 −3 classes/phing/tasks/ext/dbdeploy/DbDeployTask.php
  98. +2 −2 classes/phing/tasks/ext/git/GitBranchTask.php
  99. +2 −2 classes/phing/tasks/ext/git/GitCheckoutTask.php
  100. +3 −3 classes/phing/tasks/ext/git/GitCommitTask.php
  101. +2 −2 classes/phing/tasks/ext/git/GitMergeTask.php
  102. +2 −2 classes/phing/tasks/ext/git/GitPullTask.php
  103. +3 −3 classes/phing/tasks/ext/hg/HgAddTask.php
  104. +3 −3 classes/phing/tasks/ext/hg/HgBaseTask.php
  105. +8 −8 classes/phing/tasks/ext/inifile/IniFileConfig.php
  106. +2 −2 classes/phing/tasks/ext/inifile/IniFileTask.php
  107. +5 −5 classes/phing/tasks/ext/ioncube/IoncubeEncoderTask.php
  108. +1 −1 classes/phing/tasks/ext/ioncube/IoncubeLicenseTask.php
  109. +1 −1 classes/phing/tasks/ext/jsmin/JsMinTask.php
  110. +5 −5 classes/phing/tasks/ext/liquibase/AbstractLiquibaseTask.php
  111. +2 −2 classes/phing/tasks/ext/pdepend/PhpDependAnalyzerElement.php
  112. +10 −10 classes/phing/tasks/ext/pdepend/PhpDependTask.php
  113. +2 −2 classes/phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php
  114. +6 −6 classes/phing/tasks/ext/pdo/PDOSQLExecTask.php
  115. +11 −11 classes/phing/tasks/ext/pearpackage/Fileset.php
  116. +1 −1 classes/phing/tasks/ext/phar/PharDataTask.php
  117. +2 −2 classes/phing/tasks/ext/phar/PharMetadata.php
  118. +1 −1 classes/phing/tasks/ext/phar/PharPackageTask.php
  119. +2 −2 classes/phing/tasks/ext/phk/PhkPackageTask.php
  120. +2 −2 classes/phing/tasks/ext/phk/PhkPackageWebAccess.php
  121. +7 −7 classes/phing/tasks/ext/phpcpd/PHPCPDTask.php
  122. +3 −3 classes/phing/tasks/ext/phpdoc/PhpDocumentor2Task.php
  123. +7 −7 classes/phing/tasks/ext/phploc/PHPLocTask.php
  124. +8 −8 classes/phing/tasks/ext/phpmd/PHPMDTask.php
  125. +5 −5 classes/phing/tasks/ext/phpunit/BatchTest.php
  126. +7 −7 classes/phing/tasks/ext/phpunit/PHPUnitTask.php
  127. +7 −7 classes/phing/tasks/ext/phpunit/PHPUnitTestRunner.php
  128. +2 −2 classes/phing/tasks/ext/phpunit/PHPUnitUtil.php
  129. +6 −6 classes/phing/tasks/ext/phpunit/formatter/PHPUnitResultFormatter.php
  130. +2 −2 classes/phing/tasks/ext/property/SortList.php
  131. +6 −6 classes/phing/tasks/ext/rSTTask.php
  132. +1 −1 classes/phing/tasks/ext/sonar/SonarConfigurationFileParser.php
  133. +6 −6 classes/phing/tasks/ext/sonar/SonarTask.php
  134. +2 −2 classes/phing/tasks/ext/ssh/ScpTask.php
  135. +1 −1 classes/phing/tasks/ext/ssh/Ssh2MethodConnectionParam.php
  136. +4 −4 classes/phing/tasks/ext/ssh/Ssh2MethodParam.php
  137. +1 −1 classes/phing/tasks/ext/ssh/SshTask.php
  138. +7 −7 classes/phing/tasks/ext/svn/SvnBaseTask.php
  139. +3 −3 classes/phing/tasks/ext/svn/SvnCheckoutTask.php
  140. +1 −1 classes/phing/tasks/ext/svn/SvnCommitTask.php
  141. +2 −2 classes/phing/tasks/ext/svn/SvnCopyTask.php
  142. +2 −2 classes/phing/tasks/ext/svn/SvnExportTask.php
  143. +1 −1 classes/phing/tasks/ext/svn/SvnInfoTask.php
  144. +1 −1 classes/phing/tasks/ext/svn/SvnLastRevisionTask.php
  145. +8 −8 classes/phing/tasks/ext/svn/SvnListTask.php
  146. +2 −2 classes/phing/tasks/ext/svn/SvnLogTask.php
  147. +3 −3 classes/phing/tasks/ext/svn/SvnSwitchTask.php
  148. +3 −3 classes/phing/tasks/ext/svn/SvnUpdateTask.php
  149. +1 −1 classes/phing/tasks/ext/zendguard/ZendGuardEncodeTask.php
  150. +9 −9 classes/phing/tasks/ext/zendguard/ZendGuardLicenseTask.php
  151. +2 −2 classes/phing/tasks/ext/zendserverdeploymenttool/zsdtBaseTask.php
  152. +1 −1 classes/phing/tasks/system/AdhocTask.php
  153. +3 −3 classes/phing/tasks/system/AppendTask.php
  154. +8 −8 classes/phing/tasks/system/ApplyTask.php
  155. +1 −1 classes/phing/tasks/system/ChmodTask.php
  156. +1 −1 classes/phing/tasks/system/ChownTask.php
  157. +8 −8 classes/phing/tasks/system/CopyTask.php
  158. +4 −4 classes/phing/tasks/system/DeleteTask.php
  159. +1 −1 classes/phing/tasks/system/EchoProperties.php
  160. +1 −1 classes/phing/tasks/system/EchoTask.php
  161. +2 −2 classes/phing/tasks/system/ExecTask.php
  162. +3 −3 classes/phing/tasks/system/ForeachTask.php
  163. +1 −1 classes/phing/tasks/system/IfTask.php
  164. +1 −1 classes/phing/tasks/system/ImportTask.php
  165. +2 −2 classes/phing/tasks/system/IncludePathTask.php
  166. +1 −1 classes/phing/tasks/system/LoadFileTask.php
  167. +1 −1 classes/phing/tasks/system/PathConvert.php
  168. +4 −4 classes/phing/tasks/system/PhingTask.php
  169. +3 −3 classes/phing/tasks/system/PhpEvalTask.php
  170. +4 −4 classes/phing/tasks/system/PropertyTask.php
  171. +3 −3 classes/phing/tasks/system/RecorderTask.php
  172. +3 −3 classes/phing/tasks/system/ReflexiveTask.php
  173. +1 −1 classes/phing/tasks/system/SequentialTask.php
  174. +1 −1 classes/phing/tasks/system/SwitchTask.php
  175. +1 −1 classes/phing/tasks/system/TouchTask.php
  176. +1 −1 classes/phing/tasks/system/TstampTask.php
  177. +2 −2 classes/phing/tasks/system/UpToDateTask.php
  178. +1 −1 classes/phing/tasks/system/XsltTask.php
  179. +1 −1 classes/phing/tasks/system/condition/ConditionBase.php
  180. +1 −1 classes/phing/tasks/system/condition/VersionCompareCondition.php
  181. +4 −4 classes/phing/types/AbstractFileSet.php
  182. +9 −9 classes/phing/types/Commandline.php
  183. +1 −1 classes/phing/types/DataType.php
  184. +7 −7 classes/phing/types/Excludes.php
  185. +2 −2 classes/phing/types/FileList.php
  186. +1 −1 classes/phing/types/FilterChain.php
  187. +1 −1 classes/phing/types/Mapper.php
  188. +1 −1 classes/phing/types/Parameter.php
  189. +6 −6 classes/phing/types/Path.php
  190. +8 −8 classes/phing/types/PatternSet.php
  191. +2 −2 classes/phing/types/PhingFilterReader.php
  192. +1 −1 classes/phing/types/RegularExpression.php
  193. +2 −2 classes/phing/types/TokenSource.php
  194. +3 −3 classes/phing/types/selectors/AbstractSelectorContainer.php
  195. +2 −2 classes/phing/types/selectors/BaseSelectorContainer.php
  196. +1 −1 classes/phing/types/selectors/DateSelector.php
  197. +1 −1 classes/phing/types/selectors/ExtendSelector.php
  198. +1 −1 classes/phing/types/selectors/PresentSelector.php
  199. +3 −3 classes/phing/types/selectors/SelectorUtils.php
  200. +3 −3 classes/phing/types/selectors/SizeSelector.php
  201. +1 −1 classes/phing/types/selectors/TypeSelector.php
  202. +1 −1 classes/phing/util/DataStore.php
  203. +15 −15 classes/phing/util/DirectoryScanner.php
  204. +1 −1 classes/phing/util/FileUtils.php
  205. +1 −1 classes/phing/util/PathTokenizer.php
  206. +10 −10 classes/phing/util/PearPackageScanner.php
  207. +3 −3 classes/phing/util/SourceFileScanner.php
  208. +3 −3 classes/phing/util/StringHelper.php
  209. +1 −1 classes/phing/util/regexp/Regexp.php
  210. +2 −2 composer/bin/phing
  211. +3 −3 test/classes/phing/BuildFileTest.php
  212. +9 −9 test/classes/phing/components/TargetTest.php
  213. +39 −39 test/classes/phing/system/io/AbstractWinFileSystemTestCase.php
  214. +7 −7 test/classes/phing/system/io/FileParserFactoryTest.php
  215. +5 −5 test/classes/phing/system/io/FileSystemTest.php
  216. +39 −39 test/classes/phing/system/io/IniFileParserTest.php
  217. +2 −2 test/classes/phing/system/util/RegisterSlotTest.php
  218. +5 −5 test/classes/phing/tasks/PropertyTaskTest.php
  219. +14 −14 test/classes/phing/tasks/ext/GitTasks/GitLogTaskTest.php
  220. +2 −2 test/classes/phing/tasks/ext/GrowlNotifyTaskErrorTest.php
  221. +2 −2 test/classes/phing/tasks/ext/GrowlNotifyTaskTest.php
  222. +11 −9 test/classes/phing/tasks/ext/HTTP/HttpGetTaskTest.php
  223. +6 −5 test/classes/phing/tasks/ext/HTTP/HttpRequestTaskTest.php
  224. +2 −2 test/classes/phing/tasks/ext/HTTP/TraceHttpAdapter.php
  225. +14 −14 test/classes/phing/tasks/ext/PDO/PDODelimitersTest.php
  226. +1 −1 test/classes/phing/tasks/ext/PearPackageTest.php
  227. +8 −8 test/classes/phing/tasks/ext/WikiPublishTaskTest.php
  228. +3 −3 test/classes/phing/tasks/ext/inifile/IniFileTaskTest.php
  229. +1 −1 test/classes/phing/tasks/system/ChownTaskTest.php
  230. +1 −1 test/classes/phing/types/CommandlineTest.php
  231. +62 −62 test/classes/phing/util/DirectoryScannerTest.php
  232. +2 −2 test/classes/phing/util/PearPackageScannerTest.php
  233. +3 −3 test/classes/phing/util/regexp/PregEngineTest.php
  234. +3 −3 test/etc/tasks/ext/phpunit/tests/provider_failTest.php
View
@@ -42,7 +42,7 @@ function hasColorSupport()
// default logger
if (!in_array('-logger', $argv) && hasColorSupport()) {
- array_splice($argv, 1, 0, array('-logger', 'phing.listener.AnsiColorLogger'));
+ array_splice($argv, 1, 0, ['-logger', 'phing.listener.AnsiColorLogger']);
}
try {
@@ -40,7 +40,7 @@ class BuildPhingPEARPackageTask extends MatchingTask
private $mode = 'source';
- private $filesets = array();
+ private $filesets = [];
/** Package file */
private $packageFile;
@@ -80,24 +80,29 @@ private function setOptions($pkg)
}
if ($this->mode == "docs") {
- $options['dir_roles'] = array( 'phing_guide' => 'doc',
+ $options['dir_roles'] = [
+ 'phing_guide' => 'doc',
'api' => 'doc',
- 'example' => 'doc');
+ 'example' => 'doc'
+ ];
} else {
// add install exceptions
- $options['installexceptions'] = array( 'bin/phing.php' => '/',
+ $options['installexceptions'] = [
+ 'bin/phing.php' => '/',
'bin/pear-phing' => '/',
'bin/pear-phing.bat' => '/',
- );
+ ];
- $options['dir_roles'] = array( 'etc' => 'data');
+ $options['dir_roles'] = ['etc' => 'data'];
- $options['exceptions'] = array( 'bin/pear-phing.bat' => 'script',
+ $options['exceptions'] = [
+ 'bin/pear-phing.bat' => 'script',
'bin/pear-phing' => 'script',
'CREDITS.md' => 'doc',
'CHANGELOG.md' => 'doc',
'LICENSE' => 'doc',
- 'README.md' => 'doc');
+ 'README.md' => 'doc'
+ ];
}
$pkg->setOptions($options);
@@ -49,26 +49,26 @@ class IntrospectionHelper
*
* @var array string[]
*/
- private $attributeSetters = array();
+ private $attributeSetters = [];
/**
* Holds methods to create nested elements.
*
* @var array string[]
*/
- private $nestedCreators = array();
+ private $nestedCreators = [];
/**
* Holds methods to store configured nested elements.
*
* @var array string[]
*/
- private $nestedStorers = array();
+ private $nestedStorers = [];
/**
* Map from attribute names to nested types.
*/
- private $nestedTypes = array();
+ private $nestedTypes = [];
/**
* New idea in phing: any class can register certain
@@ -80,7 +80,7 @@ class IntrospectionHelper
* function setListeningReplace($slot) {}
* @var array string[]
*/
- private $slotListeners = array();
+ private $slotListeners = [];
/**
* The method to add PCDATA stuff.
@@ -100,7 +100,7 @@ class IntrospectionHelper
* The cache of IntrospectionHelper classes instantiated by getHelper().
* @var array IntrospectionHelpers[]
*/
- private static $helpers = array();
+ private static $helpers = [];
/**
* Factory method for helper objects.
@@ -577,7 +577,7 @@ public function supportsCharacters()
*/
public function getAttributes()
{
- $attribs = array();
+ $attribs = [];
foreach (array_keys($this->attributeSetters) as $setter) {
$attribs[] = $this->getPropertyName($setter, "set");
}
@@ -77,7 +77,7 @@ class Phing
private $buildFile = null;
/** The build targets */
- private $targets = array();
+ private $targets = [];
/**
* Set of properties that are passed in from commandline or invoking code.
@@ -86,7 +86,7 @@ class Phing
private static $definedProps;
/** Names of classes to add as listeners to project */
- private $listeners = array();
+ private $listeners = [];
/**
* keep going mode
@@ -119,7 +119,7 @@ class Phing
private static $importPaths;
/** System-wide static properties (moved from System) */
- private static $properties = array();
+ private static $properties = [];
/** Static system timer. */
private static $timer;
@@ -134,7 +134,7 @@ class Phing
private $propertyFileOverride = false;
/** Array of captured PHP errors */
- private static $capturedPhpErrors = array();
+ private static $capturedPhpErrors = [];
/**
* @var OUtputStream Stream for standard output.
@@ -158,7 +158,7 @@ class Phing
* @var array Struct of array(setting-name => setting-value)
* @see restoreIni()
*/
- private static $origIniSettings = array();
+ private static $origIniSettings = [];
/** Whether or not output to the log is to be unadorned. */
private $emacsMode = false;
@@ -667,7 +667,7 @@ public function runBuild()
$project = new Project();
self::setCurrentProject($project);
- set_error_handler(array('Phing', 'handlePhpError'));
+ set_error_handler(['Phing', 'handlePhpError']);
$error = null;
@@ -939,12 +939,12 @@ public static function handlePhpError($level, $message, $file, $line)
if (self::$phpErrorCapture) {
- self::$capturedPhpErrors[] = array(
+ self::$capturedPhpErrors[] = [
'message' => $message,
'level' => $level,
'line' => $line,
'file' => $file
- );
+ ];
} else {
@@ -983,7 +983,7 @@ public static function handlePhpError($level, $message, $file, $line)
public static function startPhpErrorCapture()
{
self::$phpErrorCapture = true;
- self::$capturedPhpErrors = array();
+ self::$capturedPhpErrors = [];
}
/**
@@ -1000,7 +1000,7 @@ public static function stopPhpErrorCapture()
*/
public static function clearCapturedPhpErrors()
{
- self::$capturedPhpErrors = array();
+ self::$capturedPhpErrors = [];
}
/**
@@ -1142,8 +1142,8 @@ public function printTargets($project)
// split the targets in top-level and sub-targets depending
// on the presence of a description
- $subNames = array();
- $topNameDescMap = array();
+ $subNames = [];
+ $topNameDescMap = [];
foreach ($targets as $currentTarget) {
$targetName = $currentTarget->getName();
@@ -1175,13 +1175,13 @@ public function printTargets($project)
$defaultTarget = $project->getDefaultTarget();
if ($defaultTarget !== null && $defaultTarget !== "") {
- $defaultName = array();
- $defaultDesc = array();
+ $defaultName = [];
+ $defaultDesc = [];
$defaultName[] = $defaultTarget;
$indexOfDefDesc = array_search($defaultTarget, $topNames, true);
if ($indexOfDefDesc !== false && $indexOfDefDesc >= 0) {
- $defaultDesc = array();
+ $defaultDesc = [];
$defaultDesc[] = $topDescriptions[$indexOfDefDesc];
}
@@ -1512,7 +1512,7 @@ private static function setSystemConstants()
self::setProperty('php.tmpdir', sys_get_temp_dir());
// try to detect machine dependent information
- $sysInfo = array();
+ $sysInfo = [];
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' && function_exists("posix_uname")) {
$sysInfo = posix_uname();
} else {
@@ -50,39 +50,39 @@ class Project
* contains the targets
* @var Target[]
*/
- private $targets = array();
+ private $targets = [];
/** global filterset (future use) */
- private $globalFilterSet = array();
+ private $globalFilterSet = [];
/** all globals filters (future use) */
- private $globalFilters = array();
+ private $globalFilters = [];
/** Project properties map (usually String to String). */
- private $properties = array();
+ private $properties = [];
/**
* Map of "user" properties (as created in the Ant task, for example).
* Note that these key/value pairs are also always put into the
* project properties, so only the project properties need to be queried.
* Mapping is String to String.
*/
- private $userProperties = array();
+ private $userProperties = [];
/**
* Map of inherited "user" properties - that are those "user"
* properties that have been created by tasks and not been set
* from the command line or a GUI tool.
* Mapping is String to String.
*/
- private $inheritedProperties = array();
+ private $inheritedProperties = [];
/** task definitions for this project*/
- private $taskdefs = array();
+ private $taskdefs = [];
/** type definitions for this project */
- private $typedefs = array();
+ private $typedefs = [];
/** holds ref names and a reference to the referred object*/
- private $references = array();
+ private $references = [];
/** The InputHandler being used by this project. */
private $inputHandler;
@@ -111,7 +111,7 @@ class Project
private $fileUtils;
/** Build listeneers */
- private $listeners = array();
+ private $listeners = [];
/**
* Keep going flag.
@@ -121,7 +121,7 @@ class Project
/**
* @var string[]
*/
- private $executedTargetNames = array();
+ private $executedTargetNames = [];
/**
* Constructor, sets any default vars.
@@ -1001,9 +1001,9 @@ public function resolveFile($fileName, $rootDir = null)
public function topoSort($rootTarget)
{
$rootTarget = (string) $rootTarget;
- $ret = array();
- $state = array();
- $visiting = array();
+ $ret = [];
+ $state = [];
+ $visiting = [];
// We first run a DFS based sort using the root as the starting node.
// This creates the minimum sequence of Targets to the root node.
@@ -1215,7 +1215,7 @@ public function addBuildListener(BuildListener $listener)
*/
public function removeBuildListener(BuildListener $listener)
{
- $newarray = array();
+ $newarray = [];
for ($i = 0, $size = count($this->listeners); $i < $size; $i++) {
if ($this->listeners[$i] !== $listener) {
$newarray[] = $this->listeners[$i];
@@ -36,13 +36,13 @@ class RuntimeConfigurable
private $elementTag = null;
/** @var array $children */
- private $children = array();
+ private $children = [];
/** @var object|Task $wrappedObject */
private $wrappedObject = null;
/** @var array $attributes */
- private $attributes = array();
+ private $attributes = [];
/** @var string $characters */
private $characters = "";
@@ -44,13 +44,13 @@ class Target implements TaskContainer
* Dependencies
* @var array
*/
- private $dependencies = array();
+ private $dependencies = [];
/**
* Holds objects of children of this target
* @var array
*/
- private $children = array();
+ private $children = [];
/**
* The if condition from xml
@@ -233,7 +233,7 @@ public function addDataType($rtc)
*/
public function getTasks()
{
- $tasks = array();
+ $tasks = [];
for ($i = 0, $size = count($this->children); $i < $size; $i++) {
$tsk = $this->children[$i];
if ($tsk instanceof Task) {
@@ -39,7 +39,7 @@ class UnknownElement extends Task
private $elementName;
private $realThing;
- private $children = array();
+ private $children = [];
/**
* Constructs a UnknownElement object
@@ -41,7 +41,7 @@ class DocBlox_Parallel_Manager extends ArrayObject
* @param string $iterator_class Iterator class for this array object.
*/
public function __construct(
- $input = array(),
+ $input = [],
$flags = 0,
$iterator_class = "ArrayIterator"
) {
@@ -213,7 +213,7 @@ protected function startExecution()
);
}
- return array();
+ return [];
}
/**
Oops, something went wrong.

0 comments on commit 2428601

Please sign in to comment.