TimeTrex Community Edition v16.2.0
This commit is contained in:
.htaccess3rd_party_credits.txtINSTALL.txtLICENSEREADME.txtUPGRADE.txt
api
json
soap
classes
.htaccess
composer.jsoncomposer.lockfavicon.icofiles.deletefiles.sha1ChequeForms
9085.class.php9209p.class.phpChequeForms.class.phpChequeForms_Base.class.phpcr_standard_form_1.class.phpcr_standard_form_2.class.phpdlt103.class.phpdlt104.class.php
examples
mbl2398.class.phpGovernmentForms
GovernmentForms.class.phpGovernmentForms_Base.class.php
country
ca
CA.class.phproe.class.php
grid.class.phpschema
OL_layout-topologie.xsdPayrollExtractXmlV2.xsdT661.xsdT661prt1.xsdT661prt10.xsdT661prt2.xsdT661prt3.xsdT661prt4.xsdT661prt5.xsdT661prt6.xsdT661prt7.xsdT661prt9.xsdagr-1.xsdcomplex.xsdcracommonstructures.xsdfrms.xsdlayout-topologie.xsdlemmcommontypes.xsdnr4.xsdpartxix.xsdpartxviii.xsdprpp-rpac.xsdrc236.xsdrc364.xsdrc364ca.xsdrc365.xsdrc365ca.xsdrc368.xsdrc368ca.xsdrrsp-reer.xsdrrsp-rrif-nqi.xsdsafer-alal.xsdsimple.xsdspecifictypes_v2.xsdstandarddatatypes.xsdstfdirect-2.1.xsdstfdirect-2.2.xsdstftypes-2.1.xsdstftypes-2.2.xsdt1061.xsdt1200.xsdt1204.xsdt2000.xsdt215.xsdt2202.xsdt2214.xsdt2217.xsdt244.xsdt3.xsdt3ath-ind.xsdt3d.xsdt3general.xsdt3genschedules.xsdt3gr.xsdt3m.xsdt3p.xsdt3prp.xsdt3ri.xsdt3s.xsdt3specialtypes.xsdt4.xsdt4a-nr.xsdt4a-oas.xsdt4a-p.xsdt4a.xsdt4e.xsdt4rif.xsdt4rsp.xsdt5.xsdt5007.xsdt5008.xsdt5013.xsdt5013fin.xsdt5013main.xsdt5013sch01.xsdt5013sch02.xsdt5013sch05.xsdt5013sch06.xsdt5013sch08-1.xsdt5013sch08.xsdt5013sch09.xsdt5013sch100.xsdt5013sch12.xsdt5013sch125.xsdt5013sch140.xsdt5013sch141.xsdt5013sch50.xsdt5013sch52.xsdt5013sch58.xsdt5018.xsdt510.xsdt550.xsdt920.xsdtape.xsdtfsa-celi.xsdxml.xsd
t4.class.phpt4a.class.phpt4asum.class.phpt4sum.class.phpt619.class.phptemplates
us
1096.class.php1099nec.class.php940.class.php940sa.class.php941.class.php941sb.class.php941worksheet1.class.php941worksheet2.class.php941worksheet3.class.php941worksheet4.class.php941worksheet5.class.phpUS.class.phpcms_pbj.class.phpreturn1040.class.phpreturn940.class.phpreturn941.class.phpstate_ui.class.php
templates
1096.pdf1099nec.pdf940.pdf940sa.pdf941.pdf941sb.pdf941worksheet1.pdf941worksheet2.pdf941worksheet3.pdf941worksheet4.pdf941worksheet5.pdfw2.pdfw2c.pdfw3.pdfw3c.pdf
w2.class.phpw2c.class.phpw3.class.phpw3c.class.phpexamples
adodb
adodb-active-record.inc.phpadodb-active-recordx.inc.phpadodb-csvlib.inc.phpadodb-datadict.inc.phpadodb-error.inc.phpadodb-errorhandler.inc.phpadodb-errorpear.inc.phpadodb-exceptions.inc.phpadodb-iterator.inc.phpadodb-lib.inc.phpadodb-loadbalancer.inc.phpadodb-memcache.lib.inc.phpadodb-pager.inc.phpadodb-pear.inc.phpadodb-perf.inc.phpadodb-php4.inc.phpadodb-time.inc.phpadodb-xmlschema.inc.phpadodb-xmlschema03.inc.phpadodb.inc.php
contrib
datadict
drivers
adodb-ldap.inc.phpadodb-mysql.inc.phpadodb-mysqli.inc.phpadodb-mysqlpo.inc.phpadodb-mysqlt.inc.phpadodb-pdo.inc.phpadodb-pdo_mysql.inc.phpadodb-pdo_pgsql.inc.phpadodb-postgres.inc.phpadodb-postgres64.inc.phpadodb-postgres7.inc.phpadodb-postgres8.inc.phpadodb-postgres9.inc.php
lang
adodb-ar.inc.phpadodb-bg.inc.phpadodb-bgutf8.inc.phpadodb-ca.inc.phpadodb-cn.inc.phpadodb-cz.inc.phpadodb-da.inc.phpadodb-de.inc.phpadodb-en.inc.phpadodb-eo.inc.phpadodb-es.inc.phpadodb-esperanto.inc.phpadodb-fa.inc.phpadodb-fr.inc.phpadodb-hu.inc.phpadodb-it.inc.phpadodb-nl.inc.phpadodb-pl.inc.phpadodb-pt-br.inc.phpadodb-ro.inc.phpadodb-ru.inc.phpadodb-ru1251.inc.phpadodb-sv.inc.phpadodb-th.inc.phpadodb-uk.inc.phpadodb-uk1251.inc.phpadodb_th.inc.php
license.txtpear
perf
pivottable.inc.phprsfilter.inc.phpserver.phptips_portable_sql.htmtoexport.inc.phptohtml.inc.phptute.htmxmlschema.dtdxmlschema03.dtdxsl
bitmask
bounce_handler
Make_statuscodes.phpREADME.txtbounce_driver.class.phpbounce_responses.phpbounce_statuscodes.phpbounce_statuscodes_new.php
misc
MimeMailParser.class.phpMultiCurl.class.phpUUID.class.phparr_multisort.class.phpattachment.class.phpis_email.phpsignature_to_image.class.php
modules
accrual
AccrualBalanceFactory.class.phpAccrualBalanceListFactory.class.phpAccrualFactory.class.phpAccrualListFactory.class.php
api
accrual
client
company
APIBranch.class.phpAPICompany.class.phpAPICompanyDeduction.class.phpAPICompanyGenericTag.class.phpAPICompanySetting.class.phpAPILegalEntity.class.phpAPIPayrollRemittanceAgency.class.phpAPIPayrollRemittanceAgencyEvent.class.phpAPIRemittanceSourceAccount.class.phpAPISetupPresets.class.phpAPIWageGroup.class.php
core
APIAbout.class.phpAPIAuthorization.class.phpAPICurrency.class.phpAPICurrencyRate.class.phpAPICustomField.class.phpAPIDashboard.class.phpAPIEnvironment.class.phpAPIException.class.phpAPIFactory.class.phpAPIInstall.class.phpAPILog.class.phpAPIMisc.class.phpAPIOtherField.class.phpAPIPermission.class.phpAPIPermissionControl.class.phpAPIProgressBar.class.phpAPIStation.class.phpAPITTDate.class.phpAPITest.class.phpAPITimeSheet.class.phpAPIUserDateTotal.class.php
department
hierarchy
holiday
import
APIImport.class.phpAPIImportAccrual.class.phpAPIImportBankAccount.class.phpAPIImportBranch.class.phpAPIImportDepartment.class.phpAPIImportPayPeriod.class.phpAPIImportPayStubAmendment.class.phpAPIImportRemittanceDestinationAccount.class.phpAPIImportUser.class.phpAPIImportUserDeduction.class.phpAPIImportUserEducation.class.phpAPIImportUserSkill.class.phpAPIImportUserWage.class.php
kpi
message
notification
pay_stub
APIPayStub.class.phpAPIPayStubEntry.class.phpAPIPayStubEntryAccount.class.phpAPIPayStubEntryAccountLink.class.phpAPIPayStubTransaction.class.php
pay_stub_amendment
payperiod
policy
APIAbsencePolicy.class.phpAPIAccrualPolicy.class.phpAPIAccrualPolicyAccount.class.phpAPIAccrualPolicyMilestone.class.phpAPIBreakPolicy.class.phpAPIContributingPayCodePolicy.class.phpAPIContributingShiftPolicy.class.phpAPIExceptionPolicy.class.phpAPIExceptionPolicyControl.class.phpAPIHolidayPolicy.class.phpAPIMealPolicy.class.phpAPIOverTimePolicy.class.phpAPIPayCode.class.phpAPIPayFormulaPolicy.class.phpAPIPolicyGroup.class.phpAPIPremiumPolicy.class.phpAPIRegularTimePolicy.class.phpAPIRoundIntervalPolicy.class.phpAPISchedulePolicy.class.php
punch
qualification
APIQualification.class.phpAPIQualificationGroup.class.phpAPIUserEducation.class.phpAPIUserLanguage.class.phpAPIUserLicense.class.phpAPIUserMembership.class.phpAPIUserSkill.class.php
report
APIAccrualBalanceSummaryReport.class.phpAPIActiveShiftReport.class.phpAPIAuditTrailReport.class.phpAPIExceptionReport.class.phpAPIForm1099NecReport.class.phpAPIForm940Report.class.phpAPIForm941Report.class.phpAPIFormW2Report.class.phpAPIGeneralLedgerSummaryReport.class.phpAPIKPIReport.class.phpAPIPayStubSummaryReport.class.phpAPIPayStubTransactionSummaryReport.class.phpAPIPayrollExportReport.class.phpAPIPunchSummaryReport.class.phpAPIROEReport.class.phpAPIRemittanceSummaryReport.class.phpAPIReport.class.phpAPIReportSchedule.class.phpAPIScheduleSummaryReport.class.phpAPIT4ASummaryReport.class.phpAPIT4SummaryReport.class.phpAPITaxSummaryReport.class.phpAPITimesheetDetailReport.class.phpAPITimesheetSummaryReport.class.phpAPIUSStateUnemploymentReport.class.phpAPIUserQualificationReport.class.phpAPIUserSummaryReport.class.php
request
roe
schedule
APIRecurringScheduleControl.class.phpAPIRecurringScheduleTemplate.class.phpAPIRecurringScheduleTemplateControl.class.phpAPISchedule.class.php
system_job_queue
ui_kit
unauthenticated
users
APIBankAccount.class.phpAPIEthnicGroup.class.phpAPIRemittanceDestinationAccount.class.phpAPIUser.class.phpAPIUserContact.class.phpAPIUserDeduction.class.phpAPIUserDefault.class.phpAPIUserDefaultPreferenceNotification.class.phpAPIUserGenericData.class.phpAPIUserGenericStatus.class.phpAPIUserGroup.class.phpAPIUserPreference.class.phpAPIUserPreferenceNotification.class.phpAPIUserReportData.class.phpAPIUserSetting.class.phpAPIUserTitle.class.phpAPIUserWage.class.php
company
BranchFactory.class.phpBranchListFactory.class.phpCompanyDeductionFactory.class.phpCompanyDeductionListFactory.class.phpCompanyDeductionPayStubEntryAccountFactory.class.phpCompanyDeductionPayStubEntryAccountListFactory.class.phpCompanyFactory.class.phpCompanyGenericMapFactory.class.phpCompanyGenericMapListFactory.class.phpCompanyGenericTagFactory.class.phpCompanyGenericTagListFactory.class.phpCompanyGenericTagMapFactory.class.phpCompanyGenericTagMapListFactory.class.phpCompanyListFactory.class.phpCompanySettingFactory.class.phpCompanySettingListFactory.class.phpCompanyUserCountFactory.class.phpCompanyUserCountListFactory.class.phpLegalEntityFactory.class.phpLegalEntityListFactory.class.phpPayrollRemittanceAgencyEventFactory.class.phpPayrollRemittanceAgencyEventFactory.data.phpPayrollRemittanceAgencyEventListFactory.class.phpPayrollRemittanceAgencyFactory.class.phpPayrollRemittanceAgencyListFactory.class.phpRemittanceSourceAccountFactory.class.phpRemittanceSourceAccountListFactory.class.phpSetupPresets.class.phpWageGroupFactory.class.phpWageGroupListFactory.class.phpnaics.csv
core
Authentication.class.phpAuthenticationTrustedDeviceFactory.class.phpAuthenticationTrustedDeviceListFactory.class.phpAuthorizationFactory.class.phpAuthorizationListFactory.class.phpBackgroundProcess.class.phpBreadCrumb.class.phpCalculatePayStub.class.phpCalculatePolicy.class.phpCurrencyFactory.class.phpCurrencyListFactory.class.phpCurrencyRateFactory.class.phpCurrencyRateListFactory.class.phpCustomFieldFactory.class.phpCustomFieldListFactory.class.phpDebug.class.phpDependencyTree.class.phpEnvironment.class.phpException.class.phpExceptionFactory.class.phpExceptionListFactory.class.phpFactory.class.phpFactoryListIterator.class.phpFastTree.class.phpFormVariables.class.phpGeneralLedgerExport.class.phpGroup.class.phpIdempotentRequestFactory.class.phpIdempotentRequestListFactory.class.phpLockFile.class.phpLogDetailFactory.class.phpLogDetailListFactory.class.phpLogFactory.class.phpLogListFactory.class.phpLogRotate.class.phpMisc.class.phpOption.class.phpOtherFieldFactory.class.phpOtherFieldListFactory.class.phpPager.class.phpPermission.class.phpPermissionControlFactory.class.phpPermissionControlListFactory.class.phpPermissionFactory.class.phpPermissionListFactory.class.phpPermissionUserFactory.class.phpPermissionUserListFactory.class.phpProfiler.class.phpProgressBar.class.phpPurgeDatabase.class.phpRateLimit.class.phpRedirect.class.phpSerializer.class.phpSharedMemory.class.phpSort.class.phpStationBranchFactory.class.phpStationBranchListFactory.class.phpStationDepartmentFactory.class.phpStationDepartmentListFactory.class.phpStationExcludeUserFactory.class.phpStationExcludeUserListFactory.class.phpStationFactory.class.phpStationIncludeUserFactory.class.phpStationIncludeUserListFactory.class.phpStationListFactory.class.phpStationUserFactory.class.phpStationUserGroupFactory.class.phpStationUserGroupListFactory.class.phpStationUserListFactory.class.phpSystemJobQueue.class.phpSystemJobQueueFactory.class.phpSystemJobQueueListFactory.class.phpSystemSettingFactory.class.phpSystemSettingListFactory.class.phpTTDate.class.phpTTLDAP.class.phpTTLicense.class.phpTTLog.class.phpTTMail.class.phpTTPDF.class.phpTTPassword.class.phpTTTree.class.phpTTUUID.class.phpTTi18n.class.phpURLBuilder.class.phpUnitConvert.class.phpUserDateFactory.class.phpUserDateListFactory.class.phpUserDateTotalFactory.class.phpUserDateTotalListFactory.class.phpValidator.class.phpWage.class.php
cron
department
geoip
help
HelpFactory.class.phpHelpGroupControlFactory.class.phpHelpGroupControlListFactory.class.phpHelpGroupFactory.class.phpHelpGroupListFactory.class.phpHelpListFactory.class.php
hierarchy
HierarchyControlFactory.class.phpHierarchyControlListFactory.class.phpHierarchyFactory.class.phpHierarchyLevelFactory.class.phpHierarchyLevelListFactory.class.phpHierarchyListFactory.class.phpHierarchyObjectTypeFactory.class.phpHierarchyObjectTypeListFactory.class.phpHierarchyShareFactory.class.phpHierarchyShareListFactory.class.phpHierarchyUserFactory.class.phpHierarchyUserListFactory.class.php
holiday
HolidayFactory.class.phpHolidayListFactory.class.phpRecurringHolidayFactory.class.phpRecurringHolidayListFactory.class.php
import
Import.class.phpImportAccrual.class.phpImportBranch.class.phpImportDepartment.class.phpImportPayPeriod.class.phpImportPayStubAmendment.class.phpImportRemittanceDestinationAccount.class.phpImportUser.class.phpImportUserDeduction.class.phpImportUserEducation.class.phpImportUserSkill.class.phpImportUserWage.class.php
install
Install.class.phpInstallSchema.class.phpInstallSchema_1000A.class.phpInstallSchema_1001A.class.phpInstallSchema_1002A.class.phpInstallSchema_1003A.class.phpInstallSchema_1004A.class.phpInstallSchema_1005A.class.phpInstallSchema_1006A.class.phpInstallSchema_1007A.class.phpInstallSchema_1008A.class.phpInstallSchema_1009A.class.phpInstallSchema_1010A.class.phpInstallSchema_1011A.class.phpInstallSchema_1012A.class.phpInstallSchema_1013A.class.phpInstallSchema_1014A.class.phpInstallSchema_1015A.class.phpInstallSchema_1016A.class.phpInstallSchema_1017A.class.phpInstallSchema_1018A.class.phpInstallSchema_1019A.class.phpInstallSchema_1020A.class.phpInstallSchema_1021A.class.phpInstallSchema_1022A.class.phpInstallSchema_1023A.class.phpInstallSchema_1024A.class.phpInstallSchema_1025A.class.phpInstallSchema_1026A.class.phpInstallSchema_1027A.class.phpInstallSchema_1028A.class.phpInstallSchema_1029A.class.phpInstallSchema_1030A.class.phpInstallSchema_1031A.class.phpInstallSchema_1032A.class.phpInstallSchema_1033A.class.phpInstallSchema_1034A.class.phpInstallSchema_1035A.class.phpInstallSchema_1036A.class.phpInstallSchema_1037A.class.phpInstallSchema_1038A.class.phpInstallSchema_1039A.class.phpInstallSchema_1040A.class.phpInstallSchema_1041A.class.phpInstallSchema_1042A.class.phpInstallSchema_1043A.class.phpInstallSchema_1044A.class.phpInstallSchema_1045A.class.phpInstallSchema_1046A.class.phpInstallSchema_1047A.class.phpInstallSchema_1049A.class.phpInstallSchema_1050A.class.phpInstallSchema_1051A.class.phpInstallSchema_1052A.class.phpInstallSchema_1053A.class.phpInstallSchema_1054A.class.phpInstallSchema_1055A.class.phpInstallSchema_1056A.class.phpInstallSchema_1058A.class.phpInstallSchema_1059A.class.phpInstallSchema_1060A.class.phpInstallSchema_1061A.class.phpInstallSchema_1062A.class.phpInstallSchema_1063A.class.phpInstallSchema_1064A.class.phpInstallSchema_1065A.class.phpInstallSchema_1066A.class.phpInstallSchema_1067A.class.phpInstallSchema_1068A.class.phpInstallSchema_1069A.class.phpInstallSchema_1070A.class.phpInstallSchema_1071A.class.phpInstallSchema_1090A.class.phpInstallSchema_1093A.class.phpInstallSchema_1100A.class.phpInstallSchema_1101A.class.phpInstallSchema_1102A.class.phpInstallSchema_1103A.class.phpInstallSchema_1104A.class.phpInstallSchema_1105A.class.phpInstallSchema_1106A.class.phpInstallSchema_1107A.class.phpInstallSchema_1108A.class.phpInstallSchema_1109A.class.phpInstallSchema_1110A.class.phpInstallSchema_1111A.class.phpInstallSchema_1112A.class.phpInstallSchema_1113A.class.phpInstallSchema_1114A.class.phpInstallSchema_1117A.class.phpInstallSchema_1118A.class.phpInstallSchema_1119A.class.phpInstallSchema_1121A.class.phpInstallSchema_1122A.class.phpInstallSchema_1123A.class.phpInstallSchema_1124A.class.phpInstallSchema_1125A.class.phpInstallSchema_1126A.class.phpInstallSchema_1127A.class.phpInstallSchema_1128A.class.phpInstallSchema_1129A.class.phpInstallSchema_1131A.class.phpInstallSchema_1132A.class.phpInstallSchema_1133A.class.phpInstallSchema_1134A.class.phpInstallSchema_1135A.class.phpInstallSchema_1136A.class.phpInstallSchema_1137A.class.phpInstallSchema_1138A.class.phpInstallSchema_1139A.class.phpInstallSchema_Base.class.php
sql
postgresql
1000A.sql1001A.sql1002A.sql1003A.sql1004A.sql1005A.sql1006A.sql1007A.sql1008A.sql1009A.sql1010A.sql1011A.sql1012A.sql1013A.sql1014A.sql1015A.sql1016A.sql1017A.sql1018A.sql1019A.sql1020A.sql1021A.sql1022A.sql1023A.sql1024A.sql1025A.sql1026A.sql1027A.sql1028A.sql1029A.sql1030A.sql1031A.sql1032A.sql1033A.sql1034A.sql1035A.sql1036A.sql1037A.sql1038A.sql1039A.sql1040A.sql1041A.sql1042A.sql1043A.sql1044A.sql1045A.sql1046A.sql1047A.sql1049A.sql1050A.sql1051A.sql1052A.sql1053A.sql1054A.sql1055A.sql1056A.sql1058A.sql1059A.sql1060A.sql1061A.sql1062A.sql1063A.sql1064A.sql1065A.sql1066A.sql1067A.sql1068A.sql1069A.sql1070A.sql1071A.sql1090A.sql1093A.sql1100A.sql1101A.sql1102A.sql1103A.sql1104A.sql1105A.sql1106A.sql1107A.sql1108A.sql1109A.sql1110A.sql1111A.sql1112A.sql1113A.sql1114A.sql1117A.sql1118A.sql1119A.sql1121A.sql1122A.sql1123A.sql1124A.sql1125A.sql1126A.sql1127A.sql1128A.sql1129A.sql1131A.sql1132A.sql1133A.sql1134A.sql1135A.sql1136A.sql1137A.sql1138A.sql1139A.sql
kpi
KPIFactory.class.phpKPIGroupFactory.class.phpKPIGroupListFactory.class.phpKPIListFactory.class.phpUserReviewControlFactory.class.phpUserReviewControlListFactory.class.phpUserReviewFactory.class.phpUserReviewListFactory.class.php
message
MessageControlFactory.class.phpMessageControlListFactory.class.phpMessageFactory.class.phpMessageListFactory.class.phpMessageRecipientFactory.class.phpMessageRecipientListFactory.class.phpMessageSenderFactory.class.phpMessageSenderListFactory.class.php
notification
Notification.class.phpNotificationDeviceTokenFactory.class.phpNotificationDeviceTokenListFactory.class.phpNotificationFactory.class.phpNotificationListFactory.class.php
other
DemoData.class.phpEFT.class.phpOSTicket.class.phpPaymentServicesClientAPI.class.phpROEFactory.class.phpROEListFactory.class.phpRedis_Cache_Lite.class.phpSugarCRM.class.phpSystemDiagnostic.class.phpTelnet.class.phpTimeTrexPaymentServices.class.php
pay_stub
PayStub.class.phpPayStubEntryAccountFactory.class.phpPayStubEntryAccountLinkFactory.class.phpPayStubEntryAccountLinkListFactory.class.phpPayStubEntryAccountListFactory.class.phpPayStubEntryFactory.class.phpPayStubEntryListFactory.class.phpPayStubFactory.class.phpPayStubListFactory.class.phpPayStubTransactionFactory.class.phpPayStubTransactionListFactory.class.php
pay_stub_amendment
PayStubAmendmentFactory.class.phpPayStubAmendmentListFactory.class.phpRecurringPayStubAmendmentFactory.class.phpRecurringPayStubAmendmentListFactory.class.phpRecurringPayStubAmendmentUserFactory.class.phpRecurringPayStubAmendmentUserListFactory.class.php
payperiod
PayPeriodFactory.class.phpPayPeriodListFactory.class.phpPayPeriodScheduleFactory.class.phpPayPeriodScheduleListFactory.class.phpPayPeriodScheduleUserFactory.class.phpPayPeriodScheduleUserListFactory.class.phpPayPeriodTimeSheetVerifyFactory.class.phpPayPeriodTimeSheetVerifyListFactory.class.php
plugins
PermissionFactory.plugin.examplePermissionListFactory.plugin.examplePunchFactory.plugin.examplePunchListFactory.plugin.exampleTimesheetDetailReport.plugin.exampleUserFactory.plugin.example
policy
AbsencePolicyFactory.class.phpAbsencePolicyListFactory.class.phpAccrualPolicyAccountFactory.class.phpAccrualPolicyAccountListFactory.class.phpAccrualPolicyFactory.class.phpAccrualPolicyListFactory.class.phpAccrualPolicyMilestoneFactory.class.phpAccrualPolicyMilestoneListFactory.class.phpBreakPolicyFactory.class.phpBreakPolicyListFactory.class.phpContributingPayCodePolicyFactory.class.phpContributingPayCodePolicyListFactory.class.phpContributingShiftPolicyFactory.class.phpContributingShiftPolicyListFactory.class.phpExceptionPolicyControlFactory.class.phpExceptionPolicyControlListFactory.class.phpExceptionPolicyFactory.class.phpExceptionPolicyListFactory.class.phpHolidayPolicyFactory.class.phpHolidayPolicyListFactory.class.phpHolidayPolicyRecurringHolidayFactory.class.phpHolidayPolicyRecurringHolidayListFactory.class.phpMealPolicyFactory.class.phpMealPolicyListFactory.class.phpOverTimePolicyFactory.class.phpOverTimePolicyListFactory.class.phpPayCodeFactory.class.phpPayCodeListFactory.class.phpPayFormulaPolicyFactory.class.phpPayFormulaPolicyListFactory.class.phpPolicyGroupAccrualPolicyFactory.class.phpPolicyGroupAccrualPolicyListFactory.class.phpPolicyGroupFactory.class.phpPolicyGroupListFactory.class.phpPolicyGroupOverTimePolicyFactory.class.phpPolicyGroupOverTimePolicyListFactory.class.phpPolicyGroupPremiumPolicyFactory.class.phpPolicyGroupPremiumPolicyListFactory.class.phpPolicyGroupRoundIntervalPolicyFactory.class.phpPolicyGroupRoundIntervalPolicyListFactory.class.phpPolicyGroupUserFactory.class.phpPolicyGroupUserListFactory.class.phpPremiumPolicyBranchFactory.class.phpPremiumPolicyBranchListFactory.class.phpPremiumPolicyDepartmentFactory.class.phpPremiumPolicyDepartmentListFactory.class.phpPremiumPolicyFactory.class.phpPremiumPolicyListFactory.class.phpRegularTimePolicyFactory.class.phpRegularTimePolicyListFactory.class.phpRoundIntervalPolicyFactory.class.phpRoundIntervalPolicyListFactory.class.phpSchedulePolicyFactory.class.phpSchedulePolicyListFactory.class.php
punch
PunchControlFactory.class.phpPunchControlListFactory.class.phpPunchFactory.class.phpPunchListFactory.class.php
qualification
QualificationFactory.class.phpQualificationGroupFactory.class.phpQualificationGroupListFactory.class.phpQualificationListFactory.class.phpUserEducationFactory.class.phpUserEducationListFactory.class.phpUserLanguageFactory.class.phpUserLanguageListFactory.class.phpUserLicenseFactory.class.phpUserLicenseListFactory.class.phpUserMembershipFactory.class.phpUserMembershipListFactory.class.phpUserSkillFactory.class.phpUserSkillListFactory.class.php
report
AccrualBalanceSummaryReport.class.phpActiveShiftReport.class.phpAuditTrailReport.class.phpExceptionReport.class.phpForm1099NecReport.class.phpForm940Report.class.phpForm941Report.class.phpFormW2Report.class.phpGeneralLedgerSummaryReport.class.phpKPIReport.class.phpPayStubSummaryReport.class.phpPayStubTransactionSummaryReport.class.phpPayrollExportReport.class.phpPunchSummaryReport.class.phpROEReport.class.phpRemittanceSummaryReport.class.phpReport.class.phpScheduleSummaryReport.class.phpT4ASummaryReport.class.phpT4SummaryReport.class.phpTaxSummaryReport.class.phpTimesheetDetailReport.class.phpTimesheetSummaryReport.class.phpUSStateUnemploymentReport.class.phpUserQualificationReport.class.phpUserSummaryReport.class.php
request
schedule
RecurringScheduleControlFactory.class.phpRecurringScheduleControlListFactory.class.phpRecurringScheduleFactory.class.phpRecurringScheduleListFactory.class.phpRecurringScheduleTemplateControlFactory.class.phpRecurringScheduleTemplateControlListFactory.class.phpRecurringScheduleTemplateFactory.class.phpRecurringScheduleTemplateListFactory.class.phpRecurringScheduleUserFactory.class.phpRecurringScheduleUserListFactory.class.phpScheduleFactory.class.phpScheduleListFactory.class.php
soap
ui_kit
UIKitChildSampleFactory.class.phpUIKitChildSampleListFactory.class.phpUIKitSampleFactory.class.phpUIKitSampleListFactory.class.php
users
BankAccountFactory.class.phpBankAccountListFactory.class.phpEthnicGroupFactory.class.phpEthnicGroupListFactory.class.phpRemittanceDestinationAccountFactory.class.phpRemittanceDestinationAccountListFactory.class.phpUserContactFactory.class.phpUserContactListFactory.class.phpUserDeductionFactory.class.phpUserDeductionListFactory.class.phpUserDefaultCompanyDeductionFactory.class.phpUserDefaultCompanyDeductionListFactory.class.phpUserDefaultFactory.class.phpUserDefaultListFactory.class.phpUserDefaultPreferenceNotificationFactory.class.phpUserDefaultPreferenceNotificationListFactory.class.phpUserFactory.class.phpUserGenericDataFactory.class.phpUserGenericDataListFactory.class.phpUserGenericStatusFactory.class.phpUserGenericStatusListFactory.class.phpUserGroupFactory.class.phpUserGroupListFactory.class.phpUserIdentificationFactory.class.phpUserIdentificationListFactory.class.phpUserListFactory.class.phpUserPreferenceFactory.class.phpUserPreferenceListFactory.class.phpUserPreferenceNotificationFactory.class.phpUserPreferenceNotificationListFactory.class.phpUserReportDataFactory.class.phpUserReportDataListFactory.class.phpUserSettingFactory.class.phpUserSettingListFactory.class.phpUserTitleFactory.class.phpUserTitleListFactory.class.phpUserWageFactory.class.phpUserWageListFactory.class.php
other
payroll_deduction
CA.class.php
CA
AB.class.phpBC.class.phpData.class.phpMB.class.phpNB.class.phpNL.class.phpNS.class.phpNT.class.phpNU.class.phpON.class.phpPE.class.phpQC.class.phpSK.class.phpYT.class.php
CR.class.phpCR
PayrollDeduction.class.phpPayrollDeduction_Base.class.phpUS.class.phpUS
AK.class.phpAL.class.phpAR.class.phpAZ.class.phpCA.class.phpCO.class.phpCT.class.phpDC.class.phpDE.class.phpData.class.phpFL.class.phpGA.class.phpHI.class.phpIA.class.phpID.class.phpIL.class.phpIN.class.phpIN_ALL.class.phpKS.class.phpKY.class.phpLA.class.phpMA.class.phpMD.class.phpMD_ALL.class.phpME.class.phpMI.class.phpMN.class.phpMO.class.phpMS.class.phpMT.class.phpNC.class.phpND.class.phpNE.class.phpNH.class.phpNJ.class.phpNM.class.phpNV.class.phpNY.class.phpNY_NYC.class.phpNY_YONKERS.class.phpOH.class.phpOK.class.phpOR.class.phpPA.class.phpRI.class.phpSC.class.phpSD.class.phpTN.class.phpTX.class.phpUT.class.phpVA.class.phpVT.class.phpWA.class.phpWI.class.phpWV.class.phpWY.class.php
pear
Config.php
Config
Container.php
HTTP.phpContainer
HTTP
Net
Numbers
Words.php
Words
Payment
Process.php
Process
Services
ExchangeRates.php
Validate.phpExchangeRates
Common.phpCountries_UN.phpCurrencies_UN.phpRates_ECB.phpRates_GOOGLE.phpRates_NBI.phpRates_NBP.phpRates_XE.phpRates_YAHOO.php
example.phpValidate
upload
includes
.htaccessAPI.inc.phpCLI.inc.phpCache.inc.phpClassMap.inc.phpDatabase.inc.phpFooter.inc.phpHeader.inc.phpInterface.inc.phpTableMap.inc.phpglobal.inc.php
index.phpinstall_cron.shinterface
Login.phpblank.htmldomains.inilangs.inilocale_stats.txtmessages.potping.htmlping.phpsend_file.php
flex
html5
.jshintrcConfirmEmail.phpDownForMaintenance.phpIndexController.jsdecimal.min.jshtml5shiv.min.jsinteract.min.jsjquery.bridget.jsjquery.i18n.jsjquery.imgareaselect.jsjquery.json.jsjquery.min.jsjquery.sortable.jsjquery.stickytableheaders.min.jsjquery.tablednd.js
client
components
LegacyView.vueReportView.vueTTEditView.jsTTLeftContainer.vueTTMainUI.vueTTTestView.vueTTTopContainer.vueTTTopbar.vue
context_menu
ContextMenuManager.jsPrimeVueSplitButton.vueTTContextButton.vueTTContextMenu.vueTTOverlayMenuButton.vueTTOverlayMultiSelectButton.vueTTSplitButton.vue
login
main_menu
main_ui_router.jspdf_viewer
schedule
timesheet
dist
BaseViewController.bundle.jsBaseWindowController.bundle.jsDocumentSubViewController.bundle.jsJobApplicantEducationSubViewController.bundle.jsJobApplicantEmploymentSubViewController.bundle.jsJobApplicantLanguageSubViewController.bundle.jsJobApplicantLicenseSubViewController.bundle.jsJobApplicantLocationSubViewController.bundle.jsJobApplicantMembershipSubViewController.bundle.jsJobApplicantReferenceSubViewController.bundle.jsJobApplicantSkillSubViewController.bundle.jsJobApplicantSubBaseViewController.bundle.jsJobApplicationSubViewController.bundle.js_css.main_ui.template.html_css.portal.template.html_css.quick_punch.template.html_js.main_ui.template.html_js.portal.template.html_js.quick_punch.template.htmlattendance-accrual-AccrualViewController.bundle.jsattendance-accrual_balance-AccrualBalanceViewController.bundle.jsattendance-exceptions-ExceptionViewController.bundle.jsattendance-in_out-InOutViewController.bundle.jsattendance-job-JobGroupViewController.bundle.jsattendance-job-JobViewController.bundle.jsattendance-job_item-JobItemGroupViewController.bundle.jsattendance-job_item-JobItemViewController.bundle.jsattendance-job_item_amendment-JobItemAmendmentViewController.bundle.jsattendance-map-MapViewController.bundle.jsattendance-map-MapViewController.cssattendance-punch_tag-PunchTagGroupViewController.bundle.jsattendance-punch_tag-PunchTagViewController.bundle.jsattendance-punches-PunchesViewController.bundle.jsattendance-recurring_schedule_control-RecurringScheduleControlViewController.bundle.jsattendance-recurring_schedule_template_control-RecurringScheduleTemplateControlViewController.bundle.jsattendance-schedule-ScheduleShiftViewController.bundle.jsattendance-schedule-ScheduleViewController.bundle.jsattendance-schedule-ScheduleViewController.cssattendance-timesheet-TimeSheetViewController.bundle.jsattendance-timesheet-TimeSheetViewController.cssattendance-timesheet-UserDateTotalParentViewController.bundle.jsattendance-timesheet-UserDateTotalViewController.bundle.jsawesomebox-AComboBox.bundle.jsawesomebox-ADropDown.bundle.jsawesomebox-ALayoutCache.bundle.jsawesomebox-ASearchInput.bundle.jscheckbox-TCheckbox.bundle.jscolor-picker-TColorPicker.bundle.jscolumn_editor-ColumnEditor.bundle.jscombobox-TComboBox.bundle.jscommon-AuthorizationHistoryCommon.bundle.jscommon-BaseTreeViewController.bundle.jscommon-EmbeddedMessageCommon.bundle.jscommon-RequestViewCommonController.bundle.jscompany-branch-BranchViewController.bundle.jscompany-companies-CompaniesViewController.bundle.jscompany-company-CompanyViewController.bundle.jscompany-currency-CurrencyRateViewController.bundle.jscompany-currency-CurrencyViewController.bundle.jscompany-custom_field-CustomFieldViewController.bundle.jscompany-department-DepartmentViewController.bundle.jscompany-ethnic_group-EthnicGroupViewController.bundle.jscompany-geo_fence-GEOFenceViewController.bundle.jscompany-geo_fence-GEOFenceViewController.csscompany-hierarchy_control-HierarchyControlViewController.bundle.jscompany-legal_entity-LegalEntityViewController.bundle.jscompany-other_field-OtherFieldViewController.bundle.jscompany-payroll_remittance_agency-PayrollRemittanceAgencyEventViewController.bundle.jscompany-payroll_remittance_agency-PayrollRemittanceAgencyViewController.bundle.jscompany-permission_control-PermissionControlViewController.bundle.jscompany-remittance_source_account-RemittanceSourceAccountViewController.bundle.jscompany-station-StationViewController.bundle.jscompany-wage-WageViewController.bundle.jscompany-wage_group-WageGroupViewController.bundle.jscore-log-LogViewController.bundle.jsdatepicker-TDatePicker.bundle.jsdatepicker-TRangePicker.bundle.jsdeveloper_tools-AwesomeboxTestViewController.bundle.jsdeveloper_tools-GridTestViewController.bundle.jsdeveloper_tools-WidgetTestViewController.bundle.jsdeveloper_tools-debugPanelController.bundle.jsdocument-DocumentGroupViewController.bundle.jsdocument-DocumentRevisionViewController.bundle.jsdocument-DocumentViewController.bundle.jsdynamic-editview-primevue-button.bundle.jsdynamic-editview-primevue-calendar.bundle.jsdynamic-editview-primevue-dropdown.bundle.jsdynamic-editview-primevue-radiobutton.bundle.jsdynamic-testview.bundle.jsdynamic-testview.cssemployees-employee-EmployeeViewController.bundle.jsemployees-remittance_destination_account-RemittanceDestinationAccountViewController.bundle.jsemployees-roe-ROEViewController.bundle.jsemployees-user_contact-UserContactViewController.bundle.jsemployees-user_default-UserDefaultViewController.bundle.jsemployees-user_group-UserGroupViewController.bundle.jsemployees-user_preference-UserPreferenceViewController.bundle.jsemployees-user_title-UserTitleViewController.bundle.jserror_tip-ErrorTipBox.bundle.jsfeedback-TFeedback.bundle.jsfilebrowser-CameraBrowser.bundle.jsfilebrowser-TImage.bundle.jsfilebrowser-TImageAdvBrowser.bundle.jsfilebrowser-TImageBrowser.bundle.jsfilebrowser-TImageCutArea.bundle.jsfirebase-app.jsfirebase-messaging.jsfirebase-service-worker.bundle.jsformula_builder-FormulaBuilder.bundle.jshelp-AboutViewController.bundle.jshome-dashboard-HomeViewController.bundle.jshome-dashlet-DashletController.bundle.jshr-kpi-KPIGroupViewController.bundle.jshr-kpi-KPIViewController.bundle.jshr-kpi-UserReviewControlViewController.bundle.jshr-qualification-QualificationGroupViewController.bundle.jshr-qualification-QualificationViewController.bundle.jshr-qualification-UserEducationViewController.bundle.jshr-qualification-UserLanguageViewController.bundle.jshr-qualification-UserLicenseViewController.bundle.jshr-qualification-UserMembershipViewController.bundle.jshr-qualification-UserSkillViewController.bundle.jshr-recruitment-JobApplicantEducationViewController.bundle.jshr-recruitment-JobApplicantEmploymentViewController.bundle.jshr-recruitment-JobApplicantLanguageViewController.bundle.jshr-recruitment-JobApplicantLicenseViewController.bundle.jshr-recruitment-JobApplicantLocationViewController.bundle.jshr-recruitment-JobApplicantMembershipViewController.bundle.jshr-recruitment-JobApplicantReferenceViewController.bundle.jshr-recruitment-JobApplicantSkillViewController.bundle.jshr-recruitment-JobApplicantViewController.bundle.jshr-recruitment-JobApplicationViewController.bundle.jshr-recruitment-JobApplicationViewController.csshr-recruitment-JobVacancyViewController.bundle.jshr-recruitment-RecruitmentPortalConfigViewController.bundle.jsinside_editor-InsideEditor.bundle.jsinterface_html5_components_context_menu_TTContextButton_vue.bundle.jsinterface_html5_framework_leaflet_leaflet-timetrex_js.bundle.jsinvoice-area_policy-AreaPolicyViewController.bundle.jsinvoice-client-ClientViewController.bundle.jsinvoice-client_contact-ClientContactViewController.bundle.jsinvoice-client_group-ClientGroupViewController.bundle.jsinvoice-client_payment-ClientPaymentViewController.bundle.jsinvoice-district-InvoiceDistrictViewController.bundle.jsinvoice-invoice-InvoiceViewController.bundle.jsinvoice-invoice_transaction-InvoiceTransactionViewController.bundle.jsinvoice-payment_gateway-PaymentGatewayViewController.bundle.jsinvoice-product_group-ProductGroupViewController.bundle.jsinvoice-products-ProductViewController.bundle.jsinvoice-settings-InvoiceConfigViewController.bundle.jsinvoice-shipping_policy-ShippingPolicyViewController.bundle.jsinvoice-tax_policy-TaxPolicyViewController.bundle.jsjqgrid-TGridHeader.bundle.jsleaflet-timetrex.csslist-TList.bundle.jslive-chat.bundle.jslogin-LoginViewController.bundle.jslogin-LoginViewController.cssmain_ui-styles.bundle.jsmain_ui-styles.cssmain_ui-vendor-styles.bundle.jsmain_ui-vendor-styles.cssmain_ui.bundle.jsmain_ui.cssmessage_box-NoHierarchyBox.bundle.jsmessage_box-NoResultBox.bundle.jsmessage_box-SaveAndContinueBox.bundle.jsmy_account-expense-ExpenseAuthorizationViewController.bundle.jsmy_account-expense-LoginUserExpenseViewController.bundle.jsmy_account-message_control-MessageControlViewController.bundle.jsmy_account-notification-NotificationViewController.bundle.jsmy_account-password-ChangePasswordViewController.bundle.jsmy_account-request-RequestViewController.bundle.jsmy_account-request_authorization-RequestAuthorizationViewController.bundle.jsmy_account-timesheet_authorization-TimeSheetAuthorizationViewController.bundle.jsmy_account-user_contact-LoginUserContactViewController.bundle.jsmy_account-user_preference-LoginUserPreferenceViewController.bundle.jspaging-Paging2.bundle.jspayperiod-PayPeriodScheduleViewController.bundle.jspayroll-company_tax_deduction-CompanyTaxDeductionViewController.bundle.jspayroll-government_document-GovernmentDocumentViewController.bundle.jspayroll-pay_periods-PayPeriodsViewController.bundle.jspayroll-pay_stub-PayStubViewController.bundle.jspayroll-pay_stub_amendment-PayStubAmendmentViewController.bundle.jspayroll-pay_stub_entry_account-PayStubEntryAccountViewController.bundle.jspayroll-pay_stub_transaction-PayStubTransactionViewController.bundle.jspayroll-process_transactions_wizard-ProcessTransactionsWizard.bundle.jspayroll-process_transactions_wizard-ProcessTransactionsWizardController.bundle.jspayroll-process_transactions_wizard-ProcessTransactionsWizardStepHome.bundle.jspayroll-recurring_pay_stub_amendment-RecurringPayStubAmendmentViewController.bundle.jspayroll-remittance_wizard-PayrollRemittanceAgencyEventWizard.bundle.jspayroll-remittance_wizard-PayrollRemittanceAgencyEventWizardController.bundle.jspayroll-remittance_wizard-PayrollRemittanceAgencyEventWizardStepHome.bundle.jspayroll-remittance_wizard-PayrollRemittanceAgencyEventWizardStepPublish.bundle.jspayroll-remittance_wizard-PayrollRemittanceAgencyEventWizardStepReview.bundle.jspayroll-remittance_wizard-PayrollRemittanceAgencyEventWizardStepSubmit.bundle.jspayroll-user_expense-UserExpenseViewController.bundle.jspdf.worker.jsvendors-node_modules_bootstrap-select_dist_js_bootstrap-select_js.bundle.jsvendors-node_modules_css-loader_dist_cjs_js_node_modules_tinymce_skins_content_default_conten-a516be.bundle.jsvendors-node_modules_css-loader_dist_cjs_js_node_modules_tinymce_skins_content_default_conten-a516be.cssvendors-node_modules_decimal_js_decimal_mjs.bundle.jsvendors-node_modules_jquery-bridget_jquery-bridget_js-node_modules_masonry-layout_masonry_js.bundle.jsvendors-node_modules_jquery-ui_ui_widgets_autocomplete_js-node_modules_jquery-ui_ui_widgets_r-024c3b.bundle.jsvendors-node_modules_jquery-ui_ui_widgets_datepicker_js.bundle.jsvendors-node_modules_leaflet_dist_images_marker-icon-2x_png-node_modules_leaflet_dist_images_-78d511.bundle.jsvendors-node_modules_leaflet_dist_images_marker-icon-2x_png-node_modules_leaflet_dist_images_-78d511.cssvendors-node_modules_linkifyjs_string_js.bundle.jsvendors-node_modules_pdfjs-dist_web_pdf_viewer_js.bundle.jsvendors-node_modules_primevue_button_button_esm_js-node_modules_primevue_menu_menu_esm_js-nod-e86f5b.bundle.jswizard-BaseWizardController.bundle.jswizard-Wizard.bundle.jswizard-WizardStep.bundle.jswizard-dashlet-DashletWizardController.bundle.jswizard-find_available-FindAvailableViewController.bundle.jswizard-find_available-FindAvailableWizardController.bundle.jswizard-forgot_password-ForgotPasswordWizardController.bundle.jswizard-formula_builder_wizard-FormulaBuilderWizardController.bundle.jswizard-generate_pay_stub-GeneratePayStubWizardController.bundle.jswizard-import_csv-ImportCSVWizardController.bundle.jswizard-install-InstallWizardController.bundle.jswizard-job_invoice-JobInvoiceWizardController.bundle.jswizard-login_user-LoginUserViewController.bundle.jswizard-login_user-LoginUserWizardController.bundle.jswizard-pay_code-PayCodeWizardController.bundle.jswizard-pay_stub_account-PayStubAccountWizardController.bundle.jswizard-permission_wizard-PermissionWizardController.bundle.jswizard-process_payroll-ProcessPayrollWizardController.bundle.jswizard-quick_start-QuickStartWizardController.bundle.jswizard-re_calculate_accrual-ReCalculateAccrualWizardController.bundle.jswizard-re_calculate_timesheet-ReCalculateTimeSheetWizardController.bundle.jswizard-report_view-ReportViewWizardController.bundle.jswizard-reset_forgot_password-ResetForgotPasswordWizardController.bundle.jswizard-reset_password-ResetPasswordWizardController.bundle.jswizard-share_report-ShareReportWizardController.bundle.jswizard-user_generic_data_status-UserGenericStatusWindowController.bundle.jswizard-user_photo-UserPhotoWizardController.bundle.js
pdfjs-cmaps
78-EUC-H.bcmap78-EUC-V.bcmap78-H.bcmap78-RKSJ-H.bcmap78-RKSJ-V.bcmap78-V.bcmap78ms-RKSJ-H.bcmap78ms-RKSJ-V.bcmap83pv-RKSJ-H.bcmap90ms-RKSJ-H.bcmap90ms-RKSJ-V.bcmap90msp-RKSJ-H.bcmap90msp-RKSJ-V.bcmap90pv-RKSJ-H.bcmap90pv-RKSJ-V.bcmapAdd-H.bcmapAdd-RKSJ-H.bcmapAdd-RKSJ-V.bcmapAdd-V.bcmapAdobe-CNS1-0.bcmapAdobe-CNS1-1.bcmapAdobe-CNS1-2.bcmapAdobe-CNS1-3.bcmapAdobe-CNS1-4.bcmapAdobe-CNS1-5.bcmapAdobe-CNS1-6.bcmapAdobe-CNS1-UCS2.bcmapAdobe-GB1-0.bcmapAdobe-GB1-1.bcmapAdobe-GB1-2.bcmapAdobe-GB1-3.bcmapAdobe-GB1-4.bcmapAdobe-GB1-5.bcmapAdobe-GB1-UCS2.bcmapAdobe-Japan1-0.bcmapAdobe-Japan1-1.bcmapAdobe-Japan1-2.bcmapAdobe-Japan1-3.bcmapAdobe-Japan1-4.bcmapAdobe-Japan1-5.bcmapAdobe-Japan1-6.bcmapAdobe-Japan1-UCS2.bcmapAdobe-Korea1-0.bcmapAdobe-Korea1-1.bcmapAdobe-Korea1-2.bcmapAdobe-Korea1-UCS2.bcmapB5-H.bcmapB5-V.bcmapB5pc-H.bcmapB5pc-V.bcmapCNS-EUC-H.bcmapCNS-EUC-V.bcmapCNS1-H.bcmapCNS1-V.bcmapCNS2-H.bcmapCNS2-V.bcmapETHK-B5-H.bcmapETHK-B5-V.bcmapETen-B5-H.bcmapETen-B5-V.bcmapETenms-B5-H.bcmapETenms-B5-V.bcmapEUC-H.bcmapEUC-V.bcmapExt-H.bcmapExt-RKSJ-H.bcmapExt-RKSJ-V.bcmapExt-V.bcmapGB-EUC-H.bcmapGB-EUC-V.bcmapGB-H.bcmapGB-V.bcmapGBK-EUC-H.bcmapGBK-EUC-V.bcmapGBK2K-H.bcmapGBK2K-V.bcmapGBKp-EUC-H.bcmapGBKp-EUC-V.bcmapGBT-EUC-H.bcmapGBT-EUC-V.bcmapGBT-H.bcmapGBT-V.bcmapGBTpc-EUC-H.bcmapGBTpc-EUC-V.bcmapGBpc-EUC-H.bcmapGBpc-EUC-V.bcmapH.bcmapHKdla-B5-H.bcmapHKdla-B5-V.bcmapHKdlb-B5-H.bcmapHKdlb-B5-V.bcmapHKgccs-B5-H.bcmapHKgccs-B5-V.bcmapHKm314-B5-H.bcmapHKm314-B5-V.bcmapHKm471-B5-H.bcmapHKm471-B5-V.bcmapHKscs-B5-H.bcmapHKscs-B5-V.bcmapHankaku.bcmapHiragana.bcmapKSC-EUC-H.bcmapKSC-EUC-V.bcmapKSC-H.bcmapKSC-Johab-H.bcmapKSC-Johab-V.bcmapKSC-V.bcmapKSCms-UHC-H.bcmapKSCms-UHC-HW-H.bcmapKSCms-UHC-HW-V.bcmapKSCms-UHC-V.bcmapKSCpc-EUC-H.bcmapKSCpc-EUC-V.bcmapKatakana.bcmapLICENSENWP-H.bcmapNWP-V.bcmapRKSJ-H.bcmapRKSJ-V.bcmapRoman.bcmapUniCNS-UCS2-H.bcmapUniCNS-UCS2-V.bcmapUniCNS-UTF16-H.bcmapUniCNS-UTF16-V.bcmapUniCNS-UTF32-H.bcmapUniCNS-UTF32-V.bcmapUniCNS-UTF8-H.bcmapUniCNS-UTF8-V.bcmapUniGB-UCS2-H.bcmapUniGB-UCS2-V.bcmapUniGB-UTF16-H.bcmapUniGB-UTF16-V.bcmapUniGB-UTF32-H.bcmapUniGB-UTF32-V.bcmapUniGB-UTF8-H.bcmapUniGB-UTF8-V.bcmapUniJIS-UCS2-H.bcmapUniJIS-UCS2-HW-H.bcmapUniJIS-UCS2-HW-V.bcmapUniJIS-UCS2-V.bcmapUniJIS-UTF16-H.bcmapUniJIS-UTF16-V.bcmapUniJIS-UTF32-H.bcmapUniJIS-UTF32-V.bcmapUniJIS-UTF8-H.bcmapUniJIS-UTF8-V.bcmapUniJIS2004-UTF16-H.bcmapUniJIS2004-UTF16-V.bcmapUniJIS2004-UTF32-H.bcmapUniJIS2004-UTF32-V.bcmapUniJIS2004-UTF8-H.bcmapUniJIS2004-UTF8-V.bcmapUniJISPro-UCS2-HW-V.bcmapUniJISPro-UCS2-V.bcmapUniJISPro-UTF8-V.bcmapUniJISX0213-UTF32-H.bcmapUniJISX0213-UTF32-V.bcmapUniJISX02132004-UTF32-H.bcmapUniJISX02132004-UTF32-V.bcmapUniKS-UCS2-H.bcmapUniKS-UCS2-V.bcmapUniKS-UTF16-H.bcmapUniKS-UTF16-V.bcmapUniKS-UTF32-H.bcmapUniKS-UTF32-V.bcmapUniKS-UTF8-H.bcmapUniKS-UTF8-V.bcmapV.bcmapWP-Symbol.bcmap
policy-absence_policy-AbsencePolicyViewController.bundle.jspolicy-accrual_policy-AccrualPolicyAccountViewController.bundle.jspolicy-accrual_policy-AccrualPolicyUserModifierViewController.bundle.jspolicy-accrual_policy-AccrualPolicyViewController.bundle.jspolicy-break_policy-BreakPolicyViewController.bundle.jspolicy-contributing_pay_code_policy-ContributingPayCodePolicyViewController.bundle.jspolicy-contributing_shift_policy-ContributingShiftPolicyViewController.bundle.jspolicy-exception_policy-ExceptionPolicyControlViewController.bundle.jspolicy-expense_policy-ExpensePolicyViewController.bundle.jspolicy-holiday-HolidayViewController.bundle.jspolicy-holiday_policy-HolidayPolicyViewController.bundle.jspolicy-meal_policy-MealPolicyViewController.bundle.jspolicy-overtime_policy-OvertimePolicyViewController.bundle.jspolicy-pay_code-PayCodeViewController.bundle.jspolicy-pay_formula_policy-PayFormulaPolicyViewController.bundle.jspolicy-policy_group-PolicyGroupViewController.bundle.jspolicy-premium_policy-PremiumPolicyViewController.bundle.jspolicy-recurring_holiday-RecurringHolidayViewController.bundle.jspolicy-regular_time_policy-RegularTimePolicyViewController.bundle.jspolicy-round_interval_policy-RoundIntervalPolicyViewController.bundle.jspolicy-schedule_policy-SchedulePolicyViewController.bundle.jsportal-PortalBaseViewController.bundle.jsportal-header-HeaderUploadResumeWidget.bundle.jsportal-hr-my_jobapplication-MyJobApplicationViewController.bundle.jsportal-hr-my_profile-JobApplicantEducationSubViewController.bundle.jsportal-hr-my_profile-JobApplicantLanguageSubViewController.bundle.jsportal-hr-my_profile-JobApplicantLicenseSubViewController.bundle.jsportal-hr-my_profile-JobApplicantMembershipSubViewController.bundle.jsportal-hr-my_profile-JobApplicantSubBaseViewController.bundle.jsportal-hr-my_profile-MyProfileViewController.bundle.jsportal-hr-recruitment-PortalJobVacancyDetailController.bundle.jsportal-hr-recruitment-PortalJobVacancyDetailViewController.bundle.jsportal-hr-recruitment-PortalJobVacancyRowController.bundle.jsportal-hr-recruitment-PortalJobVacancyViewController.bundle.jsportal-sign_in-PortalForgotPasswordController.bundle.jsportal-sign_in-PortalResetForgotPasswordController.bundle.jsportal-styles.bundle.jsportal-styles.cssportal.bundle.jsportal.csspost-login-app-dependancies.bundle.jspost-login-main_ui-vendor-dependancies.bundle.jsquick_punch-QuickPunchBaseViewController.bundle.jsquick_punch-header-HeaderViewController.bundle.jsquick_punch-login-QuickPunchLoginViewController.bundle.jsquick_punch-punch-QuickPunchViewController.bundle.jsquick_punch-styles.bundle.jsquick_punch-styles.cssquick_punch.bundle.jsquick_punch.cssreports-ReportBaseViewController.bundle.jsreports-accrual_balance_summary-AccrualBalanceSummaryReportViewController.bundle.jsreports-affordable_care-AffordableCareReportViewController.bundle.jsreports-audittrail-AuditTrailReportViewController.bundle.jsreports-custom_column-CustomColumnViewController.bundle.jsreports-employee_information-UserSummaryReportViewController.bundle.jsreports-exception_summary-ExceptionSummaryReportViewController.bundle.jsreports-expense_summary-ExpenseSummaryReportViewController.bundle.jsreports-form1099-Form1099NecReportViewController.bundle.jsreports-form940-Form940ReportViewController.bundle.jsreports-form941-Form941ReportViewController.bundle.jsreports-formw2-FormW2ReportViewController.bundle.jsreports-general_ledger_summary-GeneralLedgerSummaryReportViewController.bundle.jsreports-invoice_transaction_summary-InvoiceTransactionSummaryReportViewController.bundle.jsreports-job_analysis-JobAnalysisReportViewController.bundle.jsreports-job_info-JobInformationReportViewController.bundle.jsreports-job_item_info-JobItemInformationReportViewController.bundle.jsreports-job_summary-JobSummaryReportViewController.bundle.jsreports-pay_stub_summary-PayStubSummaryReportViewController.bundle.jsreports-pay_stub_transaction_summary-PayStubTransactionSummaryReportViewController.bundle.jsreports-payroll_export-PayrollExportReportViewController.bundle.jsreports-punch_summary-PunchSummaryReportViewController.bundle.jsreports-qualification_summary-UserQualificationReportViewController.bundle.jsreports-recruitment_detail-UserRecruitmentDetailReportViewController.bundle.jsreports-recruitment_summary-UserRecruitmentSummaryReportViewController.bundle.jsreports-remittance_summary-RemittanceSummaryReportViewController.bundle.jsreports-report_schedule-ReportScheduleViewController.bundle.jsreports-review_summary-KPIReportViewController.bundle.jsreports-saved_report-SavedReportViewController.bundle.jsreports-schedule_summary-ScheduleSummaryReportViewController.bundle.jsreports-t4_summary-T4SummaryReportViewController.bundle.jsreports-t4a_summary-T4ASummaryReportViewController.bundle.jsreports-tax_summary-TaxSummaryReportViewController.bundle.jsreports-timesheet_detail-TimesheetDetailReportViewController.bundle.jsreports-timesheet_summary-TimesheetSummaryReportViewController.bundle.jsreports-us_state_unemployment-USStateUnemploymentReportViewController.bundle.jsreports-whos_in_summary-ActiveShiftReportViewController.bundle.jsruntime.bundle.jssearch_panel-SearchPanel.bundle.jsseparated_box-SeparatedBox.bundle.jsswitch_button-SwitchButton.bundle.jstag_input-TTagInput.bundle.jstext-TText.bundle.jstext_input-TPasswordInput.bundle.jstext_input-TTextInput.bundle.jstextarea-TTextArea.bundle.jstimepicker-TTimePicker.bundle.jstoggle_button-TToggleButton.bundle.jsttgrid-TTGrid.bundle.jsui_kit_sample-UIKitChildSampleViewController.bundle.jsui_kit_sample-UIKitSampleViewController.bundle.jsvendor_ui
leaflet-draw
leaflet-routing-machine
leaflet
pdfjs-dist
web
primeicons
primevue
framework
apollo-vue
.browserslistrc.eslintrc.js.prettierrcCHANGELOG.mdREADME.mdbabel.config.jspackage.jsonpostcss.config.jsfavicon.icoindex.htmlupload.php
public
assets
demo
data
countries.jsoncustomers-large.jsoncustomers-medium.jsoncustomers-small.jsoncustomers-xlarge.jsonevents.jsonicons.jsonphotos.jsonproducts-orders-small.jsonproducts-orders.jsonproducts-small.jsonproducts.jsontreenodes.jsontreetablenodes.json
flags
images
avatar
amyelsner.pngannafali.pngasiyajavayant.pngbernardodominic.pngelwinsharvill.pngionibowcher.pngivanmagalhaes.pngonyamalimba.pngprofile.jpgstephenshaw.pngxuxuefeng.png
galleria
galleria1.jpggalleria10.jpggalleria10s.jpggalleria11.jpggalleria11s.jpggalleria12.jpggalleria12s.jpggalleria13.jpggalleria13s.jpggalleria14.jpggalleria14s.jpggalleria15.jpggalleria15s.jpggalleria1s.jpggalleria2.jpggalleria2s.jpggalleria3.jpggalleria3s.jpggalleria4.jpggalleria4s.jpggalleria5.jpggalleria5s.jpggalleria6.jpggalleria6s.jpggalleria7.jpggalleria7s.jpggalleria8.jpggalleria8s.jpggalleria9.jpggalleria9s.jpg
logo-white.svglogo.svgnature
nature1.jpgnature10.jpgnature11.jpgnature12.jpgnature2.jpgnature3.jpgnature4.jpgnature5.jpgnature6.jpgnature7.jpgnature8.jpgnature9.jpg
product
bamboo-watch.jpgblack-watch.jpgblue-band.jpgblue-t-shirt.jpgbracelet.jpgbrown-purse.jpgchakra-bracelet.jpggalaxy-earrings.jpggame-controller.jpggaming-set.jpggold-phone-case.jpggreen-earbuds.jpggreen-t-shirt.jpggrey-t-shirt.jpgheadphones.jpglight-green-t-shirt.jpglime-band.jpgmini-speakers.jpgpainted-phone-case.jpgpink-band.jpgpink-purse.jpgproduct-placeholder.svgpurple-band.jpgpurple-gemstone-necklace.jpgpurple-t-shirt.jpgshoes.jpgsneakers.jpgteal-t-shirt.jpgyellow-earbuds.jpgyoga-mat.jpgyoga-set.jpg
widgets
layout
css
layout-blue-dark.scsslayout-blue-dim.scsslayout-blue-light.scsslayout-cyan-dark.scsslayout-cyan-dim.scsslayout-cyan-light.scsslayout-green-dark.scsslayout-green-dim.scsslayout-green-light.scsslayout-indigo-dark.scsslayout-indigo-dim.scsslayout-indigo-light.scsslayout-orange-dark.scsslayout-orange-dim.scsslayout-orange-light.scsslayout-pink-dark.scsslayout-pink-dim.scsslayout-pink-light.scsslayout-purple-dark.scsslayout-purple-dim.scsslayout-purple-light.scsslayout-tt-light.scsslayout-yellow-dark.scsslayout-yellow-dim.scsslayout-yellow-light.scss
fonts
source-sans-pro-v11-latin-ext_latin-300.eotsource-sans-pro-v11-latin-ext_latin-300.svgsource-sans-pro-v11-latin-ext_latin-300.ttfsource-sans-pro-v11-latin-ext_latin-300.woffsource-sans-pro-v11-latin-ext_latin-300.woff2source-sans-pro-v11-latin-ext_latin-700.eotsource-sans-pro-v11-latin-ext_latin-700.svgsource-sans-pro-v11-latin-ext_latin-700.ttfsource-sans-pro-v11-latin-ext_latin-700.woffsource-sans-pro-v11-latin-ext_latin-700.woff2source-sans-pro-v11-latin-ext_latin-italic.eotsource-sans-pro-v11-latin-ext_latin-italic.svgsource-sans-pro-v11-latin-ext_latin-italic.ttfsource-sans-pro-v11-latin-ext_latin-italic.woffsource-sans-pro-v11-latin-ext_latin-italic.woff2source-sans-pro-v11-latin-ext_latin-regular.eotsource-sans-pro-v11-latin-ext_latin-regular.svgsource-sans-pro-v11-latin-ext_latin-regular.ttfsource-sans-pro-v11-latin-ext_latin-regular.woffsource-sans-pro-v11-latin-ext_latin-regular.woff2
images
404.pngaccess.pngapollo_logo.png
avatar
back.svgcheck.svgdark-line.gifdashboard
error.pnglanding
browser.svgcreative.svgicon-menu.svglanding.jpglanding_avatar.pnglanding_cloud.pnglanding_logo_footer.pnglanding_rocket.pnglanding_s2.pngorganize.svgresponsive.svg
logo-dark.pnglogo-white.pngmap.pngpages
bg-404.jpgbg-access.jpgbg-error.jpgbg-help.pngbg-login.jpg
profile.pngtth-connector.pnghelp
icon-design.svgicon-devices.svgicon-diamond.svgicon-document.svgpages
sass
_fonts.scss
layout
_config.scss_content.scss_dashboard.scss_exception.scss_footer.scss_help.scss_horizontalmenu.scss_invoice.scss_landing.scss_layout.scss_layout_dark.scss_layout_dim.scss_layout_light.scss_loader.scss_login.scss_main.scss_menu.scss_mixins.scss_mobile.scss_slimmenu.scss_topbar.scss_typography.scss_utils.scss_variables.scss_verticalmenu.scss_widgets.scss
overrides
theme
_theme_dark.scss_theme_dim.scss_theme_light.scss
_variables
designer
_colors.scss_common.scss_components.scss_mixins.scss
components
button
data
_carousel.scss_datatable.scss_dataview.scss_filter.scss_fullcalendar.scss_orderlist.scss_organizationchart.scss_paginator.scss_picklist.scss_timeline.scss_tree.scss_treetable.scss
file
input
_autocomplete.scss_calendar.scss_cascadeselect.scss_checkbox.scss_chips.scss_colorpicker.scss_dropdown.scss_editor.scss_inputgroup.scss_inputnumber.scss_inputswitch.scss_inputtext.scss_listbox.scss_multiselect.scss_password.scss_radiobutton.scss_rating.scss_selectbutton.scss_slider.scss_togglebutton.scss_treeselect.scss
menu
_breadcrumb.scss_contextmenu.scss_dock.scss_megamenu.scss_menu.scss_menubar.scss_panelmenu.scss_steps.scss_tabmenu.scss_tieredmenu.scss
messages
misc
_avatar.scss_badge.scss_blockui.scss_chip.scss_inplace.scss_progressbar.scss_scrolltop.scss_skeleton.scss_tag.scss_terminal.scss
multimedia
overlay
panel
theme
theme-blue-dark.scsstheme-blue-dim.scsstheme-blue-light.scsstheme-cyan-dark.scsstheme-cyan-dim.scsstheme-cyan-light.scsstheme-green-dark.scsstheme-green-dim.scsstheme-green-light.scsstheme-indigo-dark.scsstheme-indigo-dim.scsstheme-indigo-light.scsstheme-orange-dark.scsstheme-orange-dim.scsstheme-orange-light.scsstheme-pink-dark.scsstheme-pink-dim.scsstheme-pink-light.scsstheme-purple-dark.scsstheme-purple-dim.scsstheme-purple-light.scsstheme-tt-light.scsstheme-yellow-dark.scsstheme-yellow-dim.scsstheme-yellow-light.scss
src
App.scssApp.vueAppBreadcrumb.vueAppCodeHighlight.jsAppConfig.vueAppFooter.vueAppMenu.vueAppSubmenu.vueAppTopbar.vueAppWrapper.vue
assets
components
ButtonDemo.vueChartDemo.vueDashboard.vueDocumentation.vueEmptyPage.vueFileDemo.vueFloatLabelDemo.vueFormLayoutDemo.vueInputDemo.vueInvalidStateDemo.vueListDemo.vueMediaDemo.vueMenuDemo.vueMessagesDemo.vueMiscDemo.vueOverlayDemo.vuePanelsDemo.vueTableDemo.vueTreeDemo.vue
event-bus.jsmain.jsmenu
pages
Access.vueCalendarDemo.vueCrudDemo.vueError.vueHelp.vueInvoice.vueLogin.vueNotFound.vueTimelineDemo.vue
router.jsservice
utilities
tests
vue.config.jsbootstrap-select
bootstrap-toolkit.min.jsbootstrap
css
fonts
glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woffglyphicons-halflings-regular.woff2
js
google
analytics
jqueryui
json2.jsmasonry.min.jsmeasurement.jsmoment.jsnanobar.min.jspolyfill.jsqunit
r.jsrequire.jsrequire_async_plugin.jsrespond.min.jsrightclickmenu
tinymce
jquery.tinymce.min.js
langs
license.txtplugins
advlist
anchor
autolink
autoresize
autosave
bbcode
charmap
code
codesample
colorpicker
contextmenu
directionality
emoticons
img
smiley-cool.gifsmiley-cry.gifsmiley-embarassed.gifsmiley-foot-in-mouth.gifsmiley-frown.gifsmiley-innocent.gifsmiley-kiss.gifsmiley-laughing.gifsmiley-money-mouth.gifsmiley-sealed.gifsmiley-smile.gifsmiley-surprised.gifsmiley-tongue-out.gifsmiley-undecided.gifsmiley-wink.gifsmiley-yell.gif
plugin.min.jsfullpage
fullscreen
help
hr
image
imagetools
importcss
insertdatetime
legacyoutput
link
lists
media
nonbreaking
noneditable
pagebreak
paste
preview
print
save
searchreplace
spellchecker
tabfocus
table
template
textcolor
textpattern
toc
visualblocks
visualchars
wordcount
skins
lightgray
themes
tinymce.min.jsvue
widgets
color-picker
datepicker
jqgrid
jquery.qtip
global
APIGlobal.js.phpCookieSetting.jsDebug.jsGlobal.jsLocalCacheData.jsPermissionManager.jsProgressBarManager.jsRateLimit.jsTAlertManager.jsTTPromise.jsTTUUID.js
index.phpmain.jsmain_ui-styles.jsmain_ui-vendor-styles.jswidgets
awesomebox
checkbox
color-picker
column_editor
combobox
datepicker
TDatePicker.jsTRangeInsideEditorRender.htmlTRangeInsideEditorRow.htmlTRangePicker.htmlTRangePicker.js
error_tip
feedback
filebrowser
inside_editor
jqgrid
list
live-chat
message_box
paging
search_panel
separated_box
switch_button
tag_input
talert
text
text_input
textarea
timepicker
toggle_button
ttgrid
view_min_tab
wizard
wizard_form_item
model
phpinfo.phppost-login-main_ui-dependancies.jspost-login-main_ui-vendor-dependancies.jsservices
HtmlTemplates.jsNotificationConsumer.jsServiceCaller.jsTTEventBus.jsTTVueUtils.jsTimeTrexClientAPI.jsfirebase-messaging-sw.js
theme
default
css
application.cssgray.svgquickPunch.css
global
widgets
awesomebox
column_editor
datepicker
error_tip
feedback
images
filebrowser
inside_editor
jqgrid
loading_bar
message_box
ribbon
RibbonView.cssgray.svg
icons
KPI-35x35.pngKPI_groups-35x35.pngabout-35x35.pngabsence_policies-35x35.pngaccrual-35x35.pngaccrual_accounts-35x35.pngaccrual_balance-35x35.pngaccrual_policies-35x35.pngadministration_guide_manual-35x35.pngalert-16x16.pngalert-35x35.pngalert_policies-35x35.pngapproved_expense-35x35.pngapproved_expense_new-35x35.pngapproved_overlay-35x35.pngarea_policies-35x35.pngaudit_trail-35x35.pngauthorization-35x35.pngauthorization2-35x35.pngauthorization3-35x35.pngauthorize-35x35.pngauthorize_request-35x35.pngauthorize_request_new-35x35.pngauthorize_timesheet-35x35.pngauthorize_timesheet_new-35x35.pngback-35x35.pngbank_accounts-35x35.pngbranches-35x35.pngbreak_policies-35x35.pngcalculate-35x35.pngcalculate_paystubs-35x35.pngcancel-35x35.pngclient_groups-35x35.pngclients-35x35.pngclients_contacts-35x35.pngclock_in_out-35x35.pngclose-35x35.pngclose_misc-35x35.pngclose_pay_period-35x35.pngclose_pay_period2-35x35.pngcompanies-35x35.pngcompany_information-35x35.pngcontact_information-35x35.pngcontributing_policies-35x35.pngcontributing_shift_policy-35x35.pngcopy-35x35.pngcopy_as_new-35x35.pngcurrencies-35x35.pngcustom_fields-35x35.pngdecline-35x35.pngdelete-35x35.pngdelete_and_next-35x35.pngdelete_and_previous-35x35.pngdepartments-35x35.pngdirect_deposit-35x35.pngdistrict-35x35.pngdocument_groups-35x35.pngdocuments-35x35.pngdone-35x35.pngdownload1-35x35.pngdownload2-35x35.pngedit-35x35.pngeducation-35x35.pngeligibility_policies-35x35.pngemailhelp-35x35.pngemployee_reports-35x35.pngemployees-35x35.pngethinicgroups-35x35.pngexceptions-35x35.pngexceptions_policies-35x35.pngexpense_policies-35x35.pngexpenses-35x35.pngexport-35x35.pngexport_to_efile-35x35.pngexport_to_excel-35x35.pngexport_to_xml-35x35.pngfaq-35x35.pngfillshift-35x35.pngformula_builder-16x16.pngformula_builder-35x35.pnggo-35x35.pnggovernment_payroll_documents-35x35.pnggroups-35x35.pnghappy.pnghappy_light.pnghelp-35x35.pnghierarchy-35x35.pngholiday_policies-35x35.pnghr_reports-35x35.pngimport-35x35.pnginbox-35x35.pnginvoice_reports-35x35.pnginvoice_wizard-35x35.pnginvoices-35x35.pngjob_applicant-35x35.pngjob_groups-35x35.pngjob_titles-35x35.pngjob_tracking_reports-35x35.pngjob_vacancies-35x35.pngjob_vacancy-35x35.pngjobapplications-35x35.pngjobs-35x35.pnglanguages-35x35.pnglanguages.pnglegal_entity-35x35.pnglicense-35x35.pnglicenses-35x35.pnglock-35x35.pnglogin-35x35.pnglogout-35x35.pngmap-35x35.pngmass_edit-35x35.pngmass_punches-35x35.pngmass_schedule-35x35.pngmaximize-35x35.pngmeal_policies-35x35.pngmemberships-35x35.pngmemberships.pngmessages-35x35.pngmessages_new-35x35.pngminimize-35x35.pngmove-35x35.pngneutral.pngneutral_light.pngnew_add-35x35.pngnew_hire_defaults-35x35.pngnew_overlay-35x35.pngnext-35x35.pngno_photo-16x16.pngno_photo-256x256.pngno_photo-35x35.pngonline_university-35x35.pngoverride-35x35.pngovertime_policies-35x35.pngpacking_slip-35x35.pngpass-35x35.pngpasswords-35x35.pngpay_code-35x35.pngpay_formula_policy-35x35.pngpay_period_schedules-35x35.pngpay_periods-35x35.pngpay_stub_account_linking-35x35.pngpay_stub_amendments-35x35.pngpay_stubs-35x35.pngpay_stubs_accounts-35x35.pngpayment_gateway_settings-35x35.pngpayment_methods-35x35.pngpayroll_remittance_agency-35x35.pngpayroll_reports-35x35.pngpermission_groups-35x35.pngpiece_work_policies-35x35.pngpolicy_groups-35x35.pngpreferences-35x35.pngpreferences_myaccount-35x35.pngpremium_policies-35x35.pngprint-35x35.pngprint_checks-35x35.pngprocess_payroll-35x35.pngproduct_groups-35x35.pngproducts-35x35.pngpunches-35x35.pngqualification_groups-35x35.pngqualification_groups.pngqualifications-35x35.pngqualifications.pngquicksetupwizard-35x35.pngquotes-35x35.pngrecord_of_employment-35x35.pngrecurring_holidays-35x35.pngrecurring_pay_stub_amendments-35x35.pngrecurring_schedule-35x35.pngrecurring_template-35x35.pngregular_time_policies-35x35.pngrequests-35x35.pngrestart-35x35.pngreviews-35x35.pngrounding_policies-35x35.pngsad.pngsad_light.pngsave-35x35.pngsave_and_back_exit-35x35.pngsave_and_continue-35x35.pngsave_and_copy-35x35.pngsave_and_new-35x35.pngsave_and_next-35x35.pngsave_and_previous-35x35.pngsave_setup-35x35.pngsaved_reports-35x35.pngschedule-35x35.pngschedule_policies-35x35.pngscheduled_shifts-35x35.pngsend-35x35.pngsent-35x35.pngsettings-35x35.pngshare-35x35.pngshipping_policies-35x35.pngshow_all_employees-18x18.pngshow_daily_totals-18x18.pngshow_weekly_totals-18x18.pngskill-35x35.pngskills-35x35.pngstations-35x35.pngstop-35x35.pngstrict_date_range-18x18.pngswap_shift-35x35.pngtags-35x35.pngtask_groups-35x35.pngtasks-35x35.pngtax_policies-35x35.pngtax_reports-35x35.pngtaxes_deductions-35x35.pngtimesheet-35x35.pngtimesheet_reports-35x35.pngtransactions-35x35.pngtrash.pngtrash_small.pngunder_time_policies-35x35.pngunlock-35x35.pngupload_file-16x16.pngupload_file-35x35.pngupload_image-16x16.pngupload_image-35x35.pngview-35x35.pngview_detail-35x35.pngwage_groups-35x35.pngwages-35x35.pngwarning-35x35.pngwhats_new-35x35.pngwizard2-35x35.pngwizard3-35x35.pngwizard4-35x35.pngwork_history_qualifiers-35x35.png
images
search_panel
switch_button
tag_input
talert
timepicker
toggle_button
top_menu
view_min_tab
icon_library
image_area_select
border-anim-h.gifborder-anim-v.gifborder-h.gifborder-v.gifimgareaselect-animated.cssimgareaselect-default.cssimgareaselect-deprecated.css
jquery-ui
images
ui-bg_diagonals-thick_90_eeeeee_40x40.pngui-bg_flat_15_cd0a0a_40x100.pngui-bg_glass_100_e1eef9_1x400.pngui-bg_glass_100_e4f1fb_1x400.pngui-bg_glass_50_3baae3_1x400.pngui-bg_glass_80_d7ebf9_1x400.pngui-bg_highlight-hard_100_f2f5f7_1x100.pngui-bg_highlight-hard_70_000000_1x100.pngui-bg_highlight-soft_100_deedf7_1x100.pngui-bg_highlight-soft_25_c6dcef_1x100.pngui-bg_highlight-soft_25_e1eef9_1x100.pngui-bg_highlight-soft_25_ffef8f_1x100.pngui-icons_2694e8_256x240.pngui-icons_2e83ff_256x240.pngui-icons_3d80b3_256x240.pngui-icons_444444_256x240.pngui-icons_555555_256x240.pngui-icons_72a7cf_256x240.pngui-icons_777620_256x240.pngui-icons_777777_256x240.pngui-icons_cc0000_256x240.pngui-icons_ffffff_256x240.png
jquery-ui.min.cssright_click_menu
text_layer_builder.cssui.jqgrid.cssviews
attendance
employees
employee
login
wizard
images
50_bg.pngadd.pngbell_permissions.svgbig_collapse.pngbig_default.pngbig_expand.pngcal.gifcal.pngcell_hover.jpgcell_hover.pngclose.pngclose_1.pngcollapse.pngcompany_logo.pngdelete-512.pngdouble_left_arrow.pngdouble_left_arrow.svgdouble_right_arrow.pngdouble_right_arrow.svgdown.pngedit.pngemail16x16.pngempty_bg.pngexpand.pngfacebook_button.jpgform_inside_bg.pngform_inside_bg1.pnginfox16x16.pngleft_arrow.pngleft_arrow.svgleft_big_arrow.pnglive_chat.pngloading.jpgloading.pngloading_bg.pnglocation.pnglogin_animals_1.pnglogin_animals_2.pnglogin_animals_3.pnglogin_animals_4.pnglogin_animals_5.pnglogin_animals_6.pnglogin_animals_7.pnglogin_animals_easter_1.pnglogin_animals_easter_2.pnglogin_animals_easter_3.pnglogin_animals_halloween_1.pnglogin_animals_halloween_2.pnglogin_animals_halloween_3.pnglogin_animals_halloween_4.pnglogin_animals_newyear_1.pnglogin_animals_newyear_2.pnglogin_animals_stpatrick_1.pnglogin_animals_stpatrick_2.pnglogin_animals_stpatrick_3.pnglogin_animals_stpatrick_4.pnglogin_animals_valintine_1.pnglogin_animals_valintine_2.pnglogin_animals_valintine_3.pnglogin_animals_valintine_4.pnglogin_animals_xmas_1.pnglogin_animals_xmas_2.pnglogin_animals_xmas_3.pnglogin_animals_xmas_4.pnglogin_animals_xmas_5.pnglogin_background_base.pnglogin_view_bg.jpglogo.jpgminus.pngno.pngnotification-arrow.svgrefresh_icon.pngrefresh_icon_white.pngright_arrow.pngright_arrow.svgright_big_arrow.pngsort_down.pngsort_up.pngtime.pngtwitter_button.jpgup.pngyes.png
views
BaseViewController.jsBaseWindowController.jsTTBackboneView.js
attendance
accrual
accrual_balance
exceptions
in_out
punches
recurring_schedule_control
recurring_schedule_template_control
schedule
timesheet
common
AuthorizationHistoryCommon.jsBaseTreeViewController.jsEmbeddedMessageCommon.jsRequestViewCommonController.js
company
branch
company
currency
custom_field
department
ethnic_group
hierarchy_control
legal_entity
other_field
payroll_remittance_agency
permission_control
remittance_source_account
station
wage
wage_group
core
developer_tools
AwesomeboxTestEditView.htmlAwesomeboxTestView.htmlAwesomeboxTestViewController.jsGridTestEditView.htmlGridTestView.htmlGridTestViewController.jsWidgetTestEditView.htmlWidgetTestView.htmlWidgetTestViewController.jsdebugPanelController.jstriggerParserError.js
employees
employee
remittance_destination_account
roe
user_contact
user_default
user_group
user_preference
user_title
help
home
hr
kpi
qualification
login
my_account
message_control
notification
password
request
request_authorization
timesheet_authorization
user_contact
user_preference
payperiod
payroll
company_tax_deduction
pay_periods
pay_stub
pay_stub_amendment
pay_stub_entry_account
pay_stub_transaction
process_transactions_wizard
ProcessTransactionsWizard.jsProcessTransactionsWizardController.htmlProcessTransactionsWizardController.jsProcessTransactionsWizardStepHome.js
recurring_pay_stub_amendment
remittance_wizard
PayrollRemittanceAgencyEventWizard.jsPayrollRemittanceAgencyEventWizardController.htmlPayrollRemittanceAgencyEventWizardController.jsPayrollRemittanceAgencyEventWizardStepHome.jsPayrollRemittanceAgencyEventWizardStepPublish.jsPayrollRemittanceAgencyEventWizardStepReview.jsPayrollRemittanceAgencyEventWizardStepSubmit.js
policy
absence_policy
accrual_policy
AccrualPolicyAccountViewController.jsAccrualPolicyUserModifierViewController.jsAccrualPolicyViewController.js
break_policy
contributing_pay_code_policy
contributing_shift_policy
exception_policy
holiday
holiday_policy
meal_policy
overtime_policy
pay_code
pay_formula_policy
policy_group
premium_policy
recurring_holiday
regular_time_policy
round_interval_policy
schedule_policy
reports
ReportBaseViewController.js
accrual_balance_summary
audittrail
employee_information
exception_summary
form1099
form940
form941
formw2
general_ledger_summary
pay_stub_summary
pay_stub_transaction_summary
payroll_export
punch_summary
qualification_summary
remittance_summary
review_summary
saved_report
schedule_summary
t4_summary
t4a_summary
tax_summary
timesheet_detail
timesheet_summary
us_state_unemployment
whos_in_summary
ui_kit_sample
wizard
BaseWizardController.js
dashlet
forgot_password
generate_pay_stub
import_csv
ImportCSVWizard.htmlImportCSVWizardController.jsimport_accrual_example.csvimport_branch_example.csvimport_client_example.csvimport_department_example.csvimport_job_example.csvimport_jobitem_example.csvimport_payperiod_example.csvimport_paystubamendment_example.csvimport_punch_example.csvimport_remittancedestinationaccount_example.csvimport_schedule_example.csvimport_user_example.csvimport_userdatetotal_example.csvimport_userdeduction_example.csvimport_usereducation_example.csvimport_userskill_example.csvimport_userwage_example.csv
install
pay_code
pay_stub_account
permission_wizard
process_payroll
quick_start
QuickStartInsideEditorRender.htmlQuickStartInsideEditorRow.htmlQuickStartWizard.htmlQuickStartWizardController.js
re_calculate_accrual
re_calculate_timesheet
report_view
reset_forgot_password
reset_password
user_generic_data_status
user_photo
images
check_zoom_sm_canadian.jpgcheck_zoom_sm_us.jpgfacebook_button.jpglock.gifnebs_cheque_9085.jpgnebs_cheque_9209P.jpgnebs_cheque_dlt103.jpgnebs_cheque_dlt104.jpgpowered_by.jpgpowered_by_wide.pngprofile_default.pngs.giftimetrex_just_logo_512.pngtimetrex_logo.icotimetrex_logo_flex_login.pngtimetrex_logo_wbg_large.pngtimetrex_logo_wbg_small2.pngtwitter_button.jpg
index.phpinstall
locale
ar_EG
LC_MESSAGES
da_DK
LC_MESSAGES
de_DE
LC_MESSAGES
en_US
LC_MESSAGES
es_ES
LC_MESSAGES
fr_CA
LC_MESSAGES
fr_FR
LC_MESSAGES
hu_HU
LC_MESSAGES
id_ID
LC_MESSAGES
it_IT
LC_MESSAGES
pt_BR
LC_MESSAGES
pt_PT
LC_MESSAGES
ro_RO
LC_MESSAGES
yi_US
LC_MESSAGES
zh_CN
LC_MESSAGES
zh_ZH
LC_MESSAGES
sounds
system_check.phpupload_file.phpmaint
.htaccessAddAccrualPolicyTime.phpAddPayPeriod.phpAddRecurringHoliday.phpAddRecurringScheduleShift.phpAddScheduleShift.phpAutoUpgrade.phpCheckForUpdate.phpMiscDaily.phpMiscWeekly.phpNotifications.phpQueueWorker.phpRemittanceAgencyEvent.phpUpdateCurrencyRates.phpUserCount.phpcalcExceptions.phpcalcQuickExceptions.phpcron.php
package-lock.jsonpackage.jsontimetrex.ini.php-example_linuxtimetrex.ini.php-example_windowstools
benchmark_job_queue.phpcleanup_storage_dir.phpconvert_mysql_to_postgresql.phpcreate_demo_data.phpdelete_user_identification.php
export
fix_accrual_balance.phpfix_client_balance.phpfix_pay_stub_ytd.phpfix_recurring_schedule.phpgenerate_payroll_deduction_test_csv.phpi18n
README.i18ncalc_l10n_stats.phpgen_master_pot.shmergelocale.shmergelocales.shmklocales.phpnotify_translator.phppo2json.phptranslate.phptsmarty2c.phpupdatetranslation.sh
import
pivot_table.phprecalculate_timesheet.phpregister_api_key.phpsend_push_notification.phpsend_system_diagnostics.phpset_admin_permissions.phpunattended_install.phpunattended_upgrade.phpuuid.phpunit_tests
.htaccessBootStrap.phpBootStrapSelenium.php
TTCodeStandard
beautifier.phpbeautifier_filters
coding_standard_check.shcomposer.jsonconfig.xmlconfig_selenium.xmlrun.shrun_selenium.shtestcases
i18n
kpi
other
APITest.phpBrowserTest.phpCustomFieldTest.phpDateTimeTest.phpDependencyTreeTest.phpEFTTest.phpExceptionTest.phpFactoryTest.phpMiscTest.phpPayPeriodScheduleTest.phpPayrollRemittanceAgencyEventTest.phpPermissionTest.phpPunchDetectionTest.phpPunchTest.phpSQLTest.phpScheduleTest.phpSystemLogTest.phpValidatorTest.php
payroll_deduction
CAPayrollDeductionCRATest2017.csvCAPayrollDeductionCRATest2018.csvCAPayrollDeductionCRATest2019.csvCAPayrollDeductionCRATest2020.csvCAPayrollDeductionCRATest2021.csvCAPayrollDeductionCRATest2022.csvCAPayrollDeductionTest2006.phpCAPayrollDeductionTest2007.phpCAPayrollDeductionTest2008.phpCAPayrollDeductionTest2009.csvCAPayrollDeductionTest2009.phpCAPayrollDeductionTest2010.csvCAPayrollDeductionTest2010.phpCAPayrollDeductionTest2011.csvCAPayrollDeductionTest2011.phpCAPayrollDeductionTest2012.csvCAPayrollDeductionTest2012.phpCAPayrollDeductionTest2013.csvCAPayrollDeductionTest2013.phpCAPayrollDeductionTest2014.csvCAPayrollDeductionTest2014.phpCAPayrollDeductionTest2015.csvCAPayrollDeductionTest2015.phpCAPayrollDeductionTest2016.csvCAPayrollDeductionTest2016.phpCAPayrollDeductionTest2017.csvCAPayrollDeductionTest2017.phpCAPayrollDeductionTest2018.csvCAPayrollDeductionTest2018.phpCAPayrollDeductionTest2019.csvCAPayrollDeductionTest2019.phpCAPayrollDeductionTest2020.csvCAPayrollDeductionTest2020.phpCAPayrollDeductionTest2021.csvCAPayrollDeductionTest2021.phpCAPayrollDeductionTest2022.csvCAPayrollDeductionTest2022.phpCRPayrollDeductionTest.phpUSPayrollDeductionTest2006.phpUSPayrollDeductionTest2007.phpUSPayrollDeductionTest2008.phpUSPayrollDeductionTest2009.csvUSPayrollDeductionTest2009.phpUSPayrollDeductionTest2010.csvUSPayrollDeductionTest2010.phpUSPayrollDeductionTest2011.csvUSPayrollDeductionTest2011.phpUSPayrollDeductionTest2012.csvUSPayrollDeductionTest2012.phpUSPayrollDeductionTest2013.csvUSPayrollDeductionTest2013.phpUSPayrollDeductionTest2014.csvUSPayrollDeductionTest2014.phpUSPayrollDeductionTest2015.csvUSPayrollDeductionTest2015.phpUSPayrollDeductionTest2016.csvUSPayrollDeductionTest2016.phpUSPayrollDeductionTest2017.csvUSPayrollDeductionTest2017.phpUSPayrollDeductionTest2018.csvUSPayrollDeductionTest2018.phpUSPayrollDeductionTest2019.csvUSPayrollDeductionTest2019.phpUSPayrollDeductionTest2020.csvUSPayrollDeductionTest2020.phpUSPayrollDeductionTest2021.csvUSPayrollDeductionTest2021.phpUSPayrollDeductionTest2022.csvUSPayrollDeductionTest2022.php
paystub
policy
AccrualPolicyTest.phpMealBreakPolicyTest.phpOverTimePolicyTest.phpPremiumPolicyTest.phpRecurringHolidayTest.php
report
Form940ReportTest.phpForm941ReportTest.phpFormW2ReportTest.phpFormW2ReportTest_testEFileFederalA.txtFormW2ReportTest_testEFileFederalB.txtFormW2ReportTest_testEFileFederalC.txtFormW2ReportTest_testEFileFederalMultiEmployeeA.txtFormW2ReportTest_testEFileFederalMultiEmployeeB.txtFormW2ReportTest_testEFileStateAL.txtFormW2ReportTest_testEFileStateAR.txtFormW2ReportTest_testEFileStateAZ.txtFormW2ReportTest_testEFileStateCO.txtFormW2ReportTest_testEFileStateCT.txtFormW2ReportTest_testEFileStateDC.txtFormW2ReportTest_testEFileStateDE.txtFormW2ReportTest_testEFileStateGA.txtFormW2ReportTest_testEFileStateIA.txtFormW2ReportTest_testEFileStateID.txtFormW2ReportTest_testEFileStateIL.txtFormW2ReportTest_testEFileStateIN.txtFormW2ReportTest_testEFileStateKS.txtFormW2ReportTest_testEFileStateKY.txtFormW2ReportTest_testEFileStateKYLocal1.txtFormW2ReportTest_testEFileStateMA.txtFormW2ReportTest_testEFileStateME.txtFormW2ReportTest_testEFileStateMI.txtFormW2ReportTest_testEFileStateMN.txtFormW2ReportTest_testEFileStateMO.txtFormW2ReportTest_testEFileStateMS.txtFormW2ReportTest_testEFileStateMT.txtFormW2ReportTest_testEFileStateMultiEmployeeIA.txtFormW2ReportTest_testEFileStateMultiEmployeeID.txtFormW2ReportTest_testEFileStateNC.txtFormW2ReportTest_testEFileStateND.txtFormW2ReportTest_testEFileStateNE.txtFormW2ReportTest_testEFileStateNY.txtFormW2ReportTest_testEFileStateOH.txtFormW2ReportTest_testEFileStateOK.txtFormW2ReportTest_testEFileStateOR.txtFormW2ReportTest_testEFileStatePA.txtFormW2ReportTest_testEFileStateSC.txtFormW2ReportTest_testEFileStateUT.txtFormW2ReportTest_testEFileStateVA.txtFormW2ReportTest_testEFileStateVT.txtFormW2ReportTest_testEFileStateWI.txtFormW2ReportTest_testFederalEFileWithFederalAndStateTaxesA.txtFormW2ReportTest_testNYEFileWithFederalAndStateTaxesA.txtTaxSummaryReportTest.phpUSStateUnemploymentReportTest.phpUSStateUnemploymentReportTest_testEFileAL.txtUSStateUnemploymentReportTest_testEFileAZ.txtUSStateUnemploymentReportTest_testEFileCA.txtUSStateUnemploymentReportTest_testEFileCO.txtUSStateUnemploymentReportTest_testEFileCT.txtUSStateUnemploymentReportTest_testEFileFL.txtUSStateUnemploymentReportTest_testEFileFederalA.txtUSStateUnemploymentReportTest_testEFileFederalMultiEmployeeA.txtUSStateUnemploymentReportTest_testEFileGA.txtUSStateUnemploymentReportTest_testEFileIA.txtUSStateUnemploymentReportTest_testEFileIL.txtUSStateUnemploymentReportTest_testEFileIN.txtUSStateUnemploymentReportTest_testEFileKS.txtUSStateUnemploymentReportTest_testEFileKY.txtUSStateUnemploymentReportTest_testEFileMI.txtUSStateUnemploymentReportTest_testEFileMS.txtUSStateUnemploymentReportTest_testEFileMT.txtUSStateUnemploymentReportTest_testEFileNC.txtUSStateUnemploymentReportTest_testEFileNY.txtUSStateUnemploymentReportTest_testEFileOK.txtUSStateUnemploymentReportTest_testEFileTN.txtUSStateUnemploymentReportTest_testEFileTX.txtUSStateUnemploymentReportTest_testEFileVA.txtUSStateUnemploymentReportTest_testEFileWA.txtUSStateUnemploymentReportTest_testEFileWI.txt
selenium
CAPayrollDeductionCRACompare.phpLanguageTest.phpLoginTest.phpMiscTest.phpQUnitTest.phpScreenShotTest.phpTTSeleniumGlobal.php
upgrade
vendor
.htaccessautoload.phpREADME.mdbuildPhar.phpcomposer.json.travis.ymlREADME.md
webpack.config.jsbin
brianium
paratest
LICENSEREADME.md
bin
composer.jsonsrc
Console
Commands
Coverage
Logging
JUnit
ErrorTestCase.phpFailureTestCase.phpReader.phpRiskyTestCase.phpSkippedTestCase.phpSuccessTestCase.phpTestCase.phpTestCaseWithMessage.phpTestSuite.phpWarningTestCase.phpWriter.php
LogInterpreter.phpMetaProviderInterface.phpParser
Runners
PHPUnit
Util
cbschuld
browser.php
composer
ClassLoader.phpInstalledVersions.phpLICENSEautoload_classmap.phpautoload_files.phpautoload_namespaces.phpautoload_psr4.phpautoload_real.phpautoload_static.php
ca-bundle
include_paths.phpinstalled.jsoninstalled.phpdoctrine
instantiator
ezyang
htmlpurifier
CHANGELOG.mdCREDITSLICENSEREADME.mdVERSIONcomposer.json
library
HTMLPurifier.auto.phpHTMLPurifier.autoload-legacy.phpHTMLPurifier.autoload.phpHTMLPurifier.composer.phpHTMLPurifier.func.phpHTMLPurifier.includes.phpHTMLPurifier.kses.phpHTMLPurifier.path.phpHTMLPurifier.phpHTMLPurifier.safe-includes.php
HTMLPurifier
Arborize.phpAttrCollections.phpAttrDef.phpContentSets.phpContext.phpDefinition.phpDefinitionCache.phpLanguageFactory.phpLength.phpLexer.php
AttrDef
CSS.php
AttrTransform.phpCSS
AlphaValue.phpBackground.phpBackgroundPosition.phpBorder.phpColor.phpComposite.phpDenyElementDecorator.phpFilter.phpFont.phpFontFamily.phpIdent.phpImportantDecorator.phpLength.phpListStyle.phpMultiple.phpNumber.phpPercentage.phpTextDecoration.phpURI.php
Clone.phpEnum.phpHTML
Bool.phpClass.phpColor.phpContentEditable.phpFrameTarget.phpID.phpLength.phpLinkTypes.phpMultiLength.phpNmtokens.phpPixels.php
Integer.phpLang.phpSwitch.phpText.phpURI.phpURI
AttrTransform
Background.phpBdoDir.phpBgColor.phpBoolToCSS.phpBorder.phpEnumToCSS.phpImgRequired.phpImgSpace.phpInput.phpLang.phpLength.phpName.phpNameSync.phpNofollow.phpSafeEmbed.phpSafeObject.phpSafeParam.phpScriptRequired.phpTargetBlank.phpTargetNoopener.phpTargetNoreferrer.phpTextarea.php
AttrTypes.phpAttrValidator.phpBootstrap.phpCSSDefinition.phpChildDef.phpChildDef
Config.phpConfigSchema.phpConfigSchema
Builder
Exception.phpInterchange.phpInterchange
InterchangeBuilder.phpValidator.phpValidatorAtom.phpschema.serschema
Attr.AllowedClasses.txtAttr.AllowedFrameTargets.txtAttr.AllowedRel.txtAttr.AllowedRev.txtAttr.ClassUseCDATA.txtAttr.DefaultImageAlt.txtAttr.DefaultInvalidImage.txtAttr.DefaultInvalidImageAlt.txtAttr.DefaultTextDir.txtAttr.EnableID.txtAttr.ForbiddenClasses.txtAttr.ID.HTML5.txtAttr.IDBlacklist.txtAttr.IDBlacklistRegexp.txtAttr.IDPrefix.txtAttr.IDPrefixLocal.txtAutoFormat.AutoParagraph.txtAutoFormat.Custom.txtAutoFormat.DisplayLinkURI.txtAutoFormat.Linkify.txtAutoFormat.PurifierLinkify.DocURL.txtAutoFormat.PurifierLinkify.txtAutoFormat.RemoveEmpty.Predicate.txtAutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txtAutoFormat.RemoveEmpty.RemoveNbsp.txtAutoFormat.RemoveEmpty.txtAutoFormat.RemoveSpansWithoutAttributes.txtCSS.AllowDuplicates.txtCSS.AllowImportant.txtCSS.AllowTricky.txtCSS.AllowedFonts.txtCSS.AllowedProperties.txtCSS.DefinitionRev.txtCSS.ForbiddenProperties.txtCSS.MaxImgLength.txtCSS.Proprietary.txtCSS.Trusted.txtCache.DefinitionImpl.txtCache.SerializerPath.txtCache.SerializerPermissions.txtCore.AggressivelyFixLt.txtCore.AggressivelyRemoveScript.txtCore.AllowHostnameUnderscore.txtCore.AllowParseManyTags.txtCore.CollectErrors.txtCore.ColorKeywords.txtCore.ConvertDocumentToFragment.txtCore.DirectLexLineNumberSyncInterval.txtCore.DisableExcludes.txtCore.EnableIDNA.txtCore.Encoding.txtCore.EscapeInvalidChildren.txtCore.EscapeInvalidTags.txtCore.EscapeNonASCIICharacters.txtCore.HiddenElements.txtCore.Language.txtCore.LegacyEntityDecoder.txtCore.LexerImpl.txtCore.MaintainLineNumbers.txtCore.NormalizeNewlines.txtCore.RemoveInvalidImg.txtCore.RemoveProcessingInstructions.txtCore.RemoveScriptContents.txtFilter.Custom.txtFilter.ExtractStyleBlocks.Escaping.txtFilter.ExtractStyleBlocks.Scope.txtFilter.ExtractStyleBlocks.TidyImpl.txtFilter.ExtractStyleBlocks.txtFilter.YouTube.txtHTML.Allowed.txtHTML.AllowedAttributes.txtHTML.AllowedComments.txtHTML.AllowedCommentsRegexp.txtHTML.AllowedElements.txtHTML.AllowedModules.txtHTML.Attr.Name.UseCDATA.txtHTML.BlockWrapper.txtHTML.CoreModules.txtHTML.CustomDoctype.txtHTML.DefinitionID.txtHTML.DefinitionRev.txtHTML.Doctype.txtHTML.FlashAllowFullScreen.txtHTML.ForbiddenAttributes.txtHTML.ForbiddenElements.txtHTML.Forms.txtHTML.MaxImgLength.txtHTML.Nofollow.txtHTML.Parent.txtHTML.Proprietary.txtHTML.SafeEmbed.txtHTML.SafeIframe.txtHTML.SafeObject.txtHTML.SafeScripting.txtHTML.Strict.txtHTML.TargetBlank.txtHTML.TargetNoopener.txtHTML.TargetNoreferrer.txtHTML.TidyAdd.txtHTML.TidyLevel.txtHTML.TidyRemove.txtHTML.Trusted.txtHTML.XHTML.txtOutput.CommentScriptContents.txtOutput.FixInnerHTML.txtOutput.FlashCompat.txtOutput.Newline.txtOutput.SortAttr.txtOutput.TidyFormat.txtTest.ForceNoIconv.txtURI.AllowedSchemes.txtURI.Base.txtURI.DefaultScheme.txtURI.DefinitionID.txtURI.DefinitionRev.txtURI.Disable.txtURI.DisableExternal.txtURI.DisableExternalResources.txtURI.DisableResources.txtURI.Host.txtURI.HostBlacklist.txtURI.MakeAbsolute.txtURI.Munge.txtURI.MungeResources.txtURI.MungeSecretKey.txtURI.OverrideAllowedSchemes.txtURI.SafeIframeRegexp.txtinfo.ini
DefinitionCache
DefinitionCacheFactory.phpDoctype.phpDoctypeRegistry.phpElementDef.phpEncoder.phpEntityLookup.phpEntityLookup
EntityParser.phpErrorCollector.phpErrorStruct.phpException.phpFilter.phpFilter
Generator.phpHTMLDefinition.phpHTMLModule.phpHTMLModule
Bdo.phpCommonAttributes.phpEdit.phpForms.phpHypertext.phpIframe.phpImage.phpLegacy.phpList.phpName.phpNofollow.phpNonXMLCommonAttributes.phpObject.phpPresentation.phpProprietary.phpRuby.phpSafeEmbed.phpSafeObject.phpSafeScripting.phpScripting.phpStyleAttribute.phpTables.phpTarget.phpTargetBlank.phpTargetNoopener.phpTargetNoreferrer.phpText.phpTidy.php
HTMLModuleManager.phpIDAccumulator.phpInjector.phpTidy
XMLCommonAttributes.phpInjector
AutoParagraph.phpDisplayLinkURI.phpLinkify.phpPurifierLinkify.phpRemoveEmpty.phpRemoveSpansWithoutAttributes.phpSafeObject.php
Language.phpLanguage
messages
Lexer
Node.phpNode
PercentEncoder.phpPrinter.phpPrinter
PropertyList.phpPropertyListIterator.phpQueue.phpStrategy.phpStrategy
Composite.phpCore.phpFixNesting.phpMakeWellFormed.phpRemoveForeignElements.phpValidateAttributes.php
StringHash.phpStringHashParser.phpTagTransform.phpTagTransform
Token.phpToken
TokenFactory.phpURI.phpURIDefinition.phpURIFilter.phpURIFilter
DisableExternal.phpDisableExternalResources.phpDisableResources.phpHostBlacklist.phpMakeAbsolute.phpMunge.phpSafeIframe.php
URIParser.phpURIScheme.phpURIScheme
URISchemeRegistry.phpUnitConverter.phpVarParser.phpVarParser
VarParserException.phpZipper.phpgeoip2
geoip2
CHANGELOG.mdLICENSEREADME.mdcomposer.json
examples
src
Database
Exception
AddressNotFoundException.phpAuthenticationException.phpGeoIp2Exception.phpHttpException.phpInvalidRequestException.phpOutOfQueriesException.php
Model
AbstractModel.phpAnonymousIp.phpAsn.phpCity.phpConnectionType.phpCountry.phpDomain.phpEnterprise.phpInsights.phpIsp.php
ProviderInterface.phpRecord
AbstractPlaceRecord.phpAbstractRecord.phpCity.phpContinent.phpCountry.phpLocation.phpMaxMind.phpPostal.phpRepresentedCountry.phpSubdivision.phpTraits.php
Util.phpWebService
jean85
pretty-package-versions
kigkonsult
icalcreator
.github
LICENCEREADME.mdautoload.phpcomposer.jsondocs
phpunit.xmlreleaseNotessrc
Available.phpCalendarComponent.phpDScomponent.phpDaylight.php
Formatter
Available.phpDScomponent.phpFormatBase.phpParticipant.php
IcalBase.phpIcalInterface.phpProperty
Attendee.phpCalMetProVer.phpDt1Property.phpDtxProperty.phpDurDates.phpExdate.phpFreebusy.phpGeo.phpIntProperty.phpMultiProps.phpProperty.phpPropertyBase.phpRdate.phpRecur.phpRequeststatus.phpSingleProps.phpXproperty.php
Valarm.phpVavailability.phpVcalendar.phpVevent.phpVfreebusy.phpVjournal.phpVlocation.phpVresource.phpVtimzone.phpVtodo.phpParser
Participant.phpPc.phpStandard.phpTraits
ACKNOWLEDGEDrfc9074trait.phpACTIONtrait.phpATTACHtrait.phpATTENDEEtrait.phpBUSYTYPErfc7953trait.phpCALENDAR_ADDRESSrfc9073trait.phpCALSCALEtrait.phpCATEGORIEStrait.phpCLASStrait.phpCOLORrfc7986trait.phpCOMMENTtrait.phpCOMPLETEDtrait.phpCONFERENCErfc7986trait.phpCONTACTtrait.phpCREATEDtrait.phpDESCRIPTIONtrait.phpDTENDtrait.phpDTSTAMPtrait.phpDTSTARTtrait.phpDUEtrait.phpDURATIONtrait.phpEXDATEtrait.phpEXRULEtrait.phpFREEBUSYtrait.phpGEOtrait.phpIMAGErfc7986trait.phpLAST_MODIFIEDtrait.phpLOCATIONTYPErfc9073trait.phpLOCATIONtrait.phpMETHODtrait.phpMvalTrait.phpNAMErfc7986trait.phpNewVlocationTrait.phpORGANIZERtrait.phpPARTICIPANT_TYPErfc9073trait.phpPERCENT_COMPLETEtrait.phpPRIORITYtrait.phpPRODIDtrait.phpPROXIMITYrfc9074trait.phpParticipants2AttendeesTrait.phpRDATEtrait.phpRECURRENCE_IDtrait.phpREFRESH_INTERVALrfc7986trait.phpRELATED_TOtrait.phpREPEATtrait.phpREQUEST_STATUStrait.phpRESOURCEStrait.phpRESOURCE_TYPErfc9073trait.phpRRULEtrait.phpSEQUENCEtrait.phpSOURCErfc7986trait.phpSTATUStrait.phpSTRUCTURED_DATArfc9073trait.phpSTYLED_DESCRIPTIONrfc9073trait.phpSUMMARYtrait.phpSubCompsGetTrait.phpTRANSPtrait.phpTRIGGERtrait.phpTZID_ALIAS_OFrfc7808trait.phpTZIDtrait.phpTZNAMEtrait.phpTZOFFSETFROMtrait.phpTZOFFSETTOtrait.phpTZUNTILrfc7808trait.phpTZURLtrait.phpUIDrfc7986trait.phpURLtrait.phpVERSIONtrait.phpX_PROPtrait.php
Util
CalAddressFactory.phpDateIntervalFactory.phpDateTimeFactory.phpDateTimeZoneFactory.phpGeoFactory.phpHttpFactory.phpIcalXMLFactory.phpIcalvCardFactory.phpParameterFactory.phpRecurFactory.phpRecurFactory2.phpRegulateTimezoneFactory.phpRexdateFactory.phpSelectFactory.phpSortFactory.phpStringFactory.phpUtil.phpUtilDateTime.phpVtimezonePopulateFactory.php
V2component.phpV3component.phpVAcomponent.phpValarm.phpVavailability.phpVcalendar.phpVcomponent.phpVevent.phpVfreebusy.phpVjournal.phpVlocation.phpVresource.phpVtimezone.phpVtodo.phpXml
test
DateIntervalTest1.phpDateIntervalTest2.phpDateIntervalTest3.phpDateTest.phpDateTimeTest.phpDateTimeUTCTest.phpDateTzTest.phpDtBase.phpException1Test.phpException2Test.phpException3Test.phpException4Test.phpException5Test.phpException6Test.phpException7Test.phpException8Test.phpFactoryCompTest.phpGetPropMethodNamesTrait.phpIcalvCardFactoryTest.phpIntegerTest.phpParseTest.phpPcTest.phpProp1TextSingleTest.phpProp2TextMultiTest.phpProp3Comp2PropTest.phpPropEmptyTest.phpPropSortTest.phpPropXTest.phpRecurBaseTest.phpRecurDayTest.phpRecurMonthTest.phpRecurWeekTest.phpRecurYearTest.phpSelectComponentsTest.phpSelectComponentsTest2.phpStringfuncTest.phpValarmTest.phpVcalendarTest.phpVtimezonePopulateFactoryTest.phpautoload.php
maennchen
zipstream-php
CHANGELOG.mdCONTRIBUTING.mdLICENSEREADME.mdcomposer.jsonphpunit.xml.distpsalm.xml
src
Bigint.phpDeflateStream.phpException.php
Exception
EncodingException.phpFileNotFoundException.phpFileNotReadableException.phpIncompatibleOptionsException.phpOverflowException.phpStreamNotReadableException.php
File.phpOption
Stream.phpZipStream.phptest
markbaker
complex
matrix
.github
workflows
classes
src
examples
infection.json.distlicense.mdphpstan.neonmaxmind-db
reader
maxmind
web-service-common
myclabs
deep-copy
.github
LICENSEREADME.mdcomposer.jsonsrc
DeepCopy
DeepCopy.php
Exception
Filter
Matcher
Reflection
TypeFilter
TypeMatcher
deep_copy.phpphp-enum
nikic
php-parser
LICENSEREADME.md
bin
composer.jsongrammar
lib
PhpParser
Builder.php
Builder
ClassConst.phpClass_.phpDeclaration.phpEnumCase.phpEnum_.phpFunctionLike.phpFunction_.phpInterface_.phpMethod.phpNamespace_.phpParam.phpProperty.phpTraitUse.phpTraitUseAdaptation.phpTrait_.phpUse_.php
BuilderFactory.phpBuilderHelpers.phpComment.phpComment
ConstExprEvaluationException.phpConstExprEvaluator.phpError.phpErrorHandler.phpErrorHandler
Internal
JsonDecoder.phpLexer.phpLexer
Emulative.php
NameContext.phpNode.phpTokenEmulator
AttributeEmulator.phpCoaleseEqualTokenEmulator.phpEnumTokenEmulator.phpExplicitOctalEmulator.phpFlexibleDocStringEmulator.phpFnTokenEmulator.phpKeywordEmulator.phpMatchTokenEmulator.phpNullsafeTokenEmulator.phpNumericLiteralSeparatorEmulator.phpReadonlyTokenEmulator.phpReverseEmulator.phpTokenEmulator.php
Node
Arg.phpAttribute.phpAttributeGroup.phpComplexType.phpConst_.phpExpr.php
NodeAbstract.phpNodeDumper.phpNodeFinder.phpNodeTraverser.phpNodeTraverserInterface.phpNodeVisitor.phpExpr
ArrayDimFetch.phpArrayItem.phpArray_.phpArrowFunction.phpAssign.phpAssignOp.php
FunctionLike.phpIdentifier.phpIntersectionType.phpMatchArm.phpName.phpAssignOp
BitwiseAnd.phpBitwiseOr.phpBitwiseXor.phpCoalesce.phpConcat.phpDiv.phpMinus.phpMod.phpMul.phpPlus.phpPow.phpShiftLeft.phpShiftRight.php
AssignRef.phpBinaryOp.phpBinaryOp
BitwiseAnd.phpBitwiseOr.phpBitwiseXor.phpBooleanAnd.phpBooleanOr.phpCoalesce.phpConcat.phpDiv.phpEqual.phpGreater.phpGreaterOrEqual.phpIdentical.phpLogicalAnd.phpLogicalOr.phpLogicalXor.phpMinus.phpMod.phpMul.phpNotEqual.phpNotIdentical.phpPlus.phpPow.phpShiftLeft.phpShiftRight.phpSmaller.phpSmallerOrEqual.phpSpaceship.php
BitwiseNot.phpBooleanNot.phpCallLike.phpCast.phpCast
ClassConstFetch.phpClone_.phpClosure.phpClosureUse.phpConstFetch.phpEmpty_.phpError.phpErrorSuppress.phpEval_.phpExit_.phpFuncCall.phpInclude_.phpInstanceof_.phpIsset_.phpList_.phpMatch_.phpMethodCall.phpNew_.phpNullsafeMethodCall.phpNullsafePropertyFetch.phpPostDec.phpPostInc.phpPreDec.phpPreInc.phpPrint_.phpPropertyFetch.phpShellExec.phpStaticCall.phpStaticPropertyFetch.phpTernary.phpThrow_.phpUnaryMinus.phpUnaryPlus.phpVariable.phpYieldFrom.phpYield_.phpName
NullableType.phpParam.phpScalar.phpScalar
Stmt.phpStmt
Break_.phpCase_.phpCatch_.phpClassConst.phpClassLike.phpClassMethod.phpClass_.phpConst_.phpContinue_.phpDeclareDeclare.phpDeclare_.phpDo_.phpEcho_.phpElseIf_.phpElse_.phpEnumCase.phpEnum_.phpExpression.phpFinally_.phpFor_.phpForeach_.phpFunction_.phpGlobal_.phpGoto_.phpGroupUse.phpHaltCompiler.phpIf_.phpInlineHTML.phpInterface_.phpLabel.phpNamespace_.phpNop.phpProperty.phpPropertyProperty.phpReturn_.phpStaticVar.phpStatic_.phpSwitch_.phpThrow_.phpTraitUse.phpTraitUseAdaptation.php
UnionType.phpVarLikeIdentifier.phpVariadicPlaceholder.phpTraitUseAdaptation
Trait_.phpTryCatch.phpUnset_.phpUseUse.phpUse_.phpWhile_.phpNodeVisitor
CloningVisitor.phpFindingVisitor.phpFirstFindingVisitor.phpNameResolver.phpNodeConnectingVisitor.phpParentConnectingVisitor.php
NodeVisitorAbstract.phpParser.phpParser
ParserAbstract.phpParserFactory.phpPrettyPrinter
PrettyPrinterAbstract.phppear
archive_tar
.github
.travis.ymlArchive
README.mdcomposer.jsondocs
package.xmlscripts
sync-php4tests
512nbytesfile.phptdeadlinks.phptdirtraversal.phpthamidTARtester2.tarinvalidblock.phptinvalidchecksum.phptlongfilename.phptlongsymlinks.phptout_of_path_fnames.phptout_of_path_symlink.tarpax.phptpermissions.phptphpt_test.php.increlativesymlink.phptrelativesymlink.tarsetup.php.incsymlink.phptsymlink_disallow.phpt
testblock1
testblock3
testpax.tartestperms.tartestsymlink.tartext-0.txtcache_lite
.travis.yml
Cache
LICENSEREADME.mdTODOcomposer.jsondocs
package.xmlphpunit.xml.disttests
Cache_Lite_File_classical.phptCache_Lite_Function_classical.phptCache_Lite_Function_dontcache.phptCache_Lite_Function_drop.phptCache_Lite_Output_classical.phptCache_Lite_automaticCleaning.phptCache_Lite_classical.phptCache_Lite_error.phptCache_Lite_error2.phptCache_Lite_eternal.phptCache_Lite_fatest.phptCache_Lite_hashed.phptCache_Lite_lifetime.phptCache_Lite_memorycache.phptCache_Lite_serialization.phptErrorDieTest.phpNestedOutputTest.phpbench.phpbench2.phpbench3.phpbootstrap.phpcache_lite_base.inccache_lite_file_base.inccache_lite_function_base.inccache_lite_output_base.inccallcache.incerrordie.phppearbug13693.phptpearbug18192.phppearbug18328.phptpearbug19422.phptpearbug19711.phptpearbug513.phptpearbug7618.phptreadmetmpdir.inc
console_getopt
mail
mail_mime
.github
workflows
Mail
READMEcomposer.jsonpackage.xmltests
Makefileclass-filename.phptcontent_transfer_encoding.phptencoding_case.phptheaders_with_mbstring.phptheaders_without_mbstring.phptqp_encoding_test.phptsleep_wakeup_EOL-bug3488-part1.phptsleep_wakeup_EOL-bug3488-part2.phpttest_Bug_10596_1.phpttest_Bug_10816_1.phpttest_Bug_10999_1.phpttest_Bug_11381.phpttest_Bug_11731.phpttest_Bug_12165.phpttest_Bug_12385_1.phpttest_Bug_12411.phpttest_Bug_12466.phpttest_Bug_13032.phpttest_Bug_13444.phpttest_Bug_13962.phpttest_Bug_14529.phpttest_Bug_14779.phpttest_Bug_14780.phpttest_Bug_15320.phpttest_Bug_16539.phpttest_Bug_17025.phpttest_Bug_17175.phpttest_Bug_18083.phpttest_Bug_18772.phpttest_Bug_19497.phpttest_Bug_20226.phpttest_Bug_20273.phpttest_Bug_20563.phpttest_Bug_20564.phpttest_Bug_21027.phpttest_Bug_21098.phpttest_Bug_21205.phpttest_Bug_21206.phpttest_Bug_21255.phpttest_Bug_3513_1.phpttest_Bug_3513_2.phpttest_Bug_3513_3.phpttest_Bug_7561_1.phpttest_Bug_8386_1.phpttest_Bug_8541_1.phpttest_Bug_9722_1.phpttest_Bug_GH16.phpttest_Bug_GH19.phpttest_Bug_GH26.phpttest_linebreak_dot.phpttest_linebreak_larger_76.phpt
mime_type
pear
.travis.ymlCODING_STANDARDSINSTALLLICENSEMakefile.frag
OS
PEAR.phpPEAR
Builder.phpChannelFile.php
README.CONTRIBUTINGREADME.rstSystem.phpbuild-release.shcatalogcomposer.jsongo-pear-list.phpgo-pear-phar.phpinstall-pear.phpinstall-pear.txtmake-command-xml.phpmake-gopear-phar.phpmake-installpear-nozlib-phar.phpmake-pear-bundle.phppackage-ErrorStack.xmlpackage-manpages.xmlpackage.dtdpackage2.xmlChannelFile
Command.phpCommand
Auth.phpAuth.xmlBuild.phpBuild.xmlChannels.phpChannels.xmlCommon.phpConfig.phpConfig.xmlInstall.phpInstall.xmlMirror.phpMirror.xmlPackage.phpPackage.xmlPickle.phpPickle.xmlRegistry.phpRegistry.xmlRemote.phpRemote.xmlTest.phpTest.xml
Common.phpConfig.phpDependency2.phpDependencyDB.phpDownloader.phpDownloader
ErrorStack.phpException.phpFrontend.phpFrontend
Installer.phpInstaller
Role.php
PackageFile.phpRole
PackageFile
Packager.phpProxy.phpREST.phpREST
Registry.phpRunTest.phpStart.phpStart
Task
Common.phpPostinstallscript.php
Validate.phpPostinstallscript
Replace.phpReplace
Unixeol.phpUnixeol
Windowseol.phpWindowseol
Validator
Warning.phpXMLParser.phpscripts
template.spectest-modified.phpstructures_graph
xml_util
phar-io
manifest
CHANGELOG.mdLICENSEREADME.mdcomposer.jsoncomposer.lock
src
ManifestDocumentMapper.phpManifestLoader.phpManifestSerializer.php
exceptions
ElementCollectionException.phpException.phpInvalidApplicationNameException.phpInvalidEmailException.phpInvalidUrlException.phpManifestDocumentException.phpManifestDocumentLoadingException.phpManifestDocumentMapperException.phpManifestElementException.phpManifestLoaderException.php
values
Application.phpApplicationName.phpAuthor.phpAuthorCollection.phpAuthorCollectionIterator.phpBundledComponent.phpBundledComponentCollection.phpBundledComponentCollectionIterator.phpCopyrightInformation.phpEmail.phpExtension.phpLibrary.phpLicense.phpManifest.phpPhpExtensionRequirement.phpPhpVersionRequirement.phpRequirement.phpRequirementCollection.phpRequirementCollectionIterator.phpType.phpUrl.php
xml
AuthorElement.phpAuthorElementCollection.phpBundlesElement.phpComponentElement.phpComponentElementCollection.phpContainsElement.phpCopyrightElement.phpElementCollection.phpExtElement.phpExtElementCollection.phpExtensionElement.phpLicenseElement.phpManifestDocument.phpManifestElement.phpPhpElement.phpRequiresElement.php
version
CHANGELOG.mdLICENSEREADME.mdcomposer.json
src
BuildMetaData.phpPreReleaseSuffix.phpVersion.phpVersionConstraintParser.phpVersionConstraintValue.phpVersionNumber.php
constraints
AbstractVersionConstraint.phpAndVersionConstraintGroup.phpAnyVersionConstraint.phpExactVersionConstraint.phpGreaterThanOrEqualToVersionConstraint.phpOrVersionConstraintGroup.phpSpecificMajorAndMinorVersionConstraint.phpSpecificMajorVersionConstraint.phpVersionConstraint.php
exceptions
phpoffice
phpspreadsheet
.php-cs-fixer.dist.php.phpcs.xml.distCHANGELOG.mdCONTRIBUTING.mdLICENSEREADME.mdcomposer.jsonphpstan-baseline.neonphpstan-conditional.phpphpstan.neon.dist
src
PhpSpreadsheet
Calculation
ArrayEnabled.phpBinaryComparison.phpCalculation.phpCategory.phpDatabase.php
Database
DAverage.phpDCount.phpDCountA.phpDGet.phpDMax.phpDMin.phpDProduct.phpDStDev.phpDStDevP.phpDSum.phpDVar.phpDVarP.phpDatabaseAbstract.php
DateTime.phpDateTimeExcel
Constants.phpCurrent.phpDate.phpDateParts.phpDateValue.phpDays.phpDays360.phpDifference.phpHelpers.phpMonth.phpNetworkDays.phpTime.phpTimeParts.phpTimeValue.phpWeek.phpWorkDay.phpYearFrac.php
Engine
Engineering.phpEngineering
BesselI.phpBesselJ.phpBesselK.phpBesselY.phpBitWise.phpCompare.phpComplex.phpComplexFunctions.phpComplexOperations.phpConstants.phpConvertBase.phpConvertBinary.phpConvertDecimal.phpConvertHex.phpConvertOctal.phpConvertUOM.phpEngineeringValidations.phpErf.phpErfC.php
Exception.phpExceptionHandler.phpFinancial.phpFinancial
Amortization.php
FormulaParser.phpFormulaToken.phpFunctions.phpCashFlow
Constants.phpCoupons.phpDepreciation.phpDollar.phpFinancialValidations.phpHelpers.phpInterestRate.phpSecurities
TreasuryBill.phpInformation
Internal
Logical.phpLogical
LookupRef.phpLookupRef
Address.phpExcelMatch.phpFilter.phpFormula.phpHLookup.phpHelpers.phpHyperlink.phpIndirect.phpLookup.phpLookupBase.phpLookupRefValidations.phpMatrix.phpOffset.phpRowColumnInformation.phpSelection.phpSort.phpUnique.phpVLookup.php
MathTrig.phpMathTrig
Absolute.phpAngle.phpArabic.phpBase.phpCeiling.phpCombinations.phpExp.phpFactorial.phpFloor.phpGcd.phpHelpers.phpIntClass.phpLcm.phpLogarithms.phpMatrixFunctions.phpOperations.phpRandom.phpRoman.phpRound.phpSeriesSum.phpSign.phpSqrt.phpSubtotal.phpSum.phpSumSquares.php
Statistical.phpTrig
Trunc.phpStatistical
AggregateBase.phpAverages.php
TextData.phpAverages
Conditional.phpConfidence.phpCounts.phpDeviations.phpDistributions
Beta.phpBinomial.phpChiSquared.phpDistributionValidations.phpExponential.phpF.phpFisher.phpGamma.phpGammaBase.phpHyperGeometric.phpLogNormal.phpNewtonRaphson.phpNormal.phpPoisson.phpStandardNormal.phpStudentT.phpWeibull.php
MaxMinBase.phpMaximum.phpMinimum.phpPercentiles.phpPermutations.phpSize.phpStandardDeviations.phpStandardize.phpStatisticalValidations.phpTrends.phpVarianceBase.phpVariances.phpTextData
CaseConvert.phpCharacterConvert.phpConcatenate.phpExtract.phpFormat.phpHelpers.phpReplace.phpSearch.phpText.phpTrim.php
Token
Web.phpWeb
locale
Cell
AddressHelper.phpAddressRange.phpAdvancedValueBinder.phpCell.phpCellAddress.phpCellRange.phpColumnRange.phpCoordinate.phpDataType.phpDataValidation.phpDataValidator.phpDefaultValueBinder.phpHyperlink.phpIValueBinder.phpRowRange.phpStringValueBinder.php
CellReferenceHelper.phpChart
Axis.phpChart.phpChartColor.phpDataSeries.phpDataSeriesValues.phpException.phpGridLines.phpLayout.phpLegend.phpPlotArea.phpProperties.php
Renderer
Title.phpTrendLine.phpCollection
Comment.phpDefinedName.phpDocument
Exception.phpHashTable.phpHelper
IComparable.phpIOFactory.phpNamedFormula.phpNamedRange.phpReader
BaseReader.phpCsv.php
ReferenceHelper.phpCsv
DefaultReadFilter.phpException.phpGnumeric.phpGnumeric
Html.phpIReadFilter.phpIReader.phpOds.phpOds
Security
Slk.phpXls.phpXls
Color.php
Xlsx.phpColor
ConditionalFormatting.phpDataValidationHelper.phpErrorCode.phpEscher.phpMD5.phpRC4.phpStyle
Xlsx
AutoFilter.phpBaseParserClass.phpChart.phpColumnAndRowAttributes.phpConditionalStyles.phpDataValidations.phpHyperlinks.phpNamespaces.phpPageSetup.phpProperties.phpSheetViewOptions.phpSheetViews.phpStyles.phpTheme.phpWorkbookView.php
Xml.phpXml
RichText
Settings.phpShared
CodePage.phpDate.phpDrawing.phpEscher.php
Spreadsheet.phpEscher
File.phpFont.phpIntOrFloat.phpJAMA
CHANGELOG.TXTCholeskyDecomposition.phpEigenvalueDecomposition.phpLUDecomposition.phpMatrix.phpQRDecomposition.phpSingularValueDecomposition.php
OLE.phputils
OLE
OLERead.phpPasswordHasher.phpStringHelper.phpTimeZone.phpTrend
BestFit.phpExponentialBestFit.phpLinearBestFit.phpLogarithmicBestFit.phpPolynomialBestFit.phpPowerBestFit.phpTrend.php
XMLWriter.phpXls.phpStyle
Alignment.phpBorder.phpBorders.phpColor.phpConditional.php
ConditionalFormatting
CellMatcher.phpCellStyleAssessor.phpConditionalDataBar.phpConditionalDataBarExtension.phpConditionalFormatValueObject.phpConditionalFormattingRuleExtension.phpStyleMerger.phpWizard.php
Fill.phpFont.phpNumberFormat.phpWizard
NumberFormat
BaseFormatter.phpDateFormatter.phpFormatter.phpFractionFormatter.phpNumberFormatter.phpPercentageFormatter.php
Protection.phpStyle.phpSupervisor.phpWorksheet
AutoFilter.php
AutoFilter
BaseDrawing.phpCellIterator.phpColumn.phpColumnCellIterator.phpColumnDimension.phpColumnIterator.phpDimension.phpDrawing.phpDrawing
HeaderFooter.phpHeaderFooterDrawing.phpIterator.phpMemoryDrawing.phpPageMargins.phpPageSetup.phpProtection.phpRow.phpRowCellIterator.phpRowDimension.phpRowIterator.phpSheetView.phpTable.phpTable
Validations.phpWorksheet.phpWriter
BaseWriter.phpCsv.phpException.phpHtml.phpIWriter.phpOds.php
Ods
AutoFilters.php
Pdf.phpCell
Content.phpFormula.phpMeta.phpMetaInf.phpMimetype.phpNamedExpressions.phpSettings.phpStyles.phpThumbnails.phpWriterPart.phpPdf
Xls.phpXls
BIFFwriter.phpCellDataValidation.phpConditionalHelper.phpErrorCode.phpEscher.phpFont.phpParser.php
Xlsx.phpStyle
Workbook.phpWorksheet.phpXf.phpXlsx
phpunit
php-code-coverage
ChangeLog.mdLICENSEREADME.mdcomposer.json
src
CodeCoverage.php
Driver
Exception
BranchAndPathCoverageNotSupportedException.phpDeadCodeDetectionNotSupportedException.phpDirectoryCouldNotBeCreatedException.phpException.phpInvalidArgumentException.phpNoCodeCoverageDriverAvailableException.phpNoCodeCoverageDriverWithPathCoverageSupportAvailableException.phpParserException.phpPathExistsButIsNotDirectoryException.phpPcovNotAvailableException.phpPhpdbgNotAvailableException.phpReflectionException.phpReportAlreadyFinalizedException.phpStaticAnalysisCacheNotConfiguredException.phpTestIdMissingException.phpUnintentionallyCoveredCodeException.phpWriteOperationFailedException.phpWrongXdebugVersionException.phpXdebug2NotEnabledException.phpXdebug3NotEnabledException.phpXdebugNotAvailableException.phpXmlException.php
Filter.phpNode
ProcessedCodeCoverageData.phpRawCodeCoverageData.phpReport
Clover.phpCobertura.phpCrap4j.php
Html
Facade.phpRenderer.php
PHP.phpText.phpRenderer
Dashboard.phpDirectory.phpFile.php
Template
branches.html.distcoverage_bar.html.distcoverage_bar_branch.html.dist
css
dashboard.html.distdashboard_branch.html.distdirectory.html.distdirectory_branch.html.distdirectory_item.html.distdirectory_item_branch.html.distfile.html.distfile_branch.html.distfile_item.html.distfile_item_branch.html.disticons
js
line.html.distlines.html.distmethod_item.html.distmethod_item_branch.html.distpaths.html.distXml
StaticAnalysis
CacheWarmer.phpCachingFileAnalyser.phpCodeUnitFindingVisitor.phpExecutableLinesFindingVisitor.phpFileAnalyser.phpIgnoredLinesFindingVisitor.phpParsingFileAnalyser.php
Util
Version.phpphp-file-iterator
php-invoker
php-text-template
php-timer
phpunit-selenium
.ci
after_script.shbefore_script.shcommon_env.shphpunit-environment.confsetup.shstart.shtravis_env.shvagrant_env.shvagrant_pre_setup.sh
.travis.ymlChangeLog.markdownLICENSEPHPUnit
Extensions
Selenium2TestCase.php
Selenium2TestCase
Command.phpCommandsHolder.phpDriver.phpElement.php
SeleniumBrowserSuite.phpElement
ElementCommand
ElementCriteria.phpException.phpKeys.phpKeysHolder.phpNoSeleniumException.phpResponse.phpScreenshotListener.phpSession.phpSession
SessionCommand
AcceptAlert.phpActive.phpAlertText.phpClick.phpDismissAlert.phpFile.phpFrame.phpGenericAccessor.phpGenericAttribute.phpKeys.phpLocation.phpLog.phpMoveTo.phpOrientation.phpUrl.phpWindow.php
SessionStrategy.phpSessionStrategy
StateCommand.phpURL.phpWaitUntil.phpWebDriverException.phpWindow.phpSeleniumCommon
Autoload.phpAutoload.php.inExitHandler.phpRemoteCoverage.phpappend.phpphpunit_coverage.phpprepend.php
SeleniumTestSuite.phpTests
CodeCoverageTest.php
Vagrantfilebuild.xmlSelenium2TestCase
BaseTestCase.php
Selenium2TestCaseTest.phpCoverage
CookieTest.phpDummyClass.phpRemoteCoverageTest.phpSingleFileTest.phpsingleFile.phpsingleFileCoverage.php
CustomDesiredCapabilitiesTest.phpFailuresTest.phpLogTest.phpMobileFeaturesTest.phpMultipleBrowsersMethodTest.phpMultipleBrowsersPropertyTest.phpPageObjectTest.phpRegressionsTest.phpScreenshotListenerTest.phpSessionCommand
SessionInSetupTest.phpSetUpPageTest.phpSuiteBuildingTest.phpTimeoutTest.phpURLTest.phpWaitUntilTest.phpfixtures
build
composer.jsonphpunit-selenium-bootstrap.phpphpunit.xml.distselenium-1-tests
coverage
html
CamelCasePage.htmlbanner.giftest_check_uncheck.htmltest_click_javascript_page.htmltest_click_page1.htmltest_click_page2.htmltest_confirm.htmltest_count.htmltest_delayed_element.htmltest_doubleclick.htmltest_dummy_page.htmltest_editable.htmltest_element_rect.htmltest_element_selection.htmltest_focus_on_blur.htmltest_form_elements.htmltest_form_events.htmltest_frames.htmltest_geometry.htmltest_locators.htmltest_log.htmltest_mouse_buttons.htmltest_moveto.htmltest_multiselect.htmltest_open.htmltest_page.slow.htmltest_prompt.htmltest_reload_onchange_page.htmltest_select.htmltest_select_window.htmltest_select_window_popup.htmltest_send_keys.htmltest_slowloading_page.htmltest_special_keys.htmltest_store_value.htmltest_submit.htmltest_text_patterns.htmltest_type_page1.htmltest_type_page2.htmltest_verifications.htmltest_verify_alert.htmltest_visibility.htmltest_wait.html
php
selenese
phpunit
.phpstorm.meta.phpChangeLog-8.5.mdChangeLog-9.5.mdLICENSEREADME.mdSECURITY.mdcomposer.jsonphpunitphpunit.xsd
schema
src
Exception.php
Framework
Assert.phpDataProviderTestSuite.phpReorderable.phpSelfDescribing.phpSkippedTest.phpSkippedTestCase.phpTest.phpTestBuilder.phpTestCase.phpTestFailure.phpTestListener.phpTestListenerDefaultImplementation.phpTestResult.phpTestSuite.phpTestSuiteIterator.phpWarningTestCase.php
Assert
Constraint
Boolean
Callback.phpCardinality
Constraint.phpEquality
Exception
Filesystem
IsAnything.phpIsIdentical.phpJsonMatches.phpJsonMatchesErrorMessageProvider.phpMath
Object
Operator
BinaryOperator.phpLogicalAnd.phpLogicalNot.phpLogicalOr.phpLogicalXor.phpOperator.phpUnaryOperator.php
String
IsJson.phpRegularExpression.phpStringContains.phpStringEndsWith.phpStringMatchesFormatDescription.phpStringStartsWith.php
Traversable
ArrayHasKey.phpTraversableContains.phpTraversableContainsEqual.phpTraversableContainsIdentical.phpTraversableContainsOnly.php
Type
Error
ErrorTestCase.phpException
ActualValueIsNotAnObjectException.phpAssertionFailedError.phpCodeCoverageException.phpComparisonMethodDoesNotAcceptParameterTypeException.phpComparisonMethodDoesNotDeclareBoolReturnTypeException.phpComparisonMethodDoesNotDeclareExactlyOneParameterException.phpComparisonMethodDoesNotDeclareParameterTypeException.phpComparisonMethodDoesNotExistException.phpCoveredCodeNotExecutedException.phpError.phpException.phpExpectationFailedException.phpIncompleteTestError.phpInvalidArgumentException.phpInvalidCoversTargetException.phpInvalidDataProviderException.phpMissingCoversAnnotationException.phpNoChildTestSuiteException.phpOutputError.phpPHPTAssertionFailedError.phpRiskyTestError.phpSkippedTestError.phpSkippedTestSuiteError.phpSyntheticError.phpSyntheticSkippedError.phpUnintentionallyCoveredCodeError.phpWarning.php
ExceptionWrapper.phpExecutionOrderDependency.phpIncompleteTest.phpIncompleteTestCase.phpInvalidParameterGroupException.phpMockObject
Api
Builder
ConfigurableMethod.phpException
BadMethodCallException.phpCannotUseAddMethodsException.phpCannotUseOnlyMethodsException.phpClassAlreadyExistsException.phpClassIsFinalException.phpConfigurableMethodsAlreadyInitializedException.phpDuplicateMethodException.phpException.phpIncompatibleReturnValueException.phpInvalidMethodNameException.phpMatchBuilderNotFoundException.phpMatcherAlreadyRegisteredException.phpMethodCannotBeConfiguredException.phpMethodNameAlreadyConfiguredException.phpMethodNameNotConfiguredException.phpMethodParametersAlreadyConfiguredException.phpOriginalConstructorInvocationRequiredException.phpReflectionException.phpReturnValueNotConfiguredException.phpRuntimeException.phpSoapExtensionNotAvailableException.phpUnknownClassException.phpUnknownTraitException.phpUnknownTypeException.php
Generator.phpGenerator
deprecation.tplintersection.tplmocked_class.tplmocked_method.tplmocked_method_never_or_void.tplmocked_static_method.tplproxied_method.tplproxied_method_never_or_void.tpltrait_class.tplwsdl_class.tplwsdl_method.tpl
Invocation.phpInvocationHandler.phpMatcher.phpMethodNameConstraint.phpMockBuilder.phpMockClass.phpMockMethod.phpMockMethodSet.phpMockObject.phpMockTrait.phpMockType.phpRule
AnyInvokedCount.phpAnyParameters.phpConsecutiveParameters.phpInvocationOrder.phpInvokedAtIndex.phpInvokedAtLeastCount.phpInvokedAtLeastOnce.phpInvokedAtMostCount.phpInvokedCount.phpMethodName.phpParameters.phpParametersRule.php
Stub.phpStub
ConsecutiveCalls.phpException.phpReturnArgument.phpReturnCallback.phpReturnReference.phpReturnSelf.phpReturnStub.phpReturnValueMap.phpStub.php
Verifiable.phpRunner
BaseTestRunner.phpDefaultTestResultCache.phpException.php
Extension
Filter
ExcludeGroupFilterIterator.phpFactory.phpGroupFilterIterator.phpIncludeGroupFilterIterator.phpNameFilterIterator.php
Hook
AfterIncompleteTestHook.phpAfterLastTestHook.phpAfterRiskyTestHook.phpAfterSkippedTestHook.phpAfterSuccessfulTestHook.phpAfterTestErrorHook.phpAfterTestFailureHook.phpAfterTestHook.phpAfterTestWarningHook.phpBeforeFirstTestHook.phpBeforeTestHook.phpHook.phpTestHook.phpTestListenerAdapter.php
NullTestResultCache.phpPhptTestCase.phpResultCacheExtension.phpStandardTestSuiteLoader.phpTestResultCache.phpTestSuiteLoader.phpTestSuiteSorter.phpVersion.phpTextUI
CliArguments
Command.phpDefaultResultPrinter.phpException
Exception.phpReflectionException.phpRuntimeException.phpTestDirectoryNotFoundException.phpTestFileNotFoundException.php
Help.phpResultPrinter.phpTestRunner.phpTestSuiteMapper.phpXmlConfiguration
CodeCoverage
Configuration.phpException.phpFilesystem
Directory.phpDirectoryCollection.phpDirectoryCollectionIterator.phpFile.phpFileCollection.phpFileCollectionIterator.php
Generator.phpGroup
Loader.phpLogging
Migration
MigrationBuilder.phpMigrationBuilderException.phpMigrationException.php
Migrations
ConvertLogTypes.phpCoverageCloverToReport.phpCoverageCrap4jToReport.phpCoverageHtmlToReport.phpCoveragePhpToReport.phpCoverageTextToReport.phpCoverageXmlToReport.phpIntroduceCoverageElement.phpLogToReportMigration.phpMigration.phpMoveAttributesFromFilterWhitelistToCoverage.phpMoveAttributesFromRootToCoverage.phpMoveWhitelistDirectoriesToCoverage.phpMoveWhitelistExcludesToCoverage.phpRemoveCacheTokensAttribute.phpRemoveEmptyFilter.phpRemoveLogTypes.phpUpdateSchemaLocationTo93.php
Migrator.phpPHP
Constant.phpConstantCollection.phpConstantCollectionIterator.phpIniSetting.phpIniSettingCollection.phpIniSettingCollectionIterator.phpPhp.phpPhpHandler.phpVariable.phpVariableCollection.phpVariableCollectionIterator.php
PHPUnit
TestSuite
Util
Annotation
Blacklist.phpCloner.phpColor.phpErrorHandler.phpException.phpExcludeList.phpFileLoader.phpFilesystem.phpFilter.phpGlobalState.phpInvalidDataSetException.phpJson.phpLog
PHP
Printer.phpReflection.phpRegularExpression.phpTest.phpTestDox
CliTestDoxPrinter.phpHtmlResultPrinter.phpNamePrettifier.phpResultPrinter.phpTestDoxPrinter.phpTextResultPrinter.phpXmlResultPrinter.php
TextTestListRenderer.phpType.phpVersionComparisonOperator.phpXdebugFilterScriptGenerator.phpXml.phpXml
Exception.phpFailedSchemaDetectionResult.phpLoader.phpSchemaDetectionResult.phpSchemaDetector.phpSchemaFinder.phpSnapshotNodeList.phpSuccessfulSchemaDetectionResult.phpValidationResult.phpValidator.php
XmlTestListRenderer.phppsr
container
http-client
http-factory
http-message
simple-cache
sebastian
cli-parser
code-unit-reverse-lookup
code-unit
comparator
ChangeLog.mdLICENSEREADME.mdcomposer.json
src
ArrayComparator.phpComparator.phpComparisonFailure.phpDOMNodeComparator.phpDateTimeComparator.phpDoubleComparator.phpExceptionComparator.phpFactory.phpMockObjectComparator.phpNumericComparator.phpObjectComparator.phpResourceComparator.phpScalarComparator.phpSplObjectStorageComparator.phpTypeComparator.php
exceptions
complexity
diff
ChangeLog.mdLICENSEREADME.mdcomposer.json
src
Chunk.phpDiff.phpDiffer.php
Exception
Line.phpLongestCommonSubsequenceCalculator.phpMemoryEfficientLongestCommonSubsequenceCalculator.phpOutput
AbstractChunkOutputBuilder.phpDiffOnlyOutputBuilder.phpDiffOutputBuilderInterface.phpStrictUnifiedDiffOutputBuilder.phpUnifiedDiffOutputBuilder.php
Parser.phpTimeEfficientLongestCommonSubsequenceCalculator.phpenvironment
exporter
global-state
lines-of-code
object-enumerator
object-reflector
recursion-context
resource-operations
type
ChangeLog.mdLICENSEREADME.mdcomposer.json
src
version
setasign
fpdf
FAQ.htmREADME.mdchangelog.htmcomposer.json
doc
__construct.htmacceptpagebreak.htmaddfont.htmaddlink.htmaddpage.htmaliasnbpages.htmcell.htmclose.htmerror.htmfooter.htmgetpageheight.htmgetpagewidth.htmgetstringwidth.htmgetx.htmgety.htmheader.htmimage.htmindex.htmline.htmlink.htmln.htmmulticell.htmoutput.htmpageno.htmrect.htmsetauthor.htmsetautopagebreak.htmsetcompression.htmsetcreator.htmsetdisplaymode.htmsetdrawcolor.htmsetfillcolor.htmsetfont.htmsetfontsize.htmsetkeywords.htmsetleftmargin.htmsetlinewidth.htmsetlink.htmsetmargins.htmsetrightmargin.htmsetsubject.htmsettextcolor.htmsettitle.htmsettopmargin.htmsetx.htmsetxy.htmsety.htmtext.htmwrite.htm
font
courier.phpcourierb.phpcourierbi.phpcourieri.phphelvetica.phphelveticab.phphelveticabi.phphelveticai.phpsymbol.phptimes.phptimesb.phptimesbi.phptimesi.phpzapfdingbats.php
fpdf.cssfpdf.phpinstall.txtlicense.txtmakefont
cp1250.mapcp1251.mapcp1252.mapcp1253.mapcp1254.mapcp1255.mapcp1257.mapcp1258.mapcp874.mapiso-8859-1.mapiso-8859-11.mapiso-8859-15.mapiso-8859-16.mapiso-8859-2.mapiso-8859-4.mapiso-8859-5.mapiso-8859-7.mapiso-8859-9.mapkoi8-r.mapkoi8-u.mapmakefont.phpttfparser.php
tutorial
fpdi
LICENSE.txtREADME.mdSECURITY.mdcomposer.json
src
FpdfTpl.phpFpdfTplTrait.phpFpdi.phpFpdiException.phpFpdiTrait.php
PdfParser
CrossReference
AbstractReader.phpCrossReference.phpCrossReferenceException.phpFixedReader.phpLineReader.phpReaderInterface.php
Filter
Ascii85.phpAscii85Exception.phpAsciiHex.phpFilterException.phpFilterInterface.phpFlate.phpFlateException.phpLzw.phpLzwException.php
PdfParser.phpPdfParserException.phpStreamReader.phpTokenizer.phpType
PdfReader
Tcpdf
TcpdfFpdi.phpTfpdf
autoload.phpsymfony
console
Application.php
Attribute
CHANGELOG.mdCI
Color.phpCommand
Command.phpCompleteCommand.phpDumpCompletionCommand.phpHelpCommand.phpLazyCommand.phpListCommand.phpLockableTrait.phpSignalableCommandInterface.php
CommandLoader
Completion
ConsoleEvents.phpCursor.phpDependencyInjection
Descriptor
ApplicationDescription.phpDescriptor.phpDescriptorInterface.phpJsonDescriptor.phpMarkdownDescriptor.phpTextDescriptor.phpXmlDescriptor.php
Event
ConsoleCommandEvent.phpConsoleErrorEvent.phpConsoleEvent.phpConsoleSignalEvent.phpConsoleTerminateEvent.php
EventListener
Exception
CommandNotFoundException.phpExceptionInterface.phpInvalidArgumentException.phpInvalidOptionException.phpLogicException.phpMissingInputException.phpNamespaceNotFoundException.phpRuntimeException.php
Formatter
NullOutputFormatter.phpNullOutputFormatterStyle.phpOutputFormatter.phpOutputFormatterInterface.phpOutputFormatterStyle.phpOutputFormatterStyleInterface.phpOutputFormatterStyleStack.phpWrappableOutputFormatterInterface.php
Helper
DebugFormatterHelper.phpDescriptorHelper.phpDumper.phpFormatterHelper.phpHelper.phpHelperInterface.phpHelperSet.phpInputAwareHelper.phpProcessHelper.phpProgressBar.phpProgressIndicator.phpQuestionHelper.phpSymfonyQuestionHelper.phpTable.phpTableCell.phpTableCellStyle.phpTableRows.phpTableSeparator.phpTableStyle.php
Input
ArgvInput.phpArrayInput.phpInput.phpInputArgument.phpInputAwareInterface.phpInputDefinition.phpInputInterface.phpInputOption.phpStreamableInputInterface.phpStringInput.php
LICENSELogger
Output
BufferedOutput.phpConsoleOutput.phpConsoleOutputInterface.phpConsoleSectionOutput.phpNullOutput.phpOutput.phpOutputInterface.phpStreamOutput.phpTrimmedBufferOutput.php
Question
README.mdResources
SignalRegistry
SingleCommandApplication.phpStyle
Terminal.phpTester
composer.jsondeprecation-contracts
polyfill-ctype
polyfill-intl-grapheme
polyfill-intl-normalizer
polyfill-mbstring
polyfill-php73
polyfill-php80
process
CHANGELOG.md
Exception
ExceptionInterface.phpInvalidArgumentException.phpLogicException.phpProcessFailedException.phpProcessSignaledException.phpProcessTimedOutException.phpRuntimeException.php
ExecutableFinder.phpInputStream.phpLICENSEPhpExecutableFinder.phpPhpProcess.phpPipes
Process.phpProcessUtils.phpREADME.mdcomposer.jsonservice-contracts
Attribute
CHANGELOG.mdLICENSEREADME.mdResetInterface.phpServiceLocatorTrait.phpServiceProviderInterface.phpServiceSubscriberInterface.phpServiceSubscriberTrait.phpTest
composer.jsonstring
tecnickcom
tcpdf
CHANGELOG.TXTLICENSE.TXTREADME.mdVERSIONcomposer.jsontcpdf.phptcpdf_autoconfig.phptcpdf_barcodes_1d.phptcpdf_barcodes_2d.phptcpdf_import.phptcpdf_parser.php
config
fonts
freemono.ctg.zfreemono.phpfreemono.zfreemonob.ctg.zfreemonob.phpfreemonob.zfreemonobi.ctg.zfreemonobi.phpfreemonobi.zfreemonoi.ctg.zfreemonoi.phpfreemonoi.zfreesans.ctg.zfreesans.phpfreesans.zfreesansb.ctg.zfreesansb.phpfreesansb.zfreesansbi.ctg.zfreesansbi.phpfreesansbi.zfreesansi.ctg.zfreesansi.phpfreesansi.zfreeserif.ctg.zfreeserif.phpfreeserif.zfreeserifb.ctg.zfreeserifb.phpfreeserifb.zfreeserifbi.ctg.zfreeserifbi.phpfreeserifbi.zfreeserifi.ctg.zfreeserifi.phpfreeserifi.zhelvetica.phphelveticab.phphelveticabi.phphelveticai.phppdfahelvetica.phppdfahelvetica.zpdfahelveticab.phppdfahelveticab.zpdfahelveticabi.phppdfahelveticabi.zpdfahelveticai.phppdfahelveticai.z
include
barcodes
sRGB.icctcpdf_colors.phptcpdf_filters.phptcpdf_font_data.phptcpdf_fonts.phptcpdf_images.phptcpdf_static.phptools
theseer
tokenizer
zytzagoo
29
vendor/nikic/php-parser/LICENSE
vendored
Normal file
29
vendor/nikic/php-parser/LICENSE
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2011, Nikita Popov
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
225
vendor/nikic/php-parser/README.md
vendored
Normal file
225
vendor/nikic/php-parser/README.md
vendored
Normal file
@ -0,0 +1,225 @@
|
||||
PHP Parser
|
||||
==========
|
||||
|
||||
[](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
|
||||
|
||||
This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and
|
||||
manipulation.
|
||||
|
||||
[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2).
|
||||
|
||||
[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
The main features provided by this library are:
|
||||
|
||||
* Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST).
|
||||
* Invalid code can be parsed into a partial AST.
|
||||
* The AST contains accurate location information.
|
||||
* Dumping the AST in human-readable form.
|
||||
* Converting an AST back to PHP code.
|
||||
* Experimental: Formatting can be preserved for partially changed ASTs.
|
||||
* Infrastructure to traverse and modify ASTs.
|
||||
* Resolution of namespaced names.
|
||||
* Evaluation of constant expressions.
|
||||
* Builders to simplify AST construction for code generation.
|
||||
* Converting an AST into JSON and back.
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
||||
Install the library using [composer](https://getcomposer.org):
|
||||
|
||||
php composer.phar require nikic/php-parser
|
||||
|
||||
Parse some PHP code into an AST and dump the result in human-readable form:
|
||||
|
||||
```php
|
||||
<?php
|
||||
use PhpParser\Error;
|
||||
use PhpParser\NodeDumper;
|
||||
use PhpParser\ParserFactory;
|
||||
|
||||
$code = <<<'CODE'
|
||||
<?php
|
||||
|
||||
function test($foo)
|
||||
{
|
||||
var_dump($foo);
|
||||
}
|
||||
CODE;
|
||||
|
||||
$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
|
||||
try {
|
||||
$ast = $parser->parse($code);
|
||||
} catch (Error $error) {
|
||||
echo "Parse error: {$error->getMessage()}\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$dumper = new NodeDumper;
|
||||
echo $dumper->dump($ast) . "\n";
|
||||
```
|
||||
|
||||
This dumps an AST looking something like this:
|
||||
|
||||
```
|
||||
array(
|
||||
0: Stmt_Function(
|
||||
byRef: false
|
||||
name: Identifier(
|
||||
name: test
|
||||
)
|
||||
params: array(
|
||||
0: Param(
|
||||
type: null
|
||||
byRef: false
|
||||
variadic: false
|
||||
var: Expr_Variable(
|
||||
name: foo
|
||||
)
|
||||
default: null
|
||||
)
|
||||
)
|
||||
returnType: null
|
||||
stmts: array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_FuncCall(
|
||||
name: Name(
|
||||
parts: array(
|
||||
0: var_dump
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
0: Arg(
|
||||
value: Expr_Variable(
|
||||
name: foo
|
||||
)
|
||||
byRef: false
|
||||
unpack: false
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
Let's traverse the AST and perform some kind of modification. For example, drop all function bodies:
|
||||
|
||||
```php
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
|
||||
$traverser = new NodeTraverser();
|
||||
$traverser->addVisitor(new class extends NodeVisitorAbstract {
|
||||
public function enterNode(Node $node) {
|
||||
if ($node instanceof Function_) {
|
||||
// Clean out the function body
|
||||
$node->stmts = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$ast = $traverser->traverse($ast);
|
||||
echo $dumper->dump($ast) . "\n";
|
||||
```
|
||||
|
||||
This gives us an AST where the `Function_::$stmts` are empty:
|
||||
|
||||
```
|
||||
array(
|
||||
0: Stmt_Function(
|
||||
byRef: false
|
||||
name: Identifier(
|
||||
name: test
|
||||
)
|
||||
params: array(
|
||||
0: Param(
|
||||
type: null
|
||||
byRef: false
|
||||
variadic: false
|
||||
var: Expr_Variable(
|
||||
name: foo
|
||||
)
|
||||
default: null
|
||||
)
|
||||
)
|
||||
returnType: null
|
||||
stmts: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
Finally, we can convert the new AST back to PHP code:
|
||||
|
||||
```php
|
||||
use PhpParser\PrettyPrinter;
|
||||
|
||||
$prettyPrinter = new PrettyPrinter\Standard;
|
||||
echo $prettyPrinter->prettyPrintFile($ast);
|
||||
```
|
||||
|
||||
This gives us our original code, minus the `var_dump()` call inside the function:
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
function test($foo)
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
For a more comprehensive introduction, see the documentation.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
1. [Introduction](doc/0_Introduction.markdown)
|
||||
2. [Usage of basic components](doc/2_Usage_of_basic_components.markdown)
|
||||
|
||||
Component documentation:
|
||||
|
||||
* [Walking the AST](doc/component/Walking_the_AST.markdown)
|
||||
* Node visitors
|
||||
* Modifying the AST from a visitor
|
||||
* Short-circuiting traversals
|
||||
* Interleaved visitors
|
||||
* Simple node finding API
|
||||
* Parent and sibling references
|
||||
* [Name resolution](doc/component/Name_resolution.markdown)
|
||||
* Name resolver options
|
||||
* Name resolution context
|
||||
* [Pretty printing](doc/component/Pretty_printing.markdown)
|
||||
* Converting AST back to PHP code
|
||||
* Customizing formatting
|
||||
* Formatting-preserving code transformations
|
||||
* [AST builders](doc/component/AST_builders.markdown)
|
||||
* Fluent builders for AST nodes
|
||||
* [Lexer](doc/component/Lexer.markdown)
|
||||
* Lexer options
|
||||
* Token and file positions for nodes
|
||||
* Custom attributes
|
||||
* [Error handling](doc/component/Error_handling.markdown)
|
||||
* Column information for errors
|
||||
* Error recovery (parsing of syntactically incorrect code)
|
||||
* [Constant expression evaluation](doc/component/Constant_expression_evaluation.markdown)
|
||||
* Evaluating constant/property/etc initializers
|
||||
* Handling errors and unsupported expressions
|
||||
* [JSON representation](doc/component/JSON_representation.markdown)
|
||||
* JSON encoding and decoding of ASTs
|
||||
* [Performance](doc/component/Performance.markdown)
|
||||
* Disabling Xdebug
|
||||
* Reusing objects
|
||||
* Garbage collection impact
|
||||
* [Frequently asked questions](doc/component/FAQ.markdown)
|
||||
* Parent and sibling references
|
||||
|
||||
[doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc
|
||||
[doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc
|
205
vendor/nikic/php-parser/bin/php-parse
vendored
Executable file
205
vendor/nikic/php-parser/bin/php-parse
vendored
Executable file
@ -0,0 +1,205 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
|
||||
if (file_exists($file)) {
|
||||
require $file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ini_set('xdebug.max_nesting_level', 3000);
|
||||
|
||||
// Disable Xdebug var_dump() output truncation
|
||||
ini_set('xdebug.var_display_max_children', -1);
|
||||
ini_set('xdebug.var_display_max_data', -1);
|
||||
ini_set('xdebug.var_display_max_depth', -1);
|
||||
|
||||
list($operations, $files, $attributes) = parseArgs($argv);
|
||||
|
||||
/* Dump nodes by default */
|
||||
if (empty($operations)) {
|
||||
$operations[] = 'dump';
|
||||
}
|
||||
|
||||
if (empty($files)) {
|
||||
showHelp("Must specify at least one file.");
|
||||
}
|
||||
|
||||
$lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => [
|
||||
'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
|
||||
]]);
|
||||
$parser = (new PhpParser\ParserFactory)->create(
|
||||
PhpParser\ParserFactory::PREFER_PHP7,
|
||||
$lexer
|
||||
);
|
||||
$dumper = new PhpParser\NodeDumper([
|
||||
'dumpComments' => true,
|
||||
'dumpPositions' => $attributes['with-positions'],
|
||||
]);
|
||||
$prettyPrinter = new PhpParser\PrettyPrinter\Standard;
|
||||
|
||||
$traverser = new PhpParser\NodeTraverser();
|
||||
$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
|
||||
|
||||
foreach ($files as $file) {
|
||||
if (strpos($file, '<?php') === 0) {
|
||||
$code = $file;
|
||||
fwrite(STDERR, "====> Code $code\n");
|
||||
} else {
|
||||
if (!file_exists($file)) {
|
||||
fwrite(STDERR, "File $file does not exist.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$code = file_get_contents($file);
|
||||
fwrite(STDERR, "====> File $file:\n");
|
||||
}
|
||||
|
||||
if ($attributes['with-recovery']) {
|
||||
$errorHandler = new PhpParser\ErrorHandler\Collecting;
|
||||
$stmts = $parser->parse($code, $errorHandler);
|
||||
foreach ($errorHandler->getErrors() as $error) {
|
||||
$message = formatErrorMessage($error, $code, $attributes['with-column-info']);
|
||||
fwrite(STDERR, $message . "\n");
|
||||
}
|
||||
if (null === $stmts) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
$stmts = $parser->parse($code);
|
||||
} catch (PhpParser\Error $error) {
|
||||
$message = formatErrorMessage($error, $code, $attributes['with-column-info']);
|
||||
fwrite(STDERR, $message . "\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($operations as $operation) {
|
||||
if ('dump' === $operation) {
|
||||
fwrite(STDERR, "==> Node dump:\n");
|
||||
echo $dumper->dump($stmts, $code), "\n";
|
||||
} elseif ('pretty-print' === $operation) {
|
||||
fwrite(STDERR, "==> Pretty print:\n");
|
||||
echo $prettyPrinter->prettyPrintFile($stmts), "\n";
|
||||
} elseif ('json-dump' === $operation) {
|
||||
fwrite(STDERR, "==> JSON dump:\n");
|
||||
echo json_encode($stmts, JSON_PRETTY_PRINT), "\n";
|
||||
} elseif ('var-dump' === $operation) {
|
||||
fwrite(STDERR, "==> var_dump():\n");
|
||||
var_dump($stmts);
|
||||
} elseif ('resolve-names' === $operation) {
|
||||
fwrite(STDERR, "==> Resolved names.\n");
|
||||
$stmts = $traverser->traverse($stmts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) {
|
||||
if ($withColumnInfo && $e->hasColumnInfo()) {
|
||||
return $e->getMessageWithColumnInfo($code);
|
||||
} else {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
function showHelp($error = '') {
|
||||
if ($error) {
|
||||
fwrite(STDERR, $error . "\n\n");
|
||||
}
|
||||
fwrite($error ? STDERR : STDOUT, <<<OUTPUT
|
||||
Usage: php-parse [operations] file1.php [file2.php ...]
|
||||
or: php-parse [operations] "<?php code"
|
||||
Turn PHP source code into an abstract syntax tree.
|
||||
|
||||
Operations is a list of the following options (--dump by default):
|
||||
|
||||
-d, --dump Dump nodes using NodeDumper
|
||||
-p, --pretty-print Pretty print file using PrettyPrinter\Standard
|
||||
-j, --json-dump Print json_encode() result
|
||||
--var-dump var_dump() nodes (for exact structure)
|
||||
-N, --resolve-names Resolve names using NodeVisitor\NameResolver
|
||||
-c, --with-column-info Show column-numbers for errors (if available)
|
||||
-P, --with-positions Show positions in node dumps
|
||||
-r, --with-recovery Use parsing with error recovery
|
||||
-h, --help Display this page
|
||||
|
||||
Example:
|
||||
php-parse -d -p -N -d file.php
|
||||
|
||||
Dumps nodes, pretty prints them, then resolves names and dumps them again.
|
||||
|
||||
|
||||
OUTPUT
|
||||
);
|
||||
exit($error ? 1 : 0);
|
||||
}
|
||||
|
||||
function parseArgs($args) {
|
||||
$operations = [];
|
||||
$files = [];
|
||||
$attributes = [
|
||||
'with-column-info' => false,
|
||||
'with-positions' => false,
|
||||
'with-recovery' => false,
|
||||
];
|
||||
|
||||
array_shift($args);
|
||||
$parseOptions = true;
|
||||
foreach ($args as $arg) {
|
||||
if (!$parseOptions) {
|
||||
$files[] = $arg;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ($arg) {
|
||||
case '--dump':
|
||||
case '-d':
|
||||
$operations[] = 'dump';
|
||||
break;
|
||||
case '--pretty-print':
|
||||
case '-p':
|
||||
$operations[] = 'pretty-print';
|
||||
break;
|
||||
case '--json-dump':
|
||||
case '-j':
|
||||
$operations[] = 'json-dump';
|
||||
break;
|
||||
case '--var-dump':
|
||||
$operations[] = 'var-dump';
|
||||
break;
|
||||
case '--resolve-names':
|
||||
case '-N';
|
||||
$operations[] = 'resolve-names';
|
||||
break;
|
||||
case '--with-column-info':
|
||||
case '-c';
|
||||
$attributes['with-column-info'] = true;
|
||||
break;
|
||||
case '--with-positions':
|
||||
case '-P':
|
||||
$attributes['with-positions'] = true;
|
||||
break;
|
||||
case '--with-recovery':
|
||||
case '-r':
|
||||
$attributes['with-recovery'] = true;
|
||||
break;
|
||||
case '--help':
|
||||
case '-h';
|
||||
showHelp();
|
||||
break;
|
||||
case '--':
|
||||
$parseOptions = false;
|
||||
break;
|
||||
default:
|
||||
if ($arg[0] === '-') {
|
||||
showHelp("Invalid operation $arg.");
|
||||
} else {
|
||||
$files[] = $arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [$operations, $files, $attributes];
|
||||
}
|
41
vendor/nikic/php-parser/composer.json
vendored
Normal file
41
vendor/nikic/php-parser/composer.json
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"type": "library",
|
||||
"description": "A PHP parser written in PHP",
|
||||
"keywords": [
|
||||
"php",
|
||||
"parser"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nikita Popov"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.0",
|
||||
"ext-tokenizer": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0",
|
||||
"ircmaxell/php-yacc": "^0.0.7"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.9-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpParser\\": "lib/PhpParser"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"PhpParser\\": "test/PhpParser/"
|
||||
}
|
||||
},
|
||||
"bin": [
|
||||
"bin/php-parse"
|
||||
]
|
||||
}
|
30
vendor/nikic/php-parser/grammar/README.md
vendored
Normal file
30
vendor/nikic/php-parser/grammar/README.md
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
What do all those files mean?
|
||||
=============================
|
||||
|
||||
* `php5.y`: PHP 5 grammar written in a pseudo language
|
||||
* `php7.y`: PHP 7 grammar written in a pseudo language
|
||||
* `tokens.y`: Tokens definition shared between PHP 5 and PHP 7 grammars
|
||||
* `parser.template`: A `kmyacc` parser prototype file for PHP
|
||||
* `tokens.template`: A `kmyacc` prototype file for the `Tokens` class
|
||||
* `rebuildParsers.php`: Preprocesses the grammar and builds the parser using `kmyacc`
|
||||
|
||||
.phpy pseudo language
|
||||
=====================
|
||||
|
||||
The `.y` file is a normal grammar in `kmyacc` (`yacc`) style, with some transformations
|
||||
applied to it:
|
||||
|
||||
* Nodes are created using the syntax `Name[..., ...]`. This is transformed into
|
||||
`new Name(..., ..., attributes())`
|
||||
* Some function-like constructs are resolved (see `rebuildParsers.php` for a list)
|
||||
|
||||
Building the parser
|
||||
===================
|
||||
|
||||
Run `php grammar/rebuildParsers.php` to rebuild the parsers. Additional options:
|
||||
|
||||
* The `KMYACC` environment variable can be used to specify an alternative `kmyacc` binary.
|
||||
By default the `phpyacc` dev dependency will be used. To use the original `kmyacc`, you
|
||||
need to compile [moriyoshi's fork](https://github.com/moriyoshi/kmyacc-forked).
|
||||
* The `--debug` option enables emission of debug symbols and creates the `y.output` file.
|
||||
* The `--keep-tmp-grammar` option preserves the preprocessed grammar file.
|
106
vendor/nikic/php-parser/grammar/parser.template
vendored
Normal file
106
vendor/nikic/php-parser/grammar/parser.template
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
$meta #
|
||||
#semval($) $this->semValue
|
||||
#semval($,%t) $this->semValue
|
||||
#semval(%n) $stackPos-(%l-%n)
|
||||
#semval(%n,%t) $stackPos-(%l-%n)
|
||||
|
||||
namespace PhpParser\Parser;
|
||||
|
||||
use PhpParser\Error;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Scalar;
|
||||
use PhpParser\Node\Stmt;
|
||||
#include;
|
||||
|
||||
/* This is an automatically GENERATED file, which should not be manually edited.
|
||||
* Instead edit one of the following:
|
||||
* * the grammar files grammar/php5.y or grammar/php7.y
|
||||
* * the skeleton file grammar/parser.template
|
||||
* * the preprocessing script grammar/rebuildParsers.php
|
||||
*/
|
||||
class #(-p) extends \PhpParser\ParserAbstract
|
||||
{
|
||||
protected $tokenToSymbolMapSize = #(YYMAXLEX);
|
||||
protected $actionTableSize = #(YYLAST);
|
||||
protected $gotoTableSize = #(YYGLAST);
|
||||
|
||||
protected $invalidSymbol = #(YYBADCH);
|
||||
protected $errorSymbol = #(YYINTERRTOK);
|
||||
protected $defaultAction = #(YYDEFAULT);
|
||||
protected $unexpectedTokenRule = #(YYUNEXPECTED);
|
||||
|
||||
protected $YY2TBLSTATE = #(YY2TBLSTATE);
|
||||
protected $numNonLeafStates = #(YYNLSTATES);
|
||||
|
||||
protected $symbolToName = array(
|
||||
#listvar terminals
|
||||
);
|
||||
|
||||
protected $tokenToSymbol = array(
|
||||
#listvar yytranslate
|
||||
);
|
||||
|
||||
protected $action = array(
|
||||
#listvar yyaction
|
||||
);
|
||||
|
||||
protected $actionCheck = array(
|
||||
#listvar yycheck
|
||||
);
|
||||
|
||||
protected $actionBase = array(
|
||||
#listvar yybase
|
||||
);
|
||||
|
||||
protected $actionDefault = array(
|
||||
#listvar yydefault
|
||||
);
|
||||
|
||||
protected $goto = array(
|
||||
#listvar yygoto
|
||||
);
|
||||
|
||||
protected $gotoCheck = array(
|
||||
#listvar yygcheck
|
||||
);
|
||||
|
||||
protected $gotoBase = array(
|
||||
#listvar yygbase
|
||||
);
|
||||
|
||||
protected $gotoDefault = array(
|
||||
#listvar yygdefault
|
||||
);
|
||||
|
||||
protected $ruleToNonTerminal = array(
|
||||
#listvar yylhs
|
||||
);
|
||||
|
||||
protected $ruleToLength = array(
|
||||
#listvar yylen
|
||||
);
|
||||
#if -t
|
||||
|
||||
protected $productions = array(
|
||||
#production-strings;
|
||||
);
|
||||
#endif
|
||||
|
||||
protected function initReduceCallbacks() {
|
||||
$this->reduceCallbacks = [
|
||||
#reduce
|
||||
%n => function ($stackPos) {
|
||||
%b
|
||||
},
|
||||
#noact
|
||||
%n => function ($stackPos) {
|
||||
$this->semValue = $this->semStack[$stackPos];
|
||||
},
|
||||
#endreduce
|
||||
];
|
||||
}
|
||||
}
|
||||
#tailcode;
|
1036
vendor/nikic/php-parser/grammar/php5.y
vendored
Normal file
1036
vendor/nikic/php-parser/grammar/php5.y
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1222
vendor/nikic/php-parser/grammar/php7.y
vendored
Normal file
1222
vendor/nikic/php-parser/grammar/php7.y
vendored
Normal file
File diff suppressed because it is too large
Load Diff
184
vendor/nikic/php-parser/grammar/phpyLang.php
vendored
Normal file
184
vendor/nikic/php-parser/grammar/phpyLang.php
vendored
Normal file
@ -0,0 +1,184 @@
|
||||
<?php
|
||||
|
||||
///////////////////////////////
|
||||
/// Utility regex constants ///
|
||||
///////////////////////////////
|
||||
|
||||
const LIB = '(?(DEFINE)
|
||||
(?<singleQuotedString>\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\')
|
||||
(?<doubleQuotedString>"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+")
|
||||
(?<string>(?&singleQuotedString)|(?&doubleQuotedString))
|
||||
(?<comment>/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/)
|
||||
(?<code>\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+})
|
||||
)';
|
||||
|
||||
const PARAMS = '\[(?<params>[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]';
|
||||
const ARGS = '\((?<args>[^()]*+(?:\((?&args)\)[^()]*+)*+)\)';
|
||||
|
||||
///////////////////////////////
|
||||
/// Preprocessing functions ///
|
||||
///////////////////////////////
|
||||
|
||||
function preprocessGrammar($code) {
|
||||
$code = resolveNodes($code);
|
||||
$code = resolveMacros($code);
|
||||
$code = resolveStackAccess($code);
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
function resolveNodes($code) {
|
||||
return preg_replace_callback(
|
||||
'~\b(?<name>[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~',
|
||||
function($matches) {
|
||||
// recurse
|
||||
$matches['params'] = resolveNodes($matches['params']);
|
||||
|
||||
$params = magicSplit(
|
||||
'(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,',
|
||||
$matches['params']
|
||||
);
|
||||
|
||||
$paramCode = '';
|
||||
foreach ($params as $param) {
|
||||
$paramCode .= $param . ', ';
|
||||
}
|
||||
|
||||
return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())';
|
||||
},
|
||||
$code
|
||||
);
|
||||
}
|
||||
|
||||
function resolveMacros($code) {
|
||||
return preg_replace_callback(
|
||||
'~\b(?<!::|->)(?!array\()(?<name>[a-z][A-Za-z]++)' . ARGS . '~',
|
||||
function($matches) {
|
||||
// recurse
|
||||
$matches['args'] = resolveMacros($matches['args']);
|
||||
|
||||
$name = $matches['name'];
|
||||
$args = magicSplit(
|
||||
'(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,',
|
||||
$matches['args']
|
||||
);
|
||||
|
||||
if ('attributes' === $name) {
|
||||
assertArgs(0, $args, $name);
|
||||
return '$this->startAttributeStack[#1] + $this->endAttributes';
|
||||
}
|
||||
|
||||
if ('stackAttributes' === $name) {
|
||||
assertArgs(1, $args, $name);
|
||||
return '$this->startAttributeStack[' . $args[0] . ']'
|
||||
. ' + $this->endAttributeStack[' . $args[0] . ']';
|
||||
}
|
||||
|
||||
if ('init' === $name) {
|
||||
return '$$ = array(' . implode(', ', $args) . ')';
|
||||
}
|
||||
|
||||
if ('push' === $name) {
|
||||
assertArgs(2, $args, $name);
|
||||
|
||||
return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0];
|
||||
}
|
||||
|
||||
if ('pushNormalizing' === $name) {
|
||||
assertArgs(2, $args, $name);
|
||||
|
||||
return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }'
|
||||
. ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }';
|
||||
}
|
||||
|
||||
if ('toArray' == $name) {
|
||||
assertArgs(1, $args, $name);
|
||||
|
||||
return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')';
|
||||
}
|
||||
|
||||
if ('parseVar' === $name) {
|
||||
assertArgs(1, $args, $name);
|
||||
|
||||
return 'substr(' . $args[0] . ', 1)';
|
||||
}
|
||||
|
||||
if ('parseEncapsed' === $name) {
|
||||
assertArgs(3, $args, $name);
|
||||
|
||||
return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {'
|
||||
. ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }';
|
||||
}
|
||||
|
||||
if ('makeNop' === $name) {
|
||||
assertArgs(3, $args, $name);
|
||||
|
||||
return '$startAttributes = ' . $args[1] . ';'
|
||||
. ' if (isset($startAttributes[\'comments\']))'
|
||||
. ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }'
|
||||
. ' else { ' . $args[0] . ' = null; }';
|
||||
}
|
||||
|
||||
if ('makeZeroLengthNop' == $name) {
|
||||
assertArgs(2, $args, $name);
|
||||
|
||||
return '$startAttributes = ' . $args[1] . ';'
|
||||
. ' if (isset($startAttributes[\'comments\']))'
|
||||
. ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($startAttributes[\'comments\'])); }'
|
||||
. ' else { ' . $args[0] . ' = null; }';
|
||||
}
|
||||
|
||||
if ('prependLeadingComments' === $name) {
|
||||
assertArgs(1, $args, $name);
|
||||
|
||||
return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; '
|
||||
. 'if (!empty($attrs[\'comments\'])) {'
|
||||
. '$stmts[0]->setAttribute(\'comments\', '
|
||||
. 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }';
|
||||
}
|
||||
|
||||
return $matches[0];
|
||||
},
|
||||
$code
|
||||
);
|
||||
}
|
||||
|
||||
function assertArgs($num, $args, $name) {
|
||||
if ($num != count($args)) {
|
||||
die('Wrong argument count for ' . $name . '().');
|
||||
}
|
||||
}
|
||||
|
||||
function resolveStackAccess($code) {
|
||||
$code = preg_replace('/\$\d+/', '$this->semStack[$0]', $code);
|
||||
$code = preg_replace('/#(\d+)/', '$$1', $code);
|
||||
return $code;
|
||||
}
|
||||
|
||||
function removeTrailingWhitespace($code) {
|
||||
$lines = explode("\n", $code);
|
||||
$lines = array_map('rtrim', $lines);
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
/// Regex helper functions ///
|
||||
//////////////////////////////
|
||||
|
||||
function regex($regex) {
|
||||
return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~';
|
||||
}
|
||||
|
||||
function magicSplit($regex, $string) {
|
||||
$pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string);
|
||||
|
||||
foreach ($pieces as &$piece) {
|
||||
$piece = trim($piece);
|
||||
}
|
||||
|
||||
if ($pieces === ['']) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $pieces;
|
||||
}
|
81
vendor/nikic/php-parser/grammar/rebuildParsers.php
vendored
Normal file
81
vendor/nikic/php-parser/grammar/rebuildParsers.php
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/phpyLang.php';
|
||||
|
||||
$grammarFileToName = [
|
||||
__DIR__ . '/php5.y' => 'Php5',
|
||||
__DIR__ . '/php7.y' => 'Php7',
|
||||
];
|
||||
|
||||
$tokensFile = __DIR__ . '/tokens.y';
|
||||
$tokensTemplate = __DIR__ . '/tokens.template';
|
||||
$skeletonFile = __DIR__ . '/parser.template';
|
||||
$tmpGrammarFile = __DIR__ . '/tmp_parser.phpy';
|
||||
$tmpResultFile = __DIR__ . '/tmp_parser.php';
|
||||
$resultDir = __DIR__ . '/../lib/PhpParser/Parser';
|
||||
$tokensResultsFile = $resultDir . '/Tokens.php';
|
||||
|
||||
$kmyacc = getenv('KMYACC');
|
||||
if (!$kmyacc) {
|
||||
// Use phpyacc from dev dependencies by default.
|
||||
$kmyacc = __DIR__ . '/../vendor/bin/phpyacc';
|
||||
}
|
||||
|
||||
$options = array_flip($argv);
|
||||
$optionDebug = isset($options['--debug']);
|
||||
$optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']);
|
||||
|
||||
///////////////////
|
||||
/// Main script ///
|
||||
///////////////////
|
||||
|
||||
$tokens = file_get_contents($tokensFile);
|
||||
|
||||
foreach ($grammarFileToName as $grammarFile => $name) {
|
||||
echo "Building temporary $name grammar file.\n";
|
||||
|
||||
$grammarCode = file_get_contents($grammarFile);
|
||||
$grammarCode = str_replace('%tokens', $tokens, $grammarCode);
|
||||
$grammarCode = preprocessGrammar($grammarCode);
|
||||
|
||||
file_put_contents($tmpGrammarFile, $grammarCode);
|
||||
|
||||
$additionalArgs = $optionDebug ? '-t -v' : '';
|
||||
|
||||
echo "Building $name parser.\n";
|
||||
$output = execCmd("$kmyacc $additionalArgs -m $skeletonFile -p $name $tmpGrammarFile");
|
||||
|
||||
$resultCode = file_get_contents($tmpResultFile);
|
||||
$resultCode = removeTrailingWhitespace($resultCode);
|
||||
|
||||
ensureDirExists($resultDir);
|
||||
file_put_contents("$resultDir/$name.php", $resultCode);
|
||||
unlink($tmpResultFile);
|
||||
|
||||
echo "Building token definition.\n";
|
||||
$output = execCmd("$kmyacc -m $tokensTemplate $tmpGrammarFile");
|
||||
rename($tmpResultFile, $tokensResultsFile);
|
||||
|
||||
if (!$optionKeepTmpGrammar) {
|
||||
unlink($tmpGrammarFile);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
/// Utility helper functions ///
|
||||
////////////////////////////////
|
||||
|
||||
function ensureDirExists($dir) {
|
||||
if (!is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
}
|
||||
|
||||
function execCmd($cmd) {
|
||||
$output = trim(shell_exec("$cmd 2>&1"));
|
||||
if ($output !== "") {
|
||||
echo "> " . $cmd . "\n";
|
||||
echo $output;
|
||||
}
|
||||
return $output;
|
||||
}
|
17
vendor/nikic/php-parser/grammar/tokens.template
vendored
Normal file
17
vendor/nikic/php-parser/grammar/tokens.template
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$meta #
|
||||
#semval($) $this->semValue
|
||||
#semval($,%t) $this->semValue
|
||||
#semval(%n) $this->stackPos-(%l-%n)
|
||||
#semval(%n,%t) $this->stackPos-(%l-%n)
|
||||
|
||||
namespace PhpParser\Parser;
|
||||
#include;
|
||||
|
||||
/* GENERATED file based on grammar/tokens.y */
|
||||
final class Tokens
|
||||
{
|
||||
#tokenval
|
||||
const %s = %n;
|
||||
#endtokenval
|
||||
}
|
115
vendor/nikic/php-parser/grammar/tokens.y
vendored
Normal file
115
vendor/nikic/php-parser/grammar/tokens.y
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for
|
||||
* both. This is enforced by sharing this token file. */
|
||||
|
||||
%right T_THROW
|
||||
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
|
||||
%left ','
|
||||
%left T_LOGICAL_OR
|
||||
%left T_LOGICAL_XOR
|
||||
%left T_LOGICAL_AND
|
||||
%right T_PRINT
|
||||
%right T_YIELD
|
||||
%right T_DOUBLE_ARROW
|
||||
%right T_YIELD_FROM
|
||||
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL
|
||||
%left '?' ':'
|
||||
%right T_COALESCE
|
||||
%left T_BOOLEAN_OR
|
||||
%left T_BOOLEAN_AND
|
||||
%left '|'
|
||||
%left '^'
|
||||
%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
|
||||
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP
|
||||
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
|
||||
%left T_SL T_SR
|
||||
%left '+' '-' '.'
|
||||
%left '*' '/' '%'
|
||||
%right '!'
|
||||
%nonassoc T_INSTANCEOF
|
||||
%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
|
||||
%right T_POW
|
||||
%right '['
|
||||
%nonassoc T_NEW T_CLONE
|
||||
%token T_EXIT
|
||||
%token T_IF
|
||||
%left T_ELSEIF
|
||||
%left T_ELSE
|
||||
%left T_ENDIF
|
||||
%token T_LNUMBER
|
||||
%token T_DNUMBER
|
||||
%token T_STRING
|
||||
%token T_STRING_VARNAME
|
||||
%token T_VARIABLE
|
||||
%token T_NUM_STRING
|
||||
%token T_INLINE_HTML
|
||||
%token T_ENCAPSED_AND_WHITESPACE
|
||||
%token T_CONSTANT_ENCAPSED_STRING
|
||||
%token T_ECHO
|
||||
%token T_DO
|
||||
%token T_WHILE
|
||||
%token T_ENDWHILE
|
||||
%token T_FOR
|
||||
%token T_ENDFOR
|
||||
%token T_FOREACH
|
||||
%token T_ENDFOREACH
|
||||
%token T_DECLARE
|
||||
%token T_ENDDECLARE
|
||||
%token T_AS
|
||||
%token T_SWITCH
|
||||
%token T_MATCH
|
||||
%token T_ENDSWITCH
|
||||
%token T_CASE
|
||||
%token T_DEFAULT
|
||||
%token T_BREAK
|
||||
%token T_CONTINUE
|
||||
%token T_GOTO
|
||||
%token T_FUNCTION
|
||||
%token T_FN
|
||||
%token T_CONST
|
||||
%token T_RETURN
|
||||
%token T_TRY
|
||||
%token T_CATCH
|
||||
%token T_FINALLY
|
||||
%token T_THROW
|
||||
%token T_USE
|
||||
%token T_INSTEADOF
|
||||
%token T_GLOBAL
|
||||
%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY
|
||||
%token T_VAR
|
||||
%token T_UNSET
|
||||
%token T_ISSET
|
||||
%token T_EMPTY
|
||||
%token T_HALT_COMPILER
|
||||
%token T_CLASS
|
||||
%token T_TRAIT
|
||||
%token T_INTERFACE
|
||||
%token T_ENUM
|
||||
%token T_EXTENDS
|
||||
%token T_IMPLEMENTS
|
||||
%token T_OBJECT_OPERATOR
|
||||
%token T_NULLSAFE_OBJECT_OPERATOR
|
||||
%token T_DOUBLE_ARROW
|
||||
%token T_LIST
|
||||
%token T_ARRAY
|
||||
%token T_CALLABLE
|
||||
%token T_CLASS_C
|
||||
%token T_TRAIT_C
|
||||
%token T_METHOD_C
|
||||
%token T_FUNC_C
|
||||
%token T_LINE
|
||||
%token T_FILE
|
||||
%token T_START_HEREDOC
|
||||
%token T_END_HEREDOC
|
||||
%token T_DOLLAR_OPEN_CURLY_BRACES
|
||||
%token T_CURLY_OPEN
|
||||
%token T_PAAMAYIM_NEKUDOTAYIM
|
||||
%token T_NAMESPACE
|
||||
%token T_NS_C
|
||||
%token T_DIR
|
||||
%token T_NS_SEPARATOR
|
||||
%token T_ELLIPSIS
|
||||
%token T_NAME_FULLY_QUALIFIED
|
||||
%token T_NAME_QUALIFIED
|
||||
%token T_NAME_RELATIVE
|
||||
%token T_ATTRIBUTE
|
||||
%token T_ENUM
|
13
vendor/nikic/php-parser/lib/PhpParser/Builder.php
vendored
Normal file
13
vendor/nikic/php-parser/lib/PhpParser/Builder.php
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
interface Builder
|
||||
{
|
||||
/**
|
||||
* Returns the built node.
|
||||
*
|
||||
* @return Node The built node
|
||||
*/
|
||||
public function getNode() : Node;
|
||||
}
|
132
vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php
vendored
Normal file
132
vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Const_;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class ClassConst implements PhpParser\Builder
|
||||
{
|
||||
protected $flags = 0;
|
||||
protected $attributes = [];
|
||||
protected $constants = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates a class constant builder
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
* @param Node\Expr|bool|null|int|float|string|array $value Value
|
||||
*/
|
||||
public function __construct($name, $value) {
|
||||
$this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add another constant to const group
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
* @param Node\Expr|bool|null|int|float|string|array $value Value
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addConst($name, $value) {
|
||||
$this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the constant public.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePublic() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the constant protected.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeProtected() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the constant private.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePrivate() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the constant final.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeFinal() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets doc comment for the constant.
|
||||
*
|
||||
* @param PhpParser\Comment\Doc|string $docComment Doc comment to set
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setDocComment($docComment) {
|
||||
$this->attributes = [
|
||||
'comments' => [BuilderHelpers::normalizeDocComment($docComment)]
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built class node.
|
||||
*
|
||||
* @return Stmt\ClassConst The built constant node
|
||||
*/
|
||||
public function getNode(): PhpParser\Node {
|
||||
return new Stmt\ClassConst(
|
||||
$this->constants,
|
||||
$this->flags,
|
||||
$this->attributes,
|
||||
$this->attributeGroups
|
||||
);
|
||||
}
|
||||
}
|
146
vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
vendored
Normal file
146
vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Class_ extends Declaration
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $extends = null;
|
||||
protected $implements = [];
|
||||
protected $flags = 0;
|
||||
|
||||
protected $uses = [];
|
||||
protected $constants = [];
|
||||
protected $properties = [];
|
||||
protected $methods = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates a class builder.
|
||||
*
|
||||
* @param string $name Name of the class
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends a class.
|
||||
*
|
||||
* @param Name|string $class Name of class to extend
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function extend($class) {
|
||||
$this->extends = BuilderHelpers::normalizeName($class);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements one or more interfaces.
|
||||
*
|
||||
* @param Name|string ...$interfaces Names of interfaces to implement
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function implement(...$interfaces) {
|
||||
foreach ($interfaces as $interface) {
|
||||
$this->implements[] = BuilderHelpers::normalizeName($interface);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the class abstract.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeAbstract() {
|
||||
$this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the class final.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeFinal() {
|
||||
$this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function makeReadonly() {
|
||||
$this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Stmt|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
$stmt = BuilderHelpers::normalizeNode($stmt);
|
||||
|
||||
$targets = [
|
||||
Stmt\TraitUse::class => &$this->uses,
|
||||
Stmt\ClassConst::class => &$this->constants,
|
||||
Stmt\Property::class => &$this->properties,
|
||||
Stmt\ClassMethod::class => &$this->methods,
|
||||
];
|
||||
|
||||
$class = \get_class($stmt);
|
||||
if (!isset($targets[$class])) {
|
||||
throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
|
||||
}
|
||||
|
||||
$targets[$class][] = $stmt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built class node.
|
||||
*
|
||||
* @return Stmt\Class_ The built class node
|
||||
*/
|
||||
public function getNode() : PhpParser\Node {
|
||||
return new Stmt\Class_($this->name, [
|
||||
'flags' => $this->flags,
|
||||
'extends' => $this->extends,
|
||||
'implements' => $this->implements,
|
||||
'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods),
|
||||
'attrGroups' => $this->attributeGroups,
|
||||
], $this->attributes);
|
||||
}
|
||||
}
|
43
vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php
vendored
Normal file
43
vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
|
||||
abstract class Declaration implements PhpParser\Builder
|
||||
{
|
||||
protected $attributes = [];
|
||||
|
||||
abstract public function addStmt($stmt);
|
||||
|
||||
/**
|
||||
* Adds multiple statements.
|
||||
*
|
||||
* @param array $stmts The statements to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmts(array $stmts) {
|
||||
foreach ($stmts as $stmt) {
|
||||
$this->addStmt($stmt);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets doc comment for the declaration.
|
||||
*
|
||||
* @param PhpParser\Comment\Doc|string $docComment Doc comment to set
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setDocComment($docComment) {
|
||||
$this->attributes['comments'] = [
|
||||
BuilderHelpers::normalizeDocComment($docComment)
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
85
vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php
vendored
Normal file
85
vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class EnumCase implements PhpParser\Builder
|
||||
{
|
||||
protected $name;
|
||||
protected $value = null;
|
||||
protected $attributes = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates an enum case builder.
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
*/
|
||||
public function __construct($name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value.
|
||||
*
|
||||
* @param Node\Expr|string|int $value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value) {
|
||||
$this->value = BuilderHelpers::normalizeValue($value);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets doc comment for the constant.
|
||||
*
|
||||
* @param PhpParser\Comment\Doc|string $docComment Doc comment to set
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setDocComment($docComment) {
|
||||
$this->attributes = [
|
||||
'comments' => [BuilderHelpers::normalizeDocComment($docComment)]
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built enum case node.
|
||||
*
|
||||
* @return Stmt\EnumCase The built constant node
|
||||
*/
|
||||
public function getNode(): PhpParser\Node {
|
||||
return new Stmt\EnumCase(
|
||||
$this->name,
|
||||
$this->value,
|
||||
$this->attributes,
|
||||
$this->attributeGroups
|
||||
);
|
||||
}
|
||||
}
|
117
vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php
vendored
Normal file
117
vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Enum_ extends Declaration
|
||||
{
|
||||
protected $name;
|
||||
protected $scalarType = null;
|
||||
|
||||
protected $implements = [];
|
||||
|
||||
protected $uses = [];
|
||||
protected $enumCases = [];
|
||||
protected $constants = [];
|
||||
protected $methods = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates an enum builder.
|
||||
*
|
||||
* @param string $name Name of the enum
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scalar type.
|
||||
*
|
||||
* @param string|Identifier $type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setScalarType($scalarType) {
|
||||
$this->scalarType = BuilderHelpers::normalizeType($scalarType);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements one or more interfaces.
|
||||
*
|
||||
* @param Name|string ...$interfaces Names of interfaces to implement
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function implement(...$interfaces) {
|
||||
foreach ($interfaces as $interface) {
|
||||
$this->implements[] = BuilderHelpers::normalizeName($interface);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Stmt|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
$stmt = BuilderHelpers::normalizeNode($stmt);
|
||||
|
||||
$targets = [
|
||||
Stmt\TraitUse::class => &$this->uses,
|
||||
Stmt\EnumCase::class => &$this->enumCases,
|
||||
Stmt\ClassConst::class => &$this->constants,
|
||||
Stmt\ClassMethod::class => &$this->methods,
|
||||
];
|
||||
|
||||
$class = \get_class($stmt);
|
||||
if (!isset($targets[$class])) {
|
||||
throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
|
||||
}
|
||||
|
||||
$targets[$class][] = $stmt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built class node.
|
||||
*
|
||||
* @return Stmt\Enum_ The built enum node
|
||||
*/
|
||||
public function getNode() : PhpParser\Node {
|
||||
return new Stmt\Enum_($this->name, [
|
||||
'scalarType' => $this->scalarType,
|
||||
'implements' => $this->implements,
|
||||
'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods),
|
||||
'attrGroups' => $this->attributeGroups,
|
||||
], $this->attributes);
|
||||
}
|
||||
}
|
73
vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
vendored
Normal file
73
vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
|
||||
abstract class FunctionLike extends Declaration
|
||||
{
|
||||
protected $returnByRef = false;
|
||||
protected $params = [];
|
||||
|
||||
/** @var string|Node\Name|Node\NullableType|null */
|
||||
protected $returnType = null;
|
||||
|
||||
/**
|
||||
* Make the function return by reference.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeReturnByRef() {
|
||||
$this->returnByRef = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a parameter.
|
||||
*
|
||||
* @param Node\Param|Param $param The parameter to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addParam($param) {
|
||||
$param = BuilderHelpers::normalizeNode($param);
|
||||
|
||||
if (!$param instanceof Node\Param) {
|
||||
throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType()));
|
||||
}
|
||||
|
||||
$this->params[] = $param;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds multiple parameters.
|
||||
*
|
||||
* @param array $params The parameters to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addParams(array $params) {
|
||||
foreach ($params as $param) {
|
||||
$this->addParam($param);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the return type for PHP 7.
|
||||
*
|
||||
* @param string|Node\Name|Node\Identifier|Node\ComplexType $type
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setReturnType($type) {
|
||||
$this->returnType = BuilderHelpers::normalizeType($type);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
67
vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php
vendored
Normal file
67
vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Function_ extends FunctionLike
|
||||
{
|
||||
protected $name;
|
||||
protected $stmts = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates a function builder.
|
||||
*
|
||||
* @param string $name Name of the function
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Node|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
$this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built function node.
|
||||
*
|
||||
* @return Stmt\Function_ The built function node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
return new Stmt\Function_($this->name, [
|
||||
'byRef' => $this->returnByRef,
|
||||
'params' => $this->params,
|
||||
'returnType' => $this->returnType,
|
||||
'stmts' => $this->stmts,
|
||||
'attrGroups' => $this->attributeGroups,
|
||||
], $this->attributes);
|
||||
}
|
||||
}
|
93
vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php
vendored
Normal file
93
vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Interface_ extends Declaration
|
||||
{
|
||||
protected $name;
|
||||
protected $extends = [];
|
||||
protected $constants = [];
|
||||
protected $methods = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates an interface builder.
|
||||
*
|
||||
* @param string $name Name of the interface
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends one or more interfaces.
|
||||
*
|
||||
* @param Name|string ...$interfaces Names of interfaces to extend
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function extend(...$interfaces) {
|
||||
foreach ($interfaces as $interface) {
|
||||
$this->extends[] = BuilderHelpers::normalizeName($interface);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Stmt|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
$stmt = BuilderHelpers::normalizeNode($stmt);
|
||||
|
||||
if ($stmt instanceof Stmt\ClassConst) {
|
||||
$this->constants[] = $stmt;
|
||||
} elseif ($stmt instanceof Stmt\ClassMethod) {
|
||||
// we erase all statements in the body of an interface method
|
||||
$stmt->stmts = null;
|
||||
$this->methods[] = $stmt;
|
||||
} else {
|
||||
throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built interface node.
|
||||
*
|
||||
* @return Stmt\Interface_ The built interface node
|
||||
*/
|
||||
public function getNode() : PhpParser\Node {
|
||||
return new Stmt\Interface_($this->name, [
|
||||
'extends' => $this->extends,
|
||||
'stmts' => array_merge($this->constants, $this->methods),
|
||||
'attrGroups' => $this->attributeGroups,
|
||||
], $this->attributes);
|
||||
}
|
||||
}
|
146
vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php
vendored
Normal file
146
vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Method extends FunctionLike
|
||||
{
|
||||
protected $name;
|
||||
protected $flags = 0;
|
||||
|
||||
/** @var array|null */
|
||||
protected $stmts = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates a method builder.
|
||||
*
|
||||
* @param string $name Name of the method
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the method public.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePublic() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the method protected.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeProtected() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the method private.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePrivate() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the method static.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeStatic() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the method abstract.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeAbstract() {
|
||||
if (!empty($this->stmts)) {
|
||||
throw new \LogicException('Cannot make method with statements abstract');
|
||||
}
|
||||
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
|
||||
$this->stmts = null; // abstract methods don't have statements
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the method final.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeFinal() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Node|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
if (null === $this->stmts) {
|
||||
throw new \LogicException('Cannot add statements to an abstract method');
|
||||
}
|
||||
|
||||
$this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built method node.
|
||||
*
|
||||
* @return Stmt\ClassMethod The built method node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
return new Stmt\ClassMethod($this->name, [
|
||||
'flags' => $this->flags,
|
||||
'byRef' => $this->returnByRef,
|
||||
'params' => $this->params,
|
||||
'returnType' => $this->returnType,
|
||||
'stmts' => $this->stmts,
|
||||
'attrGroups' => $this->attributeGroups,
|
||||
], $this->attributes);
|
||||
}
|
||||
}
|
45
vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
vendored
Normal file
45
vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Namespace_ extends Declaration
|
||||
{
|
||||
private $name;
|
||||
private $stmts = [];
|
||||
|
||||
/**
|
||||
* Creates a namespace builder.
|
||||
*
|
||||
* @param Node\Name|string|null $name Name of the namespace
|
||||
*/
|
||||
public function __construct($name) {
|
||||
$this->name = null !== $name ? BuilderHelpers::normalizeName($name) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Node|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
$this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built node.
|
||||
*
|
||||
* @return Stmt\Namespace_ The built node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes);
|
||||
}
|
||||
}
|
122
vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
vendored
Normal file
122
vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
|
||||
class Param implements PhpParser\Builder
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $default = null;
|
||||
|
||||
/** @var Node\Identifier|Node\Name|Node\NullableType|null */
|
||||
protected $type = null;
|
||||
|
||||
protected $byRef = false;
|
||||
|
||||
protected $variadic = false;
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates a parameter builder.
|
||||
*
|
||||
* @param string $name Name of the parameter
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default value for the parameter.
|
||||
*
|
||||
* @param mixed $value Default value to use
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setDefault($value) {
|
||||
$this->default = BuilderHelpers::normalizeValue($value);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type for the parameter.
|
||||
*
|
||||
* @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setType($type) {
|
||||
$this->type = BuilderHelpers::normalizeType($type);
|
||||
if ($this->type == 'void') {
|
||||
throw new \LogicException('Parameter type cannot be void');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type for the parameter.
|
||||
*
|
||||
* @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*
|
||||
* @deprecated Use setType() instead
|
||||
*/
|
||||
public function setTypeHint($type) {
|
||||
return $this->setType($type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the parameter accept the value by reference.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeByRef() {
|
||||
$this->byRef = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the parameter variadic
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeVariadic() {
|
||||
$this->variadic = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built parameter node.
|
||||
*
|
||||
* @return Node\Param The built parameter node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
return new Node\Param(
|
||||
new Node\Expr\Variable($this->name),
|
||||
$this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups
|
||||
);
|
||||
}
|
||||
}
|
161
vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php
vendored
Normal file
161
vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\ComplexType;
|
||||
|
||||
class Property implements PhpParser\Builder
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $flags = 0;
|
||||
protected $default = null;
|
||||
protected $attributes = [];
|
||||
|
||||
/** @var null|Identifier|Name|NullableType */
|
||||
protected $type;
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates a property builder.
|
||||
*
|
||||
* @param string $name Name of the property
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the property public.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePublic() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the property protected.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeProtected() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the property private.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePrivate() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the property static.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeStatic() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the property readonly.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeReadonly() {
|
||||
$this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default value for the property.
|
||||
*
|
||||
* @param mixed $value Default value to use
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setDefault($value) {
|
||||
$this->default = BuilderHelpers::normalizeValue($value);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets doc comment for the property.
|
||||
*
|
||||
* @param PhpParser\Comment\Doc|string $docComment Doc comment to set
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function setDocComment($docComment) {
|
||||
$this->attributes = [
|
||||
'comments' => [BuilderHelpers::normalizeDocComment($docComment)]
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the property type for PHP 7.4+.
|
||||
*
|
||||
* @param string|Name|Identifier|ComplexType $type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type) {
|
||||
$this->type = BuilderHelpers::normalizeType($type);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built class node.
|
||||
*
|
||||
* @return Stmt\Property The built property node
|
||||
*/
|
||||
public function getNode() : PhpParser\Node {
|
||||
return new Stmt\Property(
|
||||
$this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC,
|
||||
[
|
||||
new Stmt\PropertyProperty($this->name, $this->default)
|
||||
],
|
||||
$this->attributes,
|
||||
$this->type,
|
||||
$this->attributeGroups
|
||||
);
|
||||
}
|
||||
}
|
64
vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php
vendored
Normal file
64
vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser\Builder;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class TraitUse implements Builder
|
||||
{
|
||||
protected $traits = [];
|
||||
protected $adaptations = [];
|
||||
|
||||
/**
|
||||
* Creates a trait use builder.
|
||||
*
|
||||
* @param Node\Name|string ...$traits Names of used traits
|
||||
*/
|
||||
public function __construct(...$traits) {
|
||||
foreach ($traits as $trait) {
|
||||
$this->and($trait);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds used trait.
|
||||
*
|
||||
* @param Node\Name|string $trait Trait name
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function and($trait) {
|
||||
$this->traits[] = BuilderHelpers::normalizeName($trait);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds trait adaptation.
|
||||
*
|
||||
* @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function with($adaptation) {
|
||||
$adaptation = BuilderHelpers::normalizeNode($adaptation);
|
||||
|
||||
if (!$adaptation instanceof Stmt\TraitUseAdaptation) {
|
||||
throw new \LogicException('Adaptation must have type TraitUseAdaptation');
|
||||
}
|
||||
|
||||
$this->adaptations[] = $adaptation;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built node.
|
||||
*
|
||||
* @return Node The built node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
return new Stmt\TraitUse($this->traits, $this->adaptations);
|
||||
}
|
||||
}
|
148
vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php
vendored
Normal file
148
vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php
vendored
Normal file
@ -0,0 +1,148 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser\Builder;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class TraitUseAdaptation implements Builder
|
||||
{
|
||||
const TYPE_UNDEFINED = 0;
|
||||
const TYPE_ALIAS = 1;
|
||||
const TYPE_PRECEDENCE = 2;
|
||||
|
||||
/** @var int Type of building adaptation */
|
||||
protected $type;
|
||||
|
||||
protected $trait;
|
||||
protected $method;
|
||||
|
||||
protected $modifier = null;
|
||||
protected $alias = null;
|
||||
|
||||
protected $insteadof = [];
|
||||
|
||||
/**
|
||||
* Creates a trait use adaptation builder.
|
||||
*
|
||||
* @param Node\Name|string|null $trait Name of adaptated trait
|
||||
* @param Node\Identifier|string $method Name of adaptated method
|
||||
*/
|
||||
public function __construct($trait, $method) {
|
||||
$this->type = self::TYPE_UNDEFINED;
|
||||
|
||||
$this->trait = is_null($trait)? null: BuilderHelpers::normalizeName($trait);
|
||||
$this->method = BuilderHelpers::normalizeIdentifier($method);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets alias of method.
|
||||
*
|
||||
* @param Node\Identifier|string $alias Alias for adaptated method
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function as($alias) {
|
||||
if ($this->type === self::TYPE_UNDEFINED) {
|
||||
$this->type = self::TYPE_ALIAS;
|
||||
}
|
||||
|
||||
if ($this->type !== self::TYPE_ALIAS) {
|
||||
throw new \LogicException('Cannot set alias for not alias adaptation buider');
|
||||
}
|
||||
|
||||
$this->alias = $alias;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets adaptated method public.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePublic() {
|
||||
$this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets adaptated method protected.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makeProtected() {
|
||||
$this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets adaptated method private.
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function makePrivate() {
|
||||
$this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds overwritten traits.
|
||||
*
|
||||
* @param Node\Name|string ...$traits Traits for overwrite
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function insteadof(...$traits) {
|
||||
if ($this->type === self::TYPE_UNDEFINED) {
|
||||
if (is_null($this->trait)) {
|
||||
throw new \LogicException('Precedence adaptation must have trait');
|
||||
}
|
||||
|
||||
$this->type = self::TYPE_PRECEDENCE;
|
||||
}
|
||||
|
||||
if ($this->type !== self::TYPE_PRECEDENCE) {
|
||||
throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider');
|
||||
}
|
||||
|
||||
foreach ($traits as $trait) {
|
||||
$this->insteadof[] = BuilderHelpers::normalizeName($trait);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function setModifier(int $modifier) {
|
||||
if ($this->type === self::TYPE_UNDEFINED) {
|
||||
$this->type = self::TYPE_ALIAS;
|
||||
}
|
||||
|
||||
if ($this->type !== self::TYPE_ALIAS) {
|
||||
throw new \LogicException('Cannot set access modifier for not alias adaptation buider');
|
||||
}
|
||||
|
||||
if (is_null($this->modifier)) {
|
||||
$this->modifier = $modifier;
|
||||
} else {
|
||||
throw new \LogicException('Multiple access type modifiers are not allowed');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built node.
|
||||
*
|
||||
* @return Node The built node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
switch ($this->type) {
|
||||
case self::TYPE_ALIAS:
|
||||
return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias);
|
||||
case self::TYPE_PRECEDENCE:
|
||||
return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof);
|
||||
default:
|
||||
throw new \LogicException('Type of adaptation is not defined');
|
||||
}
|
||||
}
|
||||
}
|
78
vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php
vendored
Normal file
78
vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Trait_ extends Declaration
|
||||
{
|
||||
protected $name;
|
||||
protected $uses = [];
|
||||
protected $properties = [];
|
||||
protected $methods = [];
|
||||
|
||||
/** @var Node\AttributeGroup[] */
|
||||
protected $attributeGroups = [];
|
||||
|
||||
/**
|
||||
* Creates an interface builder.
|
||||
*
|
||||
* @param string $name Name of the interface
|
||||
*/
|
||||
public function __construct(string $name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a statement.
|
||||
*
|
||||
* @param Stmt|PhpParser\Builder $stmt The statement to add
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addStmt($stmt) {
|
||||
$stmt = BuilderHelpers::normalizeNode($stmt);
|
||||
|
||||
if ($stmt instanceof Stmt\Property) {
|
||||
$this->properties[] = $stmt;
|
||||
} elseif ($stmt instanceof Stmt\ClassMethod) {
|
||||
$this->methods[] = $stmt;
|
||||
} elseif ($stmt instanceof Stmt\TraitUse) {
|
||||
$this->uses[] = $stmt;
|
||||
} else {
|
||||
throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attribute group.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function addAttribute($attribute) {
|
||||
$this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built trait node.
|
||||
*
|
||||
* @return Stmt\Trait_ The built interface node
|
||||
*/
|
||||
public function getNode() : PhpParser\Node {
|
||||
return new Stmt\Trait_(
|
||||
$this->name, [
|
||||
'stmts' => array_merge($this->uses, $this->properties, $this->methods),
|
||||
'attrGroups' => $this->attributeGroups,
|
||||
], $this->attributes
|
||||
);
|
||||
}
|
||||
}
|
49
vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php
vendored
Normal file
49
vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Builder;
|
||||
|
||||
use PhpParser\Builder;
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class Use_ implements Builder
|
||||
{
|
||||
protected $name;
|
||||
protected $type;
|
||||
protected $alias = null;
|
||||
|
||||
/**
|
||||
* Creates a name use (alias) builder.
|
||||
*
|
||||
* @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias
|
||||
* @param int $type One of the Stmt\Use_::TYPE_* constants
|
||||
*/
|
||||
public function __construct($name, int $type) {
|
||||
$this->name = BuilderHelpers::normalizeName($name);
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets alias for used name.
|
||||
*
|
||||
* @param string $alias Alias to use (last component of full name by default)
|
||||
*
|
||||
* @return $this The builder instance (for fluid interface)
|
||||
*/
|
||||
public function as(string $alias) {
|
||||
$this->alias = $alias;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the built node.
|
||||
*
|
||||
* @return Stmt\Use_ The built node
|
||||
*/
|
||||
public function getNode() : Node {
|
||||
return new Stmt\Use_([
|
||||
new Stmt\UseUse($this->name, $this->alias)
|
||||
], $this->type);
|
||||
}
|
||||
}
|
399
vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php
vendored
Normal file
399
vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php
vendored
Normal file
@ -0,0 +1,399 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\BinaryOp\Concat;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use PhpParser\Node\Stmt\Use_;
|
||||
|
||||
class BuilderFactory
|
||||
{
|
||||
/**
|
||||
* Creates an attribute node.
|
||||
*
|
||||
* @param string|Name $name Name of the attribute
|
||||
* @param array $args Attribute named arguments
|
||||
*
|
||||
* @return Node\Attribute
|
||||
*/
|
||||
public function attribute($name, array $args = []) : Node\Attribute {
|
||||
return new Node\Attribute(
|
||||
BuilderHelpers::normalizeName($name),
|
||||
$this->args($args)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a namespace builder.
|
||||
*
|
||||
* @param null|string|Node\Name $name Name of the namespace
|
||||
*
|
||||
* @return Builder\Namespace_ The created namespace builder
|
||||
*/
|
||||
public function namespace($name) : Builder\Namespace_ {
|
||||
return new Builder\Namespace_($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a class builder.
|
||||
*
|
||||
* @param string $name Name of the class
|
||||
*
|
||||
* @return Builder\Class_ The created class builder
|
||||
*/
|
||||
public function class(string $name) : Builder\Class_ {
|
||||
return new Builder\Class_($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an interface builder.
|
||||
*
|
||||
* @param string $name Name of the interface
|
||||
*
|
||||
* @return Builder\Interface_ The created interface builder
|
||||
*/
|
||||
public function interface(string $name) : Builder\Interface_ {
|
||||
return new Builder\Interface_($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a trait builder.
|
||||
*
|
||||
* @param string $name Name of the trait
|
||||
*
|
||||
* @return Builder\Trait_ The created trait builder
|
||||
*/
|
||||
public function trait(string $name) : Builder\Trait_ {
|
||||
return new Builder\Trait_($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an enum builder.
|
||||
*
|
||||
* @param string $name Name of the enum
|
||||
*
|
||||
* @return Builder\Enum_ The created enum builder
|
||||
*/
|
||||
public function enum(string $name) : Builder\Enum_ {
|
||||
return new Builder\Enum_($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a trait use builder.
|
||||
*
|
||||
* @param Node\Name|string ...$traits Trait names
|
||||
*
|
||||
* @return Builder\TraitUse The create trait use builder
|
||||
*/
|
||||
public function useTrait(...$traits) : Builder\TraitUse {
|
||||
return new Builder\TraitUse(...$traits);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a trait use adaptation builder.
|
||||
*
|
||||
* @param Node\Name|string|null $trait Trait name
|
||||
* @param Node\Identifier|string $method Method name
|
||||
*
|
||||
* @return Builder\TraitUseAdaptation The create trait use adaptation builder
|
||||
*/
|
||||
public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation {
|
||||
if ($method === null) {
|
||||
$method = $trait;
|
||||
$trait = null;
|
||||
}
|
||||
|
||||
return new Builder\TraitUseAdaptation($trait, $method);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a method builder.
|
||||
*
|
||||
* @param string $name Name of the method
|
||||
*
|
||||
* @return Builder\Method The created method builder
|
||||
*/
|
||||
public function method(string $name) : Builder\Method {
|
||||
return new Builder\Method($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a parameter builder.
|
||||
*
|
||||
* @param string $name Name of the parameter
|
||||
*
|
||||
* @return Builder\Param The created parameter builder
|
||||
*/
|
||||
public function param(string $name) : Builder\Param {
|
||||
return new Builder\Param($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a property builder.
|
||||
*
|
||||
* @param string $name Name of the property
|
||||
*
|
||||
* @return Builder\Property The created property builder
|
||||
*/
|
||||
public function property(string $name) : Builder\Property {
|
||||
return new Builder\Property($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function builder.
|
||||
*
|
||||
* @param string $name Name of the function
|
||||
*
|
||||
* @return Builder\Function_ The created function builder
|
||||
*/
|
||||
public function function(string $name) : Builder\Function_ {
|
||||
return new Builder\Function_($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a namespace/class use builder.
|
||||
*
|
||||
* @param Node\Name|string $name Name of the entity (namespace or class) to alias
|
||||
*
|
||||
* @return Builder\Use_ The created use builder
|
||||
*/
|
||||
public function use($name) : Builder\Use_ {
|
||||
return new Builder\Use_($name, Use_::TYPE_NORMAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function use builder.
|
||||
*
|
||||
* @param Node\Name|string $name Name of the function to alias
|
||||
*
|
||||
* @return Builder\Use_ The created use function builder
|
||||
*/
|
||||
public function useFunction($name) : Builder\Use_ {
|
||||
return new Builder\Use_($name, Use_::TYPE_FUNCTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a constant use builder.
|
||||
*
|
||||
* @param Node\Name|string $name Name of the const to alias
|
||||
*
|
||||
* @return Builder\Use_ The created use const builder
|
||||
*/
|
||||
public function useConst($name) : Builder\Use_ {
|
||||
return new Builder\Use_($name, Use_::TYPE_CONSTANT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a class constant builder.
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
* @param Node\Expr|bool|null|int|float|string|array $value Value
|
||||
*
|
||||
* @return Builder\ClassConst The created use const builder
|
||||
*/
|
||||
public function classConst($name, $value) : Builder\ClassConst {
|
||||
return new Builder\ClassConst($name, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an enum case builder.
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
*
|
||||
* @return Builder\EnumCase The created use const builder
|
||||
*/
|
||||
public function enumCase($name) : Builder\EnumCase {
|
||||
return new Builder\EnumCase($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates node a for a literal value.
|
||||
*
|
||||
* @param Expr|bool|null|int|float|string|array $value $value
|
||||
*
|
||||
* @return Expr
|
||||
*/
|
||||
public function val($value) : Expr {
|
||||
return BuilderHelpers::normalizeValue($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates variable node.
|
||||
*
|
||||
* @param string|Expr $name Name
|
||||
*
|
||||
* @return Expr\Variable
|
||||
*/
|
||||
public function var($name) : Expr\Variable {
|
||||
if (!\is_string($name) && !$name instanceof Expr) {
|
||||
throw new \LogicException('Variable name must be string or Expr');
|
||||
}
|
||||
|
||||
return new Expr\Variable($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes an argument list.
|
||||
*
|
||||
* Creates Arg nodes for all arguments and converts literal values to expressions.
|
||||
*
|
||||
* @param array $args List of arguments to normalize
|
||||
*
|
||||
* @return Arg[]
|
||||
*/
|
||||
public function args(array $args) : array {
|
||||
$normalizedArgs = [];
|
||||
foreach ($args as $key => $arg) {
|
||||
if (!($arg instanceof Arg)) {
|
||||
$arg = new Arg(BuilderHelpers::normalizeValue($arg));
|
||||
}
|
||||
if (\is_string($key)) {
|
||||
$arg->name = BuilderHelpers::normalizeIdentifier($key);
|
||||
}
|
||||
$normalizedArgs[] = $arg;
|
||||
}
|
||||
return $normalizedArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function call node.
|
||||
*
|
||||
* @param string|Name|Expr $name Function name
|
||||
* @param array $args Function arguments
|
||||
*
|
||||
* @return Expr\FuncCall
|
||||
*/
|
||||
public function funcCall($name, array $args = []) : Expr\FuncCall {
|
||||
return new Expr\FuncCall(
|
||||
BuilderHelpers::normalizeNameOrExpr($name),
|
||||
$this->args($args)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a method call node.
|
||||
*
|
||||
* @param Expr $var Variable the method is called on
|
||||
* @param string|Identifier|Expr $name Method name
|
||||
* @param array $args Method arguments
|
||||
*
|
||||
* @return Expr\MethodCall
|
||||
*/
|
||||
public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall {
|
||||
return new Expr\MethodCall(
|
||||
$var,
|
||||
BuilderHelpers::normalizeIdentifierOrExpr($name),
|
||||
$this->args($args)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a static method call node.
|
||||
*
|
||||
* @param string|Name|Expr $class Class name
|
||||
* @param string|Identifier|Expr $name Method name
|
||||
* @param array $args Method arguments
|
||||
*
|
||||
* @return Expr\StaticCall
|
||||
*/
|
||||
public function staticCall($class, $name, array $args = []) : Expr\StaticCall {
|
||||
return new Expr\StaticCall(
|
||||
BuilderHelpers::normalizeNameOrExpr($class),
|
||||
BuilderHelpers::normalizeIdentifierOrExpr($name),
|
||||
$this->args($args)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object creation node.
|
||||
*
|
||||
* @param string|Name|Expr $class Class name
|
||||
* @param array $args Constructor arguments
|
||||
*
|
||||
* @return Expr\New_
|
||||
*/
|
||||
public function new($class, array $args = []) : Expr\New_ {
|
||||
return new Expr\New_(
|
||||
BuilderHelpers::normalizeNameOrExpr($class),
|
||||
$this->args($args)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a constant fetch node.
|
||||
*
|
||||
* @param string|Name $name Constant name
|
||||
*
|
||||
* @return Expr\ConstFetch
|
||||
*/
|
||||
public function constFetch($name) : Expr\ConstFetch {
|
||||
return new Expr\ConstFetch(BuilderHelpers::normalizeName($name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a property fetch node.
|
||||
*
|
||||
* @param Expr $var Variable holding object
|
||||
* @param string|Identifier|Expr $name Property name
|
||||
*
|
||||
* @return Expr\PropertyFetch
|
||||
*/
|
||||
public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch {
|
||||
return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a class constant fetch node.
|
||||
*
|
||||
* @param string|Name|Expr $class Class name
|
||||
* @param string|Identifier $name Constant name
|
||||
*
|
||||
* @return Expr\ClassConstFetch
|
||||
*/
|
||||
public function classConstFetch($class, $name): Expr\ClassConstFetch {
|
||||
return new Expr\ClassConstFetch(
|
||||
BuilderHelpers::normalizeNameOrExpr($class),
|
||||
BuilderHelpers::normalizeIdentifier($name)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates nested Concat nodes from a list of expressions.
|
||||
*
|
||||
* @param Expr|string ...$exprs Expressions or literal strings
|
||||
*
|
||||
* @return Concat
|
||||
*/
|
||||
public function concat(...$exprs) : Concat {
|
||||
$numExprs = count($exprs);
|
||||
if ($numExprs < 2) {
|
||||
throw new \LogicException('Expected at least two expressions');
|
||||
}
|
||||
|
||||
$lastConcat = $this->normalizeStringExpr($exprs[0]);
|
||||
for ($i = 1; $i < $numExprs; $i++) {
|
||||
$lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i]));
|
||||
}
|
||||
return $lastConcat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|Expr $expr
|
||||
* @return Expr
|
||||
*/
|
||||
private function normalizeStringExpr($expr) : Expr {
|
||||
if ($expr instanceof Expr) {
|
||||
return $expr;
|
||||
}
|
||||
|
||||
if (\is_string($expr)) {
|
||||
return new String_($expr);
|
||||
}
|
||||
|
||||
throw new \LogicException('Expected string or Expr');
|
||||
}
|
||||
}
|
335
vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
vendored
Normal file
335
vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
vendored
Normal file
@ -0,0 +1,335 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
use PhpParser\Node\ComplexType;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\NullableType;
|
||||
use PhpParser\Node\Scalar;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
/**
|
||||
* This class defines helpers used in the implementation of builders. Don't use it directly.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class BuilderHelpers
|
||||
{
|
||||
/**
|
||||
* Normalizes a node: Converts builder objects to nodes.
|
||||
*
|
||||
* @param Node|Builder $node The node to normalize
|
||||
*
|
||||
* @return Node The normalized node
|
||||
*/
|
||||
public static function normalizeNode($node) : Node {
|
||||
if ($node instanceof Builder) {
|
||||
return $node->getNode();
|
||||
}
|
||||
|
||||
if ($node instanceof Node) {
|
||||
return $node;
|
||||
}
|
||||
|
||||
throw new \LogicException('Expected node or builder object');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a node to a statement.
|
||||
*
|
||||
* Expressions are wrapped in a Stmt\Expression node.
|
||||
*
|
||||
* @param Node|Builder $node The node to normalize
|
||||
*
|
||||
* @return Stmt The normalized statement node
|
||||
*/
|
||||
public static function normalizeStmt($node) : Stmt {
|
||||
$node = self::normalizeNode($node);
|
||||
if ($node instanceof Stmt) {
|
||||
return $node;
|
||||
}
|
||||
|
||||
if ($node instanceof Expr) {
|
||||
return new Stmt\Expression($node);
|
||||
}
|
||||
|
||||
throw new \LogicException('Expected statement or expression node');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes strings to Identifier.
|
||||
*
|
||||
* @param string|Identifier $name The identifier to normalize
|
||||
*
|
||||
* @return Identifier The normalized identifier
|
||||
*/
|
||||
public static function normalizeIdentifier($name) : Identifier {
|
||||
if ($name instanceof Identifier) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
if (\is_string($name)) {
|
||||
return new Identifier($name);
|
||||
}
|
||||
|
||||
throw new \LogicException('Expected string or instance of Node\Identifier');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes strings to Identifier, also allowing expressions.
|
||||
*
|
||||
* @param string|Identifier|Expr $name The identifier to normalize
|
||||
*
|
||||
* @return Identifier|Expr The normalized identifier or expression
|
||||
*/
|
||||
public static function normalizeIdentifierOrExpr($name) {
|
||||
if ($name instanceof Identifier || $name instanceof Expr) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
if (\is_string($name)) {
|
||||
return new Identifier($name);
|
||||
}
|
||||
|
||||
throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a name: Converts string names to Name nodes.
|
||||
*
|
||||
* @param Name|string $name The name to normalize
|
||||
*
|
||||
* @return Name The normalized name
|
||||
*/
|
||||
public static function normalizeName($name) : Name {
|
||||
if ($name instanceof Name) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
if (is_string($name)) {
|
||||
if (!$name) {
|
||||
throw new \LogicException('Name cannot be empty');
|
||||
}
|
||||
|
||||
if ($name[0] === '\\') {
|
||||
return new Name\FullyQualified(substr($name, 1));
|
||||
}
|
||||
|
||||
if (0 === strpos($name, 'namespace\\')) {
|
||||
return new Name\Relative(substr($name, strlen('namespace\\')));
|
||||
}
|
||||
|
||||
return new Name($name);
|
||||
}
|
||||
|
||||
throw new \LogicException('Name must be a string or an instance of Node\Name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a name: Converts string names to Name nodes, while also allowing expressions.
|
||||
*
|
||||
* @param Expr|Name|string $name The name to normalize
|
||||
*
|
||||
* @return Name|Expr The normalized name or expression
|
||||
*/
|
||||
public static function normalizeNameOrExpr($name) {
|
||||
if ($name instanceof Expr) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
if (!is_string($name) && !($name instanceof Name)) {
|
||||
throw new \LogicException(
|
||||
'Name must be a string or an instance of Node\Name or Node\Expr'
|
||||
);
|
||||
}
|
||||
|
||||
return self::normalizeName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a type: Converts plain-text type names into proper AST representation.
|
||||
*
|
||||
* In particular, builtin types become Identifiers, custom types become Names and nullables
|
||||
* are wrapped in NullableType nodes.
|
||||
*
|
||||
* @param string|Name|Identifier|ComplexType $type The type to normalize
|
||||
*
|
||||
* @return Name|Identifier|ComplexType The normalized type
|
||||
*/
|
||||
public static function normalizeType($type) {
|
||||
if (!is_string($type)) {
|
||||
if (
|
||||
!$type instanceof Name && !$type instanceof Identifier &&
|
||||
!$type instanceof ComplexType
|
||||
) {
|
||||
throw new \LogicException(
|
||||
'Type must be a string, or an instance of Name, Identifier or ComplexType'
|
||||
);
|
||||
}
|
||||
return $type;
|
||||
}
|
||||
|
||||
$nullable = false;
|
||||
if (strlen($type) > 0 && $type[0] === '?') {
|
||||
$nullable = true;
|
||||
$type = substr($type, 1);
|
||||
}
|
||||
|
||||
$builtinTypes = [
|
||||
'array',
|
||||
'callable',
|
||||
'bool',
|
||||
'int',
|
||||
'float',
|
||||
'string',
|
||||
'iterable',
|
||||
'void',
|
||||
'object',
|
||||
'null',
|
||||
'false',
|
||||
'mixed',
|
||||
'never',
|
||||
'true',
|
||||
];
|
||||
|
||||
$lowerType = strtolower($type);
|
||||
if (in_array($lowerType, $builtinTypes)) {
|
||||
$type = new Identifier($lowerType);
|
||||
} else {
|
||||
$type = self::normalizeName($type);
|
||||
}
|
||||
|
||||
$notNullableTypes = [
|
||||
'void', 'mixed', 'never',
|
||||
];
|
||||
if ($nullable && in_array((string) $type, $notNullableTypes)) {
|
||||
throw new \LogicException(sprintf('%s type cannot be nullable', $type));
|
||||
}
|
||||
|
||||
return $nullable ? new NullableType($type) : $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a value: Converts nulls, booleans, integers,
|
||||
* floats, strings and arrays into their respective nodes
|
||||
*
|
||||
* @param Node\Expr|bool|null|int|float|string|array $value The value to normalize
|
||||
*
|
||||
* @return Expr The normalized value
|
||||
*/
|
||||
public static function normalizeValue($value) : Expr {
|
||||
if ($value instanceof Node\Expr) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (is_null($value)) {
|
||||
return new Expr\ConstFetch(
|
||||
new Name('null')
|
||||
);
|
||||
}
|
||||
|
||||
if (is_bool($value)) {
|
||||
return new Expr\ConstFetch(
|
||||
new Name($value ? 'true' : 'false')
|
||||
);
|
||||
}
|
||||
|
||||
if (is_int($value)) {
|
||||
return new Scalar\LNumber($value);
|
||||
}
|
||||
|
||||
if (is_float($value)) {
|
||||
return new Scalar\DNumber($value);
|
||||
}
|
||||
|
||||
if (is_string($value)) {
|
||||
return new Scalar\String_($value);
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$items = [];
|
||||
$lastKey = -1;
|
||||
foreach ($value as $itemKey => $itemValue) {
|
||||
// for consecutive, numeric keys don't generate keys
|
||||
if (null !== $lastKey && ++$lastKey === $itemKey) {
|
||||
$items[] = new Expr\ArrayItem(
|
||||
self::normalizeValue($itemValue)
|
||||
);
|
||||
} else {
|
||||
$lastKey = null;
|
||||
$items[] = new Expr\ArrayItem(
|
||||
self::normalizeValue($itemValue),
|
||||
self::normalizeValue($itemKey)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return new Expr\Array_($items);
|
||||
}
|
||||
|
||||
throw new \LogicException('Invalid value');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc.
|
||||
*
|
||||
* @param Comment\Doc|string $docComment The doc comment to normalize
|
||||
*
|
||||
* @return Comment\Doc The normalized doc comment
|
||||
*/
|
||||
public static function normalizeDocComment($docComment) : Comment\Doc {
|
||||
if ($docComment instanceof Comment\Doc) {
|
||||
return $docComment;
|
||||
}
|
||||
|
||||
if (is_string($docComment)) {
|
||||
return new Comment\Doc($docComment);
|
||||
}
|
||||
|
||||
throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a attribute: Converts attribute to the Attribute Group if needed.
|
||||
*
|
||||
* @param Node\Attribute|Node\AttributeGroup $attribute
|
||||
*
|
||||
* @return Node\AttributeGroup The Attribute Group
|
||||
*/
|
||||
public static function normalizeAttribute($attribute) : Node\AttributeGroup
|
||||
{
|
||||
if ($attribute instanceof Node\AttributeGroup) {
|
||||
return $attribute;
|
||||
}
|
||||
|
||||
if (!($attribute instanceof Node\Attribute)) {
|
||||
throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup');
|
||||
}
|
||||
|
||||
return new Node\AttributeGroup([$attribute]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a modifier and returns new modifier bitmask.
|
||||
*
|
||||
* @param int $modifiers Existing modifiers
|
||||
* @param int $modifier Modifier to set
|
||||
*
|
||||
* @return int New modifiers
|
||||
*/
|
||||
public static function addModifier(int $modifiers, int $modifier) : int {
|
||||
Stmt\Class_::verifyModifier($modifiers, $modifier);
|
||||
return $modifiers | $modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a modifier and returns new modifier bitmask.
|
||||
* @return int New modifiers
|
||||
*/
|
||||
public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int {
|
||||
Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet);
|
||||
return $existingModifiers | $modifierToSet;
|
||||
}
|
||||
}
|
239
vendor/nikic/php-parser/lib/PhpParser/Comment.php
vendored
Normal file
239
vendor/nikic/php-parser/lib/PhpParser/Comment.php
vendored
Normal file
@ -0,0 +1,239 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
class Comment implements \JsonSerializable
|
||||
{
|
||||
protected $text;
|
||||
protected $startLine;
|
||||
protected $startFilePos;
|
||||
protected $startTokenPos;
|
||||
protected $endLine;
|
||||
protected $endFilePos;
|
||||
protected $endTokenPos;
|
||||
|
||||
/**
|
||||
* Constructs a comment node.
|
||||
*
|
||||
* @param string $text Comment text (including comment delimiters like /*)
|
||||
* @param int $startLine Line number the comment started on
|
||||
* @param int $startFilePos File offset the comment started on
|
||||
* @param int $startTokenPos Token offset the comment started on
|
||||
*/
|
||||
public function __construct(
|
||||
string $text,
|
||||
int $startLine = -1, int $startFilePos = -1, int $startTokenPos = -1,
|
||||
int $endLine = -1, int $endFilePos = -1, int $endTokenPos = -1
|
||||
) {
|
||||
$this->text = $text;
|
||||
$this->startLine = $startLine;
|
||||
$this->startFilePos = $startFilePos;
|
||||
$this->startTokenPos = $startTokenPos;
|
||||
$this->endLine = $endLine;
|
||||
$this->endFilePos = $endFilePos;
|
||||
$this->endTokenPos = $endTokenPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the comment text.
|
||||
*
|
||||
* @return string The comment text (including comment delimiters like /*)
|
||||
*/
|
||||
public function getText() : string {
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line number the comment started on.
|
||||
*
|
||||
* @return int Line number (or -1 if not available)
|
||||
*/
|
||||
public function getStartLine() : int {
|
||||
return $this->startLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the file offset the comment started on.
|
||||
*
|
||||
* @return int File offset (or -1 if not available)
|
||||
*/
|
||||
public function getStartFilePos() : int {
|
||||
return $this->startFilePos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token offset the comment started on.
|
||||
*
|
||||
* @return int Token offset (or -1 if not available)
|
||||
*/
|
||||
public function getStartTokenPos() : int {
|
||||
return $this->startTokenPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line number the comment ends on.
|
||||
*
|
||||
* @return int Line number (or -1 if not available)
|
||||
*/
|
||||
public function getEndLine() : int {
|
||||
return $this->endLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the file offset the comment ends on.
|
||||
*
|
||||
* @return int File offset (or -1 if not available)
|
||||
*/
|
||||
public function getEndFilePos() : int {
|
||||
return $this->endFilePos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token offset the comment ends on.
|
||||
*
|
||||
* @return int Token offset (or -1 if not available)
|
||||
*/
|
||||
public function getEndTokenPos() : int {
|
||||
return $this->endTokenPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line number the comment started on.
|
||||
*
|
||||
* @deprecated Use getStartLine() instead
|
||||
*
|
||||
* @return int Line number
|
||||
*/
|
||||
public function getLine() : int {
|
||||
return $this->startLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the file offset the comment started on.
|
||||
*
|
||||
* @deprecated Use getStartFilePos() instead
|
||||
*
|
||||
* @return int File offset
|
||||
*/
|
||||
public function getFilePos() : int {
|
||||
return $this->startFilePos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token offset the comment started on.
|
||||
*
|
||||
* @deprecated Use getStartTokenPos() instead
|
||||
*
|
||||
* @return int Token offset
|
||||
*/
|
||||
public function getTokenPos() : int {
|
||||
return $this->startTokenPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the comment text.
|
||||
*
|
||||
* @return string The comment text (including comment delimiters like /*)
|
||||
*/
|
||||
public function __toString() : string {
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the reformatted comment text.
|
||||
*
|
||||
* "Reformatted" here means that we try to clean up the whitespace at the
|
||||
* starts of the lines. This is necessary because we receive the comments
|
||||
* without trailing whitespace on the first line, but with trailing whitespace
|
||||
* on all subsequent lines.
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function getReformattedText() {
|
||||
$text = trim($this->text);
|
||||
$newlinePos = strpos($text, "\n");
|
||||
if (false === $newlinePos) {
|
||||
// Single line comments don't need further processing
|
||||
return $text;
|
||||
} elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) {
|
||||
// Multi line comment of the type
|
||||
//
|
||||
// /*
|
||||
// * Some text.
|
||||
// * Some more text.
|
||||
// */
|
||||
//
|
||||
// is handled by replacing the whitespace sequences before the * by a single space
|
||||
return preg_replace('(^\s+\*)m', ' *', $this->text);
|
||||
} elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) {
|
||||
// Multi line comment of the type
|
||||
//
|
||||
// /*
|
||||
// Some text.
|
||||
// Some more text.
|
||||
// */
|
||||
//
|
||||
// is handled by removing the whitespace sequence on the line before the closing
|
||||
// */ on all lines. So if the last line is " */", then " " is removed at the
|
||||
// start of all lines.
|
||||
return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text);
|
||||
} elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) {
|
||||
// Multi line comment of the type
|
||||
//
|
||||
// /* Some text.
|
||||
// Some more text.
|
||||
// Indented text.
|
||||
// Even more text. */
|
||||
//
|
||||
// is handled by removing the difference between the shortest whitespace prefix on all
|
||||
// lines and the length of the "/* " opening sequence.
|
||||
$prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1));
|
||||
$removeLen = $prefixLen - strlen($matches[0]);
|
||||
return preg_replace('(^\s{' . $removeLen . '})m', '', $text);
|
||||
}
|
||||
|
||||
// No idea how to format this comment, so simply return as is
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get length of shortest whitespace prefix (at the start of a line).
|
||||
*
|
||||
* If there is a line with no prefix whitespace, 0 is a valid return value.
|
||||
*
|
||||
* @param string $str String to check
|
||||
* @return int Length in characters. Tabs count as single characters.
|
||||
*/
|
||||
private function getShortestWhitespacePrefixLen(string $str) : int {
|
||||
$lines = explode("\n", $str);
|
||||
$shortestPrefixLen = \INF;
|
||||
foreach ($lines as $line) {
|
||||
preg_match('(^\s*)', $line, $matches);
|
||||
$prefixLen = strlen($matches[0]);
|
||||
if ($prefixLen < $shortestPrefixLen) {
|
||||
$shortestPrefixLen = $prefixLen;
|
||||
}
|
||||
}
|
||||
return $shortestPrefixLen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed}
|
||||
*/
|
||||
public function jsonSerialize() : array {
|
||||
// Technically not a node, but we make it look like one anyway
|
||||
$type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment';
|
||||
return [
|
||||
'nodeType' => $type,
|
||||
'text' => $this->text,
|
||||
// TODO: Rename these to include "start".
|
||||
'line' => $this->startLine,
|
||||
'filePos' => $this->startFilePos,
|
||||
'tokenPos' => $this->startTokenPos,
|
||||
'endLine' => $this->endLine,
|
||||
'endFilePos' => $this->endFilePos,
|
||||
'endTokenPos' => $this->endTokenPos,
|
||||
];
|
||||
}
|
||||
}
|
7
vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php
vendored
Normal file
7
vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Comment;
|
||||
|
||||
class Doc extends \PhpParser\Comment
|
||||
{
|
||||
}
|
6
vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php
vendored
Normal file
6
vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
class ConstExprEvaluationException extends \Exception
|
||||
{}
|
229
vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php
vendored
Normal file
229
vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php
vendored
Normal file
@ -0,0 +1,229 @@
|
||||
<?php
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
use function array_merge;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Scalar;
|
||||
|
||||
/**
|
||||
* Evaluates constant expressions.
|
||||
*
|
||||
* This evaluator is able to evaluate all constant expressions (as defined by PHP), which can be
|
||||
* evaluated without further context. If a subexpression is not of this type, a user-provided
|
||||
* fallback evaluator is invoked. To support all constant expressions that are also supported by
|
||||
* PHP (and not already handled by this class), the fallback evaluator must be able to handle the
|
||||
* following node types:
|
||||
*
|
||||
* * All Scalar\MagicConst\* nodes.
|
||||
* * Expr\ConstFetch nodes. Only null/false/true are already handled by this class.
|
||||
* * Expr\ClassConstFetch nodes.
|
||||
*
|
||||
* The fallback evaluator should throw ConstExprEvaluationException for nodes it cannot evaluate.
|
||||
*
|
||||
* The evaluation is dependent on runtime configuration in two respects: Firstly, floating
|
||||
* point to string conversions are affected by the precision ini setting. Secondly, they are also
|
||||
* affected by the LC_NUMERIC locale.
|
||||
*/
|
||||
class ConstExprEvaluator
|
||||
{
|
||||
private $fallbackEvaluator;
|
||||
|
||||
/**
|
||||
* Create a constant expression evaluator.
|
||||
*
|
||||
* The provided fallback evaluator is invoked whenever a subexpression cannot be evaluated. See
|
||||
* class doc comment for more information.
|
||||
*
|
||||
* @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated
|
||||
*/
|
||||
public function __construct(callable $fallbackEvaluator = null) {
|
||||
$this->fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) {
|
||||
throw new ConstExprEvaluationException(
|
||||
"Expression of type {$expr->getType()} cannot be evaluated"
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Silently evaluates a constant expression into a PHP value.
|
||||
*
|
||||
* Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException.
|
||||
* The original source of the exception is available through getPrevious().
|
||||
*
|
||||
* If some part of the expression cannot be evaluated, the fallback evaluator passed to the
|
||||
* constructor will be invoked. By default, if no fallback is provided, an exception of type
|
||||
* ConstExprEvaluationException is thrown.
|
||||
*
|
||||
* See class doc comment for caveats and limitations.
|
||||
*
|
||||
* @param Expr $expr Constant expression to evaluate
|
||||
* @return mixed Result of evaluation
|
||||
*
|
||||
* @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred
|
||||
*/
|
||||
public function evaluateSilently(Expr $expr) {
|
||||
set_error_handler(function($num, $str, $file, $line) {
|
||||
throw new \ErrorException($str, 0, $num, $file, $line);
|
||||
});
|
||||
|
||||
try {
|
||||
return $this->evaluate($expr);
|
||||
} catch (\Throwable $e) {
|
||||
if (!$e instanceof ConstExprEvaluationException) {
|
||||
$e = new ConstExprEvaluationException(
|
||||
"An error occurred during constant expression evaluation", 0, $e);
|
||||
}
|
||||
throw $e;
|
||||
} finally {
|
||||
restore_error_handler();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Directly evaluates a constant expression into a PHP value.
|
||||
*
|
||||
* May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these
|
||||
* into a ConstExprEvaluationException.
|
||||
*
|
||||
* If some part of the expression cannot be evaluated, the fallback evaluator passed to the
|
||||
* constructor will be invoked. By default, if no fallback is provided, an exception of type
|
||||
* ConstExprEvaluationException is thrown.
|
||||
*
|
||||
* See class doc comment for caveats and limitations.
|
||||
*
|
||||
* @param Expr $expr Constant expression to evaluate
|
||||
* @return mixed Result of evaluation
|
||||
*
|
||||
* @throws ConstExprEvaluationException if the expression cannot be evaluated
|
||||
*/
|
||||
public function evaluateDirectly(Expr $expr) {
|
||||
return $this->evaluate($expr);
|
||||
}
|
||||
|
||||
private function evaluate(Expr $expr) {
|
||||
if ($expr instanceof Scalar\LNumber
|
||||
|| $expr instanceof Scalar\DNumber
|
||||
|| $expr instanceof Scalar\String_
|
||||
) {
|
||||
return $expr->value;
|
||||
}
|
||||
|
||||
if ($expr instanceof Expr\Array_) {
|
||||
return $this->evaluateArray($expr);
|
||||
}
|
||||
|
||||
// Unary operators
|
||||
if ($expr instanceof Expr\UnaryPlus) {
|
||||
return +$this->evaluate($expr->expr);
|
||||
}
|
||||
if ($expr instanceof Expr\UnaryMinus) {
|
||||
return -$this->evaluate($expr->expr);
|
||||
}
|
||||
if ($expr instanceof Expr\BooleanNot) {
|
||||
return !$this->evaluate($expr->expr);
|
||||
}
|
||||
if ($expr instanceof Expr\BitwiseNot) {
|
||||
return ~$this->evaluate($expr->expr);
|
||||
}
|
||||
|
||||
if ($expr instanceof Expr\BinaryOp) {
|
||||
return $this->evaluateBinaryOp($expr);
|
||||
}
|
||||
|
||||
if ($expr instanceof Expr\Ternary) {
|
||||
return $this->evaluateTernary($expr);
|
||||
}
|
||||
|
||||
if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) {
|
||||
return $this->evaluate($expr->var)[$this->evaluate($expr->dim)];
|
||||
}
|
||||
|
||||
if ($expr instanceof Expr\ConstFetch) {
|
||||
return $this->evaluateConstFetch($expr);
|
||||
}
|
||||
|
||||
return ($this->fallbackEvaluator)($expr);
|
||||
}
|
||||
|
||||
private function evaluateArray(Expr\Array_ $expr) {
|
||||
$array = [];
|
||||
foreach ($expr->items as $item) {
|
||||
if (null !== $item->key) {
|
||||
$array[$this->evaluate($item->key)] = $this->evaluate($item->value);
|
||||
} elseif ($item->unpack) {
|
||||
$array = array_merge($array, $this->evaluate($item->value));
|
||||
} else {
|
||||
$array[] = $this->evaluate($item->value);
|
||||
}
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
private function evaluateTernary(Expr\Ternary $expr) {
|
||||
if (null === $expr->if) {
|
||||
return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else);
|
||||
}
|
||||
|
||||
return $this->evaluate($expr->cond)
|
||||
? $this->evaluate($expr->if)
|
||||
: $this->evaluate($expr->else);
|
||||
}
|
||||
|
||||
private function evaluateBinaryOp(Expr\BinaryOp $expr) {
|
||||
if ($expr instanceof Expr\BinaryOp\Coalesce
|
||||
&& $expr->left instanceof Expr\ArrayDimFetch
|
||||
) {
|
||||
// This needs to be special cased to respect BP_VAR_IS fetch semantics
|
||||
return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)]
|
||||
?? $this->evaluate($expr->right);
|
||||
}
|
||||
|
||||
// The evaluate() calls are repeated in each branch, because some of the operators are
|
||||
// short-circuiting and evaluating the RHS in advance may be illegal in that case
|
||||
$l = $expr->left;
|
||||
$r = $expr->right;
|
||||
switch ($expr->getOperatorSigil()) {
|
||||
case '&': return $this->evaluate($l) & $this->evaluate($r);
|
||||
case '|': return $this->evaluate($l) | $this->evaluate($r);
|
||||
case '^': return $this->evaluate($l) ^ $this->evaluate($r);
|
||||
case '&&': return $this->evaluate($l) && $this->evaluate($r);
|
||||
case '||': return $this->evaluate($l) || $this->evaluate($r);
|
||||
case '??': return $this->evaluate($l) ?? $this->evaluate($r);
|
||||
case '.': return $this->evaluate($l) . $this->evaluate($r);
|
||||
case '/': return $this->evaluate($l) / $this->evaluate($r);
|
||||
case '==': return $this->evaluate($l) == $this->evaluate($r);
|
||||
case '>': return $this->evaluate($l) > $this->evaluate($r);
|
||||
case '>=': return $this->evaluate($l) >= $this->evaluate($r);
|
||||
case '===': return $this->evaluate($l) === $this->evaluate($r);
|
||||
case 'and': return $this->evaluate($l) and $this->evaluate($r);
|
||||
case 'or': return $this->evaluate($l) or $this->evaluate($r);
|
||||
case 'xor': return $this->evaluate($l) xor $this->evaluate($r);
|
||||
case '-': return $this->evaluate($l) - $this->evaluate($r);
|
||||
case '%': return $this->evaluate($l) % $this->evaluate($r);
|
||||
case '*': return $this->evaluate($l) * $this->evaluate($r);
|
||||
case '!=': return $this->evaluate($l) != $this->evaluate($r);
|
||||
case '!==': return $this->evaluate($l) !== $this->evaluate($r);
|
||||
case '+': return $this->evaluate($l) + $this->evaluate($r);
|
||||
case '**': return $this->evaluate($l) ** $this->evaluate($r);
|
||||
case '<<': return $this->evaluate($l) << $this->evaluate($r);
|
||||
case '>>': return $this->evaluate($l) >> $this->evaluate($r);
|
||||
case '<': return $this->evaluate($l) < $this->evaluate($r);
|
||||
case '<=': return $this->evaluate($l) <= $this->evaluate($r);
|
||||
case '<=>': return $this->evaluate($l) <=> $this->evaluate($r);
|
||||
}
|
||||
|
||||
throw new \Exception('Should not happen');
|
||||
}
|
||||
|
||||
private function evaluateConstFetch(Expr\ConstFetch $expr) {
|
||||
$name = $expr->name->toLowerString();
|
||||
switch ($name) {
|
||||
case 'null': return null;
|
||||
case 'false': return false;
|
||||
case 'true': return true;
|
||||
}
|
||||
|
||||
return ($this->fallbackEvaluator)($expr);
|
||||
}
|
||||
}
|
180
vendor/nikic/php-parser/lib/PhpParser/Error.php
vendored
Normal file
180
vendor/nikic/php-parser/lib/PhpParser/Error.php
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
class Error extends \RuntimeException
|
||||
{
|
||||
protected $rawMessage;
|
||||
protected $attributes;
|
||||
|
||||
/**
|
||||
* Creates an Exception signifying a parse error.
|
||||
*
|
||||
* @param string $message Error message
|
||||
* @param array|int $attributes Attributes of node/token where error occurred
|
||||
* (or start line of error -- deprecated)
|
||||
*/
|
||||
public function __construct(string $message, $attributes = []) {
|
||||
$this->rawMessage = $message;
|
||||
if (is_array($attributes)) {
|
||||
$this->attributes = $attributes;
|
||||
} else {
|
||||
$this->attributes = ['startLine' => $attributes];
|
||||
}
|
||||
$this->updateMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the error message
|
||||
*
|
||||
* @return string Error message
|
||||
*/
|
||||
public function getRawMessage() : string {
|
||||
return $this->rawMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line the error starts in.
|
||||
*
|
||||
* @return int Error start line
|
||||
*/
|
||||
public function getStartLine() : int {
|
||||
return $this->attributes['startLine'] ?? -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line the error ends in.
|
||||
*
|
||||
* @return int Error end line
|
||||
*/
|
||||
public function getEndLine() : int {
|
||||
return $this->attributes['endLine'] ?? -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the attributes of the node/token the error occurred at.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAttributes() : array {
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the attributes of the node/token the error occurred at.
|
||||
*
|
||||
* @param array $attributes
|
||||
*/
|
||||
public function setAttributes(array $attributes) {
|
||||
$this->attributes = $attributes;
|
||||
$this->updateMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the line of the PHP file the error occurred in.
|
||||
*
|
||||
* @param string $message Error message
|
||||
*/
|
||||
public function setRawMessage(string $message) {
|
||||
$this->rawMessage = $message;
|
||||
$this->updateMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the line the error starts in.
|
||||
*
|
||||
* @param int $line Error start line
|
||||
*/
|
||||
public function setStartLine(int $line) {
|
||||
$this->attributes['startLine'] = $line;
|
||||
$this->updateMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the error has start and end column information.
|
||||
*
|
||||
* For column information enable the startFilePos and endFilePos in the lexer options.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasColumnInfo() : bool {
|
||||
return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the start column (1-based) into the line where the error started.
|
||||
*
|
||||
* @param string $code Source code of the file
|
||||
* @return int
|
||||
*/
|
||||
public function getStartColumn(string $code) : int {
|
||||
if (!$this->hasColumnInfo()) {
|
||||
throw new \RuntimeException('Error does not have column information');
|
||||
}
|
||||
|
||||
return $this->toColumn($code, $this->attributes['startFilePos']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the end column (1-based) into the line where the error ended.
|
||||
*
|
||||
* @param string $code Source code of the file
|
||||
* @return int
|
||||
*/
|
||||
public function getEndColumn(string $code) : int {
|
||||
if (!$this->hasColumnInfo()) {
|
||||
throw new \RuntimeException('Error does not have column information');
|
||||
}
|
||||
|
||||
return $this->toColumn($code, $this->attributes['endFilePos']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats message including line and column information.
|
||||
*
|
||||
* @param string $code Source code associated with the error, for calculation of the columns
|
||||
*
|
||||
* @return string Formatted message
|
||||
*/
|
||||
public function getMessageWithColumnInfo(string $code) : string {
|
||||
return sprintf(
|
||||
'%s from %d:%d to %d:%d', $this->getRawMessage(),
|
||||
$this->getStartLine(), $this->getStartColumn($code),
|
||||
$this->getEndLine(), $this->getEndColumn($code)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a file offset into a column.
|
||||
*
|
||||
* @param string $code Source code that $pos indexes into
|
||||
* @param int $pos 0-based position in $code
|
||||
*
|
||||
* @return int 1-based column (relative to start of line)
|
||||
*/
|
||||
private function toColumn(string $code, int $pos) : int {
|
||||
if ($pos > strlen($code)) {
|
||||
throw new \RuntimeException('Invalid position information');
|
||||
}
|
||||
|
||||
$lineStartPos = strrpos($code, "\n", $pos - strlen($code));
|
||||
if (false === $lineStartPos) {
|
||||
$lineStartPos = -1;
|
||||
}
|
||||
|
||||
return $pos - $lineStartPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the exception message after a change to rawMessage or rawLine.
|
||||
*/
|
||||
protected function updateMessage() {
|
||||
$this->message = $this->rawMessage;
|
||||
|
||||
if (-1 === $this->getStartLine()) {
|
||||
$this->message .= ' on unknown line';
|
||||
} else {
|
||||
$this->message .= ' on line ' . $this->getStartLine();
|
||||
}
|
||||
}
|
||||
}
|
13
vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php
vendored
Normal file
13
vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
interface ErrorHandler
|
||||
{
|
||||
/**
|
||||
* Handle an error generated during lexing, parsing or some other operation.
|
||||
*
|
||||
* @param Error $error The error that needs to be handled
|
||||
*/
|
||||
public function handleError(Error $error);
|
||||
}
|
46
vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php
vendored
Normal file
46
vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\ErrorHandler;
|
||||
|
||||
use PhpParser\Error;
|
||||
use PhpParser\ErrorHandler;
|
||||
|
||||
/**
|
||||
* Error handler that collects all errors into an array.
|
||||
*
|
||||
* This allows graceful handling of errors.
|
||||
*/
|
||||
class Collecting implements ErrorHandler
|
||||
{
|
||||
/** @var Error[] Collected errors */
|
||||
private $errors = [];
|
||||
|
||||
public function handleError(Error $error) {
|
||||
$this->errors[] = $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get collected errors.
|
||||
*
|
||||
* @return Error[]
|
||||
*/
|
||||
public function getErrors() : array {
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether there are any errors.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasErrors() : bool {
|
||||
return !empty($this->errors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset/clear collected errors.
|
||||
*/
|
||||
public function clearErrors() {
|
||||
$this->errors = [];
|
||||
}
|
||||
}
|
18
vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
vendored
Normal file
18
vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\ErrorHandler;
|
||||
|
||||
use PhpParser\Error;
|
||||
use PhpParser\ErrorHandler;
|
||||
|
||||
/**
|
||||
* Error handler that handles all errors by throwing them.
|
||||
*
|
||||
* This is the default strategy used by all components.
|
||||
*/
|
||||
class Throwing implements ErrorHandler
|
||||
{
|
||||
public function handleError(Error $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
27
vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php
vendored
Normal file
27
vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Internal;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class DiffElem
|
||||
{
|
||||
const TYPE_KEEP = 0;
|
||||
const TYPE_REMOVE = 1;
|
||||
const TYPE_ADD = 2;
|
||||
const TYPE_REPLACE = 3;
|
||||
|
||||
/** @var int One of the TYPE_* constants */
|
||||
public $type;
|
||||
/** @var mixed Is null for add operations */
|
||||
public $old;
|
||||
/** @var mixed Is null for remove operations */
|
||||
public $new;
|
||||
|
||||
public function __construct(int $type, $old, $new) {
|
||||
$this->type = $type;
|
||||
$this->old = $old;
|
||||
$this->new = $new;
|
||||
}
|
||||
}
|
164
vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php
vendored
Normal file
164
vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Internal;
|
||||
|
||||
/**
|
||||
* Implements the Myers diff algorithm.
|
||||
*
|
||||
* Myers, Eugene W. "An O (ND) difference algorithm and its variations."
|
||||
* Algorithmica 1.1 (1986): 251-266.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class Differ
|
||||
{
|
||||
private $isEqual;
|
||||
|
||||
/**
|
||||
* Create differ over the given equality relation.
|
||||
*
|
||||
* @param callable $isEqual Equality relation with signature function($a, $b) : bool
|
||||
*/
|
||||
public function __construct(callable $isEqual) {
|
||||
$this->isEqual = $isEqual;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate diff (edit script) from $old to $new.
|
||||
*
|
||||
* @param array $old Original array
|
||||
* @param array $new New array
|
||||
*
|
||||
* @return DiffElem[] Diff (edit script)
|
||||
*/
|
||||
public function diff(array $old, array $new) {
|
||||
list($trace, $x, $y) = $this->calculateTrace($old, $new);
|
||||
return $this->extractDiff($trace, $x, $y, $old, $new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate diff, including "replace" operations.
|
||||
*
|
||||
* If a sequence of remove operations is followed by the same number of add operations, these
|
||||
* will be coalesced into replace operations.
|
||||
*
|
||||
* @param array $old Original array
|
||||
* @param array $new New array
|
||||
*
|
||||
* @return DiffElem[] Diff (edit script), including replace operations
|
||||
*/
|
||||
public function diffWithReplacements(array $old, array $new) {
|
||||
return $this->coalesceReplacements($this->diff($old, $new));
|
||||
}
|
||||
|
||||
private function calculateTrace(array $a, array $b) {
|
||||
$n = \count($a);
|
||||
$m = \count($b);
|
||||
$max = $n + $m;
|
||||
$v = [1 => 0];
|
||||
$trace = [];
|
||||
for ($d = 0; $d <= $max; $d++) {
|
||||
$trace[] = $v;
|
||||
for ($k = -$d; $k <= $d; $k += 2) {
|
||||
if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) {
|
||||
$x = $v[$k+1];
|
||||
} else {
|
||||
$x = $v[$k-1] + 1;
|
||||
}
|
||||
|
||||
$y = $x - $k;
|
||||
while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) {
|
||||
$x++;
|
||||
$y++;
|
||||
}
|
||||
|
||||
$v[$k] = $x;
|
||||
if ($x >= $n && $y >= $m) {
|
||||
return [$trace, $x, $y];
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new \Exception('Should not happen');
|
||||
}
|
||||
|
||||
private function extractDiff(array $trace, int $x, int $y, array $a, array $b) {
|
||||
$result = [];
|
||||
for ($d = \count($trace) - 1; $d >= 0; $d--) {
|
||||
$v = $trace[$d];
|
||||
$k = $x - $y;
|
||||
|
||||
if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) {
|
||||
$prevK = $k + 1;
|
||||
} else {
|
||||
$prevK = $k - 1;
|
||||
}
|
||||
|
||||
$prevX = $v[$prevK];
|
||||
$prevY = $prevX - $prevK;
|
||||
|
||||
while ($x > $prevX && $y > $prevY) {
|
||||
$result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]);
|
||||
$x--;
|
||||
$y--;
|
||||
}
|
||||
|
||||
if ($d === 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
while ($x > $prevX) {
|
||||
$result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null);
|
||||
$x--;
|
||||
}
|
||||
|
||||
while ($y > $prevY) {
|
||||
$result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]);
|
||||
$y--;
|
||||
}
|
||||
}
|
||||
return array_reverse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Coalesce equal-length sequences of remove+add into a replace operation.
|
||||
*
|
||||
* @param DiffElem[] $diff
|
||||
* @return DiffElem[]
|
||||
*/
|
||||
private function coalesceReplacements(array $diff) {
|
||||
$newDiff = [];
|
||||
$c = \count($diff);
|
||||
for ($i = 0; $i < $c; $i++) {
|
||||
$diffType = $diff[$i]->type;
|
||||
if ($diffType !== DiffElem::TYPE_REMOVE) {
|
||||
$newDiff[] = $diff[$i];
|
||||
continue;
|
||||
}
|
||||
|
||||
$j = $i;
|
||||
while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) {
|
||||
$j++;
|
||||
}
|
||||
|
||||
$k = $j;
|
||||
while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) {
|
||||
$k++;
|
||||
}
|
||||
|
||||
if ($j - $i === $k - $j) {
|
||||
$len = $j - $i;
|
||||
for ($n = 0; $n < $len; $n++) {
|
||||
$newDiff[] = new DiffElem(
|
||||
DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new
|
||||
);
|
||||
}
|
||||
} else {
|
||||
for (; $i < $k; $i++) {
|
||||
$newDiff[] = $diff[$i];
|
||||
}
|
||||
}
|
||||
$i = $k - 1;
|
||||
}
|
||||
return $newDiff;
|
||||
}
|
||||
}
|
61
vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php
vendored
Normal file
61
vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Internal;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
/**
|
||||
* This node is used internally by the format-preserving pretty printer to print anonymous classes.
|
||||
*
|
||||
* The normal anonymous class structure violates assumptions about the order of token offsets.
|
||||
* Namely, the constructor arguments are part of the Expr\New_ node and follow the class node, even
|
||||
* though they are actually interleaved with them. This special node type is used temporarily to
|
||||
* restore a sane token offset order.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class PrintableNewAnonClassNode extends Expr
|
||||
{
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public $attrGroups;
|
||||
/** @var Node\Arg[] Arguments */
|
||||
public $args;
|
||||
/** @var null|Node\Name Name of extended class */
|
||||
public $extends;
|
||||
/** @var Node\Name[] Names of implemented interfaces */
|
||||
public $implements;
|
||||
/** @var Node\Stmt[] Statements */
|
||||
public $stmts;
|
||||
|
||||
public function __construct(
|
||||
array $attrGroups, array $args, Node\Name $extends = null, array $implements,
|
||||
array $stmts, array $attributes
|
||||
) {
|
||||
parent::__construct($attributes);
|
||||
$this->attrGroups = $attrGroups;
|
||||
$this->args = $args;
|
||||
$this->extends = $extends;
|
||||
$this->implements = $implements;
|
||||
$this->stmts = $stmts;
|
||||
}
|
||||
|
||||
public static function fromNewNode(Expr\New_ $newNode) {
|
||||
$class = $newNode->class;
|
||||
assert($class instanceof Node\Stmt\Class_);
|
||||
// We don't assert that $class->name is null here, to allow consumers to assign unique names
|
||||
// to anonymous classes for their own purposes. We simplify ignore the name here.
|
||||
return new self(
|
||||
$class->attrGroups, $newNode->args, $class->extends, $class->implements,
|
||||
$class->stmts, $newNode->getAttributes()
|
||||
);
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_PrintableNewAnonClass';
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['attrGroups', 'args', 'extends', 'implements', 'stmts'];
|
||||
}
|
||||
}
|
281
vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php
vendored
Normal file
281
vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php
vendored
Normal file
@ -0,0 +1,281 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Internal;
|
||||
|
||||
/**
|
||||
* Provides operations on token streams, for use by pretty printer.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class TokenStream
|
||||
{
|
||||
/** @var array Tokens (in token_get_all format) */
|
||||
private $tokens;
|
||||
/** @var int[] Map from position to indentation */
|
||||
private $indentMap;
|
||||
|
||||
/**
|
||||
* Create token stream instance.
|
||||
*
|
||||
* @param array $tokens Tokens in token_get_all() format
|
||||
*/
|
||||
public function __construct(array $tokens) {
|
||||
$this->tokens = $tokens;
|
||||
$this->indentMap = $this->calcIndentMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the given position is immediately surrounded by parenthesis.
|
||||
*
|
||||
* @param int $startPos Start position
|
||||
* @param int $endPos End position
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function haveParens(int $startPos, int $endPos) : bool {
|
||||
return $this->haveTokenImmediatelyBefore($startPos, '(')
|
||||
&& $this->haveTokenImmediatelyAfter($endPos, ')');
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the given position is immediately surrounded by braces.
|
||||
*
|
||||
* @param int $startPos Start position
|
||||
* @param int $endPos End position
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function haveBraces(int $startPos, int $endPos) : bool {
|
||||
return ($this->haveTokenImmediatelyBefore($startPos, '{')
|
||||
|| $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN))
|
||||
&& $this->haveTokenImmediatelyAfter($endPos, '}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the position is directly preceded by a certain token type.
|
||||
*
|
||||
* During this check whitespace and comments are skipped.
|
||||
*
|
||||
* @param int $pos Position before which the token should occur
|
||||
* @param int|string $expectedTokenType Token to check for
|
||||
*
|
||||
* @return bool Whether the expected token was found
|
||||
*/
|
||||
public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool {
|
||||
$tokens = $this->tokens;
|
||||
$pos--;
|
||||
for (; $pos >= 0; $pos--) {
|
||||
$tokenType = $tokens[$pos][0];
|
||||
if ($tokenType === $expectedTokenType) {
|
||||
return true;
|
||||
}
|
||||
if ($tokenType !== \T_WHITESPACE
|
||||
&& $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the position is directly followed by a certain token type.
|
||||
*
|
||||
* During this check whitespace and comments are skipped.
|
||||
*
|
||||
* @param int $pos Position after which the token should occur
|
||||
* @param int|string $expectedTokenType Token to check for
|
||||
*
|
||||
* @return bool Whether the expected token was found
|
||||
*/
|
||||
public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool {
|
||||
$tokens = $this->tokens;
|
||||
$pos++;
|
||||
for (; $pos < \count($tokens); $pos++) {
|
||||
$tokenType = $tokens[$pos][0];
|
||||
if ($tokenType === $expectedTokenType) {
|
||||
return true;
|
||||
}
|
||||
if ($tokenType !== \T_WHITESPACE
|
||||
&& $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function skipLeft(int $pos, $skipTokenType) {
|
||||
$tokens = $this->tokens;
|
||||
|
||||
$pos = $this->skipLeftWhitespace($pos);
|
||||
if ($skipTokenType === \T_WHITESPACE) {
|
||||
return $pos;
|
||||
}
|
||||
|
||||
if ($tokens[$pos][0] !== $skipTokenType) {
|
||||
// Shouldn't happen. The skip token MUST be there
|
||||
throw new \Exception('Encountered unexpected token');
|
||||
}
|
||||
$pos--;
|
||||
|
||||
return $this->skipLeftWhitespace($pos);
|
||||
}
|
||||
|
||||
public function skipRight(int $pos, $skipTokenType) {
|
||||
$tokens = $this->tokens;
|
||||
|
||||
$pos = $this->skipRightWhitespace($pos);
|
||||
if ($skipTokenType === \T_WHITESPACE) {
|
||||
return $pos;
|
||||
}
|
||||
|
||||
if ($tokens[$pos][0] !== $skipTokenType) {
|
||||
// Shouldn't happen. The skip token MUST be there
|
||||
throw new \Exception('Encountered unexpected token');
|
||||
}
|
||||
$pos++;
|
||||
|
||||
return $this->skipRightWhitespace($pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return first non-whitespace token position smaller or equal to passed position.
|
||||
*
|
||||
* @param int $pos Token position
|
||||
* @return int Non-whitespace token position
|
||||
*/
|
||||
public function skipLeftWhitespace(int $pos) {
|
||||
$tokens = $this->tokens;
|
||||
for (; $pos >= 0; $pos--) {
|
||||
$type = $tokens[$pos][0];
|
||||
if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return first non-whitespace position greater or equal to passed position.
|
||||
*
|
||||
* @param int $pos Token position
|
||||
* @return int Non-whitespace token position
|
||||
*/
|
||||
public function skipRightWhitespace(int $pos) {
|
||||
$tokens = $this->tokens;
|
||||
for ($count = \count($tokens); $pos < $count; $pos++) {
|
||||
$type = $tokens[$pos][0];
|
||||
if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $pos;
|
||||
}
|
||||
|
||||
public function findRight(int $pos, $findTokenType) {
|
||||
$tokens = $this->tokens;
|
||||
for ($count = \count($tokens); $pos < $count; $pos++) {
|
||||
$type = $tokens[$pos][0];
|
||||
if ($type === $findTokenType) {
|
||||
return $pos;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the given position range contains a certain token type.
|
||||
*
|
||||
* @param int $startPos Starting position (inclusive)
|
||||
* @param int $endPos Ending position (exclusive)
|
||||
* @param int|string $tokenType Token type to look for
|
||||
* @return bool Whether the token occurs in the given range
|
||||
*/
|
||||
public function haveTokenInRange(int $startPos, int $endPos, $tokenType) {
|
||||
$tokens = $this->tokens;
|
||||
for ($pos = $startPos; $pos < $endPos; $pos++) {
|
||||
if ($tokens[$pos][0] === $tokenType) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function haveBracesInRange(int $startPos, int $endPos) {
|
||||
return $this->haveTokenInRange($startPos, $endPos, '{')
|
||||
|| $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN)
|
||||
|| $this->haveTokenInRange($startPos, $endPos, '}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get indentation before token position.
|
||||
*
|
||||
* @param int $pos Token position
|
||||
*
|
||||
* @return int Indentation depth (in spaces)
|
||||
*/
|
||||
public function getIndentationBefore(int $pos) : int {
|
||||
return $this->indentMap[$pos];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the code corresponding to a token offset range, optionally adjusted for indentation.
|
||||
*
|
||||
* @param int $from Token start position (inclusive)
|
||||
* @param int $to Token end position (exclusive)
|
||||
* @param int $indent By how much the code should be indented (can be negative as well)
|
||||
*
|
||||
* @return string Code corresponding to token range, adjusted for indentation
|
||||
*/
|
||||
public function getTokenCode(int $from, int $to, int $indent) : string {
|
||||
$tokens = $this->tokens;
|
||||
$result = '';
|
||||
for ($pos = $from; $pos < $to; $pos++) {
|
||||
$token = $tokens[$pos];
|
||||
if (\is_array($token)) {
|
||||
$type = $token[0];
|
||||
$content = $token[1];
|
||||
if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) {
|
||||
$result .= $content;
|
||||
} else {
|
||||
// TODO Handle non-space indentation
|
||||
if ($indent < 0) {
|
||||
$result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content);
|
||||
} elseif ($indent > 0) {
|
||||
$result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content);
|
||||
} else {
|
||||
$result .= $content;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result .= $token;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Precalculate the indentation at every token position.
|
||||
*
|
||||
* @return int[] Token position to indentation map
|
||||
*/
|
||||
private function calcIndentMap() {
|
||||
$indentMap = [];
|
||||
$indent = 0;
|
||||
foreach ($this->tokens as $token) {
|
||||
$indentMap[] = $indent;
|
||||
|
||||
if ($token[0] === \T_WHITESPACE) {
|
||||
$content = $token[1];
|
||||
$newlinePos = \strrpos($content, "\n");
|
||||
if (false !== $newlinePos) {
|
||||
$indent = \strlen($content) - $newlinePos - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add a sentinel for one past end of the file
|
||||
$indentMap[] = $indent;
|
||||
|
||||
return $indentMap;
|
||||
}
|
||||
}
|
103
vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php
vendored
Normal file
103
vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
class JsonDecoder
|
||||
{
|
||||
/** @var \ReflectionClass[] Node type to reflection class map */
|
||||
private $reflectionClassCache;
|
||||
|
||||
public function decode(string $json) {
|
||||
$value = json_decode($json, true);
|
||||
if (json_last_error()) {
|
||||
throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg());
|
||||
}
|
||||
|
||||
return $this->decodeRecursive($value);
|
||||
}
|
||||
|
||||
private function decodeRecursive($value) {
|
||||
if (\is_array($value)) {
|
||||
if (isset($value['nodeType'])) {
|
||||
if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') {
|
||||
return $this->decodeComment($value);
|
||||
}
|
||||
return $this->decodeNode($value);
|
||||
}
|
||||
return $this->decodeArray($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
private function decodeArray(array $array) : array {
|
||||
$decodedArray = [];
|
||||
foreach ($array as $key => $value) {
|
||||
$decodedArray[$key] = $this->decodeRecursive($value);
|
||||
}
|
||||
return $decodedArray;
|
||||
}
|
||||
|
||||
private function decodeNode(array $value) : Node {
|
||||
$nodeType = $value['nodeType'];
|
||||
if (!\is_string($nodeType)) {
|
||||
throw new \RuntimeException('Node type must be a string');
|
||||
}
|
||||
|
||||
$reflectionClass = $this->reflectionClassFromNodeType($nodeType);
|
||||
/** @var Node $node */
|
||||
$node = $reflectionClass->newInstanceWithoutConstructor();
|
||||
|
||||
if (isset($value['attributes'])) {
|
||||
if (!\is_array($value['attributes'])) {
|
||||
throw new \RuntimeException('Attributes must be an array');
|
||||
}
|
||||
|
||||
$node->setAttributes($this->decodeArray($value['attributes']));
|
||||
}
|
||||
|
||||
foreach ($value as $name => $subNode) {
|
||||
if ($name === 'nodeType' || $name === 'attributes') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$node->$name = $this->decodeRecursive($subNode);
|
||||
}
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
private function decodeComment(array $value) : Comment {
|
||||
$className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class;
|
||||
if (!isset($value['text'])) {
|
||||
throw new \RuntimeException('Comment must have text');
|
||||
}
|
||||
|
||||
return new $className(
|
||||
$value['text'],
|
||||
$value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1,
|
||||
$value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1
|
||||
);
|
||||
}
|
||||
|
||||
private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass {
|
||||
if (!isset($this->reflectionClassCache[$nodeType])) {
|
||||
$className = $this->classNameFromNodeType($nodeType);
|
||||
$this->reflectionClassCache[$nodeType] = new \ReflectionClass($className);
|
||||
}
|
||||
return $this->reflectionClassCache[$nodeType];
|
||||
}
|
||||
|
||||
private function classNameFromNodeType(string $nodeType) : string {
|
||||
$className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\');
|
||||
if (class_exists($className)) {
|
||||
return $className;
|
||||
}
|
||||
|
||||
$className .= '_';
|
||||
if (class_exists($className)) {
|
||||
return $className;
|
||||
}
|
||||
|
||||
throw new \RuntimeException("Unknown node type \"$nodeType\"");
|
||||
}
|
||||
}
|
560
vendor/nikic/php-parser/lib/PhpParser/Lexer.php
vendored
Normal file
560
vendor/nikic/php-parser/lib/PhpParser/Lexer.php
vendored
Normal file
@ -0,0 +1,560 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
use PhpParser\Parser\Tokens;
|
||||
|
||||
class Lexer
|
||||
{
|
||||
protected $code;
|
||||
protected $tokens;
|
||||
protected $pos;
|
||||
protected $line;
|
||||
protected $filePos;
|
||||
protected $prevCloseTagHasNewline;
|
||||
|
||||
protected $tokenMap;
|
||||
protected $dropTokens;
|
||||
protected $identifierTokens;
|
||||
|
||||
private $attributeStartLineUsed;
|
||||
private $attributeEndLineUsed;
|
||||
private $attributeStartTokenPosUsed;
|
||||
private $attributeEndTokenPosUsed;
|
||||
private $attributeStartFilePosUsed;
|
||||
private $attributeEndFilePosUsed;
|
||||
private $attributeCommentsUsed;
|
||||
|
||||
/**
|
||||
* Creates a Lexer.
|
||||
*
|
||||
* @param array $options Options array. Currently only the 'usedAttributes' option is supported,
|
||||
* which is an array of attributes to add to the AST nodes. Possible
|
||||
* attributes are: 'comments', 'startLine', 'endLine', 'startTokenPos',
|
||||
* 'endTokenPos', 'startFilePos', 'endFilePos'. The option defaults to the
|
||||
* first three. For more info see getNextToken() docs.
|
||||
*/
|
||||
public function __construct(array $options = []) {
|
||||
// Create Map from internal tokens to PhpParser tokens.
|
||||
$this->defineCompatibilityTokens();
|
||||
$this->tokenMap = $this->createTokenMap();
|
||||
$this->identifierTokens = $this->createIdentifierTokenMap();
|
||||
|
||||
// map of tokens to drop while lexing (the map is only used for isset lookup,
|
||||
// that's why the value is simply set to 1; the value is never actually used.)
|
||||
$this->dropTokens = array_fill_keys(
|
||||
[\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1
|
||||
);
|
||||
|
||||
$defaultAttributes = ['comments', 'startLine', 'endLine'];
|
||||
$usedAttributes = array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, true);
|
||||
|
||||
// Create individual boolean properties to make these checks faster.
|
||||
$this->attributeStartLineUsed = isset($usedAttributes['startLine']);
|
||||
$this->attributeEndLineUsed = isset($usedAttributes['endLine']);
|
||||
$this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']);
|
||||
$this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']);
|
||||
$this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']);
|
||||
$this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']);
|
||||
$this->attributeCommentsUsed = isset($usedAttributes['comments']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the lexer for lexing the provided source code.
|
||||
*
|
||||
* This function does not throw if lexing errors occur. Instead, errors may be retrieved using
|
||||
* the getErrors() method.
|
||||
*
|
||||
* @param string $code The source code to lex
|
||||
* @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to
|
||||
* ErrorHandler\Throwing
|
||||
*/
|
||||
public function startLexing(string $code, ErrorHandler $errorHandler = null) {
|
||||
if (null === $errorHandler) {
|
||||
$errorHandler = new ErrorHandler\Throwing();
|
||||
}
|
||||
|
||||
$this->code = $code; // keep the code around for __halt_compiler() handling
|
||||
$this->pos = -1;
|
||||
$this->line = 1;
|
||||
$this->filePos = 0;
|
||||
|
||||
// If inline HTML occurs without preceding code, treat it as if it had a leading newline.
|
||||
// This ensures proper composability, because having a newline is the "safe" assumption.
|
||||
$this->prevCloseTagHasNewline = true;
|
||||
|
||||
$scream = ini_set('xdebug.scream', '0');
|
||||
|
||||
$this->tokens = @token_get_all($code);
|
||||
$this->postprocessTokens($errorHandler);
|
||||
|
||||
if (false !== $scream) {
|
||||
ini_set('xdebug.scream', $scream);
|
||||
}
|
||||
}
|
||||
|
||||
private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) {
|
||||
$tokens = [];
|
||||
for ($i = $start; $i < $end; $i++) {
|
||||
$chr = $this->code[$i];
|
||||
if ($chr === "\0") {
|
||||
// PHP cuts error message after null byte, so need special case
|
||||
$errorMsg = 'Unexpected null byte';
|
||||
} else {
|
||||
$errorMsg = sprintf(
|
||||
'Unexpected character "%s" (ASCII %d)', $chr, ord($chr)
|
||||
);
|
||||
}
|
||||
|
||||
$tokens[] = [\T_BAD_CHARACTER, $chr, $line];
|
||||
$errorHandler->handleError(new Error($errorMsg, [
|
||||
'startLine' => $line,
|
||||
'endLine' => $line,
|
||||
'startFilePos' => $i,
|
||||
'endFilePos' => $i,
|
||||
]));
|
||||
}
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether comment token is unterminated.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isUnterminatedComment($token) : bool {
|
||||
return ($token[0] === \T_COMMENT || $token[0] === \T_DOC_COMMENT)
|
||||
&& substr($token[1], 0, 2) === '/*'
|
||||
&& substr($token[1], -2) !== '*/';
|
||||
}
|
||||
|
||||
protected function postprocessTokens(ErrorHandler $errorHandler) {
|
||||
// PHP's error handling for token_get_all() is rather bad, so if we want detailed
|
||||
// error information we need to compute it ourselves. Invalid character errors are
|
||||
// detected by finding "gaps" in the token array. Unterminated comments are detected
|
||||
// by checking if a trailing comment has a "*/" at the end.
|
||||
//
|
||||
// Additionally, we perform a number of canonicalizations here:
|
||||
// * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore.
|
||||
// * Use PHP 8.0 T_NAME_* tokens.
|
||||
// * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and
|
||||
// T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types.
|
||||
|
||||
$filePos = 0;
|
||||
$line = 1;
|
||||
$numTokens = \count($this->tokens);
|
||||
for ($i = 0; $i < $numTokens; $i++) {
|
||||
$token = $this->tokens[$i];
|
||||
|
||||
// Since PHP 7.4 invalid characters are represented by a T_BAD_CHARACTER token.
|
||||
// In this case we only need to emit an error.
|
||||
if ($token[0] === \T_BAD_CHARACTER) {
|
||||
$this->handleInvalidCharacterRange($filePos, $filePos + 1, $line, $errorHandler);
|
||||
}
|
||||
|
||||
if ($token[0] === \T_COMMENT && substr($token[1], 0, 2) !== '/*'
|
||||
&& preg_match('/(\r\n|\n|\r)$/D', $token[1], $matches)) {
|
||||
$trailingNewline = $matches[0];
|
||||
$token[1] = substr($token[1], 0, -strlen($trailingNewline));
|
||||
$this->tokens[$i] = $token;
|
||||
if (isset($this->tokens[$i + 1]) && $this->tokens[$i + 1][0] === \T_WHITESPACE) {
|
||||
// Move trailing newline into following T_WHITESPACE token, if it already exists.
|
||||
$this->tokens[$i + 1][1] = $trailingNewline . $this->tokens[$i + 1][1];
|
||||
$this->tokens[$i + 1][2]--;
|
||||
} else {
|
||||
// Otherwise, we need to create a new T_WHITESPACE token.
|
||||
array_splice($this->tokens, $i + 1, 0, [
|
||||
[\T_WHITESPACE, $trailingNewline, $line],
|
||||
]);
|
||||
$numTokens++;
|
||||
}
|
||||
}
|
||||
|
||||
// Emulate PHP 8 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and T_STRING
|
||||
// into a single token.
|
||||
if (\is_array($token)
|
||||
&& ($token[0] === \T_NS_SEPARATOR || isset($this->identifierTokens[$token[0]]))) {
|
||||
$lastWasSeparator = $token[0] === \T_NS_SEPARATOR;
|
||||
$text = $token[1];
|
||||
for ($j = $i + 1; isset($this->tokens[$j]); $j++) {
|
||||
if ($lastWasSeparator) {
|
||||
if (!isset($this->identifierTokens[$this->tokens[$j][0]])) {
|
||||
break;
|
||||
}
|
||||
$lastWasSeparator = false;
|
||||
} else {
|
||||
if ($this->tokens[$j][0] !== \T_NS_SEPARATOR) {
|
||||
break;
|
||||
}
|
||||
$lastWasSeparator = true;
|
||||
}
|
||||
$text .= $this->tokens[$j][1];
|
||||
}
|
||||
if ($lastWasSeparator) {
|
||||
// Trailing separator is not part of the name.
|
||||
$j--;
|
||||
$text = substr($text, 0, -1);
|
||||
}
|
||||
if ($j > $i + 1) {
|
||||
if ($token[0] === \T_NS_SEPARATOR) {
|
||||
$type = \T_NAME_FULLY_QUALIFIED;
|
||||
} else if ($token[0] === \T_NAMESPACE) {
|
||||
$type = \T_NAME_RELATIVE;
|
||||
} else {
|
||||
$type = \T_NAME_QUALIFIED;
|
||||
}
|
||||
$token = [$type, $text, $line];
|
||||
array_splice($this->tokens, $i, $j - $i, [$token]);
|
||||
$numTokens -= $j - $i - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($token === '&') {
|
||||
$next = $i + 1;
|
||||
while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) {
|
||||
$next++;
|
||||
}
|
||||
$followedByVarOrVarArg = isset($this->tokens[$next]) &&
|
||||
($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS);
|
||||
$this->tokens[$i] = $token = [
|
||||
$followedByVarOrVarArg
|
||||
? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
|
||||
: \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG,
|
||||
'&',
|
||||
$line,
|
||||
];
|
||||
}
|
||||
|
||||
$tokenValue = \is_string($token) ? $token : $token[1];
|
||||
$tokenLen = \strlen($tokenValue);
|
||||
|
||||
if (substr($this->code, $filePos, $tokenLen) !== $tokenValue) {
|
||||
// Something is missing, must be an invalid character
|
||||
$nextFilePos = strpos($this->code, $tokenValue, $filePos);
|
||||
$badCharTokens = $this->handleInvalidCharacterRange(
|
||||
$filePos, $nextFilePos, $line, $errorHandler);
|
||||
$filePos = (int) $nextFilePos;
|
||||
|
||||
array_splice($this->tokens, $i, 0, $badCharTokens);
|
||||
$numTokens += \count($badCharTokens);
|
||||
$i += \count($badCharTokens);
|
||||
}
|
||||
|
||||
$filePos += $tokenLen;
|
||||
$line += substr_count($tokenValue, "\n");
|
||||
}
|
||||
|
||||
if ($filePos !== \strlen($this->code)) {
|
||||
if (substr($this->code, $filePos, 2) === '/*') {
|
||||
// Unlike PHP, HHVM will drop unterminated comments entirely
|
||||
$comment = substr($this->code, $filePos);
|
||||
$errorHandler->handleError(new Error('Unterminated comment', [
|
||||
'startLine' => $line,
|
||||
'endLine' => $line + substr_count($comment, "\n"),
|
||||
'startFilePos' => $filePos,
|
||||
'endFilePos' => $filePos + \strlen($comment),
|
||||
]));
|
||||
|
||||
// Emulate the PHP behavior
|
||||
$isDocComment = isset($comment[3]) && $comment[3] === '*';
|
||||
$this->tokens[] = [$isDocComment ? \T_DOC_COMMENT : \T_COMMENT, $comment, $line];
|
||||
} else {
|
||||
// Invalid characters at the end of the input
|
||||
$badCharTokens = $this->handleInvalidCharacterRange(
|
||||
$filePos, \strlen($this->code), $line, $errorHandler);
|
||||
$this->tokens = array_merge($this->tokens, $badCharTokens);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($this->tokens) > 0) {
|
||||
// Check for unterminated comment
|
||||
$lastToken = $this->tokens[count($this->tokens) - 1];
|
||||
if ($this->isUnterminatedComment($lastToken)) {
|
||||
$errorHandler->handleError(new Error('Unterminated comment', [
|
||||
'startLine' => $line - substr_count($lastToken[1], "\n"),
|
||||
'endLine' => $line,
|
||||
'startFilePos' => $filePos - \strlen($lastToken[1]),
|
||||
'endFilePos' => $filePos,
|
||||
]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the next token.
|
||||
*
|
||||
* The available attributes are determined by the 'usedAttributes' option, which can
|
||||
* be specified in the constructor. The following attributes are supported:
|
||||
*
|
||||
* * 'comments' => Array of PhpParser\Comment or PhpParser\Comment\Doc instances,
|
||||
* representing all comments that occurred between the previous
|
||||
* non-discarded token and the current one.
|
||||
* * 'startLine' => Line in which the node starts.
|
||||
* * 'endLine' => Line in which the node ends.
|
||||
* * 'startTokenPos' => Offset into the token array of the first token in the node.
|
||||
* * 'endTokenPos' => Offset into the token array of the last token in the node.
|
||||
* * 'startFilePos' => Offset into the code string of the first character that is part of the node.
|
||||
* * 'endFilePos' => Offset into the code string of the last character that is part of the node.
|
||||
*
|
||||
* @param mixed $value Variable to store token content in
|
||||
* @param mixed $startAttributes Variable to store start attributes in
|
||||
* @param mixed $endAttributes Variable to store end attributes in
|
||||
*
|
||||
* @return int Token id
|
||||
*/
|
||||
public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int {
|
||||
$startAttributes = [];
|
||||
$endAttributes = [];
|
||||
|
||||
while (1) {
|
||||
if (isset($this->tokens[++$this->pos])) {
|
||||
$token = $this->tokens[$this->pos];
|
||||
} else {
|
||||
// EOF token with ID 0
|
||||
$token = "\0";
|
||||
}
|
||||
|
||||
if ($this->attributeStartLineUsed) {
|
||||
$startAttributes['startLine'] = $this->line;
|
||||
}
|
||||
if ($this->attributeStartTokenPosUsed) {
|
||||
$startAttributes['startTokenPos'] = $this->pos;
|
||||
}
|
||||
if ($this->attributeStartFilePosUsed) {
|
||||
$startAttributes['startFilePos'] = $this->filePos;
|
||||
}
|
||||
|
||||
if (\is_string($token)) {
|
||||
$value = $token;
|
||||
if (isset($token[1])) {
|
||||
// bug in token_get_all
|
||||
$this->filePos += 2;
|
||||
$id = ord('"');
|
||||
} else {
|
||||
$this->filePos += 1;
|
||||
$id = ord($token);
|
||||
}
|
||||
} elseif (!isset($this->dropTokens[$token[0]])) {
|
||||
$value = $token[1];
|
||||
$id = $this->tokenMap[$token[0]];
|
||||
if (\T_CLOSE_TAG === $token[0]) {
|
||||
$this->prevCloseTagHasNewline = false !== strpos($token[1], "\n")
|
||||
|| false !== strpos($token[1], "\r");
|
||||
} elseif (\T_INLINE_HTML === $token[0]) {
|
||||
$startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline;
|
||||
}
|
||||
|
||||
$this->line += substr_count($value, "\n");
|
||||
$this->filePos += \strlen($value);
|
||||
} else {
|
||||
$origLine = $this->line;
|
||||
$origFilePos = $this->filePos;
|
||||
$this->line += substr_count($token[1], "\n");
|
||||
$this->filePos += \strlen($token[1]);
|
||||
|
||||
if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) {
|
||||
if ($this->attributeCommentsUsed) {
|
||||
$comment = \T_DOC_COMMENT === $token[0]
|
||||
? new Comment\Doc($token[1],
|
||||
$origLine, $origFilePos, $this->pos,
|
||||
$this->line, $this->filePos - 1, $this->pos)
|
||||
: new Comment($token[1],
|
||||
$origLine, $origFilePos, $this->pos,
|
||||
$this->line, $this->filePos - 1, $this->pos);
|
||||
$startAttributes['comments'][] = $comment;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->attributeEndLineUsed) {
|
||||
$endAttributes['endLine'] = $this->line;
|
||||
}
|
||||
if ($this->attributeEndTokenPosUsed) {
|
||||
$endAttributes['endTokenPos'] = $this->pos;
|
||||
}
|
||||
if ($this->attributeEndFilePosUsed) {
|
||||
$endAttributes['endFilePos'] = $this->filePos - 1;
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
throw new \RuntimeException('Reached end of lexer loop');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the token array for current code.
|
||||
*
|
||||
* The token array is in the same format as provided by the
|
||||
* token_get_all() function and does not discard tokens (i.e.
|
||||
* whitespace and comments are included). The token position
|
||||
* attributes are against this token array.
|
||||
*
|
||||
* @return array Array of tokens in token_get_all() format
|
||||
*/
|
||||
public function getTokens() : array {
|
||||
return $this->tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles __halt_compiler() by returning the text after it.
|
||||
*
|
||||
* @return string Remaining text
|
||||
*/
|
||||
public function handleHaltCompiler() : string {
|
||||
// text after T_HALT_COMPILER, still including ();
|
||||
$textAfter = substr($this->code, $this->filePos);
|
||||
|
||||
// ensure that it is followed by ();
|
||||
// this simplifies the situation, by not allowing any comments
|
||||
// in between of the tokens.
|
||||
if (!preg_match('~^\s*\(\s*\)\s*(?:;|\?>\r?\n?)~', $textAfter, $matches)) {
|
||||
throw new Error('__HALT_COMPILER must be followed by "();"');
|
||||
}
|
||||
|
||||
// prevent the lexer from returning any further tokens
|
||||
$this->pos = count($this->tokens);
|
||||
|
||||
// return with (); removed
|
||||
return substr($textAfter, strlen($matches[0]));
|
||||
}
|
||||
|
||||
private function defineCompatibilityTokens() {
|
||||
static $compatTokensDefined = false;
|
||||
if ($compatTokensDefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
$compatTokens = [
|
||||
// PHP 7.4
|
||||
'T_BAD_CHARACTER',
|
||||
'T_FN',
|
||||
'T_COALESCE_EQUAL',
|
||||
// PHP 8.0
|
||||
'T_NAME_QUALIFIED',
|
||||
'T_NAME_FULLY_QUALIFIED',
|
||||
'T_NAME_RELATIVE',
|
||||
'T_MATCH',
|
||||
'T_NULLSAFE_OBJECT_OPERATOR',
|
||||
'T_ATTRIBUTE',
|
||||
// PHP 8.1
|
||||
'T_ENUM',
|
||||
'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG',
|
||||
'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG',
|
||||
'T_READONLY',
|
||||
];
|
||||
|
||||
// PHP-Parser might be used together with another library that also emulates some or all
|
||||
// of these tokens. Perform a sanity-check that all already defined tokens have been
|
||||
// assigned a unique ID.
|
||||
$usedTokenIds = [];
|
||||
foreach ($compatTokens as $token) {
|
||||
if (\defined($token)) {
|
||||
$tokenId = \constant($token);
|
||||
$clashingToken = $usedTokenIds[$tokenId] ?? null;
|
||||
if ($clashingToken !== null) {
|
||||
throw new \Error(sprintf(
|
||||
'Token %s has same ID as token %s, ' .
|
||||
'you may be using a library with broken token emulation',
|
||||
$token, $clashingToken
|
||||
));
|
||||
}
|
||||
$usedTokenIds[$tokenId] = $token;
|
||||
}
|
||||
}
|
||||
|
||||
// Now define any tokens that have not yet been emulated. Try to assign IDs from -1
|
||||
// downwards, but skip any IDs that may already be in use.
|
||||
$newTokenId = -1;
|
||||
foreach ($compatTokens as $token) {
|
||||
if (!\defined($token)) {
|
||||
while (isset($usedTokenIds[$newTokenId])) {
|
||||
$newTokenId--;
|
||||
}
|
||||
\define($token, $newTokenId);
|
||||
$newTokenId--;
|
||||
}
|
||||
}
|
||||
|
||||
$compatTokensDefined = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the token map.
|
||||
*
|
||||
* The token map maps the PHP internal token identifiers
|
||||
* to the identifiers used by the Parser. Additionally it
|
||||
* maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'.
|
||||
*
|
||||
* @return array The token map
|
||||
*/
|
||||
protected function createTokenMap() : array {
|
||||
$tokenMap = [];
|
||||
|
||||
// 256 is the minimum possible token number, as everything below
|
||||
// it is an ASCII value
|
||||
for ($i = 256; $i < 1000; ++$i) {
|
||||
if (\T_DOUBLE_COLON === $i) {
|
||||
// T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM
|
||||
$tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM;
|
||||
} elseif(\T_OPEN_TAG_WITH_ECHO === $i) {
|
||||
// T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO
|
||||
$tokenMap[$i] = Tokens::T_ECHO;
|
||||
} elseif(\T_CLOSE_TAG === $i) {
|
||||
// T_CLOSE_TAG is equivalent to ';'
|
||||
$tokenMap[$i] = ord(';');
|
||||
} elseif ('UNKNOWN' !== $name = token_name($i)) {
|
||||
if ('T_HASHBANG' === $name) {
|
||||
// HHVM uses a special token for #! hashbang lines
|
||||
$tokenMap[$i] = Tokens::T_INLINE_HTML;
|
||||
} elseif (defined($name = Tokens::class . '::' . $name)) {
|
||||
// Other tokens can be mapped directly
|
||||
$tokenMap[$i] = constant($name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// HHVM uses a special token for numbers that overflow to double
|
||||
if (defined('T_ONUMBER')) {
|
||||
$tokenMap[\T_ONUMBER] = Tokens::T_DNUMBER;
|
||||
}
|
||||
// HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant
|
||||
if (defined('T_COMPILER_HALT_OFFSET')) {
|
||||
$tokenMap[\T_COMPILER_HALT_OFFSET] = Tokens::T_STRING;
|
||||
}
|
||||
|
||||
// Assign tokens for which we define compatibility constants, as token_name() does not know them.
|
||||
$tokenMap[\T_FN] = Tokens::T_FN;
|
||||
$tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL;
|
||||
$tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED;
|
||||
$tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED;
|
||||
$tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE;
|
||||
$tokenMap[\T_MATCH] = Tokens::T_MATCH;
|
||||
$tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR;
|
||||
$tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE;
|
||||
$tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG;
|
||||
$tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG;
|
||||
$tokenMap[\T_ENUM] = Tokens::T_ENUM;
|
||||
$tokenMap[\T_READONLY] = Tokens::T_READONLY;
|
||||
|
||||
return $tokenMap;
|
||||
}
|
||||
|
||||
private function createIdentifierTokenMap(): array {
|
||||
// Based on semi_reserved production.
|
||||
return array_fill_keys([
|
||||
\T_STRING,
|
||||
\T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY,
|
||||
\T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND,
|
||||
\T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE,
|
||||
\T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH,
|
||||
\T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO,
|
||||
\T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT,
|
||||
\T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS,
|
||||
\T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN,
|
||||
\T_MATCH,
|
||||
], true);
|
||||
}
|
||||
}
|
248
vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
vendored
Normal file
248
vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
vendored
Normal file
@ -0,0 +1,248 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer;
|
||||
|
||||
use PhpParser\Error;
|
||||
use PhpParser\ErrorHandler;
|
||||
use PhpParser\Lexer;
|
||||
use PhpParser\Lexer\TokenEmulator\AttributeEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\FnTokenEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\ReverseEmulator;
|
||||
use PhpParser\Lexer\TokenEmulator\TokenEmulator;
|
||||
|
||||
class Emulative extends Lexer
|
||||
{
|
||||
const PHP_7_3 = '7.3dev';
|
||||
const PHP_7_4 = '7.4dev';
|
||||
const PHP_8_0 = '8.0dev';
|
||||
const PHP_8_1 = '8.1dev';
|
||||
|
||||
/** @var mixed[] Patches used to reverse changes introduced in the code */
|
||||
private $patches = [];
|
||||
|
||||
/** @var TokenEmulator[] */
|
||||
private $emulators = [];
|
||||
|
||||
/** @var string */
|
||||
private $targetPhpVersion;
|
||||
|
||||
/**
|
||||
* @param mixed[] $options Lexer options. In addition to the usual options,
|
||||
* accepts a 'phpVersion' string that specifies the
|
||||
* version to emulate. Defaults to newest supported.
|
||||
*/
|
||||
public function __construct(array $options = [])
|
||||
{
|
||||
$this->targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_1;
|
||||
unset($options['phpVersion']);
|
||||
|
||||
parent::__construct($options);
|
||||
|
||||
$emulators = [
|
||||
new FlexibleDocStringEmulator(),
|
||||
new FnTokenEmulator(),
|
||||
new MatchTokenEmulator(),
|
||||
new CoaleseEqualTokenEmulator(),
|
||||
new NumericLiteralSeparatorEmulator(),
|
||||
new NullsafeTokenEmulator(),
|
||||
new AttributeEmulator(),
|
||||
new EnumTokenEmulator(),
|
||||
new ReadonlyTokenEmulator(),
|
||||
new ExplicitOctalEmulator(),
|
||||
];
|
||||
|
||||
// Collect emulators that are relevant for the PHP version we're running
|
||||
// and the PHP version we're targeting for emulation.
|
||||
foreach ($emulators as $emulator) {
|
||||
$emulatorPhpVersion = $emulator->getPhpVersion();
|
||||
if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) {
|
||||
$this->emulators[] = $emulator;
|
||||
} else if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) {
|
||||
$this->emulators[] = new ReverseEmulator($emulator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function startLexing(string $code, ErrorHandler $errorHandler = null) {
|
||||
$emulators = array_filter($this->emulators, function($emulator) use($code) {
|
||||
return $emulator->isEmulationNeeded($code);
|
||||
});
|
||||
|
||||
if (empty($emulators)) {
|
||||
// Nothing to emulate, yay
|
||||
parent::startLexing($code, $errorHandler);
|
||||
return;
|
||||
}
|
||||
|
||||
$this->patches = [];
|
||||
foreach ($emulators as $emulator) {
|
||||
$code = $emulator->preprocessCode($code, $this->patches);
|
||||
}
|
||||
|
||||
$collector = new ErrorHandler\Collecting();
|
||||
parent::startLexing($code, $collector);
|
||||
$this->sortPatches();
|
||||
$this->fixupTokens();
|
||||
|
||||
$errors = $collector->getErrors();
|
||||
if (!empty($errors)) {
|
||||
$this->fixupErrors($errors);
|
||||
foreach ($errors as $error) {
|
||||
$errorHandler->handleError($error);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($emulators as $emulator) {
|
||||
$this->tokens = $emulator->emulate($code, $this->tokens);
|
||||
}
|
||||
}
|
||||
|
||||
private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool {
|
||||
return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<')
|
||||
&& version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>=');
|
||||
}
|
||||
|
||||
private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool {
|
||||
return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=')
|
||||
&& version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<');
|
||||
}
|
||||
|
||||
private function sortPatches()
|
||||
{
|
||||
// Patches may be contributed by different emulators.
|
||||
// Make sure they are sorted by increasing patch position.
|
||||
usort($this->patches, function($p1, $p2) {
|
||||
return $p1[0] <=> $p2[0];
|
||||
});
|
||||
}
|
||||
|
||||
private function fixupTokens()
|
||||
{
|
||||
if (\count($this->patches) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load first patch
|
||||
$patchIdx = 0;
|
||||
|
||||
list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
|
||||
|
||||
// We use a manual loop over the tokens, because we modify the array on the fly
|
||||
$pos = 0;
|
||||
for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) {
|
||||
$token = $this->tokens[$i];
|
||||
if (\is_string($token)) {
|
||||
if ($patchPos === $pos) {
|
||||
// Only support replacement for string tokens.
|
||||
assert($patchType === 'replace');
|
||||
$this->tokens[$i] = $patchText;
|
||||
|
||||
// Fetch the next patch
|
||||
$patchIdx++;
|
||||
if ($patchIdx >= \count($this->patches)) {
|
||||
// No more patches, we're done
|
||||
return;
|
||||
}
|
||||
list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
|
||||
}
|
||||
|
||||
$pos += \strlen($token);
|
||||
continue;
|
||||
}
|
||||
|
||||
$len = \strlen($token[1]);
|
||||
$posDelta = 0;
|
||||
while ($patchPos >= $pos && $patchPos < $pos + $len) {
|
||||
$patchTextLen = \strlen($patchText);
|
||||
if ($patchType === 'remove') {
|
||||
if ($patchPos === $pos && $patchTextLen === $len) {
|
||||
// Remove token entirely
|
||||
array_splice($this->tokens, $i, 1, []);
|
||||
$i--;
|
||||
$c--;
|
||||
} else {
|
||||
// Remove from token string
|
||||
$this->tokens[$i][1] = substr_replace(
|
||||
$token[1], '', $patchPos - $pos + $posDelta, $patchTextLen
|
||||
);
|
||||
$posDelta -= $patchTextLen;
|
||||
}
|
||||
} elseif ($patchType === 'add') {
|
||||
// Insert into the token string
|
||||
$this->tokens[$i][1] = substr_replace(
|
||||
$token[1], $patchText, $patchPos - $pos + $posDelta, 0
|
||||
);
|
||||
$posDelta += $patchTextLen;
|
||||
} else if ($patchType === 'replace') {
|
||||
// Replace inside the token string
|
||||
$this->tokens[$i][1] = substr_replace(
|
||||
$token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen
|
||||
);
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
// Fetch the next patch
|
||||
$patchIdx++;
|
||||
if ($patchIdx >= \count($this->patches)) {
|
||||
// No more patches, we're done
|
||||
return;
|
||||
}
|
||||
|
||||
list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
|
||||
|
||||
// Multiple patches may apply to the same token. Reload the current one to check
|
||||
// If the new patch applies
|
||||
$token = $this->tokens[$i];
|
||||
}
|
||||
|
||||
$pos += $len;
|
||||
}
|
||||
|
||||
// A patch did not apply
|
||||
assert(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixup line and position information in errors.
|
||||
*
|
||||
* @param Error[] $errors
|
||||
*/
|
||||
private function fixupErrors(array $errors) {
|
||||
foreach ($errors as $error) {
|
||||
$attrs = $error->getAttributes();
|
||||
|
||||
$posDelta = 0;
|
||||
$lineDelta = 0;
|
||||
foreach ($this->patches as $patch) {
|
||||
list($patchPos, $patchType, $patchText) = $patch;
|
||||
if ($patchPos >= $attrs['startFilePos']) {
|
||||
// No longer relevant
|
||||
break;
|
||||
}
|
||||
|
||||
if ($patchType === 'add') {
|
||||
$posDelta += strlen($patchText);
|
||||
$lineDelta += substr_count($patchText, "\n");
|
||||
} else if ($patchType === 'remove') {
|
||||
$posDelta -= strlen($patchText);
|
||||
$lineDelta -= substr_count($patchText, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
$attrs['startFilePos'] += $posDelta;
|
||||
$attrs['endFilePos'] += $posDelta;
|
||||
$attrs['startLine'] += $lineDelta;
|
||||
$attrs['endLine'] += $lineDelta;
|
||||
$error->setAttributes($attrs);
|
||||
}
|
||||
}
|
||||
}
|
56
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php
vendored
Normal file
56
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class AttributeEmulator extends TokenEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_8_0;
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code) : bool
|
||||
{
|
||||
return strpos($code, '#[') !== false;
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array
|
||||
{
|
||||
// We need to manually iterate and manage a count because we'll change
|
||||
// the tokens array on the way.
|
||||
$line = 1;
|
||||
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
||||
if ($tokens[$i] === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1] === '[') {
|
||||
array_splice($tokens, $i, 2, [
|
||||
[\T_ATTRIBUTE, '#[', $line]
|
||||
]);
|
||||
$c--;
|
||||
continue;
|
||||
}
|
||||
if (\is_array($tokens[$i])) {
|
||||
$line += substr_count($tokens[$i][1], "\n");
|
||||
}
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array
|
||||
{
|
||||
// TODO
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
public function preprocessCode(string $code, array &$patches): string {
|
||||
$pos = 0;
|
||||
while (false !== $pos = strpos($code, '#[', $pos)) {
|
||||
// Replace #[ with %[
|
||||
$code[$pos] = '%';
|
||||
$patches[] = [$pos, 'replace', '#'];
|
||||
$pos += 2;
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
}
|
47
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php
vendored
Normal file
47
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class CoaleseEqualTokenEmulator extends TokenEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_7_4;
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code): bool
|
||||
{
|
||||
return strpos($code, '??=') !== false;
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array
|
||||
{
|
||||
// We need to manually iterate and manage a count because we'll change
|
||||
// the tokens array on the way
|
||||
$line = 1;
|
||||
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
||||
if (isset($tokens[$i + 1])) {
|
||||
if ($tokens[$i][0] === T_COALESCE && $tokens[$i + 1] === '=') {
|
||||
array_splice($tokens, $i, 2, [
|
||||
[\T_COALESCE_EQUAL, '??=', $line]
|
||||
]);
|
||||
$c--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (\is_array($tokens[$i])) {
|
||||
$line += substr_count($tokens[$i][1], "\n");
|
||||
}
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array
|
||||
{
|
||||
// ??= was not valid code previously, don't bother.
|
||||
return $tokens;
|
||||
}
|
||||
}
|
31
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php
vendored
Normal file
31
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class EnumTokenEmulator extends KeywordEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_8_1;
|
||||
}
|
||||
|
||||
public function getKeywordString(): string
|
||||
{
|
||||
return 'enum';
|
||||
}
|
||||
|
||||
public function getKeywordToken(): int
|
||||
{
|
||||
return \T_ENUM;
|
||||
}
|
||||
|
||||
protected function isKeywordContext(array $tokens, int $pos): bool
|
||||
{
|
||||
return parent::isKeywordContext($tokens, $pos)
|
||||
&& isset($tokens[$pos + 2])
|
||||
&& $tokens[$pos + 1][0] === \T_WHITESPACE
|
||||
&& $tokens[$pos + 2][0] === \T_STRING;
|
||||
}
|
||||
}
|
44
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php
vendored
Normal file
44
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
class ExplicitOctalEmulator extends TokenEmulator {
|
||||
public function getPhpVersion(): string {
|
||||
return Emulative::PHP_8_1;
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code): bool {
|
||||
return strpos($code, '0o') !== false || strpos($code, '0O') !== false;
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array {
|
||||
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
||||
if ($tokens[$i][0] == \T_LNUMBER && $tokens[$i][1] === '0' &&
|
||||
isset($tokens[$i + 1]) && $tokens[$i + 1][0] == \T_STRING &&
|
||||
preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1][1])
|
||||
) {
|
||||
$tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1][1]);
|
||||
array_splice($tokens, $i, 2, [
|
||||
[$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]],
|
||||
]);
|
||||
$c--;
|
||||
}
|
||||
}
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
private function resolveIntegerOrFloatToken(string $str): int
|
||||
{
|
||||
$str = substr($str, 1);
|
||||
$str = str_replace('_', '', $str);
|
||||
$num = octdec($str);
|
||||
return is_float($num) ? \T_DNUMBER : \T_LNUMBER;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array {
|
||||
// Explicit octals were not legal code previously, don't bother.
|
||||
return $tokens;
|
||||
}
|
||||
}
|
76
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php
vendored
Normal file
76
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class FlexibleDocStringEmulator extends TokenEmulator
|
||||
{
|
||||
const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX'
|
||||
/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n
|
||||
(?:.*\r?\n)*?
|
||||
(?<indentation>\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?<separator>(?:;?[\r\n])?)/x
|
||||
REGEX;
|
||||
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_7_3;
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code) : bool
|
||||
{
|
||||
return strpos($code, '<<<') !== false;
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array
|
||||
{
|
||||
// Handled by preprocessing + fixup.
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array
|
||||
{
|
||||
// Not supported.
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
public function preprocessCode(string $code, array &$patches): string {
|
||||
if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) {
|
||||
// No heredoc/nowdoc found
|
||||
return $code;
|
||||
}
|
||||
|
||||
// Keep track of how much we need to adjust string offsets due to the modifications we
|
||||
// already made
|
||||
$posDelta = 0;
|
||||
foreach ($matches as $match) {
|
||||
$indentation = $match['indentation'][0];
|
||||
$indentationStart = $match['indentation'][1];
|
||||
|
||||
$separator = $match['separator'][0];
|
||||
$separatorStart = $match['separator'][1];
|
||||
|
||||
if ($indentation === '' && $separator !== '') {
|
||||
// Ordinary heredoc/nowdoc
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($indentation !== '') {
|
||||
// Remove indentation
|
||||
$indentationLen = strlen($indentation);
|
||||
$code = substr_replace($code, '', $indentationStart + $posDelta, $indentationLen);
|
||||
$patches[] = [$indentationStart + $posDelta, 'add', $indentation];
|
||||
$posDelta -= $indentationLen;
|
||||
}
|
||||
|
||||
if ($separator === '') {
|
||||
// Insert newline as separator
|
||||
$code = substr_replace($code, "\n", $separatorStart + $posDelta, 0);
|
||||
$patches[] = [$separatorStart + $posDelta, 'remove', "\n"];
|
||||
$posDelta += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
23
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php
vendored
Normal file
23
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class FnTokenEmulator extends KeywordEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_7_4;
|
||||
}
|
||||
|
||||
public function getKeywordString(): string
|
||||
{
|
||||
return 'fn';
|
||||
}
|
||||
|
||||
public function getKeywordToken(): int
|
||||
{
|
||||
return \T_FN;
|
||||
}
|
||||
}
|
62
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php
vendored
Normal file
62
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
abstract class KeywordEmulator extends TokenEmulator
|
||||
{
|
||||
abstract function getKeywordString(): string;
|
||||
abstract function getKeywordToken(): int;
|
||||
|
||||
public function isEmulationNeeded(string $code): bool
|
||||
{
|
||||
return strpos(strtolower($code), $this->getKeywordString()) !== false;
|
||||
}
|
||||
|
||||
protected function isKeywordContext(array $tokens, int $pos): bool
|
||||
{
|
||||
$previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos);
|
||||
return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR;
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array
|
||||
{
|
||||
$keywordString = $this->getKeywordString();
|
||||
foreach ($tokens as $i => $token) {
|
||||
if ($token[0] === T_STRING && strtolower($token[1]) === $keywordString
|
||||
&& $this->isKeywordContext($tokens, $i)) {
|
||||
$tokens[$i][0] = $this->getKeywordToken();
|
||||
}
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $tokens
|
||||
* @return array|string|null
|
||||
*/
|
||||
private function getPreviousNonSpaceToken(array $tokens, int $start)
|
||||
{
|
||||
for ($i = $start - 1; $i >= 0; --$i) {
|
||||
if ($tokens[$i][0] === T_WHITESPACE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return $tokens[$i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array
|
||||
{
|
||||
$keywordToken = $this->getKeywordToken();
|
||||
foreach ($tokens as $i => $token) {
|
||||
if ($token[0] === $keywordToken) {
|
||||
$tokens[$i][0] = \T_STRING;
|
||||
}
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
}
|
23
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php
vendored
Normal file
23
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class MatchTokenEmulator extends KeywordEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_8_0;
|
||||
}
|
||||
|
||||
public function getKeywordString(): string
|
||||
{
|
||||
return 'match';
|
||||
}
|
||||
|
||||
public function getKeywordToken(): int
|
||||
{
|
||||
return \T_MATCH;
|
||||
}
|
||||
}
|
67
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php
vendored
Normal file
67
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class NullsafeTokenEmulator extends TokenEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_8_0;
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code): bool
|
||||
{
|
||||
return strpos($code, '?->') !== false;
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array
|
||||
{
|
||||
// We need to manually iterate and manage a count because we'll change
|
||||
// the tokens array on the way
|
||||
$line = 1;
|
||||
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
||||
if ($tokens[$i] === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] === \T_OBJECT_OPERATOR) {
|
||||
array_splice($tokens, $i, 2, [
|
||||
[\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line]
|
||||
]);
|
||||
$c--;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Handle ?-> inside encapsed string.
|
||||
if ($tokens[$i][0] === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1])
|
||||
&& $tokens[$i - 1][0] === \T_VARIABLE
|
||||
&& preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $tokens[$i][1], $matches)
|
||||
) {
|
||||
$replacement = [
|
||||
[\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line],
|
||||
[\T_STRING, $matches[1], $line],
|
||||
];
|
||||
if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) {
|
||||
$replacement[] = [
|
||||
\T_ENCAPSED_AND_WHITESPACE,
|
||||
\substr($tokens[$i][1], \strlen($matches[0])),
|
||||
$line
|
||||
];
|
||||
}
|
||||
array_splice($tokens, $i, 1, $replacement);
|
||||
$c += \count($replacement) - 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (\is_array($tokens[$i])) {
|
||||
$line += substr_count($tokens[$i][1], "\n");
|
||||
}
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array
|
||||
{
|
||||
// ?-> was not valid code previously, don't bother.
|
||||
return $tokens;
|
||||
}
|
||||
}
|
105
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php
vendored
Normal file
105
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class NumericLiteralSeparatorEmulator extends TokenEmulator
|
||||
{
|
||||
const BIN = '(?:0b[01]+(?:_[01]+)*)';
|
||||
const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)';
|
||||
const DEC = '(?:[0-9]+(?:_[0-9]+)*)';
|
||||
const SIMPLE_FLOAT = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')';
|
||||
const EXP = '(?:e[+-]?' . self::DEC . ')';
|
||||
const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')';
|
||||
const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA';
|
||||
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_7_4;
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code) : bool
|
||||
{
|
||||
return preg_match('~[0-9]_[0-9]~', $code)
|
||||
|| preg_match('~0x[0-9a-f]+_[0-9a-f]~i', $code);
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array
|
||||
{
|
||||
// We need to manually iterate and manage a count because we'll change
|
||||
// the tokens array on the way
|
||||
$codeOffset = 0;
|
||||
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
||||
$token = $tokens[$i];
|
||||
$tokenLen = \strlen(\is_array($token) ? $token[1] : $token);
|
||||
|
||||
if ($token[0] !== T_LNUMBER && $token[0] !== T_DNUMBER) {
|
||||
$codeOffset += $tokenLen;
|
||||
continue;
|
||||
}
|
||||
|
||||
$res = preg_match(self::NUMBER, $code, $matches, 0, $codeOffset);
|
||||
assert($res, "No number at number token position");
|
||||
|
||||
$match = $matches[0];
|
||||
$matchLen = \strlen($match);
|
||||
if ($matchLen === $tokenLen) {
|
||||
// Original token already holds the full number.
|
||||
$codeOffset += $tokenLen;
|
||||
continue;
|
||||
}
|
||||
|
||||
$tokenKind = $this->resolveIntegerOrFloatToken($match);
|
||||
$newTokens = [[$tokenKind, $match, $token[2]]];
|
||||
|
||||
$numTokens = 1;
|
||||
$len = $tokenLen;
|
||||
while ($matchLen > $len) {
|
||||
$nextToken = $tokens[$i + $numTokens];
|
||||
$nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken;
|
||||
$nextTokenLen = \strlen($nextTokenText);
|
||||
|
||||
$numTokens++;
|
||||
if ($matchLen < $len + $nextTokenLen) {
|
||||
// Split trailing characters into a partial token.
|
||||
assert(is_array($nextToken), "Partial token should be an array token");
|
||||
$partialText = substr($nextTokenText, $matchLen - $len);
|
||||
$newTokens[] = [$nextToken[0], $partialText, $nextToken[2]];
|
||||
break;
|
||||
}
|
||||
|
||||
$len += $nextTokenLen;
|
||||
}
|
||||
|
||||
array_splice($tokens, $i, $numTokens, $newTokens);
|
||||
$c -= $numTokens - \count($newTokens);
|
||||
$codeOffset += $matchLen;
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
private function resolveIntegerOrFloatToken(string $str): int
|
||||
{
|
||||
$str = str_replace('_', '', $str);
|
||||
|
||||
if (stripos($str, '0b') === 0) {
|
||||
$num = bindec($str);
|
||||
} elseif (stripos($str, '0x') === 0) {
|
||||
$num = hexdec($str);
|
||||
} elseif (stripos($str, '0') === 0 && ctype_digit($str)) {
|
||||
$num = octdec($str);
|
||||
} else {
|
||||
$num = +$str;
|
||||
}
|
||||
|
||||
return is_float($num) ? T_DNUMBER : T_LNUMBER;
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array
|
||||
{
|
||||
// Numeric separators were not legal code previously, don't bother.
|
||||
return $tokens;
|
||||
}
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
use PhpParser\Lexer\Emulative;
|
||||
|
||||
final class ReadonlyTokenEmulator extends KeywordEmulator
|
||||
{
|
||||
public function getPhpVersion(): string
|
||||
{
|
||||
return Emulative::PHP_8_1;
|
||||
}
|
||||
|
||||
public function getKeywordString(): string
|
||||
{
|
||||
return 'readonly';
|
||||
}
|
||||
|
||||
public function getKeywordToken(): int
|
||||
{
|
||||
return \T_READONLY;
|
||||
}
|
||||
|
||||
protected function isKeywordContext(array $tokens, int $pos): bool
|
||||
{
|
||||
if (!parent::isKeywordContext($tokens, $pos)) {
|
||||
return false;
|
||||
}
|
||||
// Support "function readonly("
|
||||
return !(isset($tokens[$pos + 1]) &&
|
||||
($tokens[$pos + 1][0] === '(' ||
|
||||
($tokens[$pos + 1][0] === \T_WHITESPACE &&
|
||||
isset($tokens[$pos + 2]) &&
|
||||
$tokens[$pos + 2][0] === '(')));
|
||||
}
|
||||
}
|
36
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php
vendored
Normal file
36
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
/**
|
||||
* Reverses emulation direction of the inner emulator.
|
||||
*/
|
||||
final class ReverseEmulator extends TokenEmulator
|
||||
{
|
||||
/** @var TokenEmulator Inner emulator */
|
||||
private $emulator;
|
||||
|
||||
public function __construct(TokenEmulator $emulator) {
|
||||
$this->emulator = $emulator;
|
||||
}
|
||||
|
||||
public function getPhpVersion(): string {
|
||||
return $this->emulator->getPhpVersion();
|
||||
}
|
||||
|
||||
public function isEmulationNeeded(string $code): bool {
|
||||
return $this->emulator->isEmulationNeeded($code);
|
||||
}
|
||||
|
||||
public function emulate(string $code, array $tokens): array {
|
||||
return $this->emulator->reverseEmulate($code, $tokens);
|
||||
}
|
||||
|
||||
public function reverseEmulate(string $code, array $tokens): array {
|
||||
return $this->emulator->emulate($code, $tokens);
|
||||
}
|
||||
|
||||
public function preprocessCode(string $code, array &$patches): string {
|
||||
return $code;
|
||||
}
|
||||
}
|
25
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php
vendored
Normal file
25
vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Lexer\TokenEmulator;
|
||||
|
||||
/** @internal */
|
||||
abstract class TokenEmulator
|
||||
{
|
||||
abstract public function getPhpVersion(): string;
|
||||
|
||||
abstract public function isEmulationNeeded(string $code): bool;
|
||||
|
||||
/**
|
||||
* @return array Modified Tokens
|
||||
*/
|
||||
abstract public function emulate(string $code, array $tokens): array;
|
||||
|
||||
/**
|
||||
* @return array Modified Tokens
|
||||
*/
|
||||
abstract public function reverseEmulate(string $code, array $tokens): array;
|
||||
|
||||
public function preprocessCode(string $code, array &$patches): string {
|
||||
return $code;
|
||||
}
|
||||
}
|
285
vendor/nikic/php-parser/lib/PhpParser/NameContext.php
vendored
Normal file
285
vendor/nikic/php-parser/lib/PhpParser/NameContext.php
vendored
Normal file
@ -0,0 +1,285 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt;
|
||||
|
||||
class NameContext
|
||||
{
|
||||
/** @var null|Name Current namespace */
|
||||
protected $namespace;
|
||||
|
||||
/** @var Name[][] Map of format [aliasType => [aliasName => originalName]] */
|
||||
protected $aliases = [];
|
||||
|
||||
/** @var Name[][] Same as $aliases but preserving original case */
|
||||
protected $origAliases = [];
|
||||
|
||||
/** @var ErrorHandler Error handler */
|
||||
protected $errorHandler;
|
||||
|
||||
/**
|
||||
* Create a name context.
|
||||
*
|
||||
* @param ErrorHandler $errorHandler Error handling used to report errors
|
||||
*/
|
||||
public function __construct(ErrorHandler $errorHandler) {
|
||||
$this->errorHandler = $errorHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a new namespace.
|
||||
*
|
||||
* This also resets the alias table.
|
||||
*
|
||||
* @param Name|null $namespace Null is the global namespace
|
||||
*/
|
||||
public function startNamespace(Name $namespace = null) {
|
||||
$this->namespace = $namespace;
|
||||
$this->origAliases = $this->aliases = [
|
||||
Stmt\Use_::TYPE_NORMAL => [],
|
||||
Stmt\Use_::TYPE_FUNCTION => [],
|
||||
Stmt\Use_::TYPE_CONSTANT => [],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an alias / import.
|
||||
*
|
||||
* @param Name $name Original name
|
||||
* @param string $aliasName Aliased name
|
||||
* @param int $type One of Stmt\Use_::TYPE_*
|
||||
* @param array $errorAttrs Attributes to use to report an error
|
||||
*/
|
||||
public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) {
|
||||
// Constant names are case sensitive, everything else case insensitive
|
||||
if ($type === Stmt\Use_::TYPE_CONSTANT) {
|
||||
$aliasLookupName = $aliasName;
|
||||
} else {
|
||||
$aliasLookupName = strtolower($aliasName);
|
||||
}
|
||||
|
||||
if (isset($this->aliases[$type][$aliasLookupName])) {
|
||||
$typeStringMap = [
|
||||
Stmt\Use_::TYPE_NORMAL => '',
|
||||
Stmt\Use_::TYPE_FUNCTION => 'function ',
|
||||
Stmt\Use_::TYPE_CONSTANT => 'const ',
|
||||
];
|
||||
|
||||
$this->errorHandler->handleError(new Error(
|
||||
sprintf(
|
||||
'Cannot use %s%s as %s because the name is already in use',
|
||||
$typeStringMap[$type], $name, $aliasName
|
||||
),
|
||||
$errorAttrs
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
$this->aliases[$type][$aliasLookupName] = $name;
|
||||
$this->origAliases[$type][$aliasName] = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current namespace.
|
||||
*
|
||||
* @return null|Name Namespace (or null if global namespace)
|
||||
*/
|
||||
public function getNamespace() {
|
||||
return $this->namespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get resolved name.
|
||||
*
|
||||
* @param Name $name Name to resolve
|
||||
* @param int $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT}
|
||||
*
|
||||
* @return null|Name Resolved name, or null if static resolution is not possible
|
||||
*/
|
||||
public function getResolvedName(Name $name, int $type) {
|
||||
// don't resolve special class names
|
||||
if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) {
|
||||
if (!$name->isUnqualified()) {
|
||||
$this->errorHandler->handleError(new Error(
|
||||
sprintf("'\\%s' is an invalid class name", $name->toString()),
|
||||
$name->getAttributes()
|
||||
));
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
||||
// fully qualified names are already resolved
|
||||
if ($name->isFullyQualified()) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
// Try to resolve aliases
|
||||
if (null !== $resolvedName = $this->resolveAlias($name, $type)) {
|
||||
return $resolvedName;
|
||||
}
|
||||
|
||||
if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) {
|
||||
if (null === $this->namespace) {
|
||||
// outside of a namespace unaliased unqualified is same as fully qualified
|
||||
return new FullyQualified($name, $name->getAttributes());
|
||||
}
|
||||
|
||||
// Cannot resolve statically
|
||||
return null;
|
||||
}
|
||||
|
||||
// if no alias exists prepend current namespace
|
||||
return FullyQualified::concat($this->namespace, $name, $name->getAttributes());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get resolved class name.
|
||||
*
|
||||
* @param Name $name Class ame to resolve
|
||||
*
|
||||
* @return Name Resolved name
|
||||
*/
|
||||
public function getResolvedClassName(Name $name) : Name {
|
||||
return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get possible ways of writing a fully qualified name (e.g., by making use of aliases).
|
||||
*
|
||||
* @param string $name Fully-qualified name (without leading namespace separator)
|
||||
* @param int $type One of Stmt\Use_::TYPE_*
|
||||
*
|
||||
* @return Name[] Possible representations of the name
|
||||
*/
|
||||
public function getPossibleNames(string $name, int $type) : array {
|
||||
$lcName = strtolower($name);
|
||||
|
||||
if ($type === Stmt\Use_::TYPE_NORMAL) {
|
||||
// self, parent and static must always be unqualified
|
||||
if ($lcName === "self" || $lcName === "parent" || $lcName === "static") {
|
||||
return [new Name($name)];
|
||||
}
|
||||
}
|
||||
|
||||
// Collect possible ways to write this name, starting with the fully-qualified name
|
||||
$possibleNames = [new FullyQualified($name)];
|
||||
|
||||
if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) {
|
||||
// Make sure there is no alias that makes the normally namespace-relative name
|
||||
// into something else
|
||||
if (null === $this->resolveAlias($nsRelativeName, $type)) {
|
||||
$possibleNames[] = $nsRelativeName;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for relevant namespace use statements
|
||||
foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) {
|
||||
$lcOrig = $orig->toLowerString();
|
||||
if (0 === strpos($lcName, $lcOrig . '\\')) {
|
||||
$possibleNames[] = new Name($alias . substr($name, strlen($lcOrig)));
|
||||
}
|
||||
}
|
||||
|
||||
// Check for relevant type-specific use statements
|
||||
foreach ($this->origAliases[$type] as $alias => $orig) {
|
||||
if ($type === Stmt\Use_::TYPE_CONSTANT) {
|
||||
// Constants are are complicated-sensitive
|
||||
$normalizedOrig = $this->normalizeConstName($orig->toString());
|
||||
if ($normalizedOrig === $this->normalizeConstName($name)) {
|
||||
$possibleNames[] = new Name($alias);
|
||||
}
|
||||
} else {
|
||||
// Everything else is case-insensitive
|
||||
if ($orig->toLowerString() === $lcName) {
|
||||
$possibleNames[] = new Name($alias);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $possibleNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shortest representation of this fully-qualified name.
|
||||
*
|
||||
* @param string $name Fully-qualified name (without leading namespace separator)
|
||||
* @param int $type One of Stmt\Use_::TYPE_*
|
||||
*
|
||||
* @return Name Shortest representation
|
||||
*/
|
||||
public function getShortName(string $name, int $type) : Name {
|
||||
$possibleNames = $this->getPossibleNames($name, $type);
|
||||
|
||||
// Find shortest name
|
||||
$shortestName = null;
|
||||
$shortestLength = \INF;
|
||||
foreach ($possibleNames as $possibleName) {
|
||||
$length = strlen($possibleName->toCodeString());
|
||||
if ($length < $shortestLength) {
|
||||
$shortestName = $possibleName;
|
||||
$shortestLength = $length;
|
||||
}
|
||||
}
|
||||
|
||||
return $shortestName;
|
||||
}
|
||||
|
||||
private function resolveAlias(Name $name, $type) {
|
||||
$firstPart = $name->getFirst();
|
||||
|
||||
if ($name->isQualified()) {
|
||||
// resolve aliases for qualified names, always against class alias table
|
||||
$checkName = strtolower($firstPart);
|
||||
if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) {
|
||||
$alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName];
|
||||
return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes());
|
||||
}
|
||||
} elseif ($name->isUnqualified()) {
|
||||
// constant aliases are case-sensitive, function aliases case-insensitive
|
||||
$checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart);
|
||||
if (isset($this->aliases[$type][$checkName])) {
|
||||
// resolve unqualified aliases
|
||||
return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes());
|
||||
}
|
||||
}
|
||||
|
||||
// No applicable aliases
|
||||
return null;
|
||||
}
|
||||
|
||||
private function getNamespaceRelativeName(string $name, string $lcName, int $type) {
|
||||
if (null === $this->namespace) {
|
||||
return new Name($name);
|
||||
}
|
||||
|
||||
if ($type === Stmt\Use_::TYPE_CONSTANT) {
|
||||
// The constants true/false/null always resolve to the global symbols, even inside a
|
||||
// namespace, so they may be used without qualification
|
||||
if ($lcName === "true" || $lcName === "false" || $lcName === "null") {
|
||||
return new Name($name);
|
||||
}
|
||||
}
|
||||
|
||||
$namespacePrefix = strtolower($this->namespace . '\\');
|
||||
if (0 === strpos($lcName, $namespacePrefix)) {
|
||||
return new Name(substr($name, strlen($namespacePrefix)));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private function normalizeConstName(string $name) {
|
||||
$nsSep = strrpos($name, '\\');
|
||||
if (false === $nsSep) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
// Constants have case-insensitive namespace and case-sensitive short-name
|
||||
$ns = substr($name, 0, $nsSep);
|
||||
$shortName = substr($name, $nsSep + 1);
|
||||
return strtolower($ns) . '\\' . $shortName;
|
||||
}
|
||||
}
|
151
vendor/nikic/php-parser/lib/PhpParser/Node.php
vendored
Normal file
151
vendor/nikic/php-parser/lib/PhpParser/Node.php
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
interface Node
|
||||
{
|
||||
/**
|
||||
* Gets the type of the node.
|
||||
*
|
||||
* @return string Type of the node
|
||||
*/
|
||||
public function getType() : string;
|
||||
|
||||
/**
|
||||
* Gets the names of the sub nodes.
|
||||
*
|
||||
* @return array Names of sub nodes
|
||||
*/
|
||||
public function getSubNodeNames() : array;
|
||||
|
||||
/**
|
||||
* Gets line the node started in (alias of getStartLine).
|
||||
*
|
||||
* @return int Start line (or -1 if not available)
|
||||
*/
|
||||
public function getLine() : int;
|
||||
|
||||
/**
|
||||
* Gets line the node started in.
|
||||
*
|
||||
* Requires the 'startLine' attribute to be enabled in the lexer (enabled by default).
|
||||
*
|
||||
* @return int Start line (or -1 if not available)
|
||||
*/
|
||||
public function getStartLine() : int;
|
||||
|
||||
/**
|
||||
* Gets the line the node ended in.
|
||||
*
|
||||
* Requires the 'endLine' attribute to be enabled in the lexer (enabled by default).
|
||||
*
|
||||
* @return int End line (or -1 if not available)
|
||||
*/
|
||||
public function getEndLine() : int;
|
||||
|
||||
/**
|
||||
* Gets the token offset of the first token that is part of this node.
|
||||
*
|
||||
* The offset is an index into the array returned by Lexer::getTokens().
|
||||
*
|
||||
* Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default).
|
||||
*
|
||||
* @return int Token start position (or -1 if not available)
|
||||
*/
|
||||
public function getStartTokenPos() : int;
|
||||
|
||||
/**
|
||||
* Gets the token offset of the last token that is part of this node.
|
||||
*
|
||||
* The offset is an index into the array returned by Lexer::getTokens().
|
||||
*
|
||||
* Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default).
|
||||
*
|
||||
* @return int Token end position (or -1 if not available)
|
||||
*/
|
||||
public function getEndTokenPos() : int;
|
||||
|
||||
/**
|
||||
* Gets the file offset of the first character that is part of this node.
|
||||
*
|
||||
* Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default).
|
||||
*
|
||||
* @return int File start position (or -1 if not available)
|
||||
*/
|
||||
public function getStartFilePos() : int;
|
||||
|
||||
/**
|
||||
* Gets the file offset of the last character that is part of this node.
|
||||
*
|
||||
* Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default).
|
||||
*
|
||||
* @return int File end position (or -1 if not available)
|
||||
*/
|
||||
public function getEndFilePos() : int;
|
||||
|
||||
/**
|
||||
* Gets all comments directly preceding this node.
|
||||
*
|
||||
* The comments are also available through the "comments" attribute.
|
||||
*
|
||||
* @return Comment[]
|
||||
*/
|
||||
public function getComments() : array;
|
||||
|
||||
/**
|
||||
* Gets the doc comment of the node.
|
||||
*
|
||||
* @return null|Comment\Doc Doc comment object or null
|
||||
*/
|
||||
public function getDocComment();
|
||||
|
||||
/**
|
||||
* Sets the doc comment of the node.
|
||||
*
|
||||
* This will either replace an existing doc comment or add it to the comments array.
|
||||
*
|
||||
* @param Comment\Doc $docComment Doc comment to set
|
||||
*/
|
||||
public function setDocComment(Comment\Doc $docComment);
|
||||
|
||||
/**
|
||||
* Sets an attribute on a node.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function setAttribute(string $key, $value);
|
||||
|
||||
/**
|
||||
* Returns whether an attribute exists.
|
||||
*
|
||||
* @param string $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAttribute(string $key) : bool;
|
||||
|
||||
/**
|
||||
* Returns the value of an attribute.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAttribute(string $key, $default = null);
|
||||
|
||||
/**
|
||||
* Returns all the attributes of this node.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAttributes() : array;
|
||||
|
||||
/**
|
||||
* Replaces all the attributes of this node.
|
||||
*
|
||||
* @param array $attributes
|
||||
*/
|
||||
public function setAttributes(array $attributes);
|
||||
}
|
46
vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php
vendored
Normal file
46
vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node\VariadicPlaceholder;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Arg extends NodeAbstract
|
||||
{
|
||||
/** @var Identifier|null Parameter name (for named parameters) */
|
||||
public $name;
|
||||
/** @var Expr Value to pass */
|
||||
public $value;
|
||||
/** @var bool Whether to pass by ref */
|
||||
public $byRef;
|
||||
/** @var bool Whether to unpack the argument */
|
||||
public $unpack;
|
||||
|
||||
/**
|
||||
* Constructs a function call argument node.
|
||||
*
|
||||
* @param Expr $value Value to pass
|
||||
* @param bool $byRef Whether to pass by ref
|
||||
* @param bool $unpack Whether to unpack the argument
|
||||
* @param array $attributes Additional attributes
|
||||
* @param Identifier|null $name Parameter name (for named parameters)
|
||||
*/
|
||||
public function __construct(
|
||||
Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [],
|
||||
Identifier $name = null
|
||||
) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
$this->byRef = $byRef;
|
||||
$this->unpack = $unpack;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['name', 'value', 'byRef', 'unpack'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Arg';
|
||||
}
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Attribute extends NodeAbstract
|
||||
{
|
||||
/** @var Name Attribute name */
|
||||
public $name;
|
||||
|
||||
/** @var Arg[] Attribute arguments */
|
||||
public $args;
|
||||
|
||||
/**
|
||||
* @param Node\Name $name Attribute name
|
||||
* @param Arg[] $args Attribute arguments
|
||||
* @param array $attributes Additional node attributes
|
||||
*/
|
||||
public function __construct(Name $name, array $args = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = $name;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['name', 'args'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Attribute';
|
||||
}
|
||||
}
|
29
vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php
vendored
Normal file
29
vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class AttributeGroup extends NodeAbstract
|
||||
{
|
||||
/** @var Attribute[] Attributes */
|
||||
public $attrs;
|
||||
|
||||
/**
|
||||
* @param Attribute[] $attrs PHP attributes
|
||||
* @param array $attributes Additional node attributes
|
||||
*/
|
||||
public function __construct(array $attrs, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->attrs = $attrs;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['attrs'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'AttributeGroup';
|
||||
}
|
||||
}
|
14
vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php
vendored
Normal file
14
vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
/**
|
||||
* This is a base class for complex types, including nullable types and union types.
|
||||
*
|
||||
* It does not provide any shared behavior and exists only for type-checking purposes.
|
||||
*/
|
||||
abstract class ComplexType extends NodeAbstract
|
||||
{
|
||||
}
|
37
vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
vendored
Normal file
37
vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
class Const_ extends NodeAbstract
|
||||
{
|
||||
/** @var Identifier Name */
|
||||
public $name;
|
||||
/** @var Expr Value */
|
||||
public $value;
|
||||
|
||||
/** @var Name|null Namespaced name (if using NameResolver) */
|
||||
public $namespacedName;
|
||||
|
||||
/**
|
||||
* Constructs a const node for use in class const and const statements.
|
||||
*
|
||||
* @param string|Identifier $name Name
|
||||
* @param Expr $value Value
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, Expr $value, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->name = \is_string($name) ? new Identifier($name) : $name;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['name', 'value'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Const';
|
||||
}
|
||||
}
|
9
vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
vendored
Normal file
9
vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node;
|
||||
|
||||
use PhpParser\NodeAbstract;
|
||||
|
||||
abstract class Expr extends NodeAbstract
|
||||
{
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class ArrayDimFetch extends Expr
|
||||
{
|
||||
/** @var Expr Variable */
|
||||
public $var;
|
||||
/** @var null|Expr Array index / dim */
|
||||
public $dim;
|
||||
|
||||
/**
|
||||
* Constructs an array index fetch node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param null|Expr $dim Array index / dim
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $dim = null, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->dim = $dim;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['var', 'dim'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_ArrayDimFetch';
|
||||
}
|
||||
}
|
41
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
vendored
Normal file
41
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class ArrayItem extends Expr
|
||||
{
|
||||
/** @var null|Expr Key */
|
||||
public $key;
|
||||
/** @var Expr Value */
|
||||
public $value;
|
||||
/** @var bool Whether to assign by reference */
|
||||
public $byRef;
|
||||
/** @var bool Whether to unpack the argument */
|
||||
public $unpack;
|
||||
|
||||
/**
|
||||
* Constructs an array item node.
|
||||
*
|
||||
* @param Expr $value Value
|
||||
* @param null|Expr $key Key
|
||||
* @param bool $byRef Whether to assign by reference
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) {
|
||||
$this->attributes = $attributes;
|
||||
$this->key = $key;
|
||||
$this->value = $value;
|
||||
$this->byRef = $byRef;
|
||||
$this->unpack = $unpack;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['key', 'value', 'byRef', 'unpack'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_ArrayItem';
|
||||
}
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Array_ extends Expr
|
||||
{
|
||||
// For use in "kind" attribute
|
||||
const KIND_LONG = 1; // array() syntax
|
||||
const KIND_SHORT = 2; // [] syntax
|
||||
|
||||
/** @var (ArrayItem|null)[] Items */
|
||||
public $items;
|
||||
|
||||
/**
|
||||
* Constructs an array node.
|
||||
*
|
||||
* @param (ArrayItem|null)[] $items Items of the array
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $items = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->items = $items;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['items'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_Array';
|
||||
}
|
||||
}
|
79
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php
vendored
Normal file
79
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\FunctionLike;
|
||||
|
||||
class ArrowFunction extends Expr implements FunctionLike
|
||||
{
|
||||
/** @var bool */
|
||||
public $static;
|
||||
|
||||
/** @var bool */
|
||||
public $byRef;
|
||||
|
||||
/** @var Node\Param[] */
|
||||
public $params = [];
|
||||
|
||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType */
|
||||
public $returnType;
|
||||
|
||||
/** @var Expr */
|
||||
public $expr;
|
||||
/** @var Node\AttributeGroup[] */
|
||||
public $attrGroups;
|
||||
|
||||
/**
|
||||
* @param array $subNodes Array of the following optional subnodes:
|
||||
* 'static' => false : Whether the closure is static
|
||||
* 'byRef' => false : Whether to return by reference
|
||||
* 'params' => array() : Parameters
|
||||
* 'returnType' => null : Return type
|
||||
* 'expr' => Expr : Expression body
|
||||
* 'attrGroups' => array() : PHP attribute groups
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $subNodes = [], array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->static = $subNodes['static'] ?? false;
|
||||
$this->byRef = $subNodes['byRef'] ?? false;
|
||||
$this->params = $subNodes['params'] ?? [];
|
||||
$returnType = $subNodes['returnType'] ?? null;
|
||||
$this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
|
||||
$this->expr = $subNodes['expr'];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr'];
|
||||
}
|
||||
|
||||
public function returnsByRef() : bool {
|
||||
return $this->byRef;
|
||||
}
|
||||
|
||||
public function getParams() : array {
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
public function getReturnType() {
|
||||
return $this->returnType;
|
||||
}
|
||||
|
||||
public function getAttrGroups() : array {
|
||||
return $this->attrGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Node\Stmt\Return_[]
|
||||
*/
|
||||
public function getStmts() : array {
|
||||
return [new Node\Stmt\Return_($this->expr)];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_ArrowFunction';
|
||||
}
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class Assign extends Expr
|
||||
{
|
||||
/** @var Expr Variable */
|
||||
public $var;
|
||||
/** @var Expr Expression */
|
||||
public $expr;
|
||||
|
||||
/**
|
||||
* Constructs an assignment node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param Expr $expr Expression
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['var', 'expr'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_Assign';
|
||||
}
|
||||
}
|
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
vendored
Normal file
30
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
abstract class AssignOp extends Expr
|
||||
{
|
||||
/** @var Expr Variable */
|
||||
public $var;
|
||||
/** @var Expr Expression */
|
||||
public $expr;
|
||||
|
||||
/**
|
||||
* Constructs a compound assignment operation node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param Expr $expr Expression
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['var', 'expr'];
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class BitwiseAnd extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_BitwiseAnd';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class BitwiseOr extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_BitwiseOr';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class BitwiseXor extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_BitwiseXor';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Coalesce extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Coalesce';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Concat extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Concat';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Div extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Div';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Minus extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Minus';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Mod extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Mod';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Mul extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Mul';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Plus extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Plus';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Pow extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Pow';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class ShiftLeft extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_ShiftLeft';
|
||||
}
|
||||
}
|
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class ShiftRight extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_ShiftRight';
|
||||
}
|
||||
}
|
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php
vendored
Normal file
34
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
class AssignRef extends Expr
|
||||
{
|
||||
/** @var Expr Variable reference is assigned to */
|
||||
public $var;
|
||||
/** @var Expr Variable which is referenced */
|
||||
public $expr;
|
||||
|
||||
/**
|
||||
* Constructs an assignment node.
|
||||
*
|
||||
* @param Expr $var Variable
|
||||
* @param Expr $expr Expression
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->var = $var;
|
||||
$this->expr = $expr;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['var', 'expr'];
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignRef';
|
||||
}
|
||||
}
|
40
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
vendored
Normal file
40
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
|
||||
abstract class BinaryOp extends Expr
|
||||
{
|
||||
/** @var Expr The left hand side expression */
|
||||
public $left;
|
||||
/** @var Expr The right hand side expression */
|
||||
public $right;
|
||||
|
||||
/**
|
||||
* Constructs a binary operator node.
|
||||
*
|
||||
* @param Expr $left The left hand side expression
|
||||
* @param Expr $right The right hand side expression
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(Expr $left, Expr $right, array $attributes = []) {
|
||||
$this->attributes = $attributes;
|
||||
$this->left = $left;
|
||||
$this->right = $right;
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['left', 'right'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the operator sigil for this binary operation.
|
||||
*
|
||||
* In the case there are multiple possible sigils for an operator, this method does not
|
||||
* necessarily return the one used in the parsed code.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getOperatorSigil() : string;
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BitwiseAnd extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '&';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_BitwiseAnd';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BitwiseOr extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '|';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_BitwiseOr';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BitwiseXor extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '^';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_BitwiseXor';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BooleanAnd extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '&&';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_BooleanAnd';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class BooleanOr extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '||';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_BooleanOr';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Coalesce extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '??';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_Coalesce';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Concat extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '.';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_Concat';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Div extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '/';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_Div';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Equal extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '==';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_Equal';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Greater extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '>';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_Greater';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class GreaterOrEqual extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '>=';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_GreaterOrEqual';
|
||||
}
|
||||
}
|
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
vendored
Normal file
16
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
||||
class Identical extends BinaryOp
|
||||
{
|
||||
public function getOperatorSigil() : string {
|
||||
return '===';
|
||||
}
|
||||
|
||||
public function getType() : string {
|
||||
return 'Expr_BinaryOp_Identical';
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user