Skip to content

Commit

Permalink
Rationalise docblock whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveRandom committed Apr 2, 2015
1 parent 80b0a33 commit fdbb019
Show file tree
Hide file tree
Showing 56 changed files with 554 additions and 655 deletions.
12 changes: 6 additions & 6 deletions examples/AQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* PHP version 5.4
*
* @category LibDNS
* @package Examples
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
* @category LibDNS
* @package Examples
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
*/
namespace LibDNS\Examples;

Expand Down
12 changes: 6 additions & 6 deletions examples/SOAQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* PHP version 5.4
*
* @category LibDNS
* @package Examples
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
* @category LibDNS
* @package Examples
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
*/
namespace LibDNS\Examples;

Expand Down
93 changes: 32 additions & 61 deletions src/LibDNS/Decoder/Decoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* PHP version 5.4
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
*/
namespace LibDNS\Decoder;

Expand All @@ -35,9 +35,9 @@
/**
* Decodes raw network data to Message objects
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
*/
class Decoder
{
Expand Down Expand Up @@ -74,11 +74,11 @@ class Decoder
/**
* Constructor
*
* @param \LibDNS\Packets\PacketFactory $packetFactory
* @param \LibDNS\Messages\MessageFactory $messageFactory
* @param \LibDNS\Records\QuestionFactory $questionFactory
* @param \LibDNS\Records\ResourceBuilder $resourceBuilder
* @param \LibDNS\Records\Types\TypeBuilder $typeBuilder
* @param \LibDNS\Packets\PacketFactory $packetFactory
* @param \LibDNS\Messages\MessageFactory $messageFactory
* @param \LibDNS\Records\QuestionFactory $questionFactory
* @param \LibDNS\Records\ResourceBuilder $resourceBuilder
* @param \LibDNS\Records\Types\TypeBuilder $typeBuilder
* @param \LibDNS\Decoder\DecodingContextFactory $decodingContextFactory
*/
public function __construct(
Expand All @@ -101,10 +101,8 @@ public function __construct(
* Read a specified number of bytes of data from a packet
*
* @param \LibDNS\Packets\Packet $packet
* @param int $length
*
* @param int $length
* @return string
*
* @throws \UnexpectedValueException When the read operation does not result in the requested number of bytes
*/
private function readDataFromPacket(Packet $packet, $length)
Expand All @@ -120,8 +118,7 @@ private function readDataFromPacket(Packet $packet, $length)
* Decode the header section of the message
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Messages\Message $message
*
* @param \LibDNS\Messages\Message $message
* @throws \UnexpectedValueException When the header section is invalid
*/
private function decodeHeader(DecodingContext $decodingContext, Message $message)
Expand Down Expand Up @@ -151,11 +148,9 @@ private function decodeHeader(DecodingContext $decodingContext, Message $message
* Decode an Anything field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\Anything $anything The object to populate with the result
* @param int $length
*
* @param \LibDNS\Records\Types\Anything $anything The object to populate with the result
* @param int $length
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeAnything(DecodingContext $decodingContext, Anything $anything, $length)
Expand All @@ -169,11 +164,9 @@ private function decodeAnything(DecodingContext $decodingContext, Anything $anyt
* Decode a BitMap field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\BitMap $bitMap The object to populate with the result
* @param int $length
*
* @param \LibDNS\Records\Types\BitMap $bitMap The object to populate with the result
* @param int $length
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeBitMap(DecodingContext $decodingContext, BitMap $bitMap, $length)
Expand All @@ -187,10 +180,8 @@ private function decodeBitMap(DecodingContext $decodingContext, BitMap $bitMap,
* Decode a Char field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\Char $char The object to populate with the result
*
* @param \LibDNS\Records\Types\Char $char The object to populate with the result
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeChar(DecodingContext $decodingContext, Char $char)
Expand All @@ -204,11 +195,9 @@ private function decodeChar(DecodingContext $decodingContext, Char $char)
/**
* Decode a CharacterString field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\CharacterString $characterString The object to populate with the result
*
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeCharacterString(DecodingContext $decodingContext, CharacterString $characterString)
Expand All @@ -223,11 +212,9 @@ private function decodeCharacterString(DecodingContext $decodingContext, Charact
/**
* Decode a DomainName field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\DomainName $domainName The object to populate with the result
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\DomainName $domainName The object to populate with the result
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeDomainName(DecodingContext $decodingContext, DomainName $domainName)
Expand Down Expand Up @@ -285,11 +272,9 @@ private function decodeDomainName(DecodingContext $decodingContext, DomainName $
/**
* Decode an IPv4Address field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\IPv4Address $ipv4Address The object to populate with the result
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\IPv4Address $ipv4Address The object to populate with the result
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeIPv4Address(DecodingContext $decodingContext, IPv4Address $ipv4Address)
Expand All @@ -303,11 +288,9 @@ private function decodeIPv4Address(DecodingContext $decodingContext, IPv4Address
/**
* Decode an IPv6Address field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\IPv6Address $ipv6Address The object to populate with the result
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\IPv6Address $ipv6Address The object to populate with the result
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeIPv6Address(DecodingContext $decodingContext, IPv6Address $ipv6Address)
Expand All @@ -322,10 +305,8 @@ private function decodeIPv6Address(DecodingContext $decodingContext, IPv6Address
* Decode a Long field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\Long $long The object to populate with the result
*
* @param \LibDNS\Records\Types\Long $long The object to populate with the result
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeLong(DecodingContext $decodingContext, Long $long)
Expand All @@ -340,10 +321,8 @@ private function decodeLong(DecodingContext $decodingContext, Long $long)
* Decode a Short field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\Short $short The object to populate with the result
*
* @param \LibDNS\Records\Types\Short $short The object to populate with the result
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
*/
private function decodeShort(DecodingContext $decodingContext, Short $short)
Expand All @@ -358,11 +337,9 @@ private function decodeShort(DecodingContext $decodingContext, Short $short)
* Decode a Type field
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
* @param \LibDNS\Records\Types\Type $type The object to populate with the result
* @param int $length Expected data length
*
* @param \LibDNS\Records\Types\Type $type The object to populate with the result
* @param int $length Expected data length
* @return int The number of packet bytes consumed by the operation
*
* @throws \UnexpectedValueException When the packet data is invalid
* @throws \InvalidArgumentException When the Type subtype is unknown
*/
Expand Down Expand Up @@ -397,9 +374,7 @@ private function decodeType(DecodingContext $decodingContext, Type $type, $lengt
* Decode a question record
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
*
* @return \LibDNS\Records\Question
*
* @throws \UnexpectedValueException When the record is invalid
*/
private function decodeQuestionRecord(DecodingContext $decodingContext)
Expand All @@ -420,9 +395,7 @@ private function decodeQuestionRecord(DecodingContext $decodingContext)
* Decode a resource record
*
* @param \LibDNS\Decoder\DecodingContext $decodingContext
*
* @return \LibDNS\Records\Resource
*
* @throws \UnexpectedValueException When the record is invalid
* @throws \InvalidArgumentException When a type subtype is unknown
*/
Expand Down Expand Up @@ -467,9 +440,7 @@ private function decodeResourceRecord(DecodingContext $decodingContext)
* Decode a Message from raw network data
*
* @param string $data The data string to decode
*
* @return \LibDNS\Messages\Message
*
* @throws \UnexpectedValueException When the packet data is invalid
* @throws \InvalidArgumentException When a type subtype is unknown
*/
Expand Down
18 changes: 9 additions & 9 deletions src/LibDNS/Decoder/DecoderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* PHP version 5.4
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
*/
namespace LibDNS\Decoder;

Expand All @@ -30,9 +30,9 @@
/**
* Creates Decoder objects
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
*/
class DecoderFactory
{
Expand Down
20 changes: 10 additions & 10 deletions src/LibDNS/Decoder/DecodingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* PHP version 5.4
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
*/
namespace LibDNS\Decoder;

Expand All @@ -19,9 +19,9 @@
/**
* Holds data associated with a decode operation
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
*/
class DecodingContext
{
Expand Down Expand Up @@ -58,7 +58,7 @@ class DecodingContext
/**
* Constructor
*
* @param \LibDNS\Packets\Packet $packet
* @param \LibDNS\Packets\Packet $packet
* @param \LibDNS\Packets\LabelRegistry $labelRegistry
*/
public function __construct(Packet $packet, LabelRegistry $labelRegistry)
Expand Down
19 changes: 9 additions & 10 deletions src/LibDNS/Decoder/DecodingContextFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*
* PHP version 5.4
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 2.0.0
*/
namespace LibDNS\Decoder;

Expand All @@ -19,17 +19,16 @@
/**
* Creates DecodingContext objects
*
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
* @category LibDNS
* @package Decoder
* @author Chris Wright <https://github.com/DaveRandom>
*/
class DecodingContextFactory
{
/**
* Create a new DecodingContext object
*
* @param \LibDNS\Packets\Packet $packet The packet to be decoded
*
* @return \LibDNS\Decoder\DecodingContext
*/
public function create(Packet $packet)
Expand Down
Loading

0 comments on commit fdbb019

Please sign in to comment.