diff --git a/.gitignore b/.gitignore index 87c86a6..8119e7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ Tests/Resources/Created/*.tmp +.phpintel + diff --git a/FTNPacketBundle.php b/FTNPacketBundle.php deleted file mode 100644 index b1a8112..0000000 --- a/FTNPacketBundle.php +++ /dev/null @@ -1,9 +0,0 @@ -request('GET', '/'); //$this->assertContains('Hello World', $client->getResponse()->getContent()); $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Echomail')->name('57B435B7.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Echomail')->name('57B435B7.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); $this->assertNotEmpty($packet->getHeader()->getDate()); @@ -42,7 +42,7 @@ public function testPacketHeader() public function testPacketEchomailMessages() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Echomail')->name('57B44611.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Echomail')->name('57B44611.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -76,7 +76,7 @@ public function testPacketEchomailMessages() public function testPacketEchomailUUE() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Echomail')->name('58c30f20.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Echomail')->name('58c30f20.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -110,7 +110,7 @@ public function testPacketEchomailUUE() public function testNetmailMessageOtherZone() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B08F69.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B08F69.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -143,7 +143,7 @@ public function testNetmailMessageOtherZone() public function testNetmailMessageFromNodeAddr() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B09980.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B09980.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -177,7 +177,7 @@ public function testNetmailMessageFromNodeAddr() public function testNetmailMessageFromOtherRegionAndEcho() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B099BD.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B099BD.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -210,7 +210,7 @@ public function testNetmailMessageFromOtherRegionAndEcho() public function testNetmailMessageFromOtherRegion2() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B09D50.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B09D50.PKT'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -243,7 +243,7 @@ public function testNetmailMessageFromOtherRegion2() public function testOtherFile() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Other')->name('gedcolor.cfg'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Other')->name('gedcolor.cfg'); foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); $this->assertNotInstanceOf(Packet::class, $packet); diff --git a/Tests/Controller/RWPacketStressTest.php b/Tests/Controller/RWPacketStressTest.php index 2a79110..11145b5 100644 --- a/Tests/Controller/RWPacketStressTest.php +++ b/Tests/Controller/RWPacketStressTest.php @@ -1,12 +1,12 @@ files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B08F69.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B08F69.PKT'); $fs = new Filesystem(); - $tmpFile = 'src/IgorGoroun/FTNPacketBundle/Tests/Resources/Created/current_netmails_%s.tmp'; + $tmpFile = 'src/IgorGoroun/ftnpacket/Tests/Resources/Created/current_netmails_%s.tmp'; foreach ($finder as $file) { for ($j=0;$j<10;$j++) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -41,9 +41,9 @@ public function testStressNetmail() public function testStressPacketRW() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Echomail')->name('57B44611.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Echomail')->name('57B44611.PKT'); $fs = new Filesystem(); - $tmpFile = 'src/IgorGoroun/FTNPacketBundle/Tests/Resources/Created/current_echo_%s.tmp'; + $tmpFile = 'src/IgorGoroun/ftnpacket/Tests/Resources/Created/current_echo_%s.tmp'; foreach ($finder as $file) { for ($j=0;$j<10;$j++) { $packet = (new Parser($file->getPathname()))->parsePacket(); diff --git a/Tests/Controller/WritePacketTest.php b/Tests/Controller/WritePacketTest.php index 406a70d..7a9d02d 100644 --- a/Tests/Controller/WritePacketTest.php +++ b/Tests/Controller/WritePacketTest.php @@ -1,12 +1,12 @@ files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B08F69.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B08F69.PKT'); $fs = new Filesystem(); - $tmpFile = 'src/IgorGoroun/FTNPacketBundle/Tests/Resources/Created/current_netmails_%s.tmp'; + $tmpFile = 'src/IgorGoroun/ftnpacket/Tests/Resources/Created/current_netmails_%s.tmp'; $i = 0; foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); @@ -39,9 +39,9 @@ public function testWriteNetmail() public function testWriteCollected() { $finder = new Finder(); - $finder->files()->in('src/IgorGoroun/FTNPacketBundle/Tests/Resources/Netmail')->name('58B099BD.PKT'); + $finder->files()->in('src/IgorGoroun/ftnpacket/Tests/Resources/Netmail')->name('58B099BD.PKT'); $fs = new Filesystem(); - $tmpFile = 'src/IgorGoroun/FTNPacketBundle/Tests/Resources/Created/current_collect_%s.tmp'; + $tmpFile = 'src/IgorGoroun/ftnpacket/Tests/Resources/Created/current_collect_%s.tmp'; $i = 0; foreach ($finder as $file) { $packet = (new Parser($file->getPathname()))->parsePacket(); diff --git a/composer.json b/composer.json index 78069ae..8062b46 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "wapmorgan/binary-stream": "^0.2.3" }, "autoload": { - "psr-4": {"IgorGoroun\\FTNPacketBundle\\": ""} + "psr-4": {"IgorGoroun\\FTNPacket\\": "src/"} }, "extra": { "branch-alias": { diff --git a/Entity/Address.php b/src/Address.php similarity index 97% rename from Entity/Address.php rename to src/Address.php index 474a5ca..0aa1624 100644 --- a/Entity/Address.php +++ b/src/Address.php @@ -6,11 +6,11 @@ * Time: 15:13 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; /** * Class Address - * @package IgorGoroun\FTNPacketBundle\Entity + * @package IgorGoroun\FTNPacket */ class Address { diff --git a/Entity/Encoder.php b/src/Encoder.php similarity index 96% rename from Entity/Encoder.php rename to src/Encoder.php index 061a377..a4188cd 100644 --- a/Entity/Encoder.php +++ b/src/Encoder.php @@ -6,7 +6,7 @@ * Time: 19:37 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; class Encoder diff --git a/Entity/Header.php b/src/Header.php similarity index 98% rename from Entity/Header.php rename to src/Header.php index b302004..a3375bd 100644 --- a/Entity/Header.php +++ b/src/Header.php @@ -6,11 +6,11 @@ * Time: 20:50 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; /** * Class Header - * @package IgorGoroun\FTNPacketBundle\Entity + * @package IgorGoroun\FTNPacket */ class Header { diff --git a/Entity/Kludge.php b/src/Kludge.php similarity index 94% rename from Entity/Kludge.php rename to src/Kludge.php index a372cab..25416bc 100644 --- a/Entity/Kludge.php +++ b/src/Kludge.php @@ -6,7 +6,7 @@ * Time: 22:56 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; class Kludge diff --git a/Entity/Message.php b/src/Message.php similarity index 98% rename from Entity/Message.php rename to src/Message.php index 60c05b0..5c60ed7 100644 --- a/Entity/Message.php +++ b/src/Message.php @@ -6,11 +6,11 @@ * Time: 20:50 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; /** * Class Message - * @package IgorGoroun\FTNPacketBundle\Entity + * @package IgorGoroun\FTNPacket */ class Message { diff --git a/Entity/Packet.php b/src/Packet.php similarity index 90% rename from Entity/Packet.php rename to src/Packet.php index 8649892..8a03219 100644 --- a/Entity/Packet.php +++ b/src/Packet.php @@ -6,11 +6,11 @@ * Time: 20:47 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; /** * Class Packet - * @package IgorGoroun\FTNPacketBundle\Entity + * @package IgorGoroun\FTNPacket */ class Packet { diff --git a/Entity/Parser.php b/src/Parser.php similarity index 99% rename from Entity/Parser.php rename to src/Parser.php index 49b8aa7..33924e3 100644 --- a/Entity/Parser.php +++ b/src/Parser.php @@ -6,7 +6,7 @@ * Time: 15:23 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; use Psr\Log\LoggerInterface; use wapmorgan\BinaryStream\BinaryStream; @@ -14,7 +14,7 @@ /** * Class Parser - * @package IgorGoroun\FTNPacketBundle\Entity + * @package IgorGoroun\FTNPacket */ class Parser { diff --git a/Entity/Uuefile.php b/src/Uuefile.php similarity index 97% rename from Entity/Uuefile.php rename to src/Uuefile.php index 2f3163f..82dc2eb 100644 --- a/Entity/Uuefile.php +++ b/src/Uuefile.php @@ -19,7 +19,7 @@ * end */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; class Uuefile diff --git a/Entity/Writer.php b/src/Writer.php similarity index 98% rename from Entity/Writer.php rename to src/Writer.php index 9c867b7..ca25207 100644 --- a/Entity/Writer.php +++ b/src/Writer.php @@ -6,13 +6,13 @@ * Time: 15:21 */ -namespace IgorGoroun\FTNPacketBundle\Entity; +namespace IgorGoroun\FTNPacket; use wapmorgan\BinaryStream\BinaryStream; /** * Class Writer - * @package IgorGoroun\FTNPacketBundle\Entity + * @package IgorGoroun\FTNPacket */ class Writer {