1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Coding standards

This commit is contained in:
Asmir Mustafic 2011-10-24 12:00:11 +02:00
parent 5f80b57554
commit 7efd615b8c

View file

@ -634,8 +634,8 @@ public function <methodName>()
foreach ($metadata->associationMappings as $associationMapping) { foreach ($metadata->associationMappings as $associationMapping) {
if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) { if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
$nullable = $this->_isAssociationIsNullable($associationMapping); $nullable = $this->_isAssociationIsNullable($associationMapping) ? 'null' : null;
if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'], ($nullable ? 'null' : null))) { if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'], $nullable)) {
$methods[] = $code; $methods[] = $code;
} }
if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], $associationMapping['targetEntity'])) { if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
@ -754,7 +754,7 @@ public function <methodName>()
'<variableName>' => Inflector::camelize($fieldName), '<variableName>' => Inflector::camelize($fieldName),
'<methodName>' => $methodName, '<methodName>' => $methodName,
'<fieldName>' => $fieldName, '<fieldName>' => $fieldName,
'<variableDefault>' => (($defaultValue !== null ) ? ('='.$defaultValue) : ''), '<variableDefault>' => ($defaultValue !== null ) ? ('='.$defaultValue) : '',
'<entity>' => $this->_getClassName($metadata) '<entity>' => $this->_getClassName($metadata)
); );