Skip to content

Commit a636f33

Browse files
committed
Make project manageable in Eclipse PDT
1 parent c880899 commit a636f33

File tree

9 files changed

+245
-8
lines changed

9 files changed

+245
-8
lines changed

.buildpath

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<buildpath>
3+
<buildpathentry kind="src" path="vendor/sebastian/recursion-context/src">
4+
<attributes>
5+
<attribute name="composer" value="vendor"/>
6+
</attributes>
7+
</buildpathentry>
8+
<buildpathentry kind="src" path="vendor/sebastian/cli-parser/src">
9+
<attributes>
10+
<attribute name="composer" value="vendor"/>
11+
</attributes>
12+
</buildpathentry>
13+
<buildpathentry kind="src" path="vendor/sebastian/complexity/src">
14+
<attributes>
15+
<attribute name="composer" value="vendor"/>
16+
</attributes>
17+
</buildpathentry>
18+
<buildpathentry kind="src" path="vendor/sebastian/lines-of-code/src">
19+
<attributes>
20+
<attribute name="composer" value="vendor"/>
21+
</attributes>
22+
</buildpathentry>
23+
<buildpathentry kind="src" path="vendor/phpunit/php-code-coverage/src">
24+
<attributes>
25+
<attribute name="composer" value="vendor"/>
26+
</attributes>
27+
</buildpathentry>
28+
<buildpathentry kind="src" path="vendor/phpspec/prophecy/src/Prophecy">
29+
<attributes>
30+
<attribute name="composer" value="vendor"/>
31+
</attributes>
32+
</buildpathentry>
33+
<buildpathentry kind="src" path="vendor/phpunit/php-invoker/src">
34+
<attributes>
35+
<attribute name="composer" value="vendor"/>
36+
</attributes>
37+
</buildpathentry>
38+
<buildpathentry kind="src" path="vendor/phar-io/manifest/src">
39+
<attributes>
40+
<attribute name="composer" value="vendor"/>
41+
</attributes>
42+
</buildpathentry>
43+
<buildpathentry kind="src" path="vendor/sebastian/diff/src">
44+
<attributes>
45+
<attribute name="composer" value="vendor"/>
46+
</attributes>
47+
</buildpathentry>
48+
<buildpathentry kind="src" path="vendor/sebastian/code-unit/src">
49+
<attributes>
50+
<attribute name="composer" value="vendor"/>
51+
</attributes>
52+
</buildpathentry>
53+
<buildpathentry kind="src" path="src/TgLog">
54+
<attributes>
55+
<attribute name="composer" value="source"/>
56+
</attributes>
57+
</buildpathentry>
58+
<buildpathentry kind="src" path="vendor/phpdocumentor/type-resolver/src">
59+
<attributes>
60+
<attribute name="composer" value="vendor"/>
61+
</attributes>
62+
</buildpathentry>
63+
<buildpathentry kind="src" path="vendor/sebastian/object-reflector/src">
64+
<attributes>
65+
<attribute name="composer" value="vendor"/>
66+
</attributes>
67+
</buildpathentry>
68+
<buildpathentry kind="src" path="src/TgUtils">
69+
<attributes>
70+
<attribute name="composer" value="source"/>
71+
</attributes>
72+
</buildpathentry>
73+
<buildpathentry kind="src" path="vendor/phpdocumentor/reflection-docblock/src">
74+
<attributes>
75+
<attribute name="composer" value="vendor"/>
76+
</attributes>
77+
</buildpathentry>
78+
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
79+
<buildpathentry kind="src" path="vendor/sebastian/global-state/src">
80+
<attributes>
81+
<attribute name="composer" value="vendor"/>
82+
</attributes>
83+
</buildpathentry>
84+
<buildpathentry kind="src" path="vendor/theseer/tokenizer/src">
85+
<attributes>
86+
<attribute name="composer" value="vendor"/>
87+
</attributes>
88+
</buildpathentry>
89+
<buildpathentry kind="src" path="vendor/sebastian/code-unit-reverse-lookup/src">
90+
<attributes>
91+
<attribute name="composer" value="vendor"/>
92+
</attributes>
93+
</buildpathentry>
94+
<buildpathentry kind="src" path="vendor/nikic/php-parser/lib/PhpParser">
95+
<attributes>
96+
<attribute name="composer" value="vendor"/>
97+
</attributes>
98+
</buildpathentry>
99+
<buildpathentry kind="src" path="vendor/phpunit/php-timer/src">
100+
<attributes>
101+
<attribute name="composer" value="vendor"/>
102+
</attributes>
103+
</buildpathentry>
104+
<buildpathentry kind="src" path="vendor/webmozart/assert/src">
105+
<attributes>
106+
<attribute name="composer" value="vendor"/>
107+
</attributes>
108+
</buildpathentry>
109+
<buildpathentry kind="src" path="vendor/technicalguru/i18n/src/TgI18n">
110+
<attributes>
111+
<attribute name="composer" value="vendor"/>
112+
</attributes>
113+
</buildpathentry>
114+
<buildpathentry kind="src" path="vendor/phpunit/phpunit/src/Framework/Assert">
115+
<attributes>
116+
<attribute name="composer" value="vendor"/>
117+
</attributes>
118+
</buildpathentry>
119+
<buildpathentry kind="src" path="vendor/sebastian/version/src">
120+
<attributes>
121+
<attribute name="composer" value="vendor"/>
122+
</attributes>
123+
</buildpathentry>
124+
<buildpathentry kind="src" path="vendor/sebastian/environment/src">
125+
<attributes>
126+
<attribute name="composer" value="vendor"/>
127+
</attributes>
128+
</buildpathentry>
129+
<buildpathentry excluding="Framework/Assert/" kind="src" path="vendor/phpunit/phpunit/src">
130+
<attributes>
131+
<attribute name="composer" value="vendor"/>
132+
</attributes>
133+
</buildpathentry>
134+
<buildpathentry kind="src" path="vendor/composer">
135+
<attributes>
136+
<attribute name="composer" value="vendor"/>
137+
</attributes>
138+
</buildpathentry>
139+
<buildpathentry kind="src" path="vendor/myclabs/deep-copy/src/DeepCopy">
140+
<attributes>
141+
<attribute name="composer" value="vendor"/>
142+
</attributes>
143+
</buildpathentry>
144+
<buildpathentry kind="src" path="vendor/phpdocumentor/reflection-common/src">
145+
<attributes>
146+
<attribute name="composer" value="vendor"/>
147+
</attributes>
148+
</buildpathentry>
149+
<buildpathentry kind="src" path="vendor/phpunit/php-file-iterator/src">
150+
<attributes>
151+
<attribute name="composer" value="vendor"/>
152+
</attributes>
153+
</buildpathentry>
154+
<buildpathentry kind="src" path="vendor/phar-io/version/src">
155+
<attributes>
156+
<attribute name="composer" value="vendor"/>
157+
</attributes>
158+
</buildpathentry>
159+
<buildpathentry kind="src" path="vendor/sebastian/comparator/src">
160+
<attributes>
161+
<attribute name="composer" value="vendor"/>
162+
</attributes>
163+
</buildpathentry>
164+
<buildpathentry kind="src" path="vendor/symfony/polyfill-ctype">
165+
<attributes>
166+
<attribute name="composer" value="vendor"/>
167+
</attributes>
168+
</buildpathentry>
169+
<buildpathentry kind="src" path="vendor/doctrine/instantiator/src/Doctrine/Instantiator">
170+
<attributes>
171+
<attribute name="composer" value="vendor"/>
172+
</attributes>
173+
</buildpathentry>
174+
<buildpathentry kind="src" path="vendor/sebastian/exporter/src">
175+
<attributes>
176+
<attribute name="composer" value="vendor"/>
177+
</attributes>
178+
</buildpathentry>
179+
<buildpathentry kind="src" path="vendor/phpunit/php-text-template/src">
180+
<attributes>
181+
<attribute name="composer" value="vendor"/>
182+
</attributes>
183+
</buildpathentry>
184+
<buildpathentry kind="src" path="vendor/sebastian/type/src">
185+
<attributes>
186+
<attribute name="composer" value="vendor"/>
187+
</attributes>
188+
</buildpathentry>
189+
<buildpathentry kind="src" path="vendor/sebastian/object-enumerator/src">
190+
<attributes>
191+
<attribute name="composer" value="vendor"/>
192+
</attributes>
193+
</buildpathentry>
194+
<buildpathentry kind="src" path="vendor/sebastian/resource-operations/src">
195+
<attributes>
196+
<attribute name="composer" value="vendor"/>
197+
</attributes>
198+
</buildpathentry>
199+
</buildpath>

.project

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,29 @@
55
<projects>
66
</projects>
77
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.php.composer.core.builder.buildPathManagementBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.wst.validation.validationbuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.dltk.core.scriptbuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
828
</buildSpec>
929
<natures>
30+
<nature>org.eclipse.php.core.PHPNature</nature>
31+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
1032
</natures>
1133
</projectDescription>

.settings/org.eclipse.php.core.prefs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
include_path=0;/php-utils/src
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<faceted-project>
3+
<fixed facet="php.component"/>
4+
<fixed facet="php.core.component"/>
5+
<installed facet="php.core.component" version="1"/>
6+
<installed facet="php.component" version="7.4"/>
7+
<installed facet="php.composer.component" version="1"/>
8+
</faceted-project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disabled=06vendor
2+
eclipse.preferences.version=1

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"require" : {
1616
"php" : ">=7.0.0",
17-
"technicalguru/i18n": "^1"
17+
"technicalguru/i18n" : "~1"
1818
},
1919
"autoload" : {
2020
"psr-4" : {

src/TgUtils/Date.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
namespace TgUtils;
1010

11-
\TgI18n\I18N::addI18nFile(__DIR__.'/../date_i18n.php', FALSE);
11+
use \TgI18n\I18N;
12+
13+
I18N::addI18nFile(__DIR__.'/../date_i18n.php', FALSE);
1214

1315
/**
1416
* Date is a class that stores a date and provides logic to manipulate
@@ -60,7 +62,7 @@ class Date extends \DateTime {
6062
/**
6163
* The DateTimeZone object for usage in rending dates as strings.
6264
*
63-
* @var DateTimeZone
65+
* @var \DateTimeZone
6466
*/
6567
protected $tz;
6668

@@ -349,7 +351,7 @@ public function monthToString($month, $abbr = false, $language = null) {
349351
/**
350352
* Method to wrap the setTimezone() function and set the internal time zone object.
351353
*
352-
* @param DateTimeZone $tz The new DateTimeZone object.
354+
* @param \DateTimeZone $tz The new DateTimeZone object.
353355
*
354356
* @return Date
355357
*

src/TgUtils/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function getHeader($key) {
228228
* @param string $key - the parameter name.
229229
* @param mixed $default - the default value when not found (optional, default is NULL)
230230
* @param boolean $getPrecedes - TRUE when GET parameter shall be returned even when POST parameter is given. (optional, default is TRUE).
231-
* @return the parameter value or its default.
231+
* @return string the parameter value or its default.
232232
*/
233233
public function getParam($key, $default = NULL, $getPrecedes = true) {
234234
$rc = $getPrecedes ? $this->getGetParam($key) : $this->getPostParam($key);

src/TgUtils/Utils.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace TgUtils;
44

5-
\TgI18n\I18N::addI18nFile(__DIR__ . '/../utils_i18n.php', FALSE);
5+
use \TgI18n\I18N;
6+
7+
I18N::addI18nFile(__DIR__ . '/../utils_i18n.php', FALSE);
68

79
class Utils {
810

@@ -63,7 +65,7 @@ public static function extractAttributeFromList($array, $attr) {
6365
* Generate a random string.
6466
* @param int $length - length of string to generated (optional, default is 10).
6567
* @param string $chars - allowed characters (optional, default is alphanumeric class [0-9A-Za-z]).
66-
* @return a string with given length containing allowed characters only.
68+
* @return string a string with given length containing allowed characters only.
6769
*/
6870
public static function generateRandomString($length = 10, $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
6971
$charsLen = strlen($chars);
@@ -113,7 +115,7 @@ public static function findBy($list, $attr, $value) {
113115
* @return string the formatted price in localized manner.
114116
*/
115117
public static function formatPrice($value, $currency, $language = null, $spaceChar = '&nbsp;') {
116-
return number_format(floatval($value), 2, I18N::_('decimal_point', $language), \I18N::_('thousand_sep', $language)).$spaceChar.$currency;
118+
return number_format(floatval($value), 2, I18N::_('decimal_point', $language), I18N::_('thousand_sep', $language)).$spaceChar.$currency;
117119
}
118120

119121
}

0 commit comments

Comments
 (0)