‪TYPO3CMS  9.5
checkIntegrityCsvFixtures Class Reference

Public Member Functions

 setFix (bool $fix)
 
 setFixAll (bool $fixAll)
 
int execute ()
 

Private Member Functions

Symfony Component Finder Finder findCsvFixtures ()
 
string validateCsvFile (string $csvFixture)
 
bool fixCsvFile (string $csvFixture)
 
 getRelativePath (string $fullPath)
 
string formatOutputString (string $filename)
 

Private Attributes

bool $fix = false
 
bool $fixAll = false
 

Detailed Description

Core integrity test script:

Find all CSV files in fixtures and make sure they have the correct column count across all lines in them and fix them if –fix argument is given.

Definition at line 31 of file checkIntegrityCsvFixtures.php.

Member Function Documentation

◆ execute()

int checkIntegrityCsvFixtures::execute ( )

Executes the CGL check. The return value is used directly in the ext() call outside this class.

Returns
‪int

Definition at line 57 of file checkIntegrityCsvFixtures.php.

References $output, findCsvFixtures(), fixCsvFile(), formatOutputString(), getRelativePath(), and validateCsvFile().

◆ findCsvFixtures()

Symfony Component Finder Finder checkIntegrityCsvFixtures::findCsvFixtures ( )
private

Finds all CSV fixtures in TYPO3s core

Returns
‪\Symfony\Component\Finder\Finder

Definition at line 99 of file checkIntegrityCsvFixtures.php.

References $finder.

Referenced by execute().

◆ fixCsvFile()

bool checkIntegrityCsvFixtures::fixCsvFile ( string  $csvFixture)
private

Fix a single CSV file.

Parameters
string$csvFixture
Returns
‪bool True if the file has been changed

Definition at line 145 of file checkIntegrityCsvFixtures.php.

Referenced by execute().

◆ formatOutputString()

string checkIntegrityCsvFixtures::formatOutputString ( string  $filename)
private

Makes the output on CLI a bit more readable

Parameters
string$filename
Returns
‪string

Definition at line 218 of file checkIntegrityCsvFixtures.php.

Referenced by execute().

◆ getRelativePath()

checkIntegrityCsvFixtures::getRelativePath ( string  $fullPath)
private

Definition at line 206 of file checkIntegrityCsvFixtures.php.

Referenced by execute().

◆ setFix()

checkIntegrityCsvFixtures::setFix ( bool  $fix)

Definition at line 41 of file checkIntegrityCsvFixtures.php.

References $fix.

◆ setFixAll()

checkIntegrityCsvFixtures::setFixAll ( bool  $fixAll)

Definition at line 46 of file checkIntegrityCsvFixtures.php.

References $fixAll.

◆ validateCsvFile()

string checkIntegrityCsvFixtures::validateCsvFile ( string  $csvFixture)
private

Checks if a CSV uses the same amount of columns across all lines in that file

Parameters
string$csvFixture
Returns
‪string

Definition at line 116 of file checkIntegrityCsvFixtures.php.

Referenced by execute().

Member Data Documentation

◆ $fix

bool checkIntegrityCsvFixtures::$fix = false
private

True to fix broken files

Definition at line 35 of file checkIntegrityCsvFixtures.php.

Referenced by setFix().

◆ $fixAll

bool checkIntegrityCsvFixtures::$fixAll = false
private

True to drop superfluous comma on all CSV fixture files

Definition at line 39 of file checkIntegrityCsvFixtures.php.

Referenced by setFixAll().