mirror of
https://github.com/wearepixel/laravel-cart.git
synced 2026-11-14 22:01:48 +00:00
code cleanup
This commit is contained in:
@@ -3,15 +3,15 @@ version: 2
|
|||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
target-branch: "develop"
|
target-branch: "master"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "deps"
|
||||||
- package-ecosystem: "composer"
|
- package-ecosystem: "composer"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
target-branch: "develop"
|
target-branch: "master"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "deps"
|
||||||
|
|||||||
+2
-1
@@ -2,4 +2,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
READMETODO.md
|
READMETODO.md
|
||||||
|
build
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
|
||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
colors="true"
|
colors="true"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
|
||||||
>
|
>
|
||||||
<testsuites>
|
<source>
|
||||||
<testsuite name="Unit">
|
|
||||||
<directory suffix="Test.php">./tests/Unit</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
<source>
|
|
||||||
<include>
|
<include>
|
||||||
<directory suffix=".php">./src</directory>
|
<directory suffix=".php">./src</directory>
|
||||||
</include>
|
</include>
|
||||||
</source>
|
</source>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Laravel Cart Test Suite">
|
||||||
|
<directory>tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
@@ -25,15 +25,10 @@ public static function roundMode($config): int
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if array is multi dimensional array
|
* Check if array is multi dimensional array
|
||||||
* This will only check the first element of the array if it is still an array
|
* This will only check if the first element of the array is an array
|
||||||
* to decide that it is a multi dimensional, if you want to check the array strictly
|
|
||||||
* with all on its element, flag the second argument as true
|
|
||||||
*
|
|
||||||
* @param bool $recursive
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public static function isMultiArray($array, $recursive = false)
|
public static function isMultiArray(array $array, bool $recursive = false): bool
|
||||||
{
|
{
|
||||||
if ($recursive) {
|
if ($recursive) {
|
||||||
return (count($array) == count($array, COUNT_RECURSIVE)) ? false : true;
|
return (count($array) == count($array, COUNT_RECURSIVE)) ? false : true;
|
||||||
@@ -45,8 +40,9 @@ public static function isMultiArray($array, $recursive = false)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user