mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 23:51:25 +00:00
Further codestyle changes
This commit is contained in:
@@ -60,5 +60,4 @@ trait CanBeBought
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,7 @@ class CartItemOptions extends Collection
|
|||||||
* Get the option by the given key.
|
* Get the option by the given key.
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function __get($key)
|
public function __get($key)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ return [
|
|||||||
|
|
||||||
'decimal_point' => '.',
|
'decimal_point' => '.',
|
||||||
|
|
||||||
'thousand_separator' => ','
|
'thousand_separator' => ',',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ namespace Gloudemans\Shoppingcart\Contracts;
|
|||||||
interface InstanceIdentifier
|
interface InstanceIdentifier
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the unique identifier to load the Cart from
|
* Get the unique identifier to load the Cart from.
|
||||||
*
|
*
|
||||||
* @return int|string
|
* @return int|string
|
||||||
*/
|
*/
|
||||||
public function getInstanceIdentifier($options = null);
|
public function getInstanceIdentifier($options = null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the unique identifier to load the Cart from
|
* Get the unique identifier to load the Cart from.
|
||||||
*
|
*
|
||||||
* @return int|string
|
* @return int|string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateShoppingcartTable extends Migration
|
class CreateShoppingcartTable extends Migration
|
||||||
{
|
{
|
||||||
@@ -20,6 +20,7 @@ class CreateShoppingcartTable extends Migration
|
|||||||
$table->primary(['identifier', 'instance']);
|
$table->primary(['identifier', 'instance']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ namespace Gloudemans\Shoppingcart\Exceptions;
|
|||||||
|
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
|
||||||
class CartAlreadyStoredException extends RuntimeException {}
|
class CartAlreadyStoredException extends RuntimeException
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ namespace Gloudemans\Shoppingcart\Exceptions;
|
|||||||
|
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
|
||||||
class InvalidRowIDException extends RuntimeException {}
|
class InvalidRowIDException extends RuntimeException
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ namespace Gloudemans\Shoppingcart\Exceptions;
|
|||||||
|
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
|
||||||
class UnknownModelException extends RuntimeException {}
|
class UnknownModelException extends RuntimeException
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gloudemans\Shoppingcart\Facades;
|
namespace Gloudemans\Shoppingcart\Facades;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Facade;
|
use Illuminate\Support\Facades\Facade;
|
||||||
|
|
||||||
class Cart extends Facade {
|
class Cart extends Facade
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Get the registered name of the component.
|
* Get the registered name of the component.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ use Illuminate\Support\ServiceProvider;
|
|||||||
|
|
||||||
class ShoppingcartServiceProvider extends ServiceProvider
|
class ShoppingcartServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the service provider.
|
* Register the service provider.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace Gloudemans\Tests\Shoppingcart;
|
namespace Gloudemans\Tests\Shoppingcart;
|
||||||
|
|
||||||
use Orchestra\Testbench\TestCase;
|
|
||||||
use Gloudemans\Shoppingcart\CartItem;
|
use Gloudemans\Shoppingcart\CartItem;
|
||||||
use Gloudemans\Shoppingcart\ShoppingcartServiceProvider;
|
use Gloudemans\Shoppingcart\ShoppingcartServiceProvider;
|
||||||
|
use Orchestra\Testbench\TestCase;
|
||||||
|
|
||||||
class CartItemTest extends TestCase
|
class CartItemTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user