Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
  • Loading branch information
jfcherng committed Feb 8, 2019
1 parent b6fa08d commit fac4dae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/DiffHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

final class DiffHelper
{
/**
* The constructor.
*/
private function __construct()
{
}

/**
* Get the information about available templates.
*
Expand Down
13 changes: 9 additions & 4 deletions src/Utility/ReverseIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@

namespace Jfcherng\Diff\Utility;

use Generator;

final class ReverseIterator
{
const ITERATOR_GET_KEY = 1 << 1;
const ITERATOR_GET_BOTH = 1 << 2;

/**
* The constructor.
*/
private function __construct()
{
}

/**
* Iterate the array reversely.
*
* @param array $array the array
*
* @return Generator
* @return \Generator
*/
public static function fromArray(array $array, int $flags = 0): Generator
public static function fromArray(array $array, int $flags = 0): \Generator
{
// it may worth unrolling if-conditions to out of for-loop
// so it wont have to check multiple if-conditions inside each loop
Expand Down

0 comments on commit fac4dae

Please sign in to comment.