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