This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Finance module for HiPanel |
||
| 4 | * |
||
| 5 | * @link https://github.com/hiqdev/hipanel-module-finance |
||
| 6 | * @package hipanel-module-finance |
||
| 7 | * @license BSD-3-Clause |
||
| 8 | * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/) |
||
| 9 | */ |
||
| 10 | |||
| 11 | return [ |
||
| 12 | 'aliases' => [ |
||
| 13 | '@bill' => '/finance/bill', |
||
| 14 | '@purse' => '/finance/purse', |
||
| 15 | '@tariff' => '/finance/tariff', |
||
| 16 | '@sale' => '/finance/sale', |
||
| 17 | '@pay' => '/merchant/pay', |
||
| 18 | '@cart' => '/cart/cart', |
||
| 19 | '@finance' => '/finance', |
||
| 20 | '@plan' => '/finance/plan', |
||
| 21 | '@price' => '/finance/price', |
||
| 22 | '@tariffprofile' => '/finance/tariff-profile', |
||
| 23 | '@requisite' => '/finance/requisite', |
||
| 24 | ], |
||
| 25 | 'modules' => [ |
||
| 26 | 'finance' => [ |
||
| 27 | 'class' => \hipanel\modules\finance\Module::class, |
||
| 28 | ], |
||
| 29 | 'cart' => array_filter([ |
||
| 30 | 'class' => \hiqdev\yii2\cart\Module::class, |
||
| 31 | 'termsPage' => $params['organization.termsUrl'] ?: $params['organization.url'], |
||
| 32 | 'orderPage' => '/finance/cart/select', |
||
| 33 | 'paymentMethodsProvider' => \yii\di\Instance::of(\hipanel\modules\finance\providers\PaymentMethodsProvider::class), |
||
| 34 | 'shoppingCartOptions' => [ |
||
| 35 | 'on cartChange' => [\hipanel\modules\finance\cart\CartCalculator::class, 'handle'], |
||
| 36 | 'session' => \hipanel\modules\finance\cart\storage\CartStorageInterface::class, |
||
| 37 | ], |
||
| 38 | ]), |
||
| 39 | 'merchant' => [ |
||
| 40 | 'class' => \hiqdev\yii2\merchant\Module::class, |
||
| 41 | 'returnPage' => '/finance/pay/return', |
||
| 42 | 'notifyPage' => '/finance/pay/notify', |
||
| 43 | 'finishPage' => '/finance/bill', |
||
| 44 | 'purchaseRequestCollectionClass' => \hipanel\modules\finance\merchant\PurchaseRequestCollection::class, |
||
| 45 | 'currenciesCollectionClass' => \hipanel\modules\finance\merchant\CurrenciesCollection::class, |
||
| 46 | 'cashewOnly' => $params['module.finance.merchant.pay.cashew.only'] ?? false, |
||
| 47 | ], |
||
| 48 | ], |
||
| 49 | 'components' => [ |
||
| 50 | 'urlManager' => [ |
||
| 51 | 'rules' => [ |
||
| 52 | [ |
||
| 53 | 'pattern' => 'finance/purse/<id:\d+>/generate/monthly/<type:\w+>.<login:[.\@\w\d_]+>.<currency:\w+>.<month:[\d-]+>.pdf', |
||
| 54 | 'route' => 'finance/purse/generate-monthly-document', |
||
| 55 | ], |
||
| 56 | [ |
||
| 57 | 'pattern' => 'finance/purse/<id:\d+>/generate/<type:\w+>.<login:[.\@\w\d_]+>.<currency:\w+>.pdf', |
||
| 58 | 'route' => 'finance/purse/generate-document', |
||
| 59 | ], |
||
| 60 | [ |
||
| 61 | 'pattern' => 'finance/pay/return/<username:.+>/<merchant:[\w\d_]+>/<transactionId:[\w\d]+>', |
||
| 62 | 'route' => 'finance/pay/return', |
||
| 63 | ], |
||
| 64 | ], |
||
| 65 | ], |
||
| 66 | 'themeManager' => [ |
||
| 67 | 'pathMap' => [ |
||
| 68 | dirname(__DIR__) . '/src/views' => '$themedViewPaths', |
||
| 69 | ], |
||
| 70 | ], |
||
| 71 | 'i18n' => [ |
||
| 72 | 'translations' => [ |
||
| 73 | 'hipanel:finance' => [ |
||
| 74 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 75 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 76 | ], |
||
| 77 | 'hipanel:finance:change' => [ |
||
| 78 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 79 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 80 | ], |
||
| 81 | 'hipanel:finance:tariff' => [ |
||
| 82 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 83 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 84 | ], |
||
| 85 | 'hipanel.finance.units' => [ |
||
| 86 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 87 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 88 | ], |
||
| 89 | 'hipanel:finance:tariff:types' => [ |
||
| 90 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 91 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 92 | 'forceTranslation' => true, |
||
| 93 | ], |
||
| 94 | 'hipanel:finance:deposit' => [ |
||
| 95 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 96 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 97 | ], |
||
| 98 | 'hipanel:finance:sale' => [ |
||
| 99 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 100 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 101 | ], |
||
| 102 | 'hipanel.finance.suggestionTypes' => [ |
||
| 103 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 104 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 105 | ], |
||
| 106 | 'hipanel.finance.price' => [ |
||
| 107 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 108 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 109 | ], |
||
| 110 | 'hipanel.finance.billTypes' => [ |
||
| 111 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 112 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 113 | ], |
||
| 114 | 'hipanel.finance.plan' => [ |
||
| 115 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 116 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 117 | ], |
||
| 118 | 'hipanel.finance.tariffprofile' => [ |
||
| 119 | 'class' => \yii\i18n\PhpMessageSource::class, |
||
| 120 | 'basePath' => dirname(__DIR__) . '/src/messages', |
||
| 121 | ], |
||
| 122 | ], |
||
| 123 | ], |
||
| 124 | ], |
||
| 125 | 'container' => [ |
||
| 126 | 'definitions' => [ |
||
| 127 | \hipanel\modules\dashboard\menus\DashboardMenu::class => [ |
||
| 128 | 'add' => [ |
||
| 129 | 'finance' => [ |
||
| 130 | 'menu' => [ |
||
| 131 | 'class' => \hipanel\modules\finance\menus\DashboardItem::class, |
||
| 132 | ], |
||
| 133 | 'where' => [ |
||
| 134 | 'after' => ['clients', 'dashboard'], |
||
| 135 | 'before' => ['tickets', 'domains', 'servers', 'hosting'], |
||
| 136 | ], |
||
| 137 | ], |
||
| 138 | ], |
||
| 139 | ], |
||
| 140 | \hiqdev\thememanager\menus\AbstractSidebarMenu::class => [ |
||
| 141 | 'add' => [ |
||
| 142 | 'finance' => [ |
||
| 143 | 'menu' => \hipanel\modules\finance\menus\SidebarMenu::class, |
||
| 144 | 'where' => [ |
||
| 145 | 'after' => ['clients', 'dashboard'], |
||
| 146 | 'before' => ['tickets', 'domains', 'servers', 'hosting'], |
||
| 147 | ], |
||
| 148 | ], |
||
| 149 | ], |
||
| 150 | ], |
||
| 151 | \hiqdev\yii2\merchant\widgets\PayButton::class => [ |
||
| 152 | 'class' => \hiqdev\yii2\merchant\widgets\PayButton::class, |
||
| 153 | 'action' => ['@finance/pay/request'], |
||
| 154 | 'as commentBehavior' => [ |
||
| 155 | 'class' => \hipanel\modules\finance\behaviors\PayButtonCommentBehavior::class, |
||
| 156 | ], |
||
| 157 | ], |
||
| 158 | \hipanel\modules\finance\logic\ServerTariffCalculatorInterface::class => \hipanel\modules\finance\logic\CalculatorInterface::class, |
||
| 159 | \hipanel\modules\finance\logic\CalculatorInterface::class => \hipanel\modules\finance\logic\Calculator::class, |
||
| 160 | ], |
||
| 161 | 'singletons' => [ |
||
| 162 | hipanel\modules\finance\providers\BillTypesProvider::class => hipanel\modules\finance\providers\BillTypesProvider::class, |
||
| 163 | hiqdev\yii2\merchant\transactions\TransactionRepositoryInterface::class => hipanel\modules\finance\transaction\ApiTransactionRepository::class, |
||
| 164 | hipanel\modules\finance\logic\bill\QuantityFormatterFactoryInterface::class => hipanel\modules\finance\logic\bill\QuantityFormatterFactory::class, |
||
| 165 | hipanel\modules\finance\models\ServerResourceTypesProviderInterface::class => hipanel\modules\finance\models\ServerResourceTypesProvider::class, |
||
| 166 | hipanel\modules\finance\cart\storage\CartStorageInterface::class => function (yii\di\Container $container) { |
||
| 167 | return hipanel\modules\finance\cart\storage\CartStorageFactory::forUser($container->get(\yii\web\User::class)); |
||
| 168 | }, |
||
| 169 | \hipanel\modules\finance\models\factories\PriceModelFactory::class => \hipanel\modules\finance\models\factories\PriceModelFactory::class, |
||
| 170 | \hipanel\modules\finance\grid\presenters\price\PricePresenterFactory::class => \hipanel\modules\finance\grid\presenters\price\PricePresenterFactory::class, |
||
| 171 | \hipanel\modules\finance\widgets\FormulaHelpModal::class => \hipanel\modules\finance\widgets\FormulaHelpModal::class, |
||
| 172 | |||
| 173 | \Money\Currencies::class => function (\yii\di\Container $container) { |
||
|
0 ignored issues
–
show
|
|||
| 174 | return new \Money\Currencies\AggregateCurrencies([ |
||
| 175 | new \Money\Currencies\ISOCurrencies(), |
||
| 176 | ]); |
||
| 177 | }, |
||
| 178 | \Money\MoneyFormatter::class => function (\yii\di\Container $container) { |
||
| 179 | return new \Money\Formatter\IntlMoneyFormatter( |
||
| 180 | new NumberFormatter(Yii::$app->language, \NumberFormatter::CURRENCY), |
||
| 181 | $container->get(Money\Currencies::class) |
||
| 182 | ); |
||
| 183 | }, |
||
| 184 | \Money\MoneyParser::class => \Money\Parser\DecimalMoneyParser::class, |
||
| 185 | ], |
||
| 186 | ], |
||
| 187 | ]; |
||
| 188 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.