upgrade phpunit and codesniffer

pull/19/head
Hari KT 5 years ago
parent 7a89fea6f6
commit 0e115da493

@ -15,8 +15,8 @@
}
},
"require-dev": {
"phpunit/phpunit": "4.0.*",
"squizlabs/php_codesniffer": "1.5.5"
"phpunit/phpunit": "7.0.*",
"squizlabs/php_codesniffer": "3.5.*"
},
"require": {
"php": ">=5.4"

@ -95,6 +95,8 @@ abstract class RateAdapter
protected function sortByCost()
{
uasort($this->rates, function ($a, $b) { return ($a->getCost() > $b->getCost());});
uasort($this->rates, function ($a, $b) {
return ($a->getCost() > $b->getCost());
});
}
}

@ -139,8 +139,10 @@ class Ship
return $display_rates;
}
protected function sortByCost(& $rates)
protected function sortByCost(&$rates)
{
uasort($rates, function ($a, $b) { return ($a->getCost() > $b->getCost());});
uasort($rates, function ($a, $b) {
return ($a->getCost() > $b->getCost());
});
}
}

@ -95,8 +95,8 @@ class Rate extends RateAdapter
]);
$this->setRequestAdapter(Arr::get($options, 'requestAdapter', new RateRequest\Post()));
}
protected function validate()
{
$this->validatePackages();

@ -1,7 +1,9 @@
<?php
namespace pdt256\Shipping;
class ArrTest extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;
class ArrTest extends TestCase
{
public function providerGet()
{

@ -7,8 +7,9 @@ use pdt256\Shipping\Package;
use pdt256\Shipping\Shipment;
use pdt256\Shipping\Quote;
use DateTime;
use PHPUnit\Framework\TestCase;
class RateTest extends \PHPUnit_Framework_TestCase
class RateTest extends TestCase
{
/** @var Shipment */
protected $shipment;
@ -182,6 +183,5 @@ class RateTest extends \PHPUnit_Framework_TestCase
'requestAdapter' => new StubFedex,
]);
$rateAdapter->getRates();
}
}

@ -5,8 +5,9 @@ namespace pdt256\Shipping;
use pdt256\Shipping\RateRequest\StubFedex;
use pdt256\Shipping\RateRequest\StubUPS;
use pdt256\Shipping\RateRequest\StubUSPS;
use PHPUnit\Framework\TestCase;
class PackageDimensionsValidationTrait extends \PHPUnit_Framework_TestCase
class PackageDimensionsValidationTrait extends TestCase
{
protected function getNormalPackage()
{

@ -1,7 +1,9 @@
<?php
namespace pdt256\Shipping;
class PackageTest extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;
class PackageTest extends TestCase
{
public function testCreate()
{

@ -2,8 +2,9 @@
namespace pdt256\Shipping;
use DateTime;
use PHPUnit\Framework\TestCase;
class QuoteTest extends \PHPUnit_Framework_TestCase
class QuoteTest extends TestCase
{
public function testCreate()
{

@ -1,7 +1,9 @@
<?php
namespace pdt256\Shipping;
class RateAdapterTest extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;
class RateAdapterTest extends TestCase
{
public function testCreate()
{

@ -2,8 +2,9 @@
namespace pdt256\Shipping;
use DateTime;
use PHPUnit\Framework\TestCase;
class ShipTest extends \PHPUnit_Framework_TestCase
class ShipTest extends TestCase
{
/** @var Shipment */
public $shipment;

@ -1,7 +1,9 @@
<?php
namespace pdt256\Shipping;
class ShipmentTest extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;
class ShipmentTest extends TestCase
{
public function testCreate()
{

@ -6,8 +6,9 @@ use pdt256\Shipping\Ship;
use pdt256\Shipping\Package;
use pdt256\Shipping\Shipment;
use pdt256\Shipping\Quote;
use PHPUnit\Framework\TestCase;
class RateTest extends \PHPUnit_Framework_TestCase
class RateTest extends TestCase
{
/** @var Shipment */
protected $shipment;

@ -6,8 +6,9 @@ use pdt256\Shipping\Ship;
use pdt256\Shipping\Package;
use pdt256\Shipping\Shipment;
use pdt256\Shipping\Quote;
use PHPUnit\Framework\TestCase;
class RateTest extends \PHPUnit_Framework_TestCase
class RateTest extends TestCase
{
/** @var Shipment */
protected $shipment;

@ -1,7 +1,9 @@
<?php
namespace pdt256\Shipping;
class ValidatorTest extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;
class ValidatorTest extends TestCase
{
/**
* @expectedException \LogicException

Loading…
Cancel
Save