private function getColor(array $notes, $noteIndex)
    {
        if (!is_integer($noteIndex) || !array_key_exists($noteIndex, $notes)) {
            return null;
        }

        $noteObj = $notes[$noteIndex];
        if (!is_object($noteObj) || !property_exists($noteObj, 'color')) {
            return null;
        }

        return $noteObj->color;
    }
private function getColor(array $notes, $noteIndex)
    {
        if (!is_integer($noteIndex) || !array_key_exists($noteIndex, $notes)) {
            return null;
        }

        $noteObj = $notes[$noteIndex];
        if (!is_object($noteObj) || !property_exists($noteObj, 'color')) {
            return null;
        }

        return $noteObj->color;
    }
private function getColor ( array $ notes , $ noteIndex ) { if ( ! is_integer ( $ noteIndex ) || ! array_key_exists ( $ noteIndex , $ notes ) ) { return null ; } $ noteObj = $ notes [ $ noteIndex ] ; if ( ! is_object ( $ noteObj ) || ! property_exists ( $ noteObj , 'color' ) ) { return null ; } return $ noteObj -> color ; }
Retrieves color for note index

@param array $notes
@param Integer $noteIndex

@return string | Null
Retrieves color for note index