Files
shipping-portal/app/Classes/General/Helper.php
T
edmondlang e7c0e17ee4 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final
# Conflicts:
# app/Classes/Modules/Segments/ControllersLogic/UpdateConstantPostcodeLogic.php
# app/Classes/ValueObjects/Constants/TransactionType.php
# routes/api.php
# routes/web.php
2023-04-28 18:20:42 +08:00

45 lines
1001 B
PHP

<?php
namespace App\Classes\General;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
class Helper
{
/**
* @param string $methodName
* @return string
*/
static function getPropertyName(string $methodName){
return Str::snake(str_replace('get', '', $methodName));
}
/**
* @param string $className
* @return array
*/
static function getClassMethodsArray(string $className){
return array_slice(get_class_methods($className), 1);
}
/**
* @param $log
* @return none
*/
static function debugLoggerForPerfexCRM($log){
if($log){
$message = $log['message'];
$substring = 'No data were found';
if (isset($message)) {
if (strpos($message, $substring) !== false) {
// Log::info('Message exist');
} else {
Log::info($log['message']);
}
}
}
}
}