composer update

This commit is contained in:
2019-07-02 01:51:56 +00:00
parent b4a728213d
commit ebb41422f3
616 changed files with 14708 additions and 612 deletions
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class ChartNotFound extends LavaException
{
public function __construct($type, $label)
{
$message = "$type('$label') was not found.";
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class DashboardNotFound extends LavaException
{
public function __construct($label)
{
$message = "Dashboard('$label') was not found.";
parent::__construct($message);
}
}
@@ -0,0 +1,15 @@
<?php
namespace Khill\Lavacharts\Exceptions;
use Khill\Lavacharts\Charts\Chart;
class DataTableNotFound extends LavaException
{
public function __construct(Chart $chart)
{
$message = $chart->getType() . '(' . $chart->getLabel() . ') has no DataTable.';
parent::__construct($message);
}
}
@@ -0,0 +1,15 @@
<?php
namespace Khill\Lavacharts\Exceptions;
use Khill\Lavacharts\Support\Contracts\RenderableInterface as Renderable;
class ElementIdException extends RenderingException
{
public function __construct(Renderable $renderable)
{
$message = 'Cannot render without an elementId.';
parent::__construct($renderable, $message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidBindings extends LavaException
{
public function __construct($code = 0)
{
$message = 'You must bind ControlWrappers to ChartWrappers, as singles or arrays.';
parent::__construct($message, $code);
}
}
@@ -0,0 +1,14 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidCellCount extends LavaException
{
public function __construct($cellCount, $columnCount, $code = 0)
{
$message = 'Invalid number of cells, must be less than or equal to the number of columns. ';
$message .= "(cells: $cellCount > columns: $columnCount)";
parent::__construct($message, $code);
}
}
@@ -0,0 +1,18 @@
<?php
namespace Khill\Lavacharts\Exceptions;
use Khill\Lavacharts\Charts\ChartFactory;
class InvalidChartType extends LavaException
{
public function __construct($invalidChart)
{
$badChart = (string) $invalidChart;
$message = "'$badChart' is not a valid chart type, must be one of ";
$message .= '[ ' . implode(' | ', ChartFactory::getChartTypes()) . ']';
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidChartWrapperParams extends LavaException
{
public function __construct()
{
$message = "Invalid ChartWrapper parameters, must be (Chart, string)";
parent::__construct($message);
}
}
@@ -0,0 +1,14 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidColumnDefinition extends LavaException
{
public function __construct($invalidCol)
{
$msg = gettype($invalidCol);
$msg.= " is not valid for a column definition, must be an array.";
parent::__construct($msg);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidColumnFormat extends LavaException
{
public function __construct($format)
{
parent::__construct(
'"'. (string) $format . '" is not a valid format.'
);
}
}
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidColumnIndex extends LavaException
{
public function __construct($columnIndex, $count)
{
if (is_int($columnIndex)) {
$message = $columnIndex .' is an invalid column index, must be 0 - '.($count-1).'.';
} else {
$message = gettype($columnIndex) . ' is an invalid column index, must an (int), 0 - '.($count-1).'.';
}
parent::__construct($message);
}
}
@@ -0,0 +1,21 @@
<?php
namespace Khill\Lavacharts\Exceptions;
use Khill\Lavacharts\Values\Role;
class InvalidColumnRole extends LavaException
{
public function __construct($invalidRole)
{
if (is_string($invalidRole)) {
$message = "'$invalidRole' is not a valid column role, must be one of ";
} else {
$message = gettype($invalidRole) . ' is not a valid column role, must one of ';
}
$message .= '[ ' . implode(' | ', Role::$roles) . ' ]';
parent::__construct($message);
}
}
@@ -0,0 +1,19 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidColumnType extends LavaException
{
public function __construct($invalidType, $acceptedTypes, $code = 0)
{
if (is_string($invalidType)) {
$message = "$invalidType is not a valid column type.";
} else {
$message = gettype($invalidType) . ' is not a valid column type.';
}
$message .= ' Must one of [ ' . implode(' | ', $acceptedTypes) . ' ]';
parent::__construct($message, $code);
}
}
@@ -0,0 +1,16 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidConfigProperty extends LavaException
{
public function __construct($class, $function, $rejectedProp, $acceptedProps, $code = 0)
{
natcasesort($acceptedProps);
$message = '"'.$rejectedProp.'" is not a valid property for ' . $class . '->' . $function . ', ';
$message .= 'must be one of [ ' . implode(' | ', $acceptedProps) . ' ]';
parent::__construct($message, $code);
}
}
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidConfigValue extends LavaException
{
public function __construct($function, $requiredType, $extra = '')
{
$message = "The value for $function must be of type ($requiredType).";
if ($extra !== '') {
$message .= ' ' . $extra;
}
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidControlWrapperParams extends LavaException
{
public function __construct()
{
$message = "Invalid ControlWrapper parameters, must be (Filter, string";
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidDataTable extends LavaException
{
public function __construct($InvalidDataTable = null)
{
$message = gettype($InvalidDataTable) . ' is not a valid DataTable.';
parent::__construct($message);
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidDate extends LavaException
{
public function __construct($badString)
{
$message = 'Must be a Carbon instance or a datetime string able to be parsed by Carbon.';
parent::__construct($message);
}
}
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidDateTimeFormat extends LavaException
{
public function __construct($badString)
{
if (is_string($badString) && empty($badString)) {
$message = 'Must be a non empty string which follows standard DateTime Formatting';
} else {
$message = gettype($badString) . ' is invalid, must be a datetime format string which Carbon can use.';
}
parent::__construct($message);
}
}
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidDateTimeString extends LavaException
{
public function __construct($badString)
{
if (is_string($badString) && empty($badString)) {
$message = 'Must be a non empty datetime string which Carbon can parse.';
} else {
$message = gettype($badString) . ' is invalid, must be a datetime string which Carbon can parse.';
}
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidDivDimensions extends LavaException
{
public function __construct($code = 0)
{
$message = "Invalid div dimensions, array('height' => (int), 'width' => (int))";
parent::__construct($message, $code);
}
}
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidElementId extends LavaException
{
public function __construct($invalidElementId = '', $code = 0)
{
if (is_string($invalidElementId)) {
$message = 'ElementIds cannot be blank, must be a non-empty string.';
} else {
$message = gettype($invalidElementId) . ' is not a valid HTML element ID, must be a non-empty string.';
}
parent::__construct($message, $code);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidFilterParam extends LavaException
{
public function __construct($badParam)
{
$message = '(' . gettype($badParam) . ') is not a valid Filter parameter.';
parent::__construct($message);
}
}
@@ -0,0 +1,21 @@
<?php
namespace Khill\Lavacharts\Exceptions;
use Khill\Lavacharts\Dashboards\Filters\FilterFactory;
class InvalidFilterType extends LavaException
{
public function __construct($invalidFilter)
{
if (is_string($invalidFilter)) {
$message = $invalidFilter;
} else {
$message = gettype($invalidFilter);
}
$message .= ' is not a valid filter, must be one of [ ' . implode(' | ', FilterFactory::$FILTER_TYPES) . ']';
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidFormatType extends LavaException
{
public function __construct($badType)
{
$message = (string) $badType . ' is not a valid format';
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidFunctionParam extends LavaException
{
public function __construct($badParam, $function, $requiredParam)
{
parent::__construct(
gettype($badParam) . " is not a valid value for $function, must be of type $requiredParam"
);
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidJson extends LavaException
{
public function __construct()
{
parent::__construct("There was an error decoding the JSON.");
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidLabel extends LavaException
{
public function __construct($invalidLabel = '')
{
if (is_string($invalidLabel)) {
$message = 'Labels cannot be blank, must be a non-empty string.';
} else {
$message = gettype($invalidLabel) . ' is not a valid label, must be a non-empty string.';
}
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidLavaObject extends LavaException
{
public function __construct($badLavaObject, $code = 0)
{
$message = "'$badLavaObject' is not a valid Lavachart object.";
parent::__construct($message, $code);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidOptions extends LavaException
{
public function __construct($invalidOptions)
{
$type = gettype($invalidOptions);
parent::__construct("Cannot create options with ($type), must be an array");
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidParamType extends LavaException
{
public function __construct($invalid, $expected)
{
$message = 'Parameter of type ' . $expected . ' was expected, got ' . gettype($invalid) . ' instead';
parent::__construct($message);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidRowDefinition extends LavaException
{
public function __construct($invalidRow, $code = 0)
{
$message = gettype($invalidRow) . " is an invalid row definition, must be of type (null|array).";
parent::__construct($message, $code);
}
}
@@ -0,0 +1,13 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidRowProperty extends LavaException
{
public function __construct()
{
$message = 'Invalid row property, array with keys type (string) with values [ v | f | p ] ';
parent::__construct($message, 0);
}
}
@@ -0,0 +1,11 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidStringValue extends LavaException
{
public function __construct()
{
parent::__construct('Invalid argument, must be a non-empty string.');
}
}
@@ -0,0 +1,17 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidTimeZone extends LavaException
{
public function __construct($badZone)
{
if (is_string($badZone)) {
$message = "$badZone is not a valid timezone.";
} else {
$message = gettype($badZone) . ' is not a valid timezone.';
}
parent::__construct($message);
}
}
@@ -0,0 +1,16 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class InvalidUIProperty extends LavaException
{
public function __construct($rejectedProp, $acceptedProps)
{
natcasesort($acceptedProps);
$message = $rejectedProp . ' is not a valid UI property.';
$message .= ' Must be one of [ ' . implode(' | ', $acceptedProps) . ' ]';
parent::__construct($message);
}
}
@@ -0,0 +1,8 @@
<?php
namespace Khill\Lavacharts\Exceptions;
class LavaException extends \Exception
{
//
}
@@ -0,0 +1,21 @@
<?php
namespace Khill\Lavacharts\Exceptions;
use Khill\Lavacharts\Support\Contracts\RenderableInterface as Renderable;
class RenderingException extends LavaException
{
public function __construct(Renderable $renderable, $message = '')
{
$renderErrMsg = $renderable->getLabelStr() . ' cannot be rendered.';
if (!empty($message)) {
$message = $renderErrMsg . ' ' . $message;
} else {
$message = $renderErrMsg;
}
parent::__construct($message);
}
}