Skip to content

Commit

Permalink
Import global functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Apr 14, 2018
1 parent 5046cd8 commit 395a248
Show file tree
Hide file tree
Showing 19 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/BoxList.php
Expand Up @@ -11,6 +11,7 @@
use ArrayIterator;
use IteratorAggregate;
use Traversable;
use function usort;

/**
* List of boxes available to put items into, ordered by volume.
Expand Down
4 changes: 3 additions & 1 deletion src/ItemList.php
Expand Up @@ -12,7 +12,9 @@
use Countable;
use IteratorAggregate;
use Traversable;

use function array_shift;
use function reset;
use function usort;
/**
* List of items to be packed, ordered by volume.
*
Expand Down
1 change: 1 addition & 0 deletions src/LayerStabiliser.php
Expand Up @@ -11,6 +11,7 @@
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Psr\Log\NullLogger;
use function usort;

/**
* Applies load stability to generated result.
Expand Down
1 change: 1 addition & 0 deletions src/OrientatedItem.php
Expand Up @@ -7,6 +7,7 @@
declare(strict_types=1);

namespace DVDoug\BoxPacker;
use function min;

/**
* An item to be packed.
Expand Down
5 changes: 5 additions & 0 deletions src/OrientatedItemFactory.php
Expand Up @@ -10,6 +10,11 @@

use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use function array_filter;
use function count;
use function reset;
use function min;
use function usort;

/**
* Figure out orientations for an item and a given set of dimensions.
Expand Down
3 changes: 3 additions & 0 deletions src/PackedBox.php
Expand Up @@ -7,6 +7,9 @@
declare(strict_types=1);

namespace DVDoug\BoxPacker;
use function is_null;
use function max;
use function round;

/**
* A "box" with items.
Expand Down
4 changes: 4 additions & 0 deletions src/PackedBoxList.php
Expand Up @@ -12,6 +12,10 @@
use Countable;
use IteratorAggregate;
use Traversable;
use function count;
use function reset;
use function round;
use function usort;

/**
* List of packed boxes.
Expand Down
3 changes: 3 additions & 0 deletions src/PackedItemList.php
Expand Up @@ -12,6 +12,9 @@
use Countable;
use IteratorAggregate;
use Traversable;
use function array_map;
use function count;
use function usort;

/**
* List of packed items, ordered by volume.
Expand Down
2 changes: 2 additions & 0 deletions src/PackedLayer.php
Expand Up @@ -7,6 +7,8 @@
declare(strict_types=1);

namespace DVDoug\BoxPacker;
use function max;
use function min;

/**
* A packed layer.
Expand Down
3 changes: 3 additions & 0 deletions src/Packer.php
Expand Up @@ -12,6 +12,9 @@
use Psr\Log\LoggerAwareTrait;
use Psr\Log\LogLevel;
use Psr\Log\NullLogger;
use function array_shift;
use function count;
use function usort;

/**
* Actual packer.
Expand Down
3 changes: 3 additions & 0 deletions src/VolumePacker.php
Expand Up @@ -11,6 +11,9 @@
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Psr\Log\NullLogger;
use function count;
use function max;
use function min;

/**
* Actual packer.
Expand Down
5 changes: 5 additions & 0 deletions src/WeightRedistributor.php
Expand Up @@ -12,6 +12,11 @@
use Psr\Log\LoggerAwareTrait;
use Psr\Log\LogLevel;
use Psr\Log\NullLogger;
use function array_filter;
use function array_merge;
use function count;
use function iterator_to_array;
use function usort;

/**
* Actual packer.
Expand Down
1 change: 1 addition & 0 deletions tests/BoxListTest.php
Expand Up @@ -10,6 +10,7 @@

use DVDoug\BoxPacker\Test\TestBox;
use PHPUnit\Framework\TestCase;
use function iterator_to_array;

/**
* @covers \DVDoug\BoxPacker\BoxList
Expand Down
3 changes: 3 additions & 0 deletions tests/EfficiencyTest.php
Expand Up @@ -11,6 +11,9 @@
use DVDoug\BoxPacker\Test\TestBox;
use DVDoug\BoxPacker\Test\TestItem;
use PHPUnit\Framework\TestCase;
use function fclose;
use function fgetcsv;
use function fopen;

/**
* @coversNothing
Expand Down
2 changes: 2 additions & 0 deletions tests/ItemListTest.php
Expand Up @@ -10,6 +10,8 @@

use DVDoug\BoxPacker\Test\TestItem;
use PHPUnit\Framework\TestCase;
use function count;
use function iterator_to_array;

/**
* @covers \DVDoug\BoxPacker\ItemList
Expand Down
2 changes: 2 additions & 0 deletions tests/PackerTest.php
Expand Up @@ -11,6 +11,8 @@
use DVDoug\BoxPacker\Test\TestBox;
use DVDoug\BoxPacker\Test\TestItem;
use PHPUnit\Framework\TestCase;
use function count;
use function iterator_to_array;

/**
* @covers \DVDoug\BoxPacker\Packer
Expand Down
2 changes: 2 additions & 0 deletions tests/Test/TestConstrainedTestItem.php
Expand Up @@ -12,6 +12,8 @@
use DVDoug\BoxPacker\ConstrainedItem;
use DVDoug\BoxPacker\PackedItem;
use DVDoug\BoxPacker\PackedItemList;
use function count;
use function iterator_to_array;

class TestConstrainedTestItem extends TestItem implements ConstrainedItem
{
Expand Down
2 changes: 1 addition & 1 deletion tests/VolumePackerTest.php
Expand Up @@ -7,11 +7,11 @@
declare(strict_types=1);

namespace DVDoug\BoxPacker;

use DVDoug\BoxPacker\Test\TestBox;
use DVDoug\BoxPacker\Test\TestConstrainedTestItem;
use DVDoug\BoxPacker\Test\TestItem;
use PHPUnit\Framework\TestCase;
use function count;

/**
* @covers \DVDoug\BoxPacker\VolumePacker
Expand Down
1 change: 1 addition & 0 deletions tests/WeightRedistributorTest.php
Expand Up @@ -11,6 +11,7 @@
use DVDoug\BoxPacker\Test\TestBox;
use DVDoug\BoxPacker\Test\TestItem;
use PHPUnit\Framework\TestCase;
use function iterator_to_array;

/**
* @covers \DVDoug\BoxPacker\WeightRedistributor
Expand Down

0 comments on commit 395a248

Please sign in to comment.