Skip to content

Commit 8fc46f8

Browse files
authored
Merge pull request #7 from mallardduck/patch-1
Add php mime type
2 parents 47eae81 + 2e4697e commit 8fc46f8

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
language: php
22

33
php:
4-
- 5.3.3
5-
- 5.3
6-
- 5.4
74
- 5.5
85
- 5.6
96
- hhvm

src/Dflydev/ApacheMimeTypes/PhpRepository.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,13 @@ class PhpRepository implements RepositoryInterface
927927
'h' => 'text/x-c',
928928
'hh' => 'text/x-c',
929929
'dic' => 'text/x-c',
930+
'php' => 'text/x-php',
931+
'phtml' => 'text/x-php',
932+
'php3' => 'text/x-php',
933+
'php4' => 'text/x-php',
934+
'php5' => 'text/x-php',
935+
'php7' => 'text/x-php',
936+
'phps' => 'text/x-php',
930937
'f' => 'text/x-fortran',
931938
'for' => 'text/x-fortran',
932939
'f77' => 'text/x-fortran',
@@ -1722,6 +1729,7 @@ class PhpRepository implements RepositoryInterface
17221729
'text/x-java-source' => array('java'),
17231730
'text/x-opml' => array('opml'),
17241731
'text/x-pascal' => array('p', 'pas'),
1732+
'text/x-php' => array('php', 'phtml', 'php3', 'php4', 'php5', 'php7', 'phps'),
17251733
'text/x-nfo' => array('nfo'),
17261734
'text/x-setext' => array('etx'),
17271735
'text/x-sfv' => array('sfv'),

src/Dflydev/ApacheMimeTypes/Resources/mime.types

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@ text/x-fortran f for f77 f90
14901490
text/x-java-source java
14911491
text/x-opml opml
14921492
text/x-pascal p pas
1493+
text/x-php php phtml php3 php4 php5 php7 phps
14931494
text/x-nfo nfo
14941495
text/x-setext etx
14951496
text/x-sfv sfv

src/Dflydev/ApacheMimeTypes/Resources/mime.types.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/AbstractRepositoryTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testDefaultDumpTypeToExtensions()
8080

8181
$dump = $repository->dumpTypeToExtensions();
8282

83-
$this->assertCount(765, array_keys($dump));
83+
$this->assertCount(766, array_keys($dump));
8484
}
8585

8686
public function testDefaultDumpExtensionToType()
@@ -94,7 +94,7 @@ public function testDefaultDumpExtensionToType()
9494

9595
$dump = $repository->dumpExtensionToType();
9696

97-
$this->assertCount(981, array_keys($dump));
97+
$this->assertCount(988, array_keys($dump));
9898
}
9999

100100
public function testMissing()

0 commit comments

Comments
 (0)