Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6d61487

Browse files
committed
supports php version 8.1
1 parent 7d00848 commit 6d61487

File tree

5 files changed

+26
-99
lines changed

5 files changed

+26
-99
lines changed

‎Dockerfile81

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM php:8.1-cli
2+
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends zip libzip-dev libpspell-dev && \
5+
docker-php-ext-install zip pspell
6+
7+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
8+
9+
RUN mkdir -p /app
10+
11+
COPY ./ /app
12+
13+
RUN composer --working-dir=/app install
14+
15+
RUN cd /app && SKIP_TEST=1 ./vendor/bin/phpunit -d memory_limit=1G
16+
17+
CMD ["/bin/sh"]

‎composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"yooper/stop-words": "~1",
2525
"symfony/console": ">= 4.4",
2626
"wamania/php-stemmer": "~1",
27-
"yooper/nicknames": "~1",
28-
"vanderlee/php-sentence": "~1"
27+
"yooper/nicknames": "~1"
2928
},
3029
"require-dev": {
3130
"phpunit/phpunit": "^9",

‎src/Collections/DocumentArrayCollection.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -126,43 +126,35 @@ public function current()
126126
*
127127
* @param mixed $key
128128
* @param DocumentAbstract $value
129-
* @return boolean
129+
* @return void
130130
*/
131-
public function offsetSet($key, $value)
131+
public function offsetSet($key, $value) : void
132132
{
133133
if(!isset($key)) {
134134
$this->documents[] = $value;
135-
return true;
136135
}
137-
138136
$this->documents[$key] = $value;
139-
return $value;
140-
141-
142137
}
143138

144139
/**
145140
*
146141
* @param mixed $key
147-
* @return null
142+
* @return void
148143
*/
149-
public function offsetUnset($key)
144+
public function offsetUnset($key) : void
150145
{
151146
if (isset($this->documents[$key])) {
152147
$deleted = $this->documents[$key];
153148
unset($this->documents[$key]);
154-
155-
return $deleted;
156149
}
157-
return null;
158150
}
159151

160152
/**
161153
*
162154
* @param mixed $key
163155
* @return DocumentAbstract
164156
*/
165-
public function offsetGet($key)
157+
public function offsetGet($key) : DocumentAbstract
166158
{
167159
return $this->documents[$key];
168160
}
@@ -172,7 +164,7 @@ public function offsetGet($key)
172164
* @param mixed $key
173165
* @return boolean
174166
*/
175-
public function offsetExists($key)
167+
public function offsetExists($key) : bool
176168
{
177169
return isset($this->documents[$key]);
178170
}
@@ -181,7 +173,7 @@ public function offsetExists($key)
181173
*
182174
* @return int
183175
*/
184-
public function count()
176+
public function count() : int
185177
{
186178
return count($this->documents);
187179
}
@@ -190,7 +182,7 @@ public function count()
190182
*
191183
* @return \ArrayIterator
192184
*/
193-
public function getIterator()
185+
public function getIterator() : \ArrayIterator
194186
{
195187
return new \ArrayIterator($this->documents);
196188
}

‎tests/TextAnalysis/Analysis/Summarize/SimpleTest.php

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎tests/TextAnalysis/Tokenizers/VanderleeTokenizerTest.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /