Skip to content

Commit c76b618

Browse files
Roman SyroeshkoRoman Syroeshko
authored andcommitted
Merge pull request #171 from RomanSyroeshko/develop
"\PhpOffice\PhpWord\Shared\File" class was cut out.
2 parents e802ea3 + a0e8b43 commit c76b618

File tree

5 files changed

+3
-125
lines changed

5 files changed

+3
-125
lines changed

src/PhpWord/Reader/Word2007.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use PhpOffice\PhpWord\PhpWord;
2929
use PhpOffice\PhpWord\DocumentProperties;
3030
use PhpOffice\PhpWord\Exceptions\Exception;
31-
use PhpOffice\PhpWord\Shared\File;
3231

3332
/**
3433
* Reader for Word2007
@@ -87,7 +86,7 @@ public function getFromZipArchive($archive, $fileName = '', $removeNamespace = f
8786
if (strpos($fileName, '//') !== false) {
8887
$fileName = substr($fileName, strpos($fileName, '//') + 1);
8988
}
90-
$fileName = File::realpath($fileName);
89+
$fileName = realpath($fileName);
9190

9291
// Apache POI fixes
9392
$contents = $archive->getFromName($fileName);

src/PhpWord/Shared/File.php

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

src/PhpWord/Writer/ODText/Manifest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
use PhpOffice\PhpWord\Exceptions\Exception;
2929
use PhpOffice\PhpWord\PhpWord;
30-
use PhpOffice\PhpWord\Shared\File;
3130
use PhpOffice\PhpWord\Shared\XMLWriter;
3231

3332
/**
@@ -123,7 +122,7 @@ public function writeManifest(PhpWord $phpWord = null)
123122
*/
124123
private function _getImageMimeType($pFile = '')
125124
{
126-
if (File::fileExists($pFile)) {
125+
if (file_exists($pFile)) {
127126
$image = getimagesize($pFile);
128127
return image_type_to_mime_type($image[2]);
129128
} else {

src/PhpWord/Writer/Word2007/ContentTypes.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
namespace PhpOffice\PhpWord\Writer\Word2007;
2727

2828
use PhpOffice\PhpWord\Exceptions\Exception;
29-
use PhpOffice\PhpWord\Shared\File;
3029
use PhpOffice\PhpWord\Shared\XMLWriter;
3130

3231
/**
@@ -189,7 +188,7 @@ public function writeContentTypes($_imageTypes, $_objectTypes, $_cHdrs, $footers
189188
*/
190189
private function _getImageMimeType($pFile = '')
191190
{
192-
if (File::fileExists($pFile)) {
191+
if (file_exists($pFile)) {
193192
$image = getimagesize($pFile);
194193
return image_type_to_mime_type($image[2]);
195194
} else {

tests/PhpWord/Tests/Shared/FileTest.php

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

0 commit comments

Comments
 (0)