original_string: private function isPropertyWritable($object, string $property): bool
      {
          if (!\is_object($object)) {
              return false;
          }
  
          $access = $this->getWriteAccessInfo(\get_class($object), $property, []);
  
          $isWritable = self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE]
              || (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property))
              || self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE];
  
          if ($isWritable) {
              return true;
          }
  
          $access = $this->getWriteAccessInfo(\get_class($object), $property, '');
  
          return self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE]
              || (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property))
              || self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE];
      }
code: private function isPropertyWritable($object, string $property): bool
      {
          if (!\is_object($object)) {
              return false;
          }
  
          $access = $this->getWriteAccessInfo(\get_class($object), $property, []);
  
          $isWritable = self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE]
              || (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property))
              || self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE];
  
          if ($isWritable) {
              return true;
          }
  
          $access = $this->getWriteAccessInfo(\get_class($object), $property, '');
  
          return self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]
              || self::ACCESS_TYPE_ADDER_AND_REMOVER === $access[self::ACCESS_TYPE]
              || (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property))
              || self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE];
      }
code_tokens: private function isPropertyWritable ( $ object , string $ property ) : bool { if ( ! \ is_object ( $ object ) ) { return false ; } $ access = $ this -> getWriteAccessInfo ( \ get_class ( $ object ) , $ property , [ ] ) ; $ isWritable = self :: ACCESS_TYPE_METHOD === $ access [ self :: ACCESS_TYPE ] || self :: ACCESS_TYPE_PROPERTY === $ access [ self :: ACCESS_TYPE ] || self :: ACCESS_TYPE_ADDER_AND_REMOVER === $ access [ self :: ACCESS_TYPE ] || ( ! $ access [ self :: ACCESS_HAS_PROPERTY ] && property_exists ( $ object , $ property ) ) || self :: ACCESS_TYPE_MAGIC === $ access [ self :: ACCESS_TYPE ] ; if ( $ isWritable ) { return true ; } $ access = $ this -> getWriteAccessInfo ( \ get_class ( $ object ) , $ property , '' ) ; return self :: ACCESS_TYPE_METHOD === $ access [ self :: ACCESS_TYPE ] || self :: ACCESS_TYPE_PROPERTY === $ access [ self :: ACCESS_TYPE ] || self :: ACCESS_TYPE_ADDER_AND_REMOVER === $ access [ self :: ACCESS_TYPE ] || ( ! $ access [ self :: ACCESS_HAS_PROPERTY ] && property_exists ( $ object , $ property ) ) || self :: ACCESS_TYPE_MAGIC === $ access [ self :: ACCESS_TYPE ] ; }
docstring: Returns whether a property is writable in the given object.
  
  @param object $object The object to write to
docstring_tokens: Returns whether a property is writable in the given object .