stable

Clone or download

Read-only

Split files that contains more than one class

PSR-1 says that "each class is in a file by itself": https://www.php-fig.org/psr/psr-1/#3-namespace-and-class-names Technical refactoring, no functional changes. Only the minimal has been done. The existing issues inside the classes has not been fix (ex: private method named prefixed by underscore). This is small step towards PSR-4 compliance. Psalm baseline has been updated. Work has been mostly automated by usage of psr4-switcher[0] and rector[1]. Manual adjustment has been made for copyright headers and phpcs:ignore on the classname. Notes: * docman will be done in a dedicated commit * phpwiki has the same class defined twice in two different files, I'm not sure we should touch the whole lib anyway. Part of request #16620: One class per file [0] https://github.com/migrify/psr4-switcher [1] https://github.com/rectorphp/rector/blob/master/docs/rector_rules_overview.md#multipleclassfiletopsr4classesrector Change-Id: I19a30a3f1985c70f485902cf34f2f48a1730cbe9

Modified Files

Name
M plugins/ldap/include/LDAPResult.class.php +2 −164 Go to diff View file
A plugins/ldap/include/LDAPResultIterator.php +182 −0 Go to diff View file
D src/common/FRS/Exceptions.class.php +0 −126 Go to diff View file
A src/common/FRS/FRSException.php +25 −0 Go to diff View file
A src/common/FRS/FRSFileDbException.php +35 −0 Go to diff View file
A src/common/FRS/FRSFileException.php +25 −0 Go to diff View file
A src/common/FRS/FRSFileExistsException.php +35 −0 Go to diff View file
M src/common/FRS/FRSFileFactory.class.php +1 −2 Go to diff View file
A src/common/FRS/FRSFileForgeException.php +35 −0 Go to diff View file
A src/common/FRS/FRSFileIllegalNameException.php +35 −0 Go to diff View file
A src/common/FRS/FRSFileInvalidNameException.php +35 −0 Go to diff View file
A src/common/FRS/FRSFileMD5SumException.php +35 −0 Go to diff View file
A src/common/FRS/FRSFileToBeRestoredException.php +35 −0 Go to diff View file
A src/common/include/Codendi_BlockDiffFormatter.php +71 −0 Go to diff View file
D src/common/include/Codendi_Diff.class.php +0 −1268 Go to diff View file
A src/common/include/Codendi_Diff.php +160 −0 Go to diff View file
A src/common/include/Codendi_DiffEngine.php +418 −0 Go to diff View file
A src/common/include/Codendi_DiffFormatter.php +171 −0 Go to diff View file
A src/common/include/Codendi_DiffOp.php +47 −0 Go to diff View file
A src/common/include/Codendi_DiffOp_Add.php +36 −0 Go to diff View file
A src/common/include/Codendi_DiffOp_Change.php +36 −0 Go to diff View file
A src/common/include/Codendi_DiffOp_Copy.php +39 −0 Go to diff View file
A src/common/include/Codendi_DiffOp_Delete.php +36 −0 Go to diff View file
A src/common/include/Codendi_HWLDF_WordAccumulator.php +86 −0 Go to diff View file
A src/common/include/Codendi_HtmlUnifiedDiffFormatter.php +108 −0 Go to diff View file
A src/common/include/Codendi_MappedDiff.php +73 −0 Go to diff View file
A src/common/include/Codendi_UnifiedDiffFormatter.php +59 −0 Go to diff View file
A src/common/include/Codendi_WordLevelDiff.php +64 −0 Go to diff View file
R src/common/include/MIME.class.php Go to diff View file
A src/common/include/MIME_MagicRule.php +37 −0 Go to diff View file
D src/common/valid/Rule.class.php +0 −923 Go to diff View file
A src/common/valid/Rule.php +53 −0 Go to diff View file
A src/common/valid/Rule_Array.php +33 −0 Go to diff View file
A src/common/valid/Rule_Comparator.php +37 −0 Go to diff View file
A src/common/valid/Rule_Date.php +41 −0 Go to diff View file
A src/common/valid/Rule_Date_Time.php +34 −0 Go to diff View file
A src/common/valid/Rule_Email.php +76 −0 Go to diff View file
A src/common/valid/Rule_FRSFileName.php +45 −0 Go to diff View file
A src/common/valid/Rule_File.php +74 −0 Go to diff View file
A src/common/valid/Rule_GreaterOrEqual.php +33 −0 Go to diff View file
A src/common/valid/Rule_GreaterThan.php +33 −0 Go to diff View file
A src/common/valid/Rule_Int.php +57 −0 Go to diff View file
A src/common/valid/Rule_LessThan.php +33 −0 Go to diff View file
A src/common/valid/Rule_NoCr.php +36 −0 Go to diff View file
A src/common/valid/Rule_ProjectFullName.php +52 −0 Go to diff View file
A src/common/valid/Rule_ProjectName.php +127 −0 Go to diff View file
A src/common/valid/Rule_RealName.php +50 −0 Go to diff View file
A src/common/valid/Rule_Regexp.php +39 −0 Go to diff View file
A src/common/valid/Rule_String.php +33 −0 Go to diff View file
A src/common/valid/Rule_Timestamp.php +31 −0 Go to diff View file
A src/common/valid/Rule_UserName.php +306 −0 Go to diff View file
A src/common/valid/Rule_WhiteList.php +38 −0 Go to diff View file
A src/common/valid/Rule_lessOrEqual.php +33 −0 Go to diff View file
D src/common/valid/ValidFactory.class.php +0 −348 Go to diff View file
A src/common/valid/ValidFactory.php +61 −0 Go to diff View file
A src/common/valid/Valid_Array.php +34 −0 Go to diff View file
A src/common/valid/Valid_Email.php +44 −0 Go to diff View file
A src/common/valid/Valid_FTPURI.php +35 −0 Go to diff View file
A src/common/valid/Valid_File.php +62 −0 Go to diff View file
A src/common/valid/Valid_GenericUserNameSuffix.php +40 −0 Go to diff View file
A src/common/valid/Valid_GroupId.php +40 −0 Go to diff View file
A src/common/valid/Valid_HTTPSURI.php +34 −0 Go to diff View file
A src/common/valid/Valid_HTTPURI.php +34 −0 Go to diff View file
A src/common/valid/Valid_Int.php +34 −0 Go to diff View file
A src/common/valid/Valid_LocalURI.php +35 −0 Go to diff View file
A src/common/valid/Valid_MailtoURI.php +34 −0 Go to diff View file
A src/common/valid/Valid_Numeric.php +34 −0 Go to diff View file
A src/common/valid/Valid_Pv.php +38 −0 Go to diff View file
A src/common/valid/Valid_RealNameFormat.php +35 −0 Go to diff View file
A src/common/valid/Valid_String.php +34 −0 Go to diff View file
A src/common/valid/Valid_Text.php +34 −0 Go to diff View file
A src/common/valid/Valid_UInt.php +34 −0 Go to diff View file
A src/common/valid/Valid_UserNameFormat.php +37 −0 Go to diff View file
A src/common/valid/Valid_WhiteList.php +34 −0 Go to diff View file
M tests/psalm/psalm.xml +1 −1 Go to diff View file
M tests/psalm/tuleap-baseline.xml +557 −553 Go to diff View file
A tests/unit/common/valid/ValidFactoryTest.php +47 −0 Go to diff View file
M tests/unit/common/valid/ValidHelpersTest.php +1 −16 Go to diff View file