private function isPublic($object, string $propertyName): bool
    {
        $objectArray = (array) $object;

        return array_key_exists($propertyName, $objectArray);
    }
private function isPublic($object, string $propertyName): bool
    {
        $objectArray = (array) $object;

        return array_key_exists($propertyName, $objectArray);
    }
private function isPublic ( $ object , string $ propertyName ) : bool { $ objectArray = ( array ) $ object ; return array_key_exists ( $ propertyName , $ objectArray ) ; }
Checks if the given property is public.

@param $object
@param string $propertyName
@return bool
Checks if the given property is public .