src/Core/Modification.php
public function setResidues(array $residues)
    {
        if (empty($residues)) {
            throw new \InvalidArgumentException('Argument 1 must not be empty.');
        }
        
        foreach ($residues as $residue) {
            if (!preg_match('/^[A-Z]$/', $residue)) {
                throw new \InvalidArgumentException('Argument 1 must be an array of single char values (A-Z). Value passed is ' . $residue);
            }
        }
        
        // Force sort order
        sort($residues);
        
        // Force unique residue positions
        $this->residues = array_combine($residues, $residues);
    }
public function setResidues(array $residues)
    {
        if (empty($residues)) {
            throw new \InvalidArgumentException('Argument 1 must not be empty.');
        }
        
        foreach ($residues as $residue) {
            if (!preg_match('/^[A-Z]$/', $residue)) {
                throw new \InvalidArgumentException('Argument 1 must be an array of single char values (A-Z). Value passed is ' . $residue);
            }
        }
        
        // Force sort order
        sort($residues);
        
        // Force unique residue positions
        $this->residues = array_combine($residues, $residues);
    }
public function setResidues ( array $ residues ) { if ( empty ( $ residues ) ) { throw new \ InvalidArgumentException ( 'Argument 1 must not be empty.' ) ; } foreach ( $ residues as $ residue ) { if ( ! preg_match ( '/^[A-Z]$/' , $ residue ) ) { throw new \ InvalidArgumentException ( 'Argument 1 must be an array of single char values (A-Z). Value passed is ' . $ residue ) ; } } // Force sort order sort ( $ residues ) ; // Force unique residue positions $ this -> residues = array_combine ( $ residues , $ residues ) ; }
Set residues for this modification

@param array $residues
Array of residues this modification may occur on
@throws \InvalidArgumentException If argument 1 is not of type float
Set residues for this modification