Changeset 3317812
- Timestamp:
- 06/25/2025 05:41:44 PM (9 months ago)
- Location:
- shipment-tracker-for-woocommerce/trunk
- Files:
-
- 10 added
- 47 edited
-
README.txt (modified) (3 diffs)
-
admin/js/bt-sync-shipment-tracking-admin.js (modified) (2 diffs)
-
admin/partials/bt-st-buy-credits-popup.php (modified) (1 diff)
-
bt-sync-shipment-tracking.php (modified) (2 diffs)
-
composer.lock (modified) (6 diffs)
-
includes/class-bt-sync-shipment-tracking.php (modified) (6 diffs)
-
public/class-bt-sync-shipment-tracking-public.php (modified) (19 diffs)
-
public/css/bt-sync-shipment-tracking-primery-template-form-2.css (modified) (1 diff)
-
vendor/composer/ClassLoader.php (modified) (27 diffs)
-
vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
vendor/composer/installed.json (modified) (6 diffs)
-
vendor/composer/installed.php (modified) (4 diffs)
-
vendor/composer/platform_check.php (modified) (1 diff)
-
vendor/htmlburger/carbon-fields/config.php (modified) (1 diff)
-
vendor/htmlburger/carbon-fields/core/Container/Block_Container.php (modified) (1 diff)
-
vendor/htmlburger/carbon-fields/core/Service/Meta_Query_Service.php (modified) (1 diff)
-
vendor/htmlburger/carbon-fields/package.json (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/.github (added)
-
vendor/php-units-of-measure/php-units-of-measure/.github/workflows (added)
-
vendor/php-units-of-measure/php-units-of-measure/.github/workflows/ci.yaml (added)
-
vendor/php-units-of-measure/php-units-of-measure/.gitignore (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/CHANGELOG.md (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/Dockerfile (added)
-
vendor/php-units-of-measure/php-units-of-measure/README.md (modified) (4 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/composer.json (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/scripts (added)
-
vendor/php-units-of-measure/php-units-of-measure/scripts/lint (added)
-
vendor/php-units-of-measure/php-units-of-measure/scripts/shell (added)
-
vendor/php-units-of-measure/php-units-of-measure/scripts/test (added)
-
vendor/php-units-of-measure/php-units-of-measure/source/AbstractPhysicalQuantity.php (modified) (5 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/source/PhysicalQuantity/Power.php (added)
-
vendor/php-units-of-measure/php-units-of-measure/source/PhysicalQuantity/Volume.php (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/source/PhysicalQuantityInterface.php (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/tests/AbstractPhysicalQuantityTest.php (modified) (24 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/DemonstrationTests.php (modified) (10 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/Fixtures/PhysicalQuantity/Wigginess.php (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/tests/Fixtures/PhysicalQuantity/Wonkicity.php (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/tests/Fixtures/PhysicalQuantity/Woogosity.php (modified) (1 diff)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AbstractPhysicalQuantityTestCase.php (modified) (3 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AccelerationTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AngleTest.php (modified) (3 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AreaTest.php (modified) (5 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/ElectricCurrentTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/EnergyTest.php (modified) (5 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/LengthTest.php (modified) (6 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/LuminousIntensityTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/MassTest.php (modified) (5 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/PowerTest.php (added)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/PressureTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/QuantityTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/SolidAngleTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/TemperatureTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/TimeTest.php (modified) (8 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/VelocityTest.php (modified) (5 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/VolumeTest.php (modified) (2 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/UnitOfMeasureTest.php (modified) (12 diffs)
-
vendor/php-units-of-measure/php-units-of-measure/tests/phpunit.xml.dist (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shipment-tracker-for-woocommerce/trunk/README.txt
r3292239 r3317812 43 43 Eliminate the need for multiple plugins with our Swiss army knife for shipment tracking. Manage everything in one place. 44 44 45 ### Inbuilt SMS and Email Functionality45 ### Inbuilt SMS, WhatsApp and Email Functionality 46 46 47 47 Send tracking updates directly to your customers via SMS and email. … … 73 73 74 74 75 - **SMS & Email Notifications:**75 - **SMS, WhatsApp & Email Notifications:** 76 76 77 77 78 78 >- **Easily integrates with WooCommerce's default email** system to provide real-time tracking updates. 79 79 80 >- **Send tracking updates** via SMS, Email, or WhatsApp (coming soon).80 >- **Send tracking updates** via SMS, Email, or WhatsApp. 81 81 82 82 >- Global SMS service availability. … … 414 414 9. Custom development assistance. 415 415 416 10. Priority phone and ticket based support. 416 10. Priority phone and ticket based support. 417 418 11. Branded SMS & WhatsApp messaging. 417 419 418 420 ## Compatibility -
shipment-tracker-for-woocommerce/trunk/admin/js/bt-sync-shipment-tracking-admin.js
r3308462 r3317812 1168 1168 var checkbox2 = document.getElementById('checkbox2'); 1169 1169 var mobile_no = document.getElementById('register_mobile_number').value; 1170 if ( !checkbox1.checked || !checkbox2.checked ||mobile_no === '') {1171 alert('Please check both checkboxes to proceed and enter your mobile number.');1170 if (mobile_no === '') { 1171 alert('Please enter your mobile number to proceed.'); 1172 1172 } 1173 1173 else { … … 1265 1265 $(document).on('submit', '#bt_buy_sms_form', function (e) { 1266 1266 var qty = $('#bt_sms_input_credits_buy').val(); 1267 if (qty < 2000) {1267 if (qty < 1000) { 1268 1268 e.preventDefault(); 1269 alert("Minimum purchase of 2000 credits are required.");1269 alert("Minimum purchase of 1000 credits are required."); 1270 1270 } 1271 1271 -
shipment-tracker-for-woocommerce/trunk/admin/partials/bt-st-buy-credits-popup.php
r3299743 r3317812 32 32 <input type="hidden" name="apikey" value="<?php echo esc_html($api); ?>" /> 33 33 <p class="is-size-6" for="quantity">No. of Credits:</p> 34 <input id="bt_sms_input_credits_buy" value="" class="input is-medium mb-2" required type="number" name="quantity" maxlength="7" min=" 2000" max="200000" placeholder="Enter quantity"/><br>34 <input id="bt_sms_input_credits_buy" value="" class="input is-medium mb-2" required type="number" name="quantity" maxlength="7" min="1000" max="200000" placeholder="Enter quantity"/><br> 35 35 <p class="is-size-6" >Price per Credit:</p> 36 36 <p id="bt_sms_price_per_credit" class="is-size-5 pb-2" >-</p> -
shipment-tracker-for-woocommerce/trunk/bt-sync-shipment-tracking.php
r3308462 r3317812 17 17 * Plugin URI: https://shipment-tracker-for-woocommerce.bitss.tech/ 18 18 * Description: Most comprehensive shipment tracking plugin that extends your woocommerce store with shipment related features. Keeps you & your customers informed about shipment movement. 19 * Version: 1.4.24.1 519 * Version: 1.4.24.16 20 20 * Author: Bitss Techniques 21 21 * Author URI: https://shipment-tracker-for-woocommerce.bitss.tech … … 59 59 60 60 define( 'Carbon_Fields\URL', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'vendor/htmlburger/carbon-fields/' );//fix for Bitnami installations. 61 define( 'BT_SYNC_SHIPMENT_TRACKING_VERSION', '1.4.24.1 5' );61 define( 'BT_SYNC_SHIPMENT_TRACKING_VERSION', '1.4.24.16' ); 62 62 define( 'BT_SHIPPING_PROVIDERS', array('delhivery' =>'Delhivery','nimbuspost' => 'Nimbuspost (Deprecated)','nimbuspost_new' => 'Nimbuspost','shipmozo'=>'Shipmozo','shiprocket' => 'Shiprocket', 'xpressbees' => 'Xpressbees', 'manual' =>'Custom Shipping') ); 63 63 define( 'BT_SHIPPING_PROVIDERS_WITH_NONE', array('none' =>'none','delhivery' =>'Delhivery', 'nimbuspost' => 'Nimbuspost (OLD)','nimbuspost_new' => 'Nimbuspost(NEW)','shipmozo'=>'Shipmozo','shiprocket' => 'Shiprocket', 'xpressbees' => 'Xpressbees','manual' =>'Custom Shipping') ); -
shipment-tracker-for-woocommerce/trunk/composer.lock
r3292239 r3317812 9 9 { 10 10 "name": "htmlburger/carbon-fields", 11 "version": "v3.6. 6",11 "version": "v3.6.9", 12 12 "source": { 13 13 "type": "git", 14 14 "url": "https://github.com/htmlburger/carbon-fields.git", 15 "reference": " 9cb536e775f3c0688e18fca39445326521197220"15 "reference": "f82e80e3e3469d6e86cc17a8950b918ad448a059" 16 16 }, 17 17 "dist": { 18 18 "type": "zip", 19 "url": "https://api.github.com/repos/htmlburger/carbon-fields/zipball/ 9cb536e775f3c0688e18fca39445326521197220",20 "reference": " 9cb536e775f3c0688e18fca39445326521197220",19 "url": "https://api.github.com/repos/htmlburger/carbon-fields/zipball/f82e80e3e3469d6e86cc17a8950b918ad448a059", 20 "reference": "f82e80e3e3469d6e86cc17a8950b918ad448a059", 21 21 "shasum": "" 22 22 }, … … 145 145 "source": "https://github.com/htmlburger/carbon-fields" 146 146 }, 147 "time": "2025-0 4-17T11:56:23+00:00"147 "time": "2025-06-11T11:23:23+00:00" 148 148 }, 149 149 { 150 150 "name": "php-units-of-measure/php-units-of-measure", 151 "version": "v2. 1.0",151 "version": "v2.2.0", 152 152 "source": { 153 153 "type": "git", 154 154 "url": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure.git", 155 "reference": " 25f476e9c50e11af8cf044d22ffc271c96aa5248"155 "reference": "cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1" 156 156 }, 157 157 "dist": { 158 158 "type": "zip", 159 "url": "https://api.github.com/repos/PhpUnitsOfMeasure/php-units-of-measure/zipball/ 25f476e9c50e11af8cf044d22ffc271c96aa5248",160 "reference": " 25f476e9c50e11af8cf044d22ffc271c96aa5248",159 "url": "https://api.github.com/repos/PhpUnitsOfMeasure/php-units-of-measure/zipball/cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1", 160 "reference": "cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1", 161 161 "shasum": "" 162 162 }, 163 163 "require": { 164 "php": ">= 5.4.0"164 "php": ">=7.4" 165 165 }, 166 166 "replace": { … … 168 168 }, 169 169 "require-dev": { 170 "phpunit/phpunit": " 4.8.*",171 "squizlabs/php_codesniffer": " 2.2.*"170 "phpunit/phpunit": "^9.5", 171 "squizlabs/php_codesniffer": "^3.7" 172 172 }, 173 173 "type": "library", … … 184 184 { 185 185 "name": "Jonathan Hanson", 186 "email": "[email protected]",187 "homepage": "http://www.jonathan-hanson.org/",188 186 "role": "Developer" 189 187 } … … 197 195 ], 198 196 "support": { 199 "email": "[email protected]",200 197 "issues": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure/issues", 201 198 "source": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure" 202 199 }, 203 "time": "20 16-07-24T22:36:00+00:00"200 "time": "2025-04-30T23:02:43+00:00" 204 201 } 205 202 ], … … 212 209 "platform": [], 213 210 "platform-dev": [], 214 "plugin-api-version": "2. 3.0"211 "plugin-api-version": "2.6.0" 215 212 } -
shipment-tracker-for-woocommerce/trunk/includes/class-bt-sync-shipment-tracking.php
r3308462 r3317812 645 645 if(empty($api)){ 646 646 $register_for_sms_form = ' 647 <div class="is-overlay" style="background: #202020d4;"> 648 <div class="container" style="display: flex; flex-direction: column; align-items: center;justify-content: center;height:100%;"> 649 <div class="field is-horizontal" style="width: 100%; max-width: 600px;"> 650 <div class="field-body" style="width: 100%;"> 651 <div class="field" style="width: 100%;"> 652 <div class="control"> 653 <label class="checkbox" style="width: 100%; color: white;font-size:12px;"> 654 <input type="checkbox" id="checkbox1"> 655 I agree to the terms & conditions and authorize "Bitss Techniques" to send SMS/WhatsApp on my behalf. 656 </label> 657 </div> 647 <div class="is-overlay" style="background:rgba(0, 0, 0, 0.80);"> 648 <div class="panel is-info" style="background-color:white;max-width: 600px; margin: -10px auto;"> 649 <p class="panel-heading"> 650 Register for SMS/WhatsApp Messaging 651 </p> 652 <div class="panel-block" style="flex-direction: column; align-items: stretch;"> 653 <div class="panel-block" style="flex-direction: column; align-items: stretch;"> 654 <div class="notification is-info is-light mb-3" style="font-size: 15px;"> 655 <strong>Why Register?</strong> 656 <ul style="margin-left: 1.2em; list-style: disc; font-size: 14px;"> 657 <li>Enable SMS & WhatsApp order updates for your customers</li> 658 <li>Reduce support queries & improve satisfaction</li> 659 <li>Quick, free registration</li> 660 </ul> 661 </div> 662 <div class="field is-grouped" style="width:100%;"> 663 <p class="control is-expanded"> 664 <input style="display:none" checked="checked" type="checkbox" id="checkbox1"> 665 <input style="display:none" checked="checked" type="checkbox" id="checkbox2"> 666 667 <input type="text" id="register_mobile_number" class="input is-medium" placeholder="Mobile number with country code" style="height: 44px;"> 668 </p> 669 <p class="control"> 670 <button type="button" class="button is-info is-medium" id="register_get_api_key" style="height: 44px;"> 671 Register 672 </button> 673 </p> 674 </div> 675 <div id="register_get_api_key_test_connection_modal" class="modal"> 676 <div class="modal-background"></div> 677 <div class="modal-card"> 678 <header class="modal-card-head"> 679 <p id="register_get_api_key_tc-m-content" class="modal-content"></p> 680 </header> 658 681 </div> 659 682 </div> 660 </div> 661 <div class="field is-horizontal" style="width: 100%; max-width: 600px;"> 662 <div class="field-body" style="width: 100%;"> 663 <div class="field" style="width: 100%;"> 664 <div class="control"> 665 <label class="checkbox" style="width: 100%; color: white;font-size:12px;"> 666 <input type="checkbox" id="checkbox2"> 667 I understand that misuse of the service will lead to immediate termination of account. 668 </label> 669 </div> 670 </div> 683 <div class="panel-block" style="font-size:12px; margin-top: 8px;"> 684 By registering, you authorize Bitss Techniques to send SMS/WhatsApp on your behalf. Misuse will lead to termination. 671 685 </div> 672 686 </div> 673 <div class="field is-horizontal" style="width: 100%; max-width: 600px; text-align: center;">674 <div class="field-body" style="width: 100%;">675 <div class="field" style="width: 100%;">676 <div class="control">677 <input type="text" id="register_mobile_number" class="p-2" style="font-size: 16px;" placeholder="Enter mobile number">678 <button type="button" class=" button is-medium" id="register_get_api_key" style="" >679 Click Here to Register for SMS/WhatsApp680 </button>681 <div id="register_get_api_key_test_connection_modal" class="modal">682 <div class="modal-background"></div>683 <div class="modal-card">684 <header class="modal-card-head">685 <p id="register_get_api_key_tc-m-content" class="modal-content"></p>686 687 </header>688 </div>689 </div>690 </div>691 </div>692 </div>693 687 </div> 694 688 </div> 689 </div> 695 690 </div> 696 691 '; … … 801 796 <div class="control"> 802 797 <button type="button" class=" button is-medium" id="get_sms_trial" style="width: 100%;" > 803 Send SMS798 Send 804 799 </button> 805 800 <div id="get_sms_trial_test_connection_modal" class="modal"> … … 817 812 </div> 818 813 </div> 819 <p class="help is-info">Enter your mobile number with country code. Eg: +91 94622 42982 <br>We will send an sms of selected event to your mobile number.<br> 820 Supported Countries: <b>All</b></p> 814 <p class="help is-info">Enter your mobile number with country code. Eg: +91 94622 42982 <br> 815 Upgrade to Premium to send SMS Messages using your own brand name. <br> 816 Supported Countries: <b>All</b><br> 817 818 </p> 821 819 </div> 822 820 ' ), … … 845 843 <div class="control"> 846 844 <button type="button" class=" button is-medium" id="get_whatsapp_trial" style="width: 100%;" > 847 Send WhatsApp845 Send 848 846 </button> 849 847 <div id="get_whatsapp_trial_test_connection_modal" class="modal"> … … 861 859 </div> 862 860 </div> 863 <p class="help is-info">Enter your mobile number with country code. Eg: +91 94622 42982 <br>We will send an WhatsApp of selected event to your mobile number.<br> 861 <p class="help is-info">Enter your mobile number with country code. Eg: +91 94622 42982 <br> 862 Upgrade to Premium to Send WhatsApp messages using your own brand name. <br> 864 863 Supported Countries: <b>All</b></p> 865 864 </div> … … 910 909 <h3 class="title is-5">Note:</h3> 911 910 <h4 class="title is-6">SMS/WhatsApp are chargeable and requires registration. You can buy messaging credits from within this plugin.</h4> 912 <h4 class="title is-6">S ms/WhatsApp messages are sent using pre-approved, co-branded DLT/Meta templates. For sending fully branded sms using your sender id,<a target="_blank" href="https://billing.bitss.tech/index.php?fuse=support&controller=ticket&view=submitticket">pls raise a support ticket</a>.</h4>911 <h4 class="title is-6">SMS/WhatsApp messages are sent using pre-approved, co-branded DLT/Meta templates. For sending fully branded sms using your brand name, upgrade to Premium & then <a target="_blank" href="https://billing.bitss.tech/index.php?fuse=support&controller=ticket&view=submitticket">pls raise a support ticket</a>.</h4> 913 912 <h4 class="title is-6">Need a Full Featured SMS Panel for advanced SMS Messaging? <a target="_blank" href="https://smsapi.bitss.tech">Signup here for fast, reliable & cost effective sms service.</a></h4> 914 913 <h4 class="title is-6">Emails are free and are sent using your own server. Email template can be customized from <a target="_blank" href="/wp-admin/admin.php?page=wc-settings&tab=email§ion=bt_sst_wc_shipment_email">woocommerce email settings</a>.</h4> -
shipment-tracker-for-woocommerce/trunk/public/class-bt-sync-shipment-tracking-public.php
r3308462 r3317812 357 357 } 358 358 359 function getDaysDifferenceFromToday($date) 360 { 361 try { 362 // Attempt to create DateTime object from the input 363 $givenDate = new DateTime($date); 364 $currentDate = new DateTime(); 365 366 $interval = $currentDate->diff($givenDate); 367 return (int)$interval->format('%r%a'); // returns signed number of days 368 } catch (Exception $e) { 369 // Handle invalid date format 370 return null; // or you could return a specific error message or code 371 } 372 } 373 359 374 function addDayswithdate($date, $days) 360 375 { … … 1056 1071 $shippingTimeline = ob_get_clean(); 1057 1072 1073 $edd_variables = array( 1074 'bt_sst_message_text_template' => $bt_sst_message_text_template, 1075 'min_date' => $min_date, 1076 'max_date' => $max_date, 1077 'delivery_pincode' => $delivery_pincode, 1078 'city' => $city, 1079 'min_date_charges' => $min_date_charges, 1080 'max_date_charges' => $max_date_charges, 1081 'cut_off_time' => $cut_of_time, 1082 'processing_time' => $processing_time, 1083 'shipping_timeline_html' => $shippingTimeline 1084 ); 1085 1086 $edd_variables = apply_filters('bt_edd_variables', $edd_variables,$product_id ); 1087 1088 $bt_sst_message_text_template = $edd_variables['bt_sst_message_text_template']; 1089 $min_date = $edd_variables['min_date']; 1090 $max_date = $edd_variables['max_date']; 1091 $delivery_pincode = $edd_variables['delivery_pincode']; 1092 $city = $edd_variables['city']; 1093 $min_date_charges = $edd_variables['min_date_charges']; 1094 $max_date_charges = $edd_variables['max_date_charges']; 1095 $cut_of_time = $edd_variables['cut_off_time']; 1096 $processing_time = $edd_variables['processing_time']; 1097 $shippingTimeline = $edd_variables['shipping_timeline_html']; 1098 1099 1100 1058 1101 $message_text_template = $this->update_message_text_template($bt_sst_message_text_template, $min_date, $max_date, $delivery_pincode, $city, $min_date_charges, $max_date_charges, $cut_of_time, $edit_postcode, $processing_time, $shippingTimeline); 1102 1103 $message_text_template = apply_filters('bt_edd_message_text', $message_text_template, $edd_variables , $product_id); 1059 1104 1060 1105 $response = array( … … 1415 1460 $WC_Shipping_Rate->add_meta_data('bt_sst_courier_company_name', $courier_name); 1416 1461 $WC_Shipping_Rate->add_meta_data('bt_sst_shipment_provider', 'generic'); 1417 1462 $bt_sst_shipping_duration_days = 1; 1463 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1418 1464 $rates[$id] = $WC_Shipping_Rate; 1419 1465 } … … 1520 1566 $WC_Shipping_Rate->set_cost($cost); 1521 1567 $WC_Shipping_Rate->set_instance_id($id); 1568 $bt_sst_shipping_duration_days = 4; // set default of 4 days 1569 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1570 1522 1571 // $WC_Shipping_Rate->set_taxes($texes); 1523 1572 … … 1559 1608 $delivery_date = ''; 1560 1609 $show_delivery_date = carbon_get_theme_option("bt_sst_show_delivery_date"); 1610 $bt_sst_shipping_duration_days = null; 1561 1611 if ($show_delivery_date == 1) { 1562 1612 $processing_days = $this->bt_get_processing_days();//first try to get at product or category level. … … 1570 1620 } 1571 1621 $d = $this->addDayswithdate($rb['etd'], $processing_days); 1622 $bt_sst_shipping_duration_days = $this->getDaysDifferenceFromToday($rb['etd']); 1572 1623 $delivery_date = " (Edd: " . $d . ")"; 1573 1624 } … … 1585 1636 $WC_Shipping_Rate->add_meta_data('bt_sst_sr_courier_company_name', $rb['courier_name']); 1586 1637 $WC_Shipping_Rate->add_meta_data('bt_sst_shipment_provider', 'shiprocket'); 1587 1638 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1588 1639 $rates[$id] = $WC_Shipping_Rate; 1589 1640 } … … 1610 1661 $delivery_date = ''; 1611 1662 $show_delivery_date = carbon_get_theme_option("bt_sst_show_delivery_date"); 1663 $bt_sst_shipping_duration_days = null; 1612 1664 if ($show_delivery_date == 1) { 1613 1665 $processing_days = carbon_get_theme_option("bt_sst_shipment_processing_days"); … … 1618 1670 $min_date = explode("-", $etd)[0]; 1619 1671 $max_date = explode("-", $etd)[1]; 1620 1672 $bt_sst_shipping_duration_days = $this->getDaysDifferenceFromToday($min_date); 1621 1673 $min_date = $this->addDayswithdate($min_date, $processing_days); 1622 1674 $max_date = $this->addDayswithdate($max_date, $processing_days); … … 1636 1688 $WC_Shipping_Rate->add_meta_data('bt_sst_sr_courier_company_name', $rb['courier_name']); 1637 1689 $WC_Shipping_Rate->add_meta_data('bt_sst_shipment_provider', 'shiprocket'); 1638 1690 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1639 1691 $rates[$id] = $WC_Shipping_Rate; 1640 1692 } … … 1728 1780 $WC_Shipping_Rate->set_cost($cost); 1729 1781 $WC_Shipping_Rate->set_instance_id($id); 1782 $bt_sst_shipping_duration_days = 4; // set default of 4 days 1783 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1730 1784 // $WC_Shipping_Rate->set_taxes($texes); 1731 1785 … … 1763 1817 $delivery_date = ''; 1764 1818 $show_delivery_date = carbon_get_theme_option("bt_sst_show_delivery_date"); 1819 $bt_sst_shipping_duration_days = null; // set default of 4 days 1765 1820 if ($show_delivery_date == 1) { 1766 1821 $processing_days = $this->bt_get_processing_days();//first try to get at product or category level. … … 1777 1832 preg_match('/\d+/', $input, $matches); 1778 1833 $days = intval($matches[0]); 1834 $bt_sst_shipping_duration_days = $days; 1779 1835 $interval = new DateInterval("P{$days}D"); 1780 1836 $currentDate->add($interval); … … 1796 1852 $WC_Shipping_Rate->set_instance_id($id); 1797 1853 $WC_Shipping_Rate->set_taxes($texes); 1854 1855 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1798 1856 $WC_Shipping_Rate->add_meta_data('bt_sst_courier_company_id', $rb['id']); 1799 1857 $WC_Shipping_Rate->add_meta_data('bt_sst_courier_company_name', $rb['name']); … … 1893 1951 $WC_Shipping_Rate->set_instance_id($id); 1894 1952 // $WC_Shipping_Rate->set_taxes($texes); 1895 1953 $bt_sst_shipping_duration_days = 4; // set default of 4 days 1954 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1896 1955 $rates[$id] = $WC_Shipping_Rate; 1897 1956 } … … 1949 2008 $WC_Shipping_Rate->set_instance_id($id); 1950 2009 $WC_Shipping_Rate->set_taxes($texes); 2010 $bt_sst_shipping_duration_days = 4; // set default of 4 days 2011 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 1951 2012 $WC_Shipping_Rate->add_meta_data('bt_sst_courier_company_id', $rb['id']); 1952 2013 $WC_Shipping_Rate->add_meta_data('bt_sst_courier_company_name', $rb['name']); … … 2047 2108 $WC_Shipping_Rate->set_cost($cost); 2048 2109 $WC_Shipping_Rate->set_instance_id($id); 2110 $bt_sst_shipping_duration_days = 4; // set default of 4 days 2111 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 2049 2112 // $WC_Shipping_Rate->set_taxes($texes); 2050 2113 … … 2077 2140 2078 2141 $lable = "Delhivery " . ucfirst($rb['mode']); 2142 $bt_sst_shipping_duration_days = null; 2079 2143 if (isset($rb['tat']) && $rb['tat'] != null) { 2080 2144 $lable .= " / " . $rb['tat'] . ($rb['tat'] > 1 ? " days " : " day"); 2145 $bt_sst_shipping_duration_days = $rb['tat']; 2081 2146 } 2082 2147 $id = 'flat_rate:delhivery:' . $rb['mode']; … … 2124 2189 $WC_Shipping_Rate->add_meta_data('bt_sst_courier_company_name', $lable); 2125 2190 $WC_Shipping_Rate->add_meta_data('bt_sst_shipment_provider', 'delhivery'); 2126 2191 $WC_Shipping_Rate->add_meta_data('bt_sst_shipping_duration_days', $bt_sst_shipping_duration_days); 2127 2192 $rates[$id] = $WC_Shipping_Rate; 2128 2193 } -
shipment-tracker-for-woocommerce/trunk/public/css/bt-sync-shipment-tracking-primery-template-form-2.css
r3284690 r3317812 33 33 height: unset; 34 34 line-height: unset; 35 margin: 0; 35 36 } 36 37 -
shipment-tracker-for-woocommerce/trunk/vendor/composer/ClassLoader.php
r3267231 r3317812 46 46 private static $includeFile; 47 47 48 /** @var ?string*/48 /** @var string|null */ 49 49 private $vendorDir; 50 50 51 51 // PSR-4 52 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 55 54 */ 56 55 private $prefixLengthsPsr4 = array(); 57 56 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 60 58 */ 61 59 private $prefixDirsPsr4 = array(); 62 60 /** 63 * @var array[] 64 * @psalm-var array<string, string> 61 * @var list<string> 65 62 */ 66 63 private $fallbackDirsPsr4 = array(); … … 68 65 // PSR-0 69 66 /** 70 * @var array[] 71 * @psalm-var array<string, array<string, string[]>> 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 72 72 */ 73 73 private $prefixesPsr0 = array(); 74 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 75 * @var list<string> 77 76 */ 78 77 private $fallbackDirsPsr0 = array(); … … 82 81 83 82 /** 84 * @var string[] 85 * @psalm-var array<string, string> 83 * @var array<string, string> 86 84 */ 87 85 private $classMap = array(); … … 91 89 92 90 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 91 * @var array<string, bool> 95 92 */ 96 93 private $missingClasses = array(); 97 94 98 /** @var ?string*/95 /** @var string|null */ 99 96 private $apcuPrefix; 100 97 101 98 /** 102 * @var self[]99 * @var array<string, self> 103 100 */ 104 101 private static $registeredLoaders = array(); 105 102 106 103 /** 107 * @param ?string$vendorDir104 * @param string|null $vendorDir 108 105 */ 109 106 public function __construct($vendorDir = null) … … 114 111 115 112 /** 116 * @return string[]113 * @return array<string, list<string>> 117 114 */ 118 115 public function getPrefixes() … … 126 123 127 124 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 130 126 */ 131 127 public function getPrefixesPsr4() … … 135 131 136 132 /** 137 * @return array[] 138 * @psalm-return array<string, string> 133 * @return list<string> 139 134 */ 140 135 public function getFallbackDirs() … … 144 139 145 140 /** 146 * @return array[] 147 * @psalm-return array<string, string> 141 * @return list<string> 148 142 */ 149 143 public function getFallbackDirsPsr4() … … 153 147 154 148 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 157 150 */ 158 151 public function getClassMap() … … 162 155 163 156 /** 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 166 158 * 167 159 * @return void … … 180 172 * appending or prepending to the ones previously set for this prefix. 181 173 * 182 * @param string $prefix The prefix183 * @param string[]|string $paths The PSR-0 root directories184 * @param bool $prepend Whether to prepend the directories174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 185 177 * 186 178 * @return void … … 188 180 public function add($prefix, $paths, $prepend = false) 189 181 { 182 $paths = (array) $paths; 190 183 if (!$prefix) { 191 184 if ($prepend) { 192 185 $this->fallbackDirsPsr0 = array_merge( 193 (array)$paths,186 $paths, 194 187 $this->fallbackDirsPsr0 195 188 ); … … 197 190 $this->fallbackDirsPsr0 = array_merge( 198 191 $this->fallbackDirsPsr0, 199 (array)$paths192 $paths 200 193 ); 201 194 } … … 206 199 $first = $prefix[0]; 207 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 208 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 209 202 210 203 return; … … 212 205 if ($prepend) { 213 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 214 (array)$paths,207 $paths, 215 208 $this->prefixesPsr0[$first][$prefix] 216 209 ); … … 218 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 219 212 $this->prefixesPsr0[$first][$prefix], 220 (array)$paths213 $paths 221 214 ); 222 215 } … … 227 220 * appending or prepending to the ones previously set for this namespace. 228 221 * 229 * @param string $prefix The prefix/namespace, with trailing '\\'230 * @param string[]|string $paths The PSR-4 base directories231 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 232 225 * 233 226 * @throws \InvalidArgumentException … … 237 230 public function addPsr4($prefix, $paths, $prepend = false) 238 231 { 232 $paths = (array) $paths; 239 233 if (!$prefix) { 240 234 // Register directories for the root namespace. 241 235 if ($prepend) { 242 236 $this->fallbackDirsPsr4 = array_merge( 243 (array)$paths,237 $paths, 244 238 $this->fallbackDirsPsr4 245 239 ); … … 247 241 $this->fallbackDirsPsr4 = array_merge( 248 242 $this->fallbackDirsPsr4, 249 (array)$paths243 $paths 250 244 ); 251 245 } … … 257 251 } 258 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 259 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 260 254 } elseif ($prepend) { 261 255 // Prepend directories for an already registered namespace. 262 256 $this->prefixDirsPsr4[$prefix] = array_merge( 263 (array)$paths,257 $paths, 264 258 $this->prefixDirsPsr4[$prefix] 265 259 ); … … 268 262 $this->prefixDirsPsr4[$prefix] = array_merge( 269 263 $this->prefixDirsPsr4[$prefix], 270 (array)$paths264 $paths 271 265 ); 272 266 } … … 277 271 * replacing any others previously set for this prefix. 278 272 * 279 * @param string $prefix The prefix280 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 281 275 * 282 276 * @return void … … 295 289 * replacing any others previously set for this namespace. 296 290 * 297 * @param string $prefix The prefix/namespace, with trailing '\\'298 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 299 293 * 300 294 * @throws \InvalidArgumentException … … 430 424 { 431 425 if ($file = $this->findFile($class)) { 432 (self::$includeFile)($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 433 428 434 429 return true; … … 481 476 482 477 /** 483 * Returns the currently registered loaders indexed by their corresponding vendor directories.484 * 485 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 486 481 */ 487 482 public static function getRegisteredLoaders() … … 561 556 } 562 557 563 private static function initializeIncludeClosure(): void 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 564 562 { 565 563 if (self::$includeFile !== null) { … … 575 573 * @return void 576 574 */ 577 self::$includeFile = static function($file) {575 self::$includeFile = \Closure::bind(static function($file) { 578 576 include $file; 579 } ;577 }, null, null); 580 578 } 581 579 } -
shipment-tracker-for-woocommerce/trunk/vendor/composer/InstalledVersions.php
r3267231 r3317812 99 99 foreach (self::getInstalled() as $installed) { 100 100 if (isset($installed['versions'][$packageName])) { 101 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 102 102 } 103 103 } … … 120 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 121 121 { 122 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 123 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 124 124 … … 329 329 $installed[] = self::$installedByVendor[$vendorDir]; 330 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 331 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 332 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 333 335 self::$installed = $installed[count($installed) - 1]; … … 341 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 342 344 if (substr(__DIR__, -8, 1) !== 'C') { 343 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 344 348 } else { 345 349 self::$installed = array(); 346 350 } 347 351 } 348 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 349 356 350 357 return $installed; -
shipment-tracker-for-woocommerce/trunk/vendor/composer/installed.json
r3284690 r3317812 3 3 { 4 4 "name": "htmlburger/carbon-fields", 5 "version": "v3.6. 6",6 "version_normalized": "3.6. 6.0",5 "version": "v3.6.9", 6 "version_normalized": "3.6.9.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/htmlburger/carbon-fields.git", 10 "reference": " 9cb536e775f3c0688e18fca39445326521197220"10 "reference": "f82e80e3e3469d6e86cc17a8950b918ad448a059" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/htmlburger/carbon-fields/zipball/ 9cb536e775f3c0688e18fca39445326521197220",15 "reference": " 9cb536e775f3c0688e18fca39445326521197220",14 "url": "https://api.github.com/repos/htmlburger/carbon-fields/zipball/f82e80e3e3469d6e86cc17a8950b918ad448a059", 15 "reference": "f82e80e3e3469d6e86cc17a8950b918ad448a059", 16 16 "shasum": "" 17 17 }, … … 24 24 "yoast/phpunit-polyfills": "^1.0" 25 25 }, 26 "time": "2025-0 4-17T11:56:23+00:00",26 "time": "2025-06-11T11:23:23+00:00", 27 27 "type": "library", 28 28 "installation-source": "dist", … … 146 146 { 147 147 "name": "php-units-of-measure/php-units-of-measure", 148 "version": "v2. 1.0",149 "version_normalized": "2. 1.0.0",148 "version": "v2.2.0", 149 "version_normalized": "2.2.0.0", 150 150 "source": { 151 151 "type": "git", 152 152 "url": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure.git", 153 "reference": " 25f476e9c50e11af8cf044d22ffc271c96aa5248"153 "reference": "cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1" 154 154 }, 155 155 "dist": { 156 156 "type": "zip", 157 "url": "https://api.github.com/repos/PhpUnitsOfMeasure/php-units-of-measure/zipball/ 25f476e9c50e11af8cf044d22ffc271c96aa5248",158 "reference": " 25f476e9c50e11af8cf044d22ffc271c96aa5248",157 "url": "https://api.github.com/repos/PhpUnitsOfMeasure/php-units-of-measure/zipball/cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1", 158 "reference": "cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1", 159 159 "shasum": "" 160 160 }, 161 161 "require": { 162 "php": ">= 5.4.0"162 "php": ">=7.4" 163 163 }, 164 164 "replace": { … … 166 166 }, 167 167 "require-dev": { 168 "phpunit/phpunit": " 4.8.*",169 "squizlabs/php_codesniffer": " 2.2.*"170 }, 171 "time": "20 16-07-24T22:36:00+00:00",168 "phpunit/phpunit": "^9.5", 169 "squizlabs/php_codesniffer": "^3.7" 170 }, 171 "time": "2025-04-30T23:02:43+00:00", 172 172 "type": "library", 173 173 "installation-source": "dist", … … 184 184 { 185 185 "name": "Jonathan Hanson", 186 "email": "[email protected]",187 "homepage": "http://www.jonathan-hanson.org/",188 186 "role": "Developer" 189 187 } … … 197 195 ], 198 196 "support": { 199 "email": "[email protected]",200 197 "issues": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure/issues", 201 198 "source": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure" -
shipment-tracker-for-woocommerce/trunk/vendor/composer/installed.php
r3284690 r3317812 4 4 'pretty_version' => '1.14.21.x-dev', 5 5 'version' => '1.14.21.9999999-dev', 6 'reference' => ' 7633a98894c470b46667ed21baec71f0a8dce2f1',6 'reference' => '5d6f6ca21235b70aceb1363e637ca9440fb4ccdc', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => '1.14.21.x-dev', 15 15 'version' => '1.14.21.9999999-dev', 16 'reference' => ' 7633a98894c470b46667ed21baec71f0a8dce2f1',16 'reference' => '5d6f6ca21235b70aceb1363e637ca9440fb4ccdc', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'htmlburger/carbon-fields' => array( 23 'pretty_version' => 'v3.6. 6',24 'version' => '3.6. 6.0',25 'reference' => ' 9cb536e775f3c0688e18fca39445326521197220',23 'pretty_version' => 'v3.6.9', 24 'version' => '3.6.9.0', 25 'reference' => 'f82e80e3e3469d6e86cc17a8950b918ad448a059', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../htmlburger/carbon-fields', … … 30 30 ), 31 31 'php-units-of-measure/php-units-of-measure' => array( 32 'pretty_version' => 'v2. 1.0',33 'version' => '2. 1.0.0',34 'reference' => ' 25f476e9c50e11af8cf044d22ffc271c96aa5248',32 'pretty_version' => 'v2.2.0', 33 'version' => '2.2.0.0', 34 'reference' => 'cf1b83b1ef7615dd53f70864c9e7f496b1ec0fd1', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../php-units-of-measure/php-units-of-measure', -
shipment-tracker-for-woocommerce/trunk/vendor/composer/platform_check.php
r3253299 r3317812 5 5 $issues = array(); 6 6 7 if (!(PHP_VERSION_ID >= 50620)) {8 $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.20". You are running ' . PHP_VERSION . '.';7 if (!(PHP_VERSION_ID >= 70400)) { 8 $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 9 9 } 10 10 -
shipment-tracker-for-woocommerce/trunk/vendor/htmlburger/carbon-fields/config.php
r3284690 r3317812 5 5 # Define version constant 6 6 if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) { 7 define( __NAMESPACE__ . '\VERSION', '3.6. 6' );7 define( __NAMESPACE__ . '\VERSION', '3.6.9' ); 8 8 } 9 9 -
shipment-tracker-for-woocommerce/trunk/vendor/htmlburger/carbon-fields/core/Container/Block_Container.php
r3284690 r3317812 450 450 ob_start(); 451 451 call_user_func( $this->render_callback , $fields, $attributes, $content, $post_id, $block ); 452 $toReturn = ob_get_contents(); 453 ob_clean(); 454 return $toReturn; 452 return ob_get_clean(); 455 453 } 456 454 -
shipment-tracker-for-woocommerce/trunk/vendor/htmlburger/carbon-fields/core/Service/Meta_Query_Service.php
r2469257 r3317812 101 101 102 102 public function filter_get_meta_sql( $sql ) { 103 if ( strpos( $sql['where'], static::META_KEY_PREFIX ) !== false ) { 104 $sql['where'] = preg_replace( $this->get_meta_key_replace_regex(), '$1 LIKE $2', $sql['where'] ); 105 } 106 return $sql; 107 } 103 if ( strpos( $sql['where'], static::META_KEY_PREFIX ) !== false ) { 104 $sql['where'] = preg_replace( $this->get_meta_key_replace_regex(), '$1 LIKE $2', $sql['where'] ); 105 } 106 if ( strpos( $sql['join'], static::META_KEY_PREFIX ) !== false ) { 107 $sql['join'] = str_replace( static::META_KEY_PREFIX, '', $sql['join'] ); 108 } 109 return $sql; 110 } 108 111 109 112 /************************************************** -
shipment-tracker-for-woocommerce/trunk/vendor/htmlburger/carbon-fields/package.json
r3284690 r3317812 1 1 { 2 2 "name": "carbon-fields", 3 "version": "3.6. 6",3 "version": "3.6.9", 4 4 "description": "WordPress developer-friendly custom fields for post types, taxonomy terms, users, comments, widgets, options, navigation menus and more.", 5 5 "directories": { -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/.gitignore
r2844514 r3317812 24 24 *.sass-cache 25 25 26 # Vagrant files 27 /.vagrant/ 26 .phpunit.result.cache 27 tests/clover.xml -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/CHANGELOG.md
r2844514 r3317812 1 ## v2.2.0 (April 30th, 2025) 2 - Drop support of PHP < 7.4 3 - Add `isUnitDefined()`, `listAllUnits()`, `getOriginalValue()`, and `getOriginalUnit()` methods to the Physical Quantity parent class 4 - Add new Power Physical Quantity 5 - Add Imperial Gallons to the Volume quantity 6 - Move to Github Actions, away from Travis CI 7 - Use Docker containers instead of Vagrant/VBox instances for dev environments 8 - Add local dev scripts for `lint`, `test`, and `shell`, in `./scripts/` 9 1 10 ## v2.1.0 (July 24th, 2016) 2 11 - Added getUnitDefinitions() method to PhysicalQuantity classes, to get a raw list of UnitofMeasure objects defined on that quantity -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/README.md
r2844514 r3317812 44 44 45 45 ## Installation 46 This library is best included in your projects via Composer. See the [Composer website](http ://getcomposer.org/) for more details, and see the [Packagist.org site for this library](https://packagist.org/packages/php-units-of-measure/php-units-of-measure).47 48 If you'd prefer to manually include this library as a dependency in your project, then it is recommended that you use a [PSR-4](http ://www.php-fig.org/psr/psr-4/) compliant PHP autoloader. The mapping between this project's root namespace and its base directory is:46 This library is best included in your projects via Composer. See the [Composer website](https://getcomposer.org/) for more details, and see the [Packagist.org site for this library](https://packagist.org/packages/php-units-of-measure/php-units-of-measure). 47 48 If you'd prefer to manually include this library as a dependency in your project, then it is recommended that you use a [PSR-4](https://www.php-fig.org/psr/psr-4/) compliant PHP autoloader. The mapping between this project's root namespace and its base directory is: 49 49 - vendor namespace 'PhpUnitsOfMeasure\' maps to the library's base directory 'source/' 50 50 … … 52 52 53 53 ### Project Tags and Versions 54 This project follows the guidelines set out in [Semantic Versioning 2.0.0](http ://semver.org/spec/v2.0.0.html). In general, versions are of the form 'X.Y.Z', and increments to X denote backward-incompatible major changes.55 56 It is recommended that if your project includes this project as a dependency and you are using an automated dependency management tool such as [Composer](http ://getcomposer.org/), then you should 'pin' the major version (X) and allow only variations in 'Y' (minor changes) and 'Z' (bugfixes). See the documentation of your dependency manager for more details.54 This project follows the guidelines set out in [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). In general, versions are of the form 'X.Y.Z', and increments to X denote backward-incompatible major changes. 55 56 It is recommended that if your project includes this project as a dependency and you are using an automated dependency management tool such as [Composer](https://getcomposer.org/), then you should 'pin' the major version (X) and allow only variations in 'Y' (minor changes) and 'Z' (bugfixes). See the documentation of your dependency manager for more details. 57 57 58 58 … … 240 240 241 241 ### Adding New Physical Quantities 242 [Physical quantities](http ://en.wikipedia.org/wiki/Physical_quantity) are categories of measurable values, like mass, length, force, etc.242 [Physical quantities](https://en.wikipedia.org/wiki/Physical_quantity) are categories of measurable values, like mass, length, force, etc. 243 243 244 244 For physical quantities that are not already present in this library, it will be necessary to write a class to support a new one. All physical quantities implement the `\PhpUnitsOfMeasure\PhysicalQuantityInterface` interface, typically extend the `\PhpUnitsOfMeasure\AbstractPhysicalQuantity` class, and typically have only an `initialize()` method which creates the quantity's units of measure. See above for typical examples of physical quantity classes and of how to add new units to a quantity class. … … 278 278 279 279 ### Pull Requests and Merging 280 The workflow for this repository loosely follows [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) and goes as follows: 281 - To develop new contributions, fork or branch from the `develop` branch of the main repository 282 - Pull requests and contribution merges are always made to the `develop` branch of the main repository 283 - From time to time, `develop` is merged into `master` by a project maintainer using --no-ff, and a new tag and version are released 284 285 In this way, no feature-development work is ever directly contributed to `master`; merges to master only ever come from `develop` when a new version is being cut or from a bugfix branch, and are never fast-forward merges. this maintains the `master` branch as a series of released production versions of the code, while `develop` is always the sum of the approved and merged contributions from developers. 286 287 End users of this repository should only use tagged commits in production. Users interested in the current 'soon-to-be-released' code may use `develop`, with the understanding that it changes quickly. All other existing branches (if any) should be considered 'feature' branches in development, and not yet ready for use. 280 The workflow for this repository goes as follows: 281 - To develop new contributions, fork or branch from the `master` branch of the main repository 282 - Pull requests and contribution merges are always made to the `master` branch of the main repository 283 - From time to time, commits of `master` are tagged and a new version is released 284 - At present, there is no support for maintaining bug-fix branches of older project versions. This is something we can revisit if a need arises. 285 286 End users of this repository should only use tagged commits in production. Users interested in the current 'soon-to-be-released' code may use `master`, with the understanding that it may change unexpectedly. All other existing branches (if any) should be considered 'feature' branches in development, and not yet ready for use. 288 287 289 288 ### Local Testing Environment 290 There's a Vagrant virtual machine configuration included which is suitable for running the necessary unit tests. To bring up the machine, make sure you have Vagrant and Virtualbox installed, and from the project root directory: 291 292 293 ``` bash 294 vagrant up 295 vagrant ssh 296 cd /project 297 ``` 298 299 ### Setting Up for Testing 300 The virtual machine development environment already has Composer installed. Once you're ssh'ed into the virtual machine, install this project's dev dependencies: 301 302 ``` bash 303 rm -rf vendor 304 composer.phar update --verbose --prefer-dist 305 ``` 306 307 ### Unit Tests 308 All the tests associated with this project can be manually run with: 309 310 ``` bash 311 vendor/bin/phpunit -c ./tests/phpunit.xml.dist ./tests 312 ``` 313 314 ### CodeSniffer 315 Codesniffer verifies that coding standards are being met. Once the project is built with development dependencies, you can run the checks with: 316 317 ``` bash 318 vendor/bin/phpcs --encoding=utf-8 --extensions=php --standard=./tests/phpcs.xml -nsp ./ 319 ``` 320 321 ### Continuous Integration 322 The above tests are automatically run against Github commits with Travis-CI. 323 - https://travis-ci.org/PhpUnitsOfMeasure/php-units-of-measure 289 There's a `Dockerfile` and a set of helper scripts in `scripts/` suitable for running the necessary unit tests. With Docker installed, do: 290 291 ``` shell 292 # Execute the lint checks 293 ./script/lint 294 295 # Execute the unit tests 296 ./script/test 297 ``` 298 299 In addition, `./script/shell` will get you a bash shell in a temporary container. Note that the hosts directory is mounted into the container, and changes to files inside the container will persist. -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/composer.json
r2844514 r3317812 1 1 { 2 "name": "php-units-of-measure/php-units-of-measure", 3 2 "name": "php-units-of-measure/php-units-of-measure", 4 3 "description": "A PHP library for converting between standard units of measure.", 5 6 4 "keywords": [ 7 "measurements", "data", "conversion"8 ],9 10 "homepage": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure",11 5 "measurements", 6 "data", 7 "conversion" 8 ], 9 "homepage": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure", 12 10 "license": "MIT", 13 14 11 "authors": [ 15 12 { 16 "name": "Jonathan Hanson", 17 "email": "[email protected]", 18 "homepage": "http://www.jonathan-hanson.org/", 19 "role": "Developer" 13 "name": "Jonathan Hanson", 14 "role": "Developer" 20 15 } 21 16 ], 22 23 17 "support": { 24 "email": "[email protected]",25 18 "issues": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure/issues", 26 19 "source": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure" 27 20 }, 28 29 21 "require": { 30 "php": ">= 5.4.0"22 "php": ">=7.4" 31 23 }, 32 33 24 "require-dev": { 34 "phpunit/phpunit": " 4.8.*",35 "squizlabs/php_codesniffer": " 2.2.*"25 "phpunit/phpunit": "^9.5", 26 "squizlabs/php_codesniffer": "^3.7" 36 27 }, 37 38 28 "replace": { 39 29 "triplepoint/php-units-of-measure": "*" 40 30 }, 41 42 31 "autoload": { 43 32 "psr-4": { … … 47 36 "autoload-dev": { 48 37 "psr-4": { 49 "PhpUnitsOfMeasureTest\\": "tests/"38 "PhpUnitsOfMeasureTest\\": "tests/" 50 39 } 40 }, 41 "scripts": { 42 "test": "phpunit -c ./tests/phpunit.xml.dist ./tests", 43 "lint": "phpcs --encoding=utf-8 --extensions=php --standard=./tests/phpcs.xml -nsp ./" 51 44 } 52 45 } -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/source/AbstractPhysicalQuantity.php
r2844514 r3317812 12 12 */ 13 13 // protected static $unitDefinitions; 14 15 /** 16 * Static cache for unit lookups. 17 * 18 * @var UnitOfMeasureInterface[] 19 */ 20 private static $unitCache = []; 21 22 /** 23 * Create a cache key for the unit lookup cache. 24 * 25 * @var UnitOfMeasureInterface[] 26 */ 27 private static function buildUnitCacheKey($unit) 28 { 29 return get_called_class() . '#' . $unit; 30 } 14 31 15 32 /** … … 48 65 } 49 66 67 $key = static::buildUnitCacheKey($unit); 68 if (isset(self::$unitCache[$key])) { 69 return self::$unitCache[$key]; 70 } 71 50 72 foreach (static::$unitDefinitions as $unitOfMeasure) { 51 73 if ($unit === $unitOfMeasure->getName() || $unitOfMeasure->isAliasOf($unit)) { 52 return $unitOfMeasure;74 return self::$unitCache[$key] = $unitOfMeasure; 53 75 } 54 76 } … … 212 234 } 213 235 236 /** 237 * @see \PhpUnitsOfMeasure\PhysicalQuantityInterface::isUnitDefined 238 */ 239 public static function isUnitDefined($name) 240 { 241 $units = static::getUnitDefinitions(); 242 foreach ($units as $unit) { 243 if ($name === $unit->getName() || $unit->isAliasOf($name)) { 244 return true; 245 } 246 } 247 return false; 248 } 249 250 /** 251 * @see \PhpUnitsOfMeasure\PhysicalQuantityInterface::listAllUnits 252 */ 253 public static function listAllUnits() 254 { 255 $return = []; 256 $units = static::getUnitDefinitions(); 257 foreach ($units as $unit) { 258 $return[$unit->getName()] = $unit->getAliases(); 259 } 260 return $return; 261 } 214 262 215 263 /** … … 217 265 * @return Array $unitDefinitions 218 266 */ 219 public static function getUnitDefinitions() { 267 public static function getUnitDefinitions() 268 { 220 269 if (!is_array(static::$unitDefinitions)) { 221 270 static::$unitDefinitions = []; … … 225 274 return static::$unitDefinitions; 226 275 } 276 277 /** 278 * @return float 279 */ 280 public function getOriginalValue() 281 { 282 return $this->originalValue; 283 } 284 285 /** 286 * @return string 287 */ 288 public function getOriginalUnit() 289 { 290 return $this->originalUnit; 291 } 227 292 } -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/source/PhysicalQuantity/Volume.php
r2844514 r3317812 149 149 $newUnit->addAlias('us gal'); 150 150 static::addUnit($newUnit); 151 152 // Imperial Gallon 153 $newUnit = UnitOfMeasure::linearUnitFactory('imp gal', 4.54609e-3); 154 $newUnit->addAlias('imperial gallon'); 155 $newUnit->addAlias('imperial gal'); 156 $newUnit->addAlias('imp gallon'); 157 $newUnit->addAlias('impg'); 158 static::addUnit($newUnit); 159 151 160 // Quart 152 161 $newUnit = UnitOfMeasure::linearUnitFactory('qt', 9.4635295e-4); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/source/PhysicalQuantityInterface.php
r2844514 r3317812 72 72 */ 73 73 public function isEquivalentQuantity(PhysicalQuantityInterface $testQuantity); 74 75 /** 76 * @return float 77 */ 78 public function getOriginalValue(); 79 80 /** 81 * @return string 82 */ 83 public function getOriginalUnit(); 84 85 /** 86 * Verify if the given value respond to an already defined unit of meaure of the current 87 * phisical quantity. 88 * 89 * @param string $name the string to verify 90 * 91 * @return boolean True if $name has been defined into the current physical quantity, false if not. 92 */ 93 public static function isUnitDefined($name); 94 95 /** 96 * Return a list of all the unit of measure defined in the current physical quantity 97 * 98 * @return array of all units as strings. 99 * Keys of the array are the units of measure; for any key the value is 100 * another array containing all aliases. 101 */ 102 public static function listAllUnits(); 74 103 } -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/AbstractPhysicalQuantityTest.php
r2844514 r3317812 3 3 namespace PhpUnitsOfMeasureTest; 4 4 5 use PHPUnit _Framework_TestCase;5 use PHPUnit\Framework\TestCase; 6 6 use PhpUnitsOfMeasure\AbstractPhysicalQuantity; 7 7 use PhpUnitsOfMeasure\UnitOfMeasureInterface; 8 8 use PhpUnitsOfMeasure\Exception\PhysicalQuantityMismatch; 9 use PhpUnitsOfMeasure\Exception\DuplicateUnitNameOrAlias;10 use PhpUnitsOfMeasure\Exception\NonNumericValue;11 use PhpUnitsOfMeasure\Exception\NonStringUnitName;12 use PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure;13 9 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wonkicity; 14 10 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Woogosity; … … 21 17 * @runTestsInSeparateProcesses 22 18 */ 23 class AbstractPhysicalQuantityTest extends PHPUnit_Framework_TestCase19 class AbstractPhysicalQuantityTest extends TestCase 24 20 { 25 21 protected function getTestUnitOfMeasure($name, $aliases = []) 26 22 { 27 $newUnit = $this->getMockBuilder( 'PhpUnitsOfMeasure\UnitOfMeasureInterface')23 $newUnit = $this->getMockBuilder(UnitOfMeasureInterface::class) 28 24 ->getMock(); 29 25 $newUnit->method('getName') … … 31 27 $newUnit->method('getAliases') 32 28 ->willReturn($aliases); 29 $newUnit->method('isAliasOf') 30 ->will($this->returnCallback( 31 function ($value) use ($aliases) { 32 return in_array($value, $aliases); 33 } 34 )); 33 35 34 36 return $newUnit; … … 38 40 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::addUnit 39 41 */ 40 public function testAddUnit() 42 public function testAddUnit(): void 41 43 { 42 44 $newUnit = $this->getTestUnitOfMeasure('noconflict', ['definitelynoconflict']); … … 48 50 * @dataProvider exceptionProducingUnitsProvider 49 51 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::addUnit 50 * @expectedException \PhpUnitsOfMeasure\Exception\DuplicateUnitNameOrAlias51 */52 public function testAddUnitFailsOnNameCollision($unitName, $unitAliases)53 {52 */ 53 public function testAddUnitFailsOnNameCollision($unitName, $unitAliases): void 54 { 55 $this->expectException(\PhpUnitsOfMeasure\Exception\DuplicateUnitNameOrAlias::class); 54 56 $newUnit = $this->getTestUnitOfMeasure($unitName, $unitAliases); 55 57 … … 60 62 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::getUnit 61 63 */ 62 public function testGetUnit() 64 public function testGetUnit(): void 63 65 { 64 66 $unit = Wonkicity::getUnit('u'); … … 69 71 /** 70 72 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::getUnit 71 * @expectedException \PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure72 */73 public function testGetUnitFailsOnUnknownUnit()74 {73 */ 74 public function testGetUnitFailsOnUnknownUnit(): void 75 { 76 $this->expectException(\PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure::class); 75 77 Wonkicity::getUnit('someUnknownUnit'); 76 78 } … … 79 81 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::__construct 80 82 */ 81 public function testInstantiateNewUnit() 83 public function testInstantiateNewUnit(): void 82 84 { 83 85 $value = new Wonkicity(1.234, 'quatloos'); … … 86 88 /** 87 89 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::__construct 88 * @expectedException \PhpUnitsOfMeasure\Exception\NonNumericValue89 */90 public function testInstantiateNewUnitNonNumericValue()91 {90 */ 91 public function testInstantiateNewUnitNonNumericValue(): void 92 { 93 $this->expectException(\PhpUnitsOfMeasure\Exception\NonNumericValue::class); 92 94 $value = new Wonkicity('string', 'quatloos'); 93 95 } … … 95 97 /** 96 98 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::__construct 97 * @expectedException \PhpUnitsOfMeasure\Exception\NonStringUnitName98 */99 public function testInstantiateNewUnitNonStringUnit()100 {99 */ 100 public function testInstantiateNewUnitNonStringUnit(): void 101 { 102 $this->expectException(\PhpUnitsOfMeasure\Exception\NonStringUnitName::class); 101 103 $value = new Wonkicity(1.234, 42); 102 104 } … … 105 107 * @dataProvider quantityConversionsProvider 106 108 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::toUnit 107 * @expectedException \PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure108 109 */ 109 110 public function testConvertToUnknownUnitThrowsException( … … 111 112 $arbitraryUnit, 112 113 $valueInArbitraryUnit 113 ) { 114 ): void { 115 $this->expectException(\PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure::class); 114 116 $value->toUnit('someUnknownUnit'); 115 117 } … … 123 125 $arbitraryUnit, 124 126 $valueInArbitraryUnit 125 ) {127 ): void { 126 128 $this->assertSame($valueInArbitraryUnit, $value->toUnit($arbitraryUnit)); 127 129 } … … 131 133 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::__toString 132 134 */ 133 public function testToString(AbstractPhysicalQuantity $value, $string) 135 public function testToString(AbstractPhysicalQuantity $value, $string): void 134 136 { 135 137 $this->assertSame($string, (string) $value); … … 137 139 138 140 /** 139 *140 141 * @dataProvider quantityConversionsProvider 141 142 */ … … 144 145 $arbitraryUnit, 145 146 $valueInArbitraryUnit 146 ) {147 ): void { 147 148 serialize($value); 148 149 } … … 155 156 $arbitraryUnit, 156 157 $valueInArbitraryUnit 157 ) {158 ): void { 158 159 $unserializedValue = unserialize(serialize($value)); 159 160 … … 171 172 $sumString, 172 173 $diffString 173 ) {174 ): void { 174 175 if ($shouldThrowException) { 175 $this-> setExpectedException('PhpUnitsOfMeasure\Exception\PhysicalQuantityMismatch');176 $this->expectException(PhysicalQuantityMismatch::class); 176 177 } 177 178 … … 193 194 $sumString, 194 195 $diffString 195 ) {196 ): void { 196 197 if ($shouldThrowException) { 197 $this-> setExpectedException('PhpUnitsOfMeasure\Exception\PhysicalQuantityMismatch');198 $this->expectException(PhysicalQuantityMismatch::class); 198 199 } 199 200 … … 208 209 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::getUnitDefinitions 209 210 */ 210 public function testGetAllUnits() { 211 $array = Wonkicity::getUnitDefinitions(); 212 213 $this->assertTrue(is_array($array)); 214 215 $expected = array(Wonkicity::getUnit('u'), Wonkicity::getUnit('v')); 216 $this->assertEquals($array, $expected); 211 public function testGetAllUnits(): void 212 { 213 $array = Wonkicity::getUnitDefinitions(); 214 215 $this->assertIsArray($array); 216 217 $expected = array(Wonkicity::getUnit('u'), Wonkicity::getUnit('v')); 218 $this->assertEquals($array, $expected); 219 } 220 221 /** 222 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::isUnitDefined 223 */ 224 public function testIsUnitDefined(): void 225 { 226 $newUnit = $this->getTestUnitOfMeasure('noconflict', ['definitelynoconflict_1', 'definitelynoconflict_2']); 227 Wonkicity::addUnit($newUnit); 228 229 $someExistingUnits = ['u', 'uvees', 'v', 'vorp', 'noconflict', 'definitelynoconflict_1', 'definitelynoconflict_2']; 230 $unexistingUnits = ['kg', 'l', 'definitelynoconflict_']; 231 232 foreach ($someExistingUnits as $someExistingUnit) { 233 $this->assertTrue(Wonkicity::isUnitDefined($someExistingUnit), "$someExistingUnit is not defined"); 234 } 235 foreach ($unexistingUnits as $unexistingUnit) { 236 $this->assertFalse(Wonkicity::isUnitDefined($unexistingUnit), "$unexistingUnit is not defined"); 237 } 238 } 239 240 /** 241 * @covers \PhpUnitsOfMeasure\AbstractPhysicalQuantity::listAllUnits 242 */ 243 public function testListAllUnits(): void 244 { 245 $newUnit = $this->getTestUnitOfMeasure('noconflict', ['definitelynoconflict_1', 'definitelynoconflict_2']); 246 Wonkicity::addUnit($newUnit); 247 248 $allUnits = Wonkicity::listAllUnits(); 249 $expected = []; 250 $expected['u'] = ['uvee', 'uvees']; 251 $expected['v'] = ['vorp', 'vorps']; 252 $expected['noconflict'] = ['definitelynoconflict_1', 'definitelynoconflict_2']; 253 $this->assertEquals($allUnits, $expected); 254 } 255 256 public function testGetOriginalValue() 257 { 258 $value = 2; 259 $unit = 'u'; 260 $physicalQuantity = new Wonkicity($value, $unit); 261 $this->assertEquals($value, $physicalQuantity->getOriginalValue()); 262 $this->assertEquals($unit, $physicalQuantity->getOriginalUnit()); 217 263 } 218 264 … … 222 268 * 2) The set of aliases for the new unit to test 223 269 */ 224 public function exceptionProducingUnitsProvider() 270 public function exceptionProducingUnitsProvider(): array 225 271 { 226 272 return [ … … 238 284 * 3) The expected resulting value of the conversion 239 285 */ 240 public function quantityConversionsProvider() 286 public function quantityConversionsProvider(): array 241 287 { 242 288 return [ … … 255 301 * 2) the expected resulting string from the conversion 256 302 */ 257 public function toStringProvider() 303 public function toStringProvider(): array 258 304 { 259 305 return [ … … 275 321 * 5) The string-cast result of a subtraction operation with the two operands (ignored for errors) 276 322 */ 277 public function arithmeticProvider() 323 public function arithmeticProvider(): array 278 324 { 279 325 return [ -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/DemonstrationTests.php
r2844514 r3317812 3 3 namespace PhpUnitsOfMeasureTest; 4 4 5 use PHPUnit _Framework_TestCase;5 use PHPUnit\Framework\TestCase; 6 6 7 7 use PhpUnitsOfMeasure\UnitOfMeasure; 8 use PhpUnitsOfMeasure\AbstractDerivedPhysicalQuantity;9 use PhpUnitsOfMeasure\DerivedPhysicalQuantityFactory;10 use PhpUnitsOfMeasure\PhysicalQuantity\UnknownDerivedPhysicalQuantity;11 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Plooposity;12 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Pumpalumpiness;13 8 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess; 14 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wonkicity;15 9 use PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Woogosity; 16 10 … … 33 27 * @runTestsInSeparateProcesses 34 28 */ 35 class DemonstrationTests extends PHPUnit_Framework_TestCase29 class DemonstrationTests extends TestCase 36 30 { 37 public function testInstantiatingQuantities() 31 public function testInstantiatingQuantities(): void 38 32 { 39 33 // New quantities are created like this, with … … 45 39 // (for example sopee, sopees, s). 46 40 $a = new Wigginess(1, 'sopee'); 47 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $a);41 $this->assertInstanceOf(Wigginess::class, $a); 48 42 49 43 $a = new Wigginess(2.123, 'sopees'); 50 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $a);44 $this->assertInstanceOf(Wigginess::class, $a); 51 45 52 46 $a = new Wigginess(2.6, 's'); 53 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $a);47 $this->assertInstanceOf(Wigginess::class, $a); 54 48 55 49 $a = new Wigginess(1, 'tumpet'); 56 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $a);50 $this->assertInstanceOf(Wigginess::class, $a); 57 51 58 52 $a = new Wigginess(2.123, 'tumpets'); 59 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $a);53 $this->assertInstanceOf(Wigginess::class, $a); 60 54 61 55 $a = new Wigginess(2.6, 't'); 62 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $a);56 $this->assertInstanceOf(Wigginess::class, $a); 63 57 } 64 58 65 public function testStringConversionForQuantities() 59 public function testStringConversionForQuantities(): void 66 60 { 67 61 // Casting physical quantity objects to strings will … … 74 68 } 75 69 76 public function testUnitConversionForQuantities() 70 public function testUnitConversionForQuantities(): void 77 71 { 78 72 // Creating equivalent quantities from existing … … 91 85 } 92 86 93 public function testCreatingNewUnitsForQuantities() 87 public function testCreatingNewUnitsForQuantities(): void 94 88 { 95 89 // New units of measure can be defined and registered … … 151 145 } 152 146 153 public function testAutomaticSIUnitsForQuantities() 147 public function testAutomaticSIUnitsForQuantities(): void 154 148 { 155 149 // SI units have a standard prefix naming convention to easily … … 165 159 $a = new Woogosity(21, 'plurp'); 166 160 167 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Woogosity', $a);161 $this->assertInstanceOf(Woogosity::class, $a); 168 162 $this->assertSame(21*4.5 * 1e3, $a->toUnit('millilupees')); 169 163 $this->assertSame(21*4.5 * 1e3, $a->toUnit('ml')); … … 172 166 } 173 167 174 public function testAddQuantities() 168 public function testAddQuantities(): void 175 169 { 176 170 // Two quantities of equivalent value can be summed … … 180 174 $c = $a->add($b); 181 175 182 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $c);176 $this->assertInstanceOf(Wigginess::class, $c); 183 177 $this->assertSame(3 + (2*2.5), $c->toUnit('sopee')); 184 178 } 185 179 186 public function testSubtractQuantities() 180 public function testSubtractQuantities(): void 187 181 { 188 182 // Similar to the add method, subtract called on the … … 193 187 $c = $a->subtract($b); 194 188 195 $this->assertInstanceOf( 'PhpUnitsOfMeasureTest\Fixtures\PhysicalQuantity\Wigginess', $c);189 $this->assertInstanceOf(Wigginess::class, $c); 196 190 $this->assertSame(3 - (2*2.5), $c->toUnit('sopee')); 197 191 } -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/Fixtures/PhysicalQuantity/Wigginess.php
r2844514 r3317812 10 10 protected static $unitDefinitions; 11 11 12 protected static function initialize() 12 protected static function initialize(): void 13 13 { 14 14 $native = UnitOfMeasure::nativeUnitFactory('s'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/Fixtures/PhysicalQuantity/Wonkicity.php
r2844514 r3317812 10 10 protected static $unitDefinitions; 11 11 12 protected static function initialize() 12 protected static function initialize(): void 13 13 { 14 14 $native = UnitOfMeasure::nativeUnitFactory('u'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/Fixtures/PhysicalQuantity/Woogosity.php
r2844514 r3317812 13 13 protected static $unitDefinitions; 14 14 15 protected static function initialize() 15 protected static function initialize(): void 16 16 { 17 17 $native = UnitOfMeasure::nativeUnitFactory('l'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AbstractPhysicalQuantityTestCase.php
r2844514 r3317812 3 3 namespace PhpUnitsOfMeasureTest\PhysicalQuantity; 4 4 5 use PHPUnit_Framework_TestCase; 5 use PHPUnit\Framework\TestCase; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 /** 8 9 * This is a parent class for all the PhysicalQuantity childrens' test cases. 9 10 */ 10 abstract class AbstractPhysicalQuantityTestCase extends PHPUnit_Framework_TestCase11 abstract class AbstractPhysicalQuantityTestCase extends TestCase 11 12 { 12 protected $supportedUnitsWithAliases = [];13 protected array $supportedUnitsWithAliases = []; 13 14 14 15 /** 15 16 * Verify that the object instantiates without error. 16 17 */ 17 public function testConstructorSucceeds() 18 public function testConstructorSucceeds(): void 18 19 { 19 20 $this->instantiateTestQuantity(); … … 24 25 * exceptions are thrown. 25 26 */ 26 public function testSupportedUnits() 27 public function testSupportedUnits(): void 27 28 { 28 29 $quantity = $this->instantiateTestQuantity(); … … 35 36 /** 36 37 * Build a test object of the target physical quantity. 37 *38 * @return PhysicalQuantityInterface39 38 */ 40 abstract protected function instantiateTestQuantity() ;39 abstract protected function instantiateTestQuantity(): PhysicalQuantityInterface; 41 40 } -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AccelerationTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Acceleration; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class AccelerationTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'm/s^2', 11 12 'm/s²', … … 16 17 ]; 17 18 18 protected function instantiateTestQuantity() 19 protected function instantiateTestQuantity(): PhysicalQuantityInterface 19 20 { 20 21 return new Acceleration(1, 'm/s^2'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AngleTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Angle; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class AngleTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'rad', 11 12 'radian', … … 250 251 ]; 251 252 252 protected function instantiateTestQuantity() 253 protected function instantiateTestQuantity(): PhysicalQuantityInterface 253 254 { 254 255 return new Angle(1, 'deg'); 255 256 } 256 257 257 public function testToDegrees() 258 public function testToDegrees(): void 258 259 { 259 260 $angle = new Angle(2 * M_PI, 'rad'); … … 261 262 } 262 263 263 public function testToRadians() 264 public function testToRadians(): void 264 265 { 265 266 $angle = new Angle(720, 'degree'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/AreaTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Area; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class AreaTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'm^2', 11 12 'm²', … … 62 63 ]; 63 64 64 protected function instantiateTestQuantity() 65 protected function instantiateTestQuantity(): PhysicalQuantityInterface 65 66 { 66 67 return new Area(1, 'm^2'); 67 68 } 68 69 69 public function testToHectares() 70 public function testToHectares(): void 70 71 { 71 72 $area = new Area(3, 'ha'); … … 78 79 * so we'll check that it's close. 79 80 */ 80 public function testToAcres() 81 public function testToAcres(): void 81 82 { 82 83 $area = new Area(13, 'ac'); … … 87 88 } 88 89 89 public function testToAre() 90 public function testToAre(): void 90 91 { 91 92 $area = new Area(100, 'm^2'); … … 93 94 } 94 95 95 public function testToDecare() 96 public function testToDecare(): void 96 97 { 97 98 $area = new Area(1000, 'm^2'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/ElectricCurrentTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\ElectricCurrent; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class ElectricCurrentTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'A', 11 12 'amp', … … 115 116 ]; 116 117 117 protected function instantiateTestQuantity() 118 protected function instantiateTestQuantity(): PhysicalQuantityInterface 118 119 { 119 120 return new ElectricCurrent(1, 'A'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/EnergyTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Energy; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class EnergyTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'Wh', 11 12 'watt hour', … … 59 60 ]; 60 61 61 protected function instantiateTestQuantity() 62 protected function instantiateTestQuantity(): PhysicalQuantityInterface 62 63 { 63 64 return new Energy(1, 'Wh'); 64 65 } 65 66 66 public function testToKilowattHour() 67 public function testToKilowattHour(): void 67 68 { 68 69 $quantity = new Energy(1000, 'Wh'); … … 70 71 } 71 72 72 public function testToWattHour() 73 public function testToWattHour(): void 73 74 { 74 75 $quantity = new Energy(1, 'kWh'); … … 76 77 } 77 78 78 public function testToMegaJoule() 79 public function testToMegaJoule(): void 79 80 { 80 81 $quantity = new Energy(1, 'kWh'); … … 82 83 } 83 84 84 public function testToJoule() 85 public function testToJoule(): void 85 86 { 86 87 $quantity = new Energy(1, 'Wh'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/LengthTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Length; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class LengthTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'm', 11 12 'meter', … … 136 137 ]; 137 138 138 protected function instantiateTestQuantity() 139 protected function instantiateTestQuantity(): PhysicalQuantityInterface 139 140 { 140 141 return new Length(1, 'm'); 141 142 } 142 143 143 public function testToMillimeters() 144 public function testToMillimeters(): void 144 145 { 145 146 $quantity = new Length(5, 'm'); … … 147 148 } 148 149 149 public function testToMegameters() 150 public function testToMegameters(): void 150 151 { 151 152 $quantity = new Length(5, 'm'); … … 153 154 } 154 155 155 public function testToInches() 156 public function testToInches(): void 156 157 { 157 158 $quantity = new Length(2, 'ft'); 158 $this->assertEquals(24, $quantity->toUnit('in'));159 $this->assertEquals(24, round($quantity->toUnit('in'))); 159 160 } 160 161 161 public function testToNauticalMiles() 162 public function testToNauticalMiles(): void 162 163 { 163 164 $quantity = new Length(3704, 'm'); … … 165 166 } 166 167 167 public function testToScandinavianMil() 168 public function testToScandinavianMil(): void 168 169 { 169 170 $quantity = new Length(20000, 'm'); … … 171 172 } 172 173 173 public function testToAstronomicalUnit() 174 public function testToAstronomicalUnit(): void 174 175 { 175 176 $quantity = new Length(150000000, 'km'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/LuminousIntensityTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\LuminousIntensity; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class LuminousIntensityTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'cd', 11 12 'candela', … … 52 53 ]; 53 54 54 protected function instantiateTestQuantity() 55 protected function instantiateTestQuantity(): PhysicalQuantityInterface 55 56 { 56 57 return new LuminousIntensity(1, 'cd'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/MassTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Mass; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class MassTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'kg', 11 12 'kilogram', … … 88 89 ]; 89 90 90 protected function instantiateTestQuantity() 91 protected function instantiateTestQuantity(): PhysicalQuantityInterface 91 92 { 92 93 return new Mass(1, 'kg'); 93 94 } 94 95 95 public function testToGrams() 96 public function testToGrams(): void 96 97 { 97 98 $quantity = new Mass(5, 'kg'); … … 99 100 } 100 101 101 public function testToMilligrams() 102 public function testToMilligrams(): void 102 103 { 103 104 $quantity = new Mass(5, 'kg'); … … 105 106 } 106 107 107 public function testToPounds() 108 public function testToPounds(): void 108 109 { 109 110 $quantity = new Mass(16, 'oz'); … … 111 112 } 112 113 113 public function testToStones() 114 public function testToStones(): void 114 115 { 115 116 $quantity = new Mass(14, 'pound'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/PressureTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Pressure; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class PressureTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'Pa', 11 12 'pascal', … … 84 85 ]; 85 86 86 protected function instantiateTestQuantity() 87 protected function instantiateTestQuantity(): PhysicalQuantityInterface 87 88 { 88 89 return new Pressure(1, 'Pa'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/QuantityTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Quantity; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class QuantityTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'mol', 11 12 'mole', … … 73 74 ]; 74 75 75 protected function instantiateTestQuantity() 76 protected function instantiateTestQuantity(): PhysicalQuantityInterface 76 77 { 77 78 return new Quantity(1, 'mol'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/SolidAngleTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\SolidAngle; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class SolidAngleTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'sr', 11 12 'steradian', … … 73 74 ]; 74 75 75 protected function instantiateTestQuantity() 76 protected function instantiateTestQuantity(): PhysicalQuantityInterface 76 77 { 77 78 return new SolidAngle(1, 'steradian'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/TemperatureTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Temperature; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class TemperatureTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'K', 11 12 '°K', … … 80 81 ]; 81 82 82 protected function instantiateTestQuantity() 83 protected function instantiateTestQuantity(): PhysicalQuantityInterface 83 84 { 84 85 return new Temperature(1, 'K'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/TimeTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Time; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class TimeTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 's', 11 12 'sec', … … 141 142 ]; 142 143 143 protected function instantiateTestQuantity() 144 protected function instantiateTestQuantity(): PhysicalQuantityInterface 144 145 { 145 146 return new Time(1, 'sec'); 146 147 } 147 148 148 public function testToSeconds() 149 public function testToSeconds(): void 149 150 { 150 151 $angle = new Time(5, 'm'); … … 152 153 } 153 154 154 public function testToMinutes() 155 public function testToMinutes(): void 155 156 { 156 157 $angle = new Time(360, 'sec'); … … 158 159 } 159 160 160 public function testToHours() 161 public function testToHours(): void 161 162 { 162 163 $angle = new Time(120, 'mins'); … … 164 165 } 165 166 166 public function testToDays() 167 public function testToDays(): void 167 168 { 168 169 $angle = new Time(72, 'hours'); … … 170 171 } 171 172 172 public function testToWeeks() 173 public function testToWeeks(): void 173 174 { 174 175 $angle = new Time(14, 'd'); … … 176 177 } 177 178 178 public function testToGregorianYears() 179 public function testToGregorianYears(): void 179 180 { 180 181 $angle = new Time(365.2425, 'd'); … … 182 183 } 183 184 184 public function testToJulianYears() 185 public function testToJulianYears(): void 185 186 { 186 187 $angle = new Time(365.25, 'd'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/VelocityTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Velocity; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class VelocityTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'm/s', 11 12 'meters/sec', … … 30 31 ]; 31 32 32 protected function instantiateTestQuantity() 33 protected function instantiateTestQuantity(): PhysicalQuantityInterface 33 34 { 34 35 return new Velocity(1, 'm/s'); 35 36 } 36 37 37 public function testToKilometersPerHour() 38 public function testToKilometersPerHour(): void 38 39 { 39 40 $speed = new Velocity(1, 'km/h'); … … 41 42 } 42 43 43 public function testToFeetPerSecond() 44 public function testToFeetPerSecond(): void 44 45 { 45 46 $speed = new Velocity(2, 'm/s'); … … 47 48 } 48 49 49 public function testToKmPerHour() 50 public function testToKmPerHour(): void 50 51 { 51 52 $speed = new Velocity(2, 'mph'); … … 53 54 } 54 55 55 public function testToKnot() 56 public function testToKnot(): void 56 57 { 57 58 $speed = new Velocity(2, 'm/s'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/PhysicalQuantity/VolumeTest.php
r2844514 r3317812 4 4 5 5 use PhpUnitsOfMeasure\PhysicalQuantity\Volume; 6 use PhpUnitsOfMeasure\PhysicalQuantityInterface; 6 7 7 8 class VolumeTest extends AbstractPhysicalQuantityTestCase 8 9 { 9 protected $supportedUnitsWithAliases = [10 protected array $supportedUnitsWithAliases = [ 10 11 'm^3', 11 12 'm³', … … 85 86 ]; 86 87 87 protected function instantiateTestQuantity() 88 protected function instantiateTestQuantity(): PhysicalQuantityInterface 88 89 { 89 90 return new Volume(1, 'm^3'); -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/UnitOfMeasureTest.php
r2844514 r3317812 3 3 namespace PhpUnitsOfMeasureTest; 4 4 5 use PHPUnit\Framework\TestCase; 5 6 use PhpUnitsOfMeasure\UnitOfMeasure; 6 7 7 class UnitOfMeasureTest extends \PHPUnit_Framework_TestCase8 class UnitOfMeasureTest extends TestCase 8 9 { 9 10 /** … … 11 12 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::getName 12 13 */ 13 public function testGetName() 14 public function testGetName(): void 14 15 { 15 16 $uom = new UnitOfMeasure( … … 28 29 /** 29 30 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::__construct 30 * @expectedException \PhpUnitsOfMeasure\Exception\NonStringUnitName31 */32 public function testConstructWithNonStringName()33 {31 */ 32 public function testConstructWithNonStringName(): void 33 { 34 $this->expectException(\PhpUnitsOfMeasure\Exception\NonStringUnitName::class); 34 35 $uom = new UnitOfMeasure( 35 36 42, … … 47 48 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::getAliases 48 49 */ 49 public function testGetAliases() 50 public function testGetAliases(): void 50 51 { 51 52 $uom = new UnitOfMeasure( … … 70 71 /** 71 72 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::addAlias 72 * @expectedException \PhpUnitsOfMeasure\Exception\NonStringUnitName73 */74 public function testAddAliasWithNonStringAlias()75 {73 */ 74 public function testAddAliasWithNonStringAlias(): void 75 { 76 $this->expectException(\PhpUnitsOfMeasure\Exception\NonStringUnitName::class); 76 77 $uom = new UnitOfMeasure( 77 78 'quatloos', … … 90 91 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::isAliasOf 91 92 */ 92 public function testIsAliasOf() 93 public function testIsAliasOf(): void 93 94 { 94 95 $uom = new UnitOfMeasure( … … 110 111 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::isAliasOf 111 112 */ 112 public function testIsNotAliasOf() 113 public function testIsNotAliasOf(): void 113 114 { 114 115 $uom = new UnitOfMeasure( … … 129 130 /** 130 131 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::isAliasOf 131 * @expectedException \PhpUnitsOfMeasure\Exception\NonStringUnitName 132 */ 133 public function testIsAliasOfWithNonStringAlias() 134 { 132 * 133 */ 134 public function testIsAliasOfWithNonStringAlias(): void 135 { 136 $this->expectException(\PhpUnitsOfMeasure\Exception\NonStringUnitName::class); 135 137 $uom = new UnitOfMeasure( 136 138 'quatloos', … … 151 153 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::convertValueFromNativeUnitOfMeasure 152 154 */ 153 public function testConvertValueFromNativeUnitOfMeasure() 155 public function testConvertValueFromNativeUnitOfMeasure(): void 154 156 { 155 157 $uom = new UnitOfMeasure( … … 168 170 /** 169 171 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::convertValueFromNativeUnitOfMeasure 170 * @expectedException \PhpUnitsOfMeasure\Exception\NonNumericValue171 */172 public function testConvertValueFromNativeUnitOfMeasureWithNonNumericalValue()173 {172 */ 173 public function testConvertValueFromNativeUnitOfMeasureWithNonNumericalValue(): void 174 { 175 $this->expectException(\PhpUnitsOfMeasure\Exception\NonNumericValue::class); 174 176 $uom = new UnitOfMeasure( 175 177 'quatloos', … … 188 190 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::convertValueToNativeUnitOfMeasure 189 191 */ 190 public function testConvertValueToNativeUnitOfMeasure() 192 public function testConvertValueToNativeUnitOfMeasure(): void 191 193 { 192 194 $uom = new UnitOfMeasure( … … 205 207 /** 206 208 * @covers \PhpUnitsOfMeasure\UnitOfMeasure::convertValueToNativeUnitOfMeasure 207 * @expectedException \PhpUnitsOfMeasure\Exception\NonNumericValue208 */209 public function testConvertValueToNativeUnitOfMeasureWithNonNumericalValue()210 {209 */ 210 public function testConvertValueToNativeUnitOfMeasureWithNonNumericalValue(): void 211 { 212 $this->expectException(\PhpUnitsOfMeasure\Exception\NonNumericValue::class); 211 213 $uom = new UnitOfMeasure( 212 214 'quatloos', -
shipment-tracker-for-woocommerce/trunk/vendor/php-units-of-measure/php-units-of-measure/tests/phpunit.xml.dist
r2844514 r3317812 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 3 <phpunit 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"5 xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.4/phpunit.xsd"6 colors="true"7 verbose="true">2 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:noNamespaceSchemaLocation="../vendor/phpunit/phpunit/phpunit.xsd" 4 colors="true" 5 verbose="true" 6 beStrictAboutTestsThatDoNotTestAnything="false" 7 > 8 8 9 9 <testsuites> … … 13 13 </testsuites> 14 14 15 <filter> 16 <blacklist> 17 <directory suffix=".php">../vendor</directory> 18 </blacklist> 19 <whitelist> 15 <coverage> 16 <include> 20 17 <directory suffix=".php">../source</directory> 21 </whitelist> 22 </filter> 18 </include> 19 <exclude> 20 <directory>../vendor</directory> 21 </exclude> 22 <report> 23 <clover outputFile="clover.xml"/> 24 </report> 25 </coverage> 23 26 24 <logging>25 <log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>26 </logging>27 27 </phpunit>
Note: See TracChangeset
for help on using the changeset viewer.