Skip to content

Commit 7baa83c

Browse files
committed
Doc fixes;
Removed default values wherever the value is unconditionally set by the constructor.
1 parent 8bda806 commit 7baa83c

File tree

7 files changed

+25
-22
lines changed

7 files changed

+25
-22
lines changed

src/PEAR2/Net/RouterOS/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private static function _login(
247247
* Sets the charset(s) for this connection. The specified charset(s) will be
248248
* used for all future requests and responses. When sending,
249249
* {@link Communicator::CHARSET_LOCAL} is converted to
250-
* {@link Communicator::HARSET_REMOTE}, and when receiving,
250+
* {@link Communicator::CHARSET_REMOTE}, and when receiving,
251251
* {@link Communicator::CHARSET_REMOTE} is converted to
252252
* {@link Communicator::CHARSET_LOCAL}. Setting NULL to either charset will
253253
* disable charset convertion, and data will be both sent and received "as

src/PEAR2/Net/RouterOS/Communicator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ protected static function verifyLengthSupport($length)
408408
/**
409409
* Encodes the length as requred by the RouterOS API.
410410
*
411-
* @param int $length The length to encode
411+
* @param int $length The length to encode.
412412
*
413-
* @return string The encoded length
413+
* @return string The encoded length.
414414
*/
415415
public static function encodeLength($length)
416416
{
@@ -520,7 +520,7 @@ public function getNextWordAsStream()
520520
* @param T\Stream $trans The transmitter from which to decode the length of
521521
* the incoming message.
522522
*
523-
* @return int The decoded length
523+
* @return int The decoded length.
524524
*/
525525
public static function decodeLength(T\Stream $trans)
526526
{
@@ -545,7 +545,7 @@ public static function decodeLength(T\Stream $trans)
545545
* @param T\Stream $trans The transmitter from which to decode the length of
546546
* the incoming message.
547547
*
548-
* @return int The decoded length
548+
* @return int The decoded length.
549549
*/
550550
private static function _decodeLength(T\Stream $trans)
551551
{

src/PEAR2/Net/RouterOS/LengthException.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,24 @@ class LengthException extends \LengthException implements Exception
3434

3535
/**
3636
*
37-
* @var mixed The unsuppported value.
37+
* @var mixed The problematic length.
3838
*/
39-
private $_length = null;
39+
private $_length;
4040

4141
/**
4242
* Creates a new LengthException.
4343
*
44-
* @param string $message The Exception message to throw.
45-
* @param int $code The Exception code.
46-
* @param Exception $previous The previous exception used for the exception
44+
* @param string $message The Exception message to throw.
45+
* @param int $code The Exception code.
46+
* @param \Exception $previous The previous exception used for the exception
4747
* chaining.
48-
* @param number $value The length.
48+
* @param number $length The length.
4949
*/
5050
public function __construct($message, $code = 0, $previous = null,
51-
$value = null
51+
$length = null
5252
) {
5353
parent::__construct($message, $code, $previous);
54-
$this->_length = $value;
54+
$this->_length = $length;
5555
}
5656

5757
/**
@@ -74,7 +74,7 @@ public function getLength()
7474
*/
7575
public function __toString()
7676
{
77-
return parent::__toString() . "\nValue:{$this->_length}";
77+
return parent::__toString() . "\nLength:{$this->_length}";
7878
}
7979

8080
// @codeCoverageIgnoreEnd

src/PEAR2/Net/RouterOS/NotSupportedException.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ class NotSupportedException extends \Exception implements Exception
3737
*
3838
* @var mixed The unsuppported value.
3939
*/
40-
private $_value = null;
40+
private $_value;
4141

4242
/**
4343
* Creates a new NotSupportedException.
4444
*
45-
* @param string $message The Exception message to throw.
46-
* @param int $code The Exception code.
47-
* @param Exception $previous The previous exception used for the exception
45+
* @param string $message The Exception message to throw.
46+
* @param int $code The Exception code.
47+
* @param \Exception $previous The previous exception used for the exception
4848
* chaining.
49-
* @param mixed $value The unsupported value.
49+
* @param mixed $value The unsupported value.
5050
*/
5151
public function __construct($message, $code = 0, $previous = null,
5252
$value = null

src/PEAR2/Net/RouterOS/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Request extends Message
4545
/**
4646
* @var Query A query for the command.
4747
*/
48-
private $_query = null;
48+
private $_query;
4949

5050
/**
5151
* Creates a request to send to RouterOS.

src/PEAR2/Net/RouterOS/Response.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
*/
2121
namespace PEAR2\Net\RouterOS;
2222

23+
/**
24+
* Refers to transmitter direction constants.
25+
*/
2326
use PEAR2\Net\Transmitter as T;
2427

2528
/**
@@ -63,7 +66,7 @@ class Response extends Message
6366
/**
6467
* @var string The response type.
6568
*/
66-
private $_type = null;
69+
private $_type;
6770

6871
/**
6972
* Extracts a new response from a communicator.

src/PEAR2/Net/RouterOS/UnexpectedValueException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class UnexpectedValueException extends \UnexpectedValueException
3737
*
3838
* @var mixed The unexpected value.
3939
*/
40-
private $_value = null;
40+
private $_value;
4141

4242
/**
4343
* Creates a new UnexpectedValueException.

0 commit comments

Comments
 (0)