Skip to content

Commit

Permalink
updating uploads helper
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Jan 5, 2024
1 parent 3aaa9fe commit f4f54db
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,4 @@ parameters:
- src/
excludePaths:
- src/**/*Example.php
ignoreErrors:
# Block templates
- '#^Variable \$attributes might not be defined\.#'
- '#^Variable \$innerBlockContent might not be defined\.#'
checkGenericClassInNonGenericObjectType: false
1 change: 0 additions & 1 deletion src/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace EightshiftFormsUtils\Helpers;

use EightshiftFormsUtils\Config\UtilsConfig;
use EightshiftFormsUtilsVendor\EightshiftLibs\Helpers\Components;
use RecursiveArrayIterator;
use RecursiveIteratorIterator;

Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/UploadHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public static function isFileFaulty(array $files): bool
*
* @return string
*/
private function getUploadFolerPath(): string
private static function getUploadFolerPath(): string
{
if (!\defined('WP_CONTENT_DIR')) {
return 'errorUploadFolderPathMissingWpContentDir';
Expand Down
4 changes: 2 additions & 2 deletions src/Helpers/UtilsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/
class UtilsHelper
{
/**
/**
* Return main manifest.json file.
*
* @return array<mixed>
*/
public static function getUtilsManifest(): array
{
$sep = \DIRECTORY_SEPARATOR;
$filePath = dirname(__FILE__, 2) . "{$sep}manifest.json";
$filePath = \dirname(__FILE__, 2) . "{$sep}manifest.json";

return \json_decode(\implode(' ', (array)\file($filePath)), true);
}
Expand Down

0 comments on commit f4f54db

Please sign in to comment.